/* Generated by Cython 0.29.32 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "NDEBUG",
                null
            ],
            [
                "_LARGEFILE_SOURCE",
                null
            ],
            [
                "_CONSOLE",
                null
            ],
            [
                "_FILE_OFFSET_BITS",
                64
            ],
            [
                "SAPonUNIX",
                null
            ],
            [
                "SAPwithUNICODE",
                null
            ],
            [
                "SAPwithTHREADS",
                null
            ],
            [
                "SAPonDARW",
                null
            ],
            [
                "char16_t",
                "uint16_t"
            ]
        ],
        "depends": [],
        "extra_compile_args": [
            "-Wall",
            "-O2",
            "-fexceptions",
            "-funsigned-char",
            "-fno-strict-aliasing",
            "-Wno-uninitialized",
            "-Wcast-align",
            "-fPIC",
            "-pthread",
            "-minline-all-stringops",
            "-isystem",
            "-std=c++11",
            "-mmacosx-version-min=10.15",
            "-I/usr/local/sap/nwrfcsdk/include",
            "-Wno-cast-align",
            "-Wno-deprecated-declarations",
            "-Wno-unused-function",
            "-Wno-nullability-completeness",
            "-Wno-expansion-to-defined",
            "-Wno-unreachable-code-fallthrough"
        ],
        "extra_link_args": [
            "-L/usr/local/sap/nwrfcsdk/lib",
            "-stdlib=libc++",
            "-mmacosx-version-min=10.15",
            "-Wl,-rpath,/usr/local/sap/nwrfcsdk/lib"
        ],
        "language": "c++",
        "libraries": [
            "sapnwrfc",
            "sapucum"
        ],
        "name": "pyrfc.pyrfc",
        "sources": [
            "src/pyrfc/_pyrfc.pyx"
        ]
    },
    "module_name": "pyrfc.pyrfc"
}
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_32"
#define CYTHON_HEX_VERSION 0x001D20F0
#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
  #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 (PYPY_VERSION_HEX >= 0x07030900)
  #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 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || 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)
  #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;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_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
#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 defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #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 defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #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
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __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__pyrfc
#define __PYX_HAVE_API__pyrfc__pyrfc
/* Early includes */
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include "pythread.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/_pyrfc.pyx",
  "stringsource",
  "array.pxd",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
};
/* 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 ---*/
#ifndef _ARRAYARRAY_H
struct arrayobject;
typedef struct arrayobject arrayobject;
#endif
struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters;
struct __pyx_obj_5pyrfc_5pyrfc_Connection;
struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection;
struct __pyx_obj_5pyrfc_5pyrfc_Server;
struct __pyx_obj_5pyrfc_5pyrfc_Throughput;
struct __pyx_opt_args_5pyrfc_5pyrfc_wrapString;

/* "src/pyrfc/_pyrfc.pyx":2354
 *         wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4))
 * 
 * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */
struct __pyx_opt_args_5pyrfc_5pyrfc_wrapString {
  int __pyx_n;
  PyObject *uclen;
  PyObject *rstrip;
};

/* "src/pyrfc/_pyrfc.pyx":141
 * ################################################################################
 * 
 * cdef class ConnectionParameters:             # <<<<<<<<<<<<<<
 *     cdef unsigned _params_count
 *     cdef RFC_CONNECTION_PARAMETER *_params
 */
struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters {
  PyObject_HEAD
  unsigned int _params_count;
  RFC_CONNECTION_PARAMETER *_params;
};


/* "src/pyrfc/_pyrfc.pyx":171
 * ################################################################################
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 *     """ A connection to an SAP backend system
 * 
 */
struct __pyx_obj_5pyrfc_5pyrfc_Connection {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_5pyrfc_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_5pyrfc_ConnectionParameters *_connection;
};


/* "src/pyrfc/_pyrfc.pyx":1246
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 * 
 * cdef class ServerConnection:             # <<<<<<<<<<<<<<
 *     cdef ConnectionParameters _connection
 *     cdef RFC_SERVER_HANDLE _handle
 */
struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection *__pyx_vtab;
  struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *_connection;
  RFC_SERVER_HANDLE _handle;
  int debug;
  int rstrip;
};


/* "src/pyrfc/_pyrfc.pyx":1424
 * 
 * 
 * cdef class Server:             # <<<<<<<<<<<<<<
 *     """ An SAP server
 * 
 */
struct __pyx_obj_5pyrfc_5pyrfc_Server {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_5pyrfc_Server *__pyx_vtab;
  int debug;
  int rstrip;
  struct __pyx_obj_5pyrfc_5pyrfc_Connection *_client_connection;
  struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *_server_connection;
};


/* "src/pyrfc/_pyrfc.pyx":2406
 * ################################################################################
 * 
 * cdef class Throughput:             # <<<<<<<<<<<<<<
 *     _registry = []
 * 
 */
struct __pyx_obj_5pyrfc_5pyrfc_Throughput {
  PyObject_HEAD
  struct __pyx_vtabstruct_5pyrfc_5pyrfc_Throughput *__pyx_vtab;
  RFC_THROUGHPUT_HANDLE _throughput_handle;
  PyObject *_connections;
};



/* "src/pyrfc/_pyrfc.pyx":171
 * ################################################################################
 * 
 * cdef class Connection:             # <<<<<<<<<<<<<<
 *     """ A connection to an SAP backend system
 * 
 */

struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection {
  PyObject *(*_reopen)(struct __pyx_obj_5pyrfc_5pyrfc_Connection *);
  PyObject *(*_open)(struct __pyx_obj_5pyrfc_5pyrfc_Connection *);
  PyObject *(*_error)(struct __pyx_obj_5pyrfc_5pyrfc_Connection *, RFC_ERROR_INFO *);
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *__pyx_vtabptr_5pyrfc_5pyrfc_Connection;


/* "src/pyrfc/_pyrfc.pyx":1246
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 * 
 * cdef class ServerConnection:             # <<<<<<<<<<<<<<
 *     cdef ConnectionParameters _connection
 *     cdef RFC_SERVER_HANDLE _handle
 */

struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection {
  PyObject *(*_open)(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *);
  PyObject *(*_close)(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *);
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection *__pyx_vtabptr_5pyrfc_5pyrfc_ServerConnection;


/* "src/pyrfc/_pyrfc.pyx":1424
 * 
 * 
 * cdef class Server:             # <<<<<<<<<<<<<<
 *     """ An SAP server
 * 
 */

struct __pyx_vtabstruct_5pyrfc_5pyrfc_Server {
  PyObject *(*_error)(struct __pyx_obj_5pyrfc_5pyrfc_Server *, RFC_ERROR_INFO *);
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_Server *__pyx_vtabptr_5pyrfc_5pyrfc_Server;


/* "src/pyrfc/_pyrfc.pyx":2406
 * ################################################################################
 * 
 * cdef class Throughput:             # <<<<<<<<<<<<<<
 *     _registry = []
 * 
 */

struct __pyx_vtabstruct_5pyrfc_5pyrfc_Throughput {
  PyObject *(*_destroy)(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *);
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_Throughput *__pyx_vtabptr_5pyrfc_5pyrfc_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)  {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
#define __Pyx_GetModuleGlobalNameUncached(var, name)  {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
}
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* 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_RFC_INT(RFC_INT value);

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

/* 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_RFC_UNIT_STATE(RFC_UNIT_STATE value);

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

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

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

/* 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_INT2(RFC_INT2 value);

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

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

/* 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_5pyrfc_10Connection__reopen(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_10Connection__open(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_10Connection__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo); /* proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_16ServerConnection__open(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_16ServerConnection__close(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_6Server__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo); /* proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_10Throughput__destroy(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto*/

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

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

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

/* Module declarations from 'cpython.version' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

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

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

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

/* Module declarations from 'cpython.exc' */

/* Module declarations from 'cpython.module' */

/* Module declarations from 'cpython.mem' */

/* Module declarations from 'cpython.tuple' */

/* Module declarations from 'cpython.list' */

/* Module declarations from 'cpython.sequence' */

/* Module declarations from 'cpython.mapping' */

/* Module declarations from 'cpython.iterator' */

/* Module declarations from 'cpython.number' */

/* Module declarations from 'cpython.int' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.bool' */
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;

/* Module declarations from 'cpython.long' */

/* Module declarations from 'cpython.float' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.complex' */
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;

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

/* Module declarations from 'cpython.unicode' */

/* Module declarations from 'cpython.dict' */

/* Module declarations from 'cpython.instance' */

/* Module declarations from 'cpython.function' */

/* Module declarations from 'cpython.method' */

/* Module declarations from 'cpython.weakref' */

/* Module declarations from 'cpython.getargs' */

/* Module declarations from 'cpython.pythread' */

/* Module declarations from 'cpython.pystate' */

/* Module declarations from 'cpython.cobject' */

/* Module declarations from 'cpython.oldbuffer' */

/* Module declarations from 'cpython.set' */

/* Module declarations from 'cpython.buffer' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cpython.pycapsule' */

/* Module declarations from 'cpython' */

/* Module declarations from 'array' */

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

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

/* Module declarations from 'pyrfc.pyrfc' */
static PyTypeObject *__pyx_ptype_5pyrfc_5pyrfc_ConnectionParameters = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_5pyrfc_Connection = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_5pyrfc_ServerConnection = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_5pyrfc_Server = 0;
static PyTypeObject *__pyx_ptype_5pyrfc_5pyrfc_Throughput = 0;
static RFC_RC __pyx_f_5pyrfc_5pyrfc_metadataLookup(SAP_UC const *, RFC_ATTRIBUTES, RFC_FUNCTION_DESC_HANDLE *); /*proto*/
static RFC_RC __pyx_f_5pyrfc_5pyrfc_genericHandler(RFC_CONNECTION_HANDLE, RFC_FUNCTION_HANDLE, RFC_ERROR_INFO *); /*proto*/
static RFC_TYPE_DESC_HANDLE __pyx_f_5pyrfc_5pyrfc_fillTypeDescription(PyObject *); /*proto*/
static RFC_UNIT_IDENTIFIER __pyx_f_5pyrfc_5pyrfc_fillUnitIdentifier(PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE, RFC_FUNCTION_HANDLE, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_fillStructureField(RFC_TYPE_DESC_HANDLE, RFC_STRUCTURE_HANDLE, PyObject *, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_fillTable(RFC_TYPE_DESC_HANDLE, RFC_TABLE_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_fillVariable(RFCTYPE, RFC_FUNCTION_HANDLE, SAP_UC *, PyObject *, RFC_TYPE_DESC_HANDLE); /*proto*/
static SAP_RAW *__pyx_f_5pyrfc_5pyrfc_fillBytes(PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_fillError(PyObject *, RFC_ERROR_INFO *); /*proto*/
static SAP_UC *__pyx_f_5pyrfc_5pyrfc_fillString(PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapConnectionAttributes(RFC_ATTRIBUTES); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapTypeDescription(RFC_TYPE_DESC_HANDLE); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapResult(RFC_FUNCTION_DESC_HANDLE, RFC_FUNCTION_HANDLE, RFC_DIRECTION, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapUnitIdentifier(RFC_UNIT_IDENTIFIER); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapStructure(RFC_TYPE_DESC_HANDLE, RFC_STRUCTURE_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapTable(RFC_TYPE_DESC_HANDLE, RFC_TABLE_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapVariable(RFCTYPE, RFC_FUNCTION_HANDLE, SAP_UC *, unsigned int, RFC_TYPE_DESC_HANDLE, PyObject *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapError(RFC_ERROR_INFO *); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapString(SAP_UC const *, struct __pyx_opt_args_5pyrfc_5pyrfc_wrapString *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_5pyrfc_5pyrfc___pyx_unpickle_Server__set_state(struct __pyx_obj_5pyrfc_5pyrfc_Server *, PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "pyrfc.pyrfc"
extern int __pyx_module_is_main_pyrfc__pyrfc;
int __pyx_module_is_main_pyrfc__pyrfc = 0;

/* Implementation of 'pyrfc.pyrfc' */
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 PyObject *__pyx_builtin_KeyboardInterrupt;
static PyObject *__pyx_builtin_MemoryError;
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_id[] = "id";
static const char __pyx_k_rc[] = "rc";
static const char __pyx_k_UTC[] = " UTC] ";
static const char __pyx_k__19[] = ", ";
static const char __pyx_k__20[] = "]";
static const char __pyx_k__21[] = "";
static const char __pyx_k__25[] = "'";
static const char __pyx_k__26[] = "[";
static const char __pyx_k__27[] = " '";
static const char __pyx_k__30[] = "'.";
static const char __pyx_k__31[] = ".";
static const char __pyx_k__50[] = "\000";
static const char __pyx_k__57[] = "*";
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_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_rel[] = "rel";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_args[] = "args";
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_dict[] = "__dict__";
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_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_year[] = "year";
static const char __pyx_k_H_M_S[] = "%H%M%S";
static const char __pyx_k_UTF_8[] = "UTF-8";
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_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_dumps[] = "dumps";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_loads[] = "loads";
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_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_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_wfile[] = "wfile";
static const char __pyx_k_write[] = "write";
static const char __pyx_k_Server[] = "Server";
static const char __pyx_k_Thread[] = "Thread";
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_config[] = "config";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_do_GET[] = "do_GET";
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_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_objstr[] = "objstr";
static const char __pyx_k_origin[] = "origin";
static const char __pyx_k_pickle[] = "pickle";
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_rstrip[] = "rstrip";
static const char __pyx_k_second[] = "second";
static const char __pyx_k_server[] = "server";
static const char __pyx_k_t_code[] = "t_code";
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_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_replace[] = "replace";
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_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_getstate[] = "__getstate__";
static const char __pyx_k_handle_2[] = "_handle";
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_pyx_type[] = "__pyx_type";
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_setstate[] = "__setstate__";
static const char __pyx_k_strptime[] = "strptime";
static const char __pyx_k_type2rfc[] = "_type2rfc";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_add_field[] = "add_field";
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_partnerIP[] = "partnerIP";
static const char __pyx_k_path_name[] = "path_name";
static const char __pyx_k_pyx_state[] = "__pyx_state";
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_text_html[] = "text/html";
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_HTTPServer[] = "HTTPServer";
static const char __pyx_k_LogonError[] = "LogonError";
static const char __pyx_k_MASK_DTIME[] = "_MASK_DTIME";
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_field_type[] = "field_type";
static const char __pyx_k_localeconv[] = "localeconv";
static const char __pyx_k_msg_number[] = "msg_number";
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_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_queue_name[] = "queue_name";
static const char __pyx_k_serve_http[] = "_serve_http";
static const char __pyx_k_server_log[] = "_server_log";
static const char __pyx_k_throughput[] = "throughput";
static const char __pyx_k_02d_02d_02d[] = "{:02d}{:02d}{:02d}";
static const char __pyx_k_04d_02d_02d[] = "{:04d}{:02d}{:02d}";
static const char __pyx_k_BasicServer[] = "BasicServer";
static const char __pyx_k_HTTP_Server[] = "HTTP Server";
static const char __pyx_k_MASK_RSTRIP[] = "_MASK_RSTRIP";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_PickleError[] = "PickleError";
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_active_unit[] = "active_unit";
static const char __pyx_k_collections[] = "collections";
static const char __pyx_k_connections[] = "connections";
static const char __pyx_k_end_headers[] = "end_headers";
static const char __pyx_k_get_unit_id[] = "_get_unit_id";
static const char __pyx_k_http_server[] = "http.server";
static const char __pyx_k_isoLanguage[] = "isoLanguage";
static const char __pyx_k_log_message[] = "log_message";
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_pyrfc_pyrfc[] = "pyrfc.pyrfc";
static const char __pyx_k_queue_names[] = "queue_names";
static const char __pyx_k_send_header[] = "send_header";
static const char __pyx_k_Content_type[] = "Content-type";
static const char __pyx_k_RFCTYPE_BYTE[] = "RFCTYPE_BYTE";
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_TIME[] = "RFCTYPE_TIME";
static const char __pyx_k_RFC_CHANGING[] = "RFC_CHANGING";
static const char __pyx_k_Server_close[] = "Server close";
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_py_to_string[] = "py_to_string";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_sapnwrfc_ini[] = "sapnwrfc.ini";
static const char __pyx_k_server_class[] = "server_class";
static const char __pyx_k_server_close[] = "server_close";
static const char __pyx_k_server_log_2[] = "server_log";
static const char __pyx_k_set_response[] = "_set_response";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_string_to_py[] = "string_to_py";
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_FLOAT[] = "RFCTYPE_FLOAT";
static const char __pyx_k_RFCTYPE_TABLE[] = "RFCTYPE_TABLE";
static const char __pyx_k_add_parameter[] = "add_parameter";
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_direction2rfc[] = "_direction2rfc";
static const char __pyx_k_function_name[] = "function_name";
static const char __pyx_k_handler_class[] = "handler_class";
static const char __pyx_k_not_requested[] = "not_requested";
static const char __pyx_k_numberOfCalls[] = "numberOfCalls";
static const char __pyx_k_receivedBytes[] = "receivedBytes";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_send_response[] = "send_response";
static const char __pyx_k_serve_forever[] = "serve_forever";
static const char __pyx_k_server_params[] = "server_params";
static const char __pyx_k_when_wrapping[] = " when wrapping ";
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_UTCLONG[] = "RFCTYPE_UTCLONG";
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_collections_abc[] = "collections.abc";
static const char __pyx_k_no_commit_check[] = "no_commit_check";
static const char __pyx_k_partnerCodepage[] = "partnerCodepage";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
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_ABAPRuntimeError[] = "ABAPRuntimeError";
static const char __pyx_k_HIGHEST_PROTOCOL[] = "HIGHEST_PROTOCOL";
static const char __pyx_k_ServerConnection[] = "ServerConnection";
static const char __pyx_k_Unknown_RFC_type[] = "Unknown RFC type ";
static const char __pyx_k_func_desc_handle[] = "func_desc_handle";
static const char __pyx_k_server_functions[] = "server_functions";
static const char __pyx_k_type_description[] = "type_description";
static const char __pyx_k_KeyboardInterrupt[] = "KeyboardInterrupt";
static const char __pyx_k_RFCTYPE_STRUCTURE[] = "RFCTYPE_STRUCTURE";
static const char __pyx_k_Server_connection[] = "Server connection";
static const char __pyx_k_already_installed[] = "' already installed.";
static const char __pyx_k_getFromConnection[] = "getFromConnection";
static const char __pyx_k_serializationTime[] = "serializationTime";
static const char __pyx_k_BasicServer_do_GET[] = "BasicServer.do_GET";
static const char __pyx_k_CommunicationError[] = "CommunicationError";
static const char __pyx_k_RFC_UNIT_COMMITTED[] = "RFC_UNIT_COMMITTED";
static const char __pyx_k_RFC_UNIT_CONFIRMED[] = "RFC_UNIT_CONFIRMED";
static const char __pyx_k_RFC_UNIT_NOT_FOUND[] = "RFC_UNIT_NOT_FOUND";
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_Press_CTRL_C_to_end[] = "Press CTRL-C to end";
static const char __pyx_k_RFC_UNIT_IN_PROCESS[] = "RFC_UNIT_IN_PROCESS";
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_partnerBytesPerChar[] = "partnerBytesPerChar";
static const char __pyx_k_pyx_unpickle_Server[] = "__pyx_unpickle_Server";
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_UNIT_ROLLED_BACK[] = "RFC_UNIT_ROLLED_BACK";
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__pyrfc_pyx[] = "src/pyrfc/_pyrfc.pyx";
static const char __pyx_k_connection_attributes[] = "connection_attributes";
static const char __pyx_k_partnerSystemCodepage[] = "partnerSystemCodepage";
static const char __pyx_k_BaseHTTPRequestHandler[] = "BaseHTTPRequestHandler";
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_set_ini_file_directory[] = "set_ini_file_directory";
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_Crypto_library_not_found[] = "Crypto library not found:";
static const char __pyx_k_ExternalApplicationError[] = "ExternalApplicationError";
static const char __pyx_k_BasicServer__set_response[] = "BasicServer._set_response";
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_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_direction_string_must_be_in[] = "'direction' (string) must be in [";
static const char __pyx_k_started_press_CTRC_C_to_end[] = "started, press CTRC-C to end ...";
static const char __pyx_k_an_integer_required_received[] = "an integer required, received";
static const char __pyx_k_date_value_required_received[] = "date value required, received";
static const char __pyx_k_field_type_string_must_be_in[] = "'field_type' (string) must be in [";
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_No_metadata_found_for_function[] = "No metadata found for function '";
static const char __pyx_k_an_string_is_required_received[] = "an string is required, received";
static const char __pyx_k_parameter_text_string_must_not[] = "'parameter_text' (string) must not exceed 79 chars.";
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_FunctionDescription_with_params[] = "<FunctionDescription '{}' with {} params>";
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_TypeDescription_with_fields_n_u[] = "<TypeDescription '{}' with {} fields (n/uclength={}/{})>";
static const char __pyx_k_default_value_string_must_not_e[] = "'default_value' (string) must not exceed 30 chars.";
static const char __pyx_k_name_string_should_be_from_1_30[] = "'name' (string) should be from 1-30 chars.";
static const char __pyx_k_parameter_type_string_must_be_i[] = "'parameter_type' (string) must be in [";
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_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_Connection_object_required_recei[] = "Connection object required, received";
static const char __pyx_k_FunctionDescription_add_paramete[] = "FunctionDescription.add_parameter";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))";
static const char __pyx_k_Invalid_exception_raised_by_call[] = "Invalid exception raised by callback function: rc";
static const char __pyx_k_Invalid_length_of_unit_id_should[] = "Invalid length of unit['id'] (should be {}, but found {}).";
static const char __pyx_k_Length_of_parameter_unit_id_must[] = "Length of parameter 'unit['id']' must be {} chars.";
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_Remote_function_module_s_invocat[] = "Remote function module %s invocation rejected because the connection is closed";
static const char __pyx_k_Request_for_func_name_Error_whil[] = "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).";
static const char __pyx_k_Request_for_raises_ABAPApplicati[] = "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.";
static const char __pyx_k_Request_for_raises_ABAPRuntimeEr[] = "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.";
static const char __pyx_k_Request_for_raises_ExternalRunti[] = "Request for '{}' raises ExternalRuntimeError {} - code set to RFC_EXTERNAL_FAILURE.";
static const char __pyx_k_Request_for_raises_an_invalid_ex[] = "Request for '{}' raises an invalid exception:\n Exception: {}\n Values: {}\nCallback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\nThe values of the request were:\nparams: {}\nrequest_context: {}";
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_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__params_cannot_be_converted[] = "self._params 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 const char __pyx_k_Invalid_exception_raised_by_call_2[] = "Invalid exception raised by callback function.";
static PyObject *__pyx_kp_u_00000000;
static PyObject *__pyx_kp_u_02d_02d_02d;
static PyObject *__pyx_kp_u_04d_02d_02d;
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_n_s_BaseHTTPRequestHandler;
static PyObject *__pyx_n_s_BasicServer;
static PyObject *__pyx_n_s_BasicServer__set_response;
static PyObject *__pyx_n_s_BasicServer_do_GET;
static PyObject *__pyx_n_s_CommunicationError;
static PyObject *__pyx_n_s_Connection;
static PyObject *__pyx_n_s_ConnectionParameters;
static PyObject *__pyx_kp_u_Connection_object_required_recei;
static PyObject *__pyx_kp_u_Connection_parameters_missing;
static PyObject *__pyx_kp_u_Content_type;
static PyObject *__pyx_kp_u_Crypto_library_not_found;
static PyObject *__pyx_n_s_Decimal;
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_n_s_FunctionDescription;
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_FunctionDescription_with_params;
static PyObject *__pyx_n_s_HIGHEST_PROTOCOL;
static PyObject *__pyx_n_s_HTTPServer;
static PyObject *__pyx_kp_u_HTTP_Server;
static PyObject *__pyx_kp_u_H_M_S;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_kp_u_Invalid_connection_handle;
static PyObject *__pyx_kp_u_Invalid_exception_raised_by_call;
static PyObject *__pyx_kp_u_Invalid_exception_raised_by_call_2;
static PyObject *__pyx_kp_u_Invalid_length_of_unit_id_should;
static PyObject *__pyx_n_s_Iterable;
static PyObject *__pyx_n_s_KeyboardInterrupt;
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_n_s_MemoryError;
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_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_PickleError;
static PyObject *__pyx_kp_b_Press_CTRL_C_to_end;
static PyObject *__pyx_n_u_Q;
static PyObject *__pyx_n_s_RFCError;
static PyObject *__pyx_n_u_RFCTYPE_BCD;
static PyObject *__pyx_n_u_RFCTYPE_BYTE;
static PyObject *__pyx_n_u_RFCTYPE_CHAR;
static PyObject *__pyx_n_u_RFCTYPE_DATE;
static PyObject *__pyx_n_u_RFCTYPE_FLOAT;
static PyObject *__pyx_n_u_RFCTYPE_INT;
static PyObject *__pyx_n_u_RFCTYPE_INT1;
static PyObject *__pyx_n_u_RFCTYPE_INT2;
static PyObject *__pyx_n_u_RFCTYPE_INT8;
static PyObject *__pyx_n_u_RFCTYPE_NUM;
static PyObject *__pyx_n_u_RFCTYPE_STRING;
static PyObject *__pyx_n_u_RFCTYPE_STRUCTURE;
static PyObject *__pyx_n_u_RFCTYPE_TABLE;
static PyObject *__pyx_n_u_RFCTYPE_TIME;
static PyObject *__pyx_n_u_RFCTYPE_UTCLONG;
static PyObject *__pyx_n_u_RFCTYPE_XSTRING;
static PyObject *__pyx_n_u_RFC_CHANGING;
static PyObject *__pyx_n_u_RFC_EXPORT;
static PyObject *__pyx_n_u_RFC_IMPORT;
static PyObject *__pyx_n_u_RFC_TABLES;
static PyObject *__pyx_n_u_RFC_UNIT_COMMITTED;
static PyObject *__pyx_n_u_RFC_UNIT_CONFIRMED;
static PyObject *__pyx_n_u_RFC_UNIT_IN_PROCESS;
static PyObject *__pyx_n_u_RFC_UNIT_NOT_FOUND;
static PyObject *__pyx_n_u_RFC_UNIT_ROLLED_BACK;
static PyObject *__pyx_kp_u_Remote_function_module_name_must;
static PyObject *__pyx_kp_u_Remote_function_module_s_invocat;
static PyObject *__pyx_kp_u_Request_for_func_name_Error_whil;
static PyObject *__pyx_kp_u_Request_for_raises_ABAPApplicati;
static PyObject *__pyx_kp_u_Request_for_raises_ABAPRuntimeEr;
static PyObject *__pyx_kp_u_Request_for_raises_ExternalRunti;
static PyObject *__pyx_kp_u_Request_for_raises_an_invalid_ex;
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_There_is_an_active_unit_for_this;
static PyObject *__pyx_n_s_Thread;
static PyObject *__pyx_n_s_Throughput;
static PyObject *__pyx_n_s_TypeDescription;
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_kp_u_TypeDescription_with_fields_n_u;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_kp_u_UTC;
static PyObject *__pyx_kp_u_UTF_8;
static PyObject *__pyx_kp_u_Unknown_RFC_type;
static PyObject *__pyx_kp_u_User_user_from_system_sysId_clie;
static PyObject *__pyx_kp_u_Y_m_d;
static PyObject *__pyx_kp_u__19;
static PyObject *__pyx_kp_u__20;
static PyObject *__pyx_kp_u__21;
static PyObject *__pyx_kp_u__25;
static PyObject *__pyx_kp_u__26;
static PyObject *__pyx_kp_u__27;
static PyObject *__pyx_kp_u__30;
static PyObject *__pyx_kp_u__31;
static PyObject *__pyx_kp_u__50;
static PyObject *__pyx_n_s__57;
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_background;
static PyObject *__pyx_n_u_background;
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_clear;
static PyObject *__pyx_n_u_client;
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_n_u_codepage;
static PyObject *__pyx_n_s_collections;
static PyObject *__pyx_n_s_collections_abc;
static PyObject *__pyx_n_s_config;
static PyObject *__pyx_n_s_confirm_transaction;
static PyObject *__pyx_n_s_confirm_unit;
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_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_must_not_e;
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_n_s_dict;
static PyObject *__pyx_kp_u_dictionary_required_for_structur;
static PyObject *__pyx_n_s_direction;
static PyObject *__pyx_n_u_direction;
static PyObject *__pyx_n_s_direction2rfc;
static PyObject *__pyx_kp_u_direction_string_must_be_in;
static PyObject *__pyx_n_s_do_GET;
static PyObject *__pyx_n_s_doc;
static PyObject *__pyx_n_u_dtime;
static PyObject *__pyx_n_s_dumps;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end_headers;
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_field_type;
static PyObject *__pyx_n_u_field_type;
static PyObject *__pyx_kp_u_field_type_string_must_be_in;
static PyObject *__pyx_n_s_fields;
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_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_getstate;
static PyObject *__pyx_kp_u_handle;
static PyObject *__pyx_n_s_handle_2;
static PyObject *__pyx_n_s_handler_class;
static PyObject *__pyx_n_u_host;
static PyObject *__pyx_n_s_hour;
static PyObject *__pyx_n_s_http_server;
static PyObject *__pyx_n_u_id;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_int_field;
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_u_language;
static PyObject *__pyx_n_u_launched;
static PyObject *__pyx_kp_u_list_required_for_table_paramete;
static PyObject *__pyx_n_s_loads;
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_must_be_of_type_integer;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_u_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_kp_u_name_string_should_be_from_1_30;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_n_u_no_commit_check;
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_obj;
static PyObject *__pyx_n_s_object;
static PyObject *__pyx_n_s_objstr;
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_must_not;
static PyObject *__pyx_n_s_parameter_type;
static PyObject *__pyx_n_u_parameter_type;
static PyObject *__pyx_kp_u_parameter_type_string_must_be_i;
static PyObject *__pyx_n_s_parameters;
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_s_pickle;
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_s_py_to_string;
static PyObject *__pyx_n_s_pyrfc_pyrfc;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_Server;
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_u_queued;
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_s_registry;
static PyObject *__pyx_n_u_rel;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_replace;
static PyObject *__pyx_n_s_repr;
static PyObject *__pyx_n_s_request_context;
static PyObject *__pyx_n_u_reserved;
static PyObject *__pyx_n_u_return_import_params;
static PyObject *__pyx_n_u_rfcRole;
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__params_cannot_be_converted;
static PyObject *__pyx_kp_s_self__throughput_handle_cannot_b;
static PyObject *__pyx_n_s_send_header;
static PyObject *__pyx_n_s_send_response;
static PyObject *__pyx_n_u_sentBytes;
static PyObject *__pyx_n_u_serializationTime;
static PyObject *__pyx_n_s_serve_forever;
static PyObject *__pyx_n_s_serve_http;
static PyObject *__pyx_n_u_server;
static PyObject *__pyx_n_s_server_class;
static PyObject *__pyx_n_s_server_close;
static PyObject *__pyx_n_s_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_response;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_kp_s_src_pyrfc__pyrfc_pyx;
static PyObject *__pyx_kp_u_started_press_CTRC_C_to_end;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_string_to_py;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_strptime;
static PyObject *__pyx_n_s_sys;
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_test;
static PyObject *__pyx_kp_u_text_html;
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_s_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_type;
static PyObject *__pyx_n_u_type;
static PyObject *__pyx_n_s_type2rfc;
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_unit;
static PyObject *__pyx_n_u_unit_history;
static PyObject *__pyx_n_s_unit_id;
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_kp_u_utf_8;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_wfile;
static PyObject *__pyx_kp_u_when_filling;
static PyObject *__pyx_kp_u_when_wrapping;
static PyObject *__pyx_kp_u_wrapString_uclen_u_utf8_size_u;
static PyObject *__pyx_n_s_write;
static PyObject *__pyx_n_s_year;
static PyObject *__pyx_pf_5pyrfc_5pyrfc_py_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_2string_to_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objstr); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_4get_nwrfclib_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6set_ini_file_directory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_8set_cryptolib_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters___init__(struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_2__del__(struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_4_free(struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_7version___get__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_7options___get__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_6handle___get__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_5alive___get__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_10Connection___init__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_2free(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_4__del__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_6__enter__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_8__exit__(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_10open(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_12reopen(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_14close(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_16cancel(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_10Connection_18__bool__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_20_close(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_22_cancel(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_24ping(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_26reset_server_context(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_28get_connection_attributes(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_30get_function_description(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_32call(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_options, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_34type_desc_get(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_type_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_36type_desc_remove(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_type_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_38func_desc_remove(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_func_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_40_get_transaction_id(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_42_create_and_submit_transaction(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_transaction_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_44_destroy_transaction(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_46_confirm_transaction(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_48_get_unit_id(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_50_create_and_submit_unit(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_52_get_unit_state(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_54_destroy_unit(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_56_confirm_unit(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_58initialize_unit(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_background); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_60fill_and_submit_unit(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_62get_unit_state(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_64destroy_unit(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_66confirm_unit(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_8__config___get__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_10Connection_8__config_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_10Connection_8__config_4__del__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_68__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_70__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_15TypeDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_19FunctionDescription___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_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_5pyrfc_19FunctionDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10default_auth_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_request_context); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_12_server_log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_log_message); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection___init__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_params); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_2open(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_4close(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6__bool__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6handle___get__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5alive___get__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_8__del__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5debug___get__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5debug_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6rstrip___get__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6rstrip_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_11BasicServer__set_response(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_11BasicServer_2do_GET(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_6Server___init__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v_server_params, PyObject *__pyx_v_client_params, PyObject *__pyx_v_config); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_2add_function(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_4_serve_http(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v_server_class, PyObject *__pyx_v_handler_class); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_6serve(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_timeout); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_8close(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_10_close(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_5debug___get__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_6Server_5debug_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_6rstrip___get__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_6Server_6rstrip_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_12__reduce_cython__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_14__setstate_cython__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_5pyrfc_5pyrfc_10Throughput___init__(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self, PyObject *__pyx_v_connections); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_11connections___get__(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_7_handle___get__(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_2setOnConnection(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_4getFromConnection(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_6removeFromConnection(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_connection); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_8reset(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_10__del__(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_12__exit__(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_14__enter__(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_5stats___get__(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_5pyrfc_5pyrfc_14__pyx_unpickle_Server(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_ConnectionParameters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_Connection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_ServerConnection(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_Server(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_Throughput(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_200;
static PyObject *__pyx_int_512;
static PyObject *__pyx_int_8080;
static PyObject *__pyx_int_10964172;
static PyObject *__pyx_int_49244456;
static PyObject *__pyx_int_202447126;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k__3;
static PyObject *__pyx_k__7;
static PyObject *__pyx_k__24;
static PyObject *__pyx_k__34;
static PyObject *__pyx_k__38;
static PyObject *__pyx_k__39;
static PyObject *__pyx_k__53;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_slice__8;
static PyObject *__pyx_slice__9;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_slice__10;
static PyObject *__pyx_slice__11;
static PyObject *__pyx_slice__32;
static PyObject *__pyx_slice__42;
static PyObject *__pyx_slice__43;
static PyObject *__pyx_slice__44;
static PyObject *__pyx_slice__45;
static PyObject *__pyx_slice__46;
static PyObject *__pyx_slice__47;
static PyObject *__pyx_slice__48;
static PyObject *__pyx_slice__49;
static PyObject *__pyx_slice__51;
static PyObject *__pyx_slice__52;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__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_tuple__90;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__94;
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;
static PyObject *__pyx_codeobj__91;
static PyObject *__pyx_codeobj__93;
static PyObject *__pyx_codeobj__95;
/* Late includes */

/* "src/pyrfc/_pyrfc.pyx":79
 * ################################################################################
 * 
 * def py_to_string(obj):             # <<<<<<<<<<<<<<
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_1py_to_string(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_1py_to_string = {"py_to_string", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_1py_to_string, METH_O, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_1py_to_string(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("py_to_string (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_py_to_string(__pyx_self, ((PyObject *)__pyx_v_obj));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_py_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("py_to_string", 0);

  /* "src/pyrfc/_pyrfc.pyx":80
 * 
 * def py_to_string(obj):
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)             # <<<<<<<<<<<<<<
 * 
 * def string_to_py(objstr):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_HIGHEST_PROTOCOL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 80, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_5 = 0;
  if (CYTHON_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_5 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_obj, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
    PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_obj, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_2) {
      __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
    }
    __Pyx_INCREF(__pyx_v_obj);
    __Pyx_GIVEREF(__pyx_v_obj);
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_obj);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":79
 * ################################################################################
 * 
 * def py_to_string(obj):             # <<<<<<<<<<<<<<
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":82
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 * def string_to_py(objstr):             # <<<<<<<<<<<<<<
 *     return pickle.loads(objstr)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_3string_to_py(PyObject *__pyx_self, PyObject *__pyx_v_objstr); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_3string_to_py = {"string_to_py", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_3string_to_py, METH_O, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_3string_to_py(PyObject *__pyx_self, PyObject *__pyx_v_objstr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("string_to_py (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_2string_to_py(__pyx_self, ((PyObject *)__pyx_v_objstr));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_2string_to_py(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_objstr) {
  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("string_to_py", 0);

  /* "src/pyrfc/_pyrfc.pyx":83
 * 
 * def string_to_py(objstr):
 *     return pickle.loads(objstr)             # <<<<<<<<<<<<<<
 * 
 * def get_nwrfclib_version():
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loads); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_objstr) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_objstr);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":82
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 * def string_to_py(objstr):             # <<<<<<<<<<<<<<
 *     return pickle.loads(objstr)
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":85
 *     return pickle.loads(objstr)
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_5get_nwrfclib_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_4get_nwrfclib_version[] = "Get SAP NW RFC Lib version\n    :returns: tuple of major, minor and patch level\n    ";
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_5get_nwrfclib_version = {"get_nwrfclib_version", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_5get_nwrfclib_version, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_4get_nwrfclib_version};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_5get_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_5pyrfc_4get_nwrfclib_version(__pyx_self);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_4get_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);

  /* "src/pyrfc/_pyrfc.pyx":89
 *     :returns: tuple of major, minor and patch level
 *     """
 *     cdef unsigned major = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned minor = 0
 *     cdef unsigned patchlevel = 0
 */
  __pyx_v_major = 0;

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

  /* "src/pyrfc/_pyrfc.pyx":91
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":92
 *     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)));

  /* "src/pyrfc/_pyrfc.pyx":93
 *     cdef unsigned patchlevel = 0
 *     RfcGetVersion(&major, &minor, &patchlevel)
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}             # <<<<<<<<<<<<<<
 * 
 * def set_ini_file_directory(path_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __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, 93, __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, 93, __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, 93, __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, 93, __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, 93, __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, 93, __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, 93, __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, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":85
 *     return pickle.loads(objstr)
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level
 */

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

/* "src/pyrfc/_pyrfc.pyx":95
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 * 
 * 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_5pyrfc_7set_ini_file_directory(PyObject *__pyx_self, PyObject *__pyx_v_path_name); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_6set_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_5pyrfc_7set_ini_file_directory = {"set_ini_file_directory", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_7set_ini_file_directory, METH_O, __pyx_doc_5pyrfc_5pyrfc_6set_ini_file_directory};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_7set_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_5pyrfc_6set_ini_file_directory(__pyx_self, ((PyObject *)__pyx_v_path_name));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6set_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);

  /* "src/pyrfc/_pyrfc.pyx":103
 *     :return: nothing, raises an error
 *     """
 *     if not isinstance(path_name, str):             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)
 *     cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_path_name); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "src/pyrfc/_pyrfc.pyx":104
 *     """
 *     if not isinstance(path_name, 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, 104, __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, 104, __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, 104, __pyx_L1_error)

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

  /* "src/pyrfc/_pyrfc.pyx":107
 *     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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __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, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "src/pyrfc/_pyrfc.pyx":108
 *     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, 108, __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, 108, __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, 108, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":107
 *     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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":109
 *     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_5pyrfc_fillString(__pyx_v_path_name); if (unlikely(__pyx_t_10 == ((SAP_UC *)NULL))) __PYX_ERR(0, 109, __pyx_L1_error)
  memcpy(&(__pyx_v_pathName[0]), __pyx_t_10, sizeof(__pyx_v_pathName[0]) * (0x200 - 0));

  /* "src/pyrfc/_pyrfc.pyx":110
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":111
 *     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)) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":95
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 * 
 * 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.pyrfc.set_ini_file_directory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":114
 *         raise wrapError(&errorInfo)
 * 
 * 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_5pyrfc_9set_cryptolib_path(PyObject *__pyx_self, PyObject *__pyx_v_path_name); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_8set_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_5pyrfc_9set_cryptolib_path = {"set_cryptolib_path", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_9set_cryptolib_path, METH_O, __pyx_doc_5pyrfc_5pyrfc_8set_cryptolib_path};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_9set_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_5pyrfc_8set_cryptolib_path(__pyx_self, ((PyObject *)__pyx_v_path_name));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_8set_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);

  /* "src/pyrfc/_pyrfc.pyx":126
 *     :return: nothing, raises an error
 *     """
 *     if not isinstance(path_name, str):             # <<<<<<<<<<<<<<
 *         raise TypeError('sapnwrfc.ini path is not a string:', path_name)
 *     cdef RFC_ERROR_INFO errorInfo
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_path_name); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "src/pyrfc/_pyrfc.pyx":127
 *     """
 *     if not isinstance(path_name, 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, 127, __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, 127, __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, 127, __pyx_L1_error)

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

  /* "src/pyrfc/_pyrfc.pyx":130
 *     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, 130, __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, 130, __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, 130, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "src/pyrfc/_pyrfc.pyx":131
 *     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, 131, __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, 131, __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, 131, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":130
 *     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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":132
 *     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_5pyrfc_fillString(__pyx_v_path_name); if (unlikely(__pyx_t_6 == ((SAP_UC *)NULL))) __PYX_ERR(0, 132, __pyx_L1_error)
  memcpy(&(__pyx_v_pathName[0]), __pyx_t_6, sizeof(__pyx_v_pathName[0]) * (0x200 - 0));

  /* "src/pyrfc/_pyrfc.pyx":133
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":134
 *     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)) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":114
 *         raise wrapError(&errorInfo)
 * 
 * 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.pyrfc.set_cryptolib_path", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":145
 *     cdef RFC_CONNECTION_PARAMETER *_params
 * 
 *     def __init__(self, **params):             # <<<<<<<<<<<<<<
 *         self._params_count = len(params)
 *         if self._params_count < 1:
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_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_5pyrfc_20ConnectionParameters___init__(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_20ConnectionParameters___init__(struct __pyx_obj_5pyrfc_5pyrfc_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("__init__", 0);

  /* "src/pyrfc/_pyrfc.pyx":146
 * 
 *     def __init__(self, **params):
 *         self._params_count = 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, 146, __pyx_L1_error)
  __pyx_v_self->_params_count = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":147
 *     def __init__(self, **params):
 *         self._params_count = 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)) {

    /* "src/pyrfc/_pyrfc.pyx":148
 *         self._params_count = 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, 148, __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, 148, __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, 148, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":147
 *     def __init__(self, **params):
 *         self._params_count = 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))
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":149
 *         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)))));

  /* "src/pyrfc/_pyrfc.pyx":150
 *             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;

  /* "src/pyrfc/_pyrfc.pyx":151
 *         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, 151, __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, 151, __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;

    /* "src/pyrfc/_pyrfc.pyx":152
 *         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_5pyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 152, __pyx_L1_error)
    (__pyx_v_self->_params[__pyx_v_i]).name = __pyx_t_9;

    /* "src/pyrfc/_pyrfc.pyx":153
 *         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_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 153, __pyx_L1_error)
    (__pyx_v_self->_params[__pyx_v_i]).value = __pyx_t_9;

    /* "src/pyrfc/_pyrfc.pyx":154
 *             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;

  /* "src/pyrfc/_pyrfc.pyx":145
 *     cdef RFC_CONNECTION_PARAMETER *_params
 * 
 *     def __init__(self, **params):             # <<<<<<<<<<<<<<
 *         self._params_count = 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.pyrfc.ConnectionParameters.__init__", __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;
}

/* "src/pyrfc/_pyrfc.pyx":156
 *             i += 1
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._free()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_3__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_20ConnectionParameters_2__del__(((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_2__del__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":157
 * 
 *     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, 157, __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, 157, __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;

  /* "src/pyrfc/_pyrfc.pyx":156
 *             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.pyrfc.ConnectionParameters.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_5_free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_20ConnectionParameters_4_free(((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_4_free(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":160
 * 
 *     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) {

    /* "src/pyrfc/_pyrfc.pyx":161
 *     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;

      /* "src/pyrfc/_pyrfc.pyx":162
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":163
 *             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));
    }

    /* "src/pyrfc/_pyrfc.pyx":164
 *                 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);

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

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

  /* "src/pyrfc/_pyrfc.pyx":159
 *         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("self._params cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_20ConnectionParameters_6__reduce_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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("self._params cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._params 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.pyrfc.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("self._params cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_20ConnectionParameters_8__setstate_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_20ConnectionParameters_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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("self._params cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

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

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

/* "src/pyrfc/_pyrfc.pyx":216
 * 
 *     property version:
 *         def __get__(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_5pyrfc_10Connection_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_7version_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_7version___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_7version___get__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":220
 *             :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;

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

  /* "src/pyrfc/_pyrfc.pyx":222
 *             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;

  /* "src/pyrfc/_pyrfc.pyx":223
 *             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)));

  /* "src/pyrfc/_pyrfc.pyx":224
 *             cdef unsigned patchlevel = 0
 *             RfcGetVersion(&major, &minor, &patchlevel)
 *             return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}             # <<<<<<<<<<<<<<
 * 
 *     property options:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __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, 224, __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, 224, __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, 224, __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, 224, __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, 224, __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, 224, __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, 224, __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, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":216
 * 
 *     property version:
 *         def __get__(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.pyrfc.Connection.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":227
 * 
 *     property options:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.__config
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_7options_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_7options_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_7options___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":228
 *     property options:
 *         def __get__(self):
 *             return self.__config             # <<<<<<<<<<<<<<
 * 
 *     property handle:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->__config);
  __pyx_r = __pyx_v_self->__config;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":227
 * 
 *     property options:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self.__config
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":231
 * 
 *     property handle:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get client connection handle
 *             :returns: Client connection handle
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_6handle___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_6handle___get__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":235
 *             :returns: Client connection handle
 *             """
 *             return <uintptr_t>self._handle             # <<<<<<<<<<<<<<
 * 
 *     property alive:
 */
  __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, 235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":231
 * 
 *     property handle:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get client connection handle
 *             :returns: Client connection handle
 */

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

/* "src/pyrfc/_pyrfc.pyx":238
 * 
 *     property alive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get conection alive property
 *             :returns: True when alive
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_5alive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_5alive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_5alive___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_5alive___get__(struct __pyx_obj_5pyrfc_5pyrfc_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);

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

  /* "src/pyrfc/_pyrfc.pyx":238
 * 
 *     property alive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get conection alive property
 *             :returns: True when alive
 */

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

/* "src/pyrfc/_pyrfc.pyx":245
 *             return self._handle != NULL
 * 
 *     def __init__(self, config={}, **params):             # <<<<<<<<<<<<<<
 *         # set connection config, rstrip default True
 *         self.__config = {}
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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] = __pyx_k__3;
    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, 245, __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, 245, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0;
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection___init__(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection___init__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_params) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  unsigned int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/pyrfc/_pyrfc.pyx":247
 *     def __init__(self, config={}, **params):
 *         # set connection config, rstrip default True
 *         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, 247, __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 = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":248
 *         # set connection config, rstrip default True
 *         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, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_self->__config, __pyx_n_u_dtime, __pyx_t_2) < 0)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":249
 *         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)
 *         # set internal configuration
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_self->__config, __pyx_n_u_return_import_params, __pyx_t_1) < 0)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":250
 *         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)             # <<<<<<<<<<<<<<
 *         # set internal configuration
 *         self.__bconfig = 0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(PyObject_SetItem(__pyx_v_self->__config, __pyx_n_u_rstrip, __pyx_t_2) < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":252
 *         self.__config['rstrip'] = config.get('rstrip', True)
 *         # set internal configuration
 *         self.__bconfig = 0             # <<<<<<<<<<<<<<
 *         if self.__config['dtime']:
 *             self.__bconfig |= _MASK_DTIME
 */
  __pyx_v_self->__pyx___bconfig = 0;

  /* "src/pyrfc/_pyrfc.pyx":253
 *         # set internal configuration
 *         self.__bconfig = 0
 *         if self.__config['dtime']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->__config, __pyx_n_u_dtime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __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, 253, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":254
 *         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_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MASK_DTIME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyNumber_InPlaceOr(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_v_self->__pyx___bconfig = __pyx_t_5;

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

  /* "src/pyrfc/_pyrfc.pyx":255
 *         if self.__config['dtime']:
 *             self.__bconfig |= _MASK_DTIME
 *         if self.__config['return_import_params']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->__config, __pyx_n_u_return_import_params); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 255, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":256
 *             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_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_InPlaceOr(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 256, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_v_self->__pyx___bconfig = __pyx_t_5;

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

  /* "src/pyrfc/_pyrfc.pyx":257
 *         if self.__config['return_import_params']:
 *             self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS
 *         if self.__config['rstrip']:             # <<<<<<<<<<<<<<
 *             self.__bconfig |= _MASK_RSTRIP
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_self->__config, __pyx_n_u_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __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, 257, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":260
 *             self.__bconfig |= _MASK_RSTRIP
 * 
 *         self._connection = ConnectionParameters(**params)             # <<<<<<<<<<<<<<
 *         self._handle = NULL
 *         self.active_transaction = False
 */
  __pyx_t_4 = PyDict_Copy(__pyx_v_params); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_ConnectionParameters), __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_connection));
  __pyx_v_self->_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)__pyx_t_1);
  __pyx_t_1 = 0;

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

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

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

  /* "src/pyrfc/_pyrfc.pyx":264
 *         self.active_transaction = False
 *         self.active_unit = False
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def free(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":245
 *             return self._handle != NULL
 * 
 *     def __init__(self, config={}, **params):             # <<<<<<<<<<<<<<
 *         # set connection config, rstrip default True
 *         self.__config = {}
 */

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

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_3free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_10Connection_2free(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_2free(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":273
 *             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, 273, __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, 273, __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;

  /* "src/pyrfc/_pyrfc.pyx":266
 *         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.pyrfc.Connection.free", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":275
 *         self.__del__()
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._connection._free()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_5__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_4__del__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_4__del__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":276
 * 
 *     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, 276, __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, 276, __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;

  /* "src/pyrfc/_pyrfc.pyx":277
 *     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, 277, __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, 277, __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;

  /* "src/pyrfc/_pyrfc.pyx":275
 *         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.pyrfc.Connection.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":279
 *         self._connection._free()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_7__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_6__enter__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":280
 * 
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":279
 *         self._connection._free()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":282
 *         return self
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self._close() # 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_5pyrfc_10Connection_9__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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, 282, __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, 282, __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, 282, __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, 282, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_8__exit__(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_8__exit__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":283
 * 
 *     def __exit__(self, type, value, traceback):
 *         self._close() # Although the _close() method is also called in the destructor, the             # <<<<<<<<<<<<<<
 *                       # explicit call assures the immediate closing to the connection.
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __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, 283, __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;

  /* "src/pyrfc/_pyrfc.pyx":282
 *         return self
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self._close() # 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.pyrfc.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":286
 *                       # explicit call assures the immediate closing to the connection.
 * 
 *     def open(self):             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_11open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_10open(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_10open(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":287
 * 
 *     def open(self):
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def reopen(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":286
 *                       # explicit call assures the immediate closing to the connection.
 * 
 *     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.pyrfc.Connection.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":289
 *         self._open()
 * 
 *     def reopen(self):             # <<<<<<<<<<<<<<
 *         self._reopen()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_13reopen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_12reopen(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_12reopen(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":290
 * 
 *     def reopen(self):
 *         self._reopen()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_reopen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":289
 *         self._open()
 * 
 *     def reopen(self):             # <<<<<<<<<<<<<<
 *         self._reopen()
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":292
 *         self._reopen()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self._close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_15close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_14close(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_14close(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":293
 * 
 *     def close(self):
 *         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, 293, __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, 293, __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;

  /* "src/pyrfc/_pyrfc.pyx":292
 *         self._reopen()
 * 
 *     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_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":295
 *         self._close()
 * 
 *     def cancel(self):             # <<<<<<<<<<<<<<
 *         self._cancel()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_17cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_16cancel(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_16cancel(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":296
 * 
 *     def cancel(self):
 *         self._cancel()             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_cancel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __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, 296, __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;

  /* "src/pyrfc/_pyrfc.pyx":295
 *         self._close()
 * 
 *     def cancel(self):             # <<<<<<<<<<<<<<
 *         self._cancel()
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":298
 *         self._cancel()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_10Connection_19__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_10Connection_19__bool__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_18__bool__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static int __pyx_pf_5pyrfc_5pyrfc_10Connection_18__bool__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":299
 * 
 *     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, 299, __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, 299, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":298
 *         self._cancel()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":301
 *         return self.alive
 * 
 *     cdef _reopen(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._open()
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_10Connection__reopen(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":302
 * 
 *     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, 302, __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, 302, __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;

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

  /* "src/pyrfc/_pyrfc.pyx":301
 *         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.pyrfc.Connection._reopen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":305
 *         self._open()
 * 
 *     cdef _open(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_10Connection__open(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":307
 *     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:*/ {

        /* "src/pyrfc/_pyrfc.pyx":308
 *         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));
      }

      /* "src/pyrfc/_pyrfc.pyx":307
 *     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:;
      }
  }

  /* "src/pyrfc/_pyrfc.pyx":309
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":310
 *             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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

  /* "src/pyrfc/_pyrfc.pyx":305
 *         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.pyrfc.Connection._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":312
 *             self._error(&errorInfo)
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection (private function)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_21_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_20_close[] = " Close the connection (private function)\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the connection cannot be closed cleanly.\n        ";
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_20_close(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_20_close(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":320
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":321
 *         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));

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

    /* "src/pyrfc/_pyrfc.pyx":323
 *             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) {

      /* "src/pyrfc/_pyrfc.pyx":324
 *             self._handle = NULL
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def _cancel(self):
 */
      __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

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

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

  /* "src/pyrfc/_pyrfc.pyx":312
 *             self._error(&errorInfo)
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection (private function)
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":326
 *                 self._error(&errorInfo)
 * 
 *     def _cancel(self):             # <<<<<<<<<<<<<<
 *         """ Cancels the ongoing RFC call (private function)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_23_cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_22_cancel[] = " Cancels the ongoing RFC call (private 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_5pyrfc_10Connection_23_cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_cancel (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_22_cancel(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_22_cancel(struct __pyx_obj_5pyrfc_5pyrfc_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("_cancel", 0);

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

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

    /* "src/pyrfc/_pyrfc.pyx":336
 *         if self._handle != NULL:
 *             rc = RfcCancel(self._handle, &errorInfo)
 *             self._handle = NULL             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)
 */
    __pyx_v_self->_handle = NULL;

    /* "src/pyrfc/_pyrfc.pyx":337
 *             rc = RfcCancel(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) {

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

      /* "src/pyrfc/_pyrfc.pyx":337
 *             rc = RfcCancel(self._handle, &errorInfo)
 *             self._handle = NULL
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":334
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:             # <<<<<<<<<<<<<<
 *             rc = RfcCancel(self._handle, &errorInfo)
 *             self._handle = NULL
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":326
 *                 self._error(&errorInfo)
 * 
 *     def _cancel(self):             # <<<<<<<<<<<<<<
 *         """ Cancels the ongoing RFC call (private function)
 * 
 */

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

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

static PyObject *__pyx_f_5pyrfc_5pyrfc_10Connection__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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);

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

  /* "src/pyrfc/_pyrfc.pyx":340
 *                 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.pyrfc.Connection._error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_25ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_24ping[] = " 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_5pyrfc_10Connection_25ping(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ping (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_24ping(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_24ping(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":365
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":366
 *         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) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":355
 *         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.pyrfc.Connection.ping", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":369
 *             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_5pyrfc_10Connection_27reset_server_context(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_26reset_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_5pyrfc_10Connection_27reset_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_5pyrfc_10Connection_26reset_server_context(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_26reset_server_context(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":382
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":383
 *         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) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":369
 *             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.pyrfc.Connection.reset_server_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_29get_connection_attributes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_28get_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\n                string values.\n\n        :raises: :exc:`~pyrfc.RFCError` or a subclass\n                 thereof if the RFC call fails.\n        ";
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_29get_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_5pyrfc_10Connection_28get_connection_attributes(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":427
 *         cdef RFC_INT isValid
 * 
 *         rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo);             # <<<<<<<<<<<<<<
 * 
 *         result = {}
 */
  __pyx_v_rc = RfcIsConnectionHandleValid(__pyx_v_self->_handle, (&__pyx_v_isValid), (&__pyx_v_errorInfo));

  /* "src/pyrfc/_pyrfc.pyx":429
 *         rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo);
 * 
 *         result = {}             # <<<<<<<<<<<<<<
 *         if (isValid and rc == RFC_OK):
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":430
 * 
 *         result = {}
 *         if (isValid and rc == RFC_OK):             # <<<<<<<<<<<<<<
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:
 */
  __pyx_t_3 = (__pyx_v_isValid != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = ((__pyx_v_rc == RFC_OK) != 0);
  __pyx_t_2 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "src/pyrfc/_pyrfc.pyx":431
 *         result = {}
 *         if (isValid and rc == RFC_OK):
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":432
 *         if (isValid and rc == RFC_OK):
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
    if (__pyx_t_2) {

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

      /* "src/pyrfc/_pyrfc.pyx":432
 *         if (isValid and rc == RFC_OK):
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
    }

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

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

    /* "src/pyrfc/_pyrfc.pyx":437
 *             result = wrapConnectionAttributes(attributes)
 *             result.update({
 *                 'active_unit': self.active_unit or self.active_transaction             # <<<<<<<<<<<<<<
 *             })
 *         return result
 */
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (!__pyx_v_self->active_unit) {
    } else {
      __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->active_unit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 437, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_6 = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L7_bool_binop_done;
    }
    __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->active_transaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __pyx_t_7;
    __pyx_t_7 = 0;
    __pyx_L7_bool_binop_done:;
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_active_unit, __pyx_t_6) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __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;

    /* "src/pyrfc/_pyrfc.pyx":430
 * 
 *         result = {}
 *         if (isValid and rc == RFC_OK):             # <<<<<<<<<<<<<<
 *             rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo)
 *             if rc != RFC_OK:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":439
 *                 'active_unit': self.active_unit or self.active_transaction
 *             })
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_function_description(self, func_name):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":386
 *             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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":441
 *         return result
 * 
 *     def get_function_description(self, func_name):             # <<<<<<<<<<<<<<
 *         """ Returns a function description of a function module.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_31get_function_description(PyObject *__pyx_v_self, PyObject *__pyx_v_func_name); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_10Connection_30get_function_description(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_func_name));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_30get_function_description(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":451
 *         """
 *         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, 451, __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, 451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_funcName = __pyx_t_4;

  /* "src/pyrfc/_pyrfc.pyx":452
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":453
 *         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);

  /* "src/pyrfc/_pyrfc.pyx":454
 *         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) {

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

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

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

  /* "src/pyrfc/_pyrfc.pyx":441
 *         return result
 * 
 *     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.pyrfc.Connection.get_function_description", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":458
 *         return wrapFunctionDescription(funcDesc)
 * 
 *     def call(self, func_name, options={}, **params):             # <<<<<<<<<<<<<<
 *         """ Invokes a remote-enabled function module via RFC.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_33call(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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, like 'skip', to deactivate certain parameters.\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_5pyrfc_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] = __pyx_k__7;
    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, 458, __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, 458, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0;
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.call", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_32call(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_32call(struct __pyx_obj_5pyrfc_5pyrfc_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_value = 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;
  PyObject *(*__pyx_t_10)(PyObject *);
  Py_ssize_t __pyx_t_11;
  int __pyx_t_12;
  char const *__pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("call", 0);

  /* "src/pyrfc/_pyrfc.pyx":483
 *         cdef unsigned paramCount
 *         cdef SAP_UC *cName
 *         if not isinstance(func_name, 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 = PyUnicode_Check(__pyx_v_func_name); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "src/pyrfc/_pyrfc.pyx":484
 *         cdef SAP_UC *cName
 *         if not isinstance(func_name, 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, 484, __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, 484, __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, 484, __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, 484, __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, 484, __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, 484, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":483
 *         cdef unsigned paramCount
 *         cdef SAP_UC *cName
 *         if not isinstance(func_name, str):             # <<<<<<<<<<<<<<
 *             raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name))
 *         cdef SAP_UC *funcName = fillString(func_name)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":485
 *         if not isinstance(func_name, 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("Remote function module %s invocation rejected because the connection is closed" % func_name)
 */
  __pyx_t_8 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 485, __pyx_L1_error)
  __pyx_v_funcName = __pyx_t_8;

  /* "src/pyrfc/_pyrfc.pyx":486
 *             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("Remote function module %s invocation rejected because the connection is closed" % func_name)
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":487
 *         cdef SAP_UC *funcName = fillString(func_name)
 *         if self._handle == NULL:
 *             raise RFCError("Remote function module %s invocation rejected because the connection is closed" % func_name)             # <<<<<<<<<<<<<<
 *         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, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_Remote_function_module_s_invocat, __pyx_v_func_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __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_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __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, 487, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":486
 *             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("Remote function module %s invocation rejected because the connection is closed" % func_name)
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":488
 *         if self._handle == NULL:
 *             raise RFCError("Remote function module %s invocation rejected because the connection is closed" % func_name)
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":489
 *             raise RFCError("Remote function module %s invocation rejected because the connection is closed" % func_name)
 *         cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *         free(funcName)             # <<<<<<<<<<<<<<
 *         if not funcDesc:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_funcName);

  /* "src/pyrfc/_pyrfc.pyx":490
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":491
 *         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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":490
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":492
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":493
 *             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) {

    /* "src/pyrfc/_pyrfc.pyx":494
 *         cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *         if not funcCont:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         cdef int isActive = 0
 *         try: # now we have a function module
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

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

  /* "src/pyrfc/_pyrfc.pyx":495
 *         if not funcCont:
 *             self._error(&errorInfo)
 *         cdef int isActive = 0             # <<<<<<<<<<<<<<
 *         try: # now we have a function module
 *             if 'not_requested' in options:
 */
  __pyx_v_isActive = 0;

  /* "src/pyrfc/_pyrfc.pyx":496
 *             self._error(&errorInfo)
 *         cdef int isActive = 0
 *         try: # now we have a function module             # <<<<<<<<<<<<<<
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']
 */
  /*try:*/ {

    /* "src/pyrfc/_pyrfc.pyx":497
 *         cdef int isActive = 0
 *         try: # now we have a function module
 *             if 'not_requested' in options:             # <<<<<<<<<<<<<<
 *                 skip_parameters = options['not_requested']
 *                 if not isinstance(skip_parameters, 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, 497, __pyx_L8_error)
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "src/pyrfc/_pyrfc.pyx":498
 *         try: # now we have a function module
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']             # <<<<<<<<<<<<<<
 *                 if not isinstance(skip_parameters, 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, 498, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_skip_parameters = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "src/pyrfc/_pyrfc.pyx":499
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']
 *                 if not isinstance(skip_parameters, list):             # <<<<<<<<<<<<<<
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:
 */
      __pyx_t_1 = PyList_Check(__pyx_v_skip_parameters); 
      __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
      if (__pyx_t_2) {

        /* "src/pyrfc/_pyrfc.pyx":500
 *                 skip_parameters = options['not_requested']
 *                 if not isinstance(skip_parameters, 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, 500, __pyx_L8_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;

        /* "src/pyrfc/_pyrfc.pyx":499
 *             if 'not_requested' in options:
 *                 skip_parameters = options['not_requested']
 *                 if not isinstance(skip_parameters, list):             # <<<<<<<<<<<<<<
 *                     skip_parameters = [skip_parameters]
 *                 for name in skip_parameters:
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":501
 *                 if not isinstance(skip_parameters, 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_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_skip_parameters); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L8_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 501, __pyx_L8_error)
      }
      for (;;) {
        if (likely(!__pyx_t_10)) {
          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, 501, __pyx_L8_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L8_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, 501, __pyx_L8_error)
            #else
            __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L8_error)
            __Pyx_GOTREF(__pyx_t_4);
            #endif
          }
        } else {
          __pyx_t_4 = __pyx_t_10(__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, 501, __pyx_L8_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_4);
        }
        __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
        __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":502
 *                     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_5pyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 502, __pyx_L8_error)
        __pyx_v_cName = __pyx_t_8;

        /* "src/pyrfc/_pyrfc.pyx":503
 *                 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));

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

        /* "src/pyrfc/_pyrfc.pyx":505
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 *                     free(cName)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *             for name, value in params.iteritems():
 */
        __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
        if (__pyx_t_2) {

          /* "src/pyrfc/_pyrfc.pyx":506
 *                     free(cName)
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *             for name, value in params.iteritems():
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 */
          __pyx_t_4 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L8_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "src/pyrfc/_pyrfc.pyx":505
 *                     rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo)
 *                     free(cName)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *             for name, value in params.iteritems():
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":501
 *                 if not isinstance(skip_parameters, 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;

      /* "src/pyrfc/_pyrfc.pyx":497
 *         cdef int isActive = 0
 *         try: # now we have a function module
 *             if 'not_requested' in options:             # <<<<<<<<<<<<<<
 *                 skip_parameters = options['not_requested']
 *                 if not isinstance(skip_parameters, list):
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":507
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)
 *             for name, value in params.iteritems():             # <<<<<<<<<<<<<<
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             with nogil:
 */
    __pyx_t_9 = 0;
    __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_params, 1, __pyx_n_s_iteritems, (&__pyx_t_11), (&__pyx_t_6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 507, __pyx_L8_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_12 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_9, &__pyx_t_4, &__pyx_t_7, NULL, __pyx_t_6);
      if (unlikely(__pyx_t_12 == 0)) break;
      if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 507, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "src/pyrfc/_pyrfc.pyx":508
 *                         self._error(&errorInfo)
 *             for name, value in params.iteritems():
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)             # <<<<<<<<<<<<<<
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 */
      __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 508, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":509
 *             for name, value in params.iteritems():
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if rc != RFC_OK:
 */
    {
        #ifdef WITH_THREAD
        PyThreadState *_save;
        Py_UNBLOCK_THREADS
        __Pyx_FastGIL_Remember();
        #endif
        /*try:*/ {

          /* "src/pyrfc/_pyrfc.pyx":510
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)             # <<<<<<<<<<<<<<
 *             if rc != RFC_OK:
 *                 if (errorInfo.group in (ABAP_RUNTIME_FAILURE, LOGON_FAILURE, COMMUNICATION_FAILURE, EXTERNAL_RUNTIME_FAILURE)):
 */
          __pyx_v_rc = RfcInvoke(__pyx_v_self->_handle, __pyx_v_funcCont, (&__pyx_v_errorInfo));
        }

        /* "src/pyrfc/_pyrfc.pyx":509
 *             for name, value in params.iteritems():
 *                 fillFunctionParameter(funcDesc, funcCont, name, value)
 *             with nogil:             # <<<<<<<<<<<<<<
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if rc != RFC_OK:
 */
        /*finally:*/ {
          /*normal exit:*/{
            #ifdef WITH_THREAD
            __Pyx_FastGIL_Forget();
            Py_BLOCK_THREADS
            #endif
            goto __pyx_L19;
          }
          __pyx_L19:;
        }
    }

    /* "src/pyrfc/_pyrfc.pyx":511
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 if (errorInfo.group in (ABAP_RUNTIME_FAILURE, LOGON_FAILURE, COMMUNICATION_FAILURE, EXTERNAL_RUNTIME_FAILURE)):
 *                 # error groups seen to be more robust here
 */
    __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":512
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if rc != RFC_OK:
 *                 if (errorInfo.group in (ABAP_RUNTIME_FAILURE, LOGON_FAILURE, COMMUNICATION_FAILURE, EXTERNAL_RUNTIME_FAILURE)):             # <<<<<<<<<<<<<<
 *                 # error groups seen to be more robust here
 *                 # if (errorInfo.code in(RFC_COMMUNICATION_FAILURE, RFC_ABAP_RUNTIME_FAILURE, RFC_ABAP_MESSAGE, RFC_EXTERNAL_FAILURE):
 */
      switch (__pyx_v_errorInfo.group) {
        case ABAP_RUNTIME_FAILURE:
        case LOGON_FAILURE:
        case COMMUNICATION_FAILURE:
        case EXTERNAL_RUNTIME_FAILURE:

        /* "src/pyrfc/_pyrfc.pyx":516
 *                 # if (errorInfo.code in(RFC_COMMUNICATION_FAILURE, RFC_ABAP_RUNTIME_FAILURE, RFC_ABAP_MESSAGE, RFC_EXTERNAL_FAILURE):
 *                     # Connection closed, reopen
 *                     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));

        /* "src/pyrfc/_pyrfc.pyx":517
 *                     # Connection closed, reopen
 *                     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) {

          /* "src/pyrfc/_pyrfc.pyx":518
 *                     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;

          /* "src/pyrfc/_pyrfc.pyx":520
 *                         self._handle = NULL
 *                         # Communication error returned as error
 *                         errorInfo = openErrorInfo             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:
 */
          __pyx_v_errorInfo = __pyx_v_openErrorInfo;

          /* "src/pyrfc/_pyrfc.pyx":517
 *                     # Connection closed, reopen
 *                     self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo)
 *                     if openErrorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._handle = NULL
 *                         # Communication error returned as error
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":512
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if rc != RFC_OK:
 *                 if (errorInfo.group in (ABAP_RUNTIME_FAILURE, LOGON_FAILURE, COMMUNICATION_FAILURE, EXTERNAL_RUNTIME_FAILURE)):             # <<<<<<<<<<<<<<
 *                 # error groups seen to be more robust here
 *                 # if (errorInfo.code in(RFC_COMMUNICATION_FAILURE, RFC_ABAP_RUNTIME_FAILURE, RFC_ABAP_MESSAGE, RFC_EXTERNAL_FAILURE):
 */
        break;
        default: break;
      }

      /* "src/pyrfc/_pyrfc.pyx":521
 *                         # Communication error returned as error
 *                         errorInfo = openErrorInfo
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 */
      __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "src/pyrfc/_pyrfc.pyx":511
 *             with nogil:
 *                 rc = RfcInvoke(self._handle, funcCont, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 if (errorInfo.group in (ABAP_RUNTIME_FAILURE, LOGON_FAILURE, COMMUNICATION_FAILURE, EXTERNAL_RUNTIME_FAILURE)):
 *                 # error groups seen to be more robust here
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":522
 *                         errorInfo = openErrorInfo
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:             # <<<<<<<<<<<<<<
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 *             else:
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 522, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = PyNumber_And(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 522, __pyx_L8_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 522, __pyx_L8_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":523
 *                 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_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 523, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcCont, ((RFC_DIRECTION)0), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 523, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_7;
      __pyx_t_7 = 0;
      goto __pyx_L7_return;

      /* "src/pyrfc/_pyrfc.pyx":522
 *                         errorInfo = openErrorInfo
 *                 self._error(&errorInfo)
 *             if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS:             # <<<<<<<<<<<<<<
 *                 return wrapResult(funcDesc, funcCont, <RFC_DIRECTION> 0, self.__bconfig)
 *             else:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":525
 *                 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_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->__pyx___bconfig); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 525, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcCont, RFC_IMPORT, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 525, __pyx_L8_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L7_return;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":527
 *                 return wrapResult(funcDesc, funcCont, RFC_IMPORT, self.__bconfig)
 *         finally:
 *             RfcDestroyFunction(funcCont, NULL)             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
  /*finally:*/ {
    __pyx_L8_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 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_17, &__pyx_t_18, &__pyx_t_19);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_14);
      __Pyx_XGOTREF(__pyx_t_15);
      __Pyx_XGOTREF(__pyx_t_16);
      __Pyx_XGOTREF(__pyx_t_17);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __pyx_t_6 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
      {
        (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_17);
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
      }
      __Pyx_XGIVEREF(__pyx_t_14);
      __Pyx_XGIVEREF(__pyx_t_15);
      __Pyx_XGIVEREF(__pyx_t_16);
      __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
      __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
      __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
      goto __pyx_L1_error;
    }
    __pyx_L7_return: {
      __pyx_t_19 = __pyx_r;
      __pyx_r = 0;
      (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL));
      __pyx_r = __pyx_t_19;
      __pyx_t_19 = 0;
      goto __pyx_L0;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":458
 *         return wrapFunctionDescription(funcDesc)
 * 
 *     def call(self, func_name, options={}, **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_AddTraceback("pyrfc.pyrfc.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_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":531
 *     ##########################################################################
 *     ## 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_5pyrfc_10Connection_35type_desc_get(PyObject *__pyx_v_self, PyObject *__pyx_v_type_name); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_10Connection_34type_desc_get(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_type_name));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_34type_desc_get(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":540
 *         """
 *         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, 540, __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, 540, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 540, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_typeName = __pyx_t_4;

  /* "src/pyrfc/_pyrfc.pyx":541
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":542
 *         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);

  /* "src/pyrfc/_pyrfc.pyx":543
 *         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) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":545
 *         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_5pyrfc_wrapTypeDescription(__pyx_v_typeDesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":531
 *     ##########################################################################
 *     ## 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.pyrfc.Connection.type_desc_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":547
 *         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_5pyrfc_10Connection_37type_desc_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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, 547, __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, 547, __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, 547, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.type_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_36type_desc_remove(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), __pyx_v_sysid, __pyx_v_type_name);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_36type_desc_remove(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":559
 *         """
 *         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_5pyrfc_fillString(__pyx_v_sysid); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 559, __pyx_L1_error)
  __pyx_v_sysId = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":560
 *         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_5pyrfc_fillString(__pyx_v_type_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 560, __pyx_L1_error)
  __pyx_v_typeName = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":561
 *         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));

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

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

  /* "src/pyrfc/_pyrfc.pyx":564
 *         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) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":566
 *         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, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":547
 *         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.pyrfc.Connection.type_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":568
 *         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_5pyrfc_10Connection_39func_desc_remove(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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, 568, __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, 568, __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, 568, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.func_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_38func_desc_remove(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), __pyx_v_sysid, __pyx_v_func_name);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_38func_desc_remove(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":580
 *         """
 *         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_5pyrfc_fillString(__pyx_v_sysid); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 580, __pyx_L1_error)
  __pyx_v_sysId = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":581
 *         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_5pyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 581, __pyx_L1_error)
  __pyx_v_funcName = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":582
 *         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));

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

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

  /* "src/pyrfc/_pyrfc.pyx":585
 *         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) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":587
 *         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, 587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":568
 *         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.pyrfc.Connection.func_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":592
 *     ## 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_5pyrfc_10Connection_41_get_transaction_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_40_get_transaction_id[] = " Returns a unique 24 char transaction ID (GUID).";
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_40_get_transaction_id(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_40_get_transaction_id(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_wrapString __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_transaction_id", 0);

  /* "src/pyrfc/_pyrfc.pyx":598
 *         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, 598, __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, 598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":600
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":601
 *             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) {

    /* "src/pyrfc/_pyrfc.pyx":602
 *         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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

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

  /* "src/pyrfc/_pyrfc.pyx":603
 *         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, 603, __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_5pyrfc_wrapString(__pyx_v_tid, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __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;

  /* "src/pyrfc/_pyrfc.pyx":592
 *     ## 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.pyrfc.Connection._get_transaction_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":605
 *         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_5pyrfc_10Connection_43_create_and_submit_transaction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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, 605, __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, 605, __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, 605, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.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_5pyrfc_10Connection_42_create_and_submit_transaction(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_42_create_and_submit_transaction(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":613
 *         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, 613, __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, 613, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

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

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

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

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

  /* "src/pyrfc/_pyrfc.pyx":618
 *         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, 618, __pyx_L1_error)
  if (__pyx_t_3) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":620
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":622
 *         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, 622, __pyx_L1_error)
  if (__pyx_t_3) {

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

    /* "src/pyrfc/_pyrfc.pyx":622
 *         self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo)
 * 
 *         if queue_name:             # <<<<<<<<<<<<<<
 *             free(queueName)
 *         free(tid)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":624
 *         if queue_name:
 *             free(queueName)
 *         free(tid)             # <<<<<<<<<<<<<<
 *         if self._tHandle == NULL:
 *             self._error(&errorInfo)
 */
  free(__pyx_v_tid);

  /* "src/pyrfc/_pyrfc.pyx":625
 *             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) {

    /* "src/pyrfc/_pyrfc.pyx":626
 *         free(tid)
 *         if self._tHandle == NULL:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_transaction = True
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":625
 *             free(queueName)
 *         free(tid)
 *         if self._tHandle == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         self.active_transaction = True
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":627
 *         if self._tHandle == NULL:
 *             self._error(&errorInfo)
 *         self.active_transaction = True             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_self->active_transaction = 1;

  /* "src/pyrfc/_pyrfc.pyx":629
 *         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:*/ {

      /* "src/pyrfc/_pyrfc.pyx":630
 * 
 *         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, 630, __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, 630, __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, 630, __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, 630, __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, 630, __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, 630, __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, 630, __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, 630, __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, 630, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 630, __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, 630, __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, 630, __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, 630, __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;

        /* "src/pyrfc/_pyrfc.pyx":631
 *         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_5pyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 631, __pyx_L7_error)
        __pyx_v_funcName = __pyx_t_4;

        /* "src/pyrfc/_pyrfc.pyx":632
 *             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));

        /* "src/pyrfc/_pyrfc.pyx":633
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)             # <<<<<<<<<<<<<<
 *                 if not funcDesc:
 *                     self._error(&errorInfo)
 */
        free(__pyx_v_funcName);

        /* "src/pyrfc/_pyrfc.pyx":634
 *                 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) {

          /* "src/pyrfc/_pyrfc.pyx":635
 *                 free(funcName)
 *                 if not funcDesc:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 */
          __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 635, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "src/pyrfc/_pyrfc.pyx":634
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 *                 if not funcDesc:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":636
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":637
 *                     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) {

          /* "src/pyrfc/_pyrfc.pyx":638
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 try:
 *                     for name, value in params.iteritems():
 */
          __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 638, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "src/pyrfc/_pyrfc.pyx":637
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 try:
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":639
 *                 if not funcCont:
 *                     self._error(&errorInfo)
 *                 try:             # <<<<<<<<<<<<<<
 *                     for name, value in params.iteritems():
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 */
        /*try:*/ {

          /* "src/pyrfc/_pyrfc.pyx":640
 *                     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, 640, __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, 640, __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, 640, __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;

            /* "src/pyrfc/_pyrfc.pyx":641
 *                 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_5pyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 641, __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;

          /* "src/pyrfc/_pyrfc.pyx":643
 *                         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));

          /* "src/pyrfc/_pyrfc.pyx":644
 *                     # 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) {

            /* "src/pyrfc/_pyrfc.pyx":645
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)
 */
            __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 645, __pyx_L22_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "src/pyrfc/_pyrfc.pyx":644
 *                     # Add RFC call to transaction
 *                     rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *                 finally:
 */
          }
        }

        /* "src/pyrfc/_pyrfc.pyx":647
 *                         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:;
        }

        /* "src/pyrfc/_pyrfc.pyx":630
 * 
 *         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;

      /* "src/pyrfc/_pyrfc.pyx":649
 *                     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:*/ {

            /* "src/pyrfc/_pyrfc.pyx":650
 *             # 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));
          }

          /* "src/pyrfc/_pyrfc.pyx":649
 *                     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:;
          }
      }

      /* "src/pyrfc/_pyrfc.pyx":651
 *             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) {

        /* "src/pyrfc/_pyrfc.pyx":652
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         except RFCError as e:
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "src/pyrfc/_pyrfc.pyx":651
 *             with nogil:
 *                 rc = RfcSubmitTransaction(self._tHandle, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":629
 *         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;

    /* "src/pyrfc/_pyrfc.pyx":654
 *                 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, 654, __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.pyrfc.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, 654, __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:*/ {

        /* "src/pyrfc/_pyrfc.pyx":656
 *         except RFCError as e:
 *             # clean up actions
 *             RfcDestroyTransaction(self._tHandle, NULL)             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
        (void)(RfcDestroyTransaction(__pyx_v_self->_tHandle, NULL));

        /* "src/pyrfc/_pyrfc.pyx":657
 *             # 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, 657, __pyx_L40_error)
      }

      /* "src/pyrfc/_pyrfc.pyx":654
 *                 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:;

    /* "src/pyrfc/_pyrfc.pyx":629
 *         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:;
  }

  /* "src/pyrfc/_pyrfc.pyx":605
 *         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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":659
 *             raise
 * 
 *     def _destroy_transaction(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_45_destroy_transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_44_destroy_transaction(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_44_destroy_transaction(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":662
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":663
 *         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, 663, __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, 663, __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, 663, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":662
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":664
 *         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, 664, __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, 664, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":665
 *             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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":664
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":666
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":667
 *             self._open()
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_self->active_transaction = 0;

  /* "src/pyrfc/_pyrfc.pyx":668
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":669
 *         self.active_transaction = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def _confirm_transaction(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":668
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":659
 *             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.pyrfc.Connection._destroy_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":671
 *             self._error(&errorInfo)
 * 
 *     def _confirm_transaction(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_47_confirm_transaction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_46_confirm_transaction(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_46_confirm_transaction(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":674
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":675
 *         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, 675, __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, 675, __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, 675, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":674
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":676
 *         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, 676, __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, 676, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":677
 *             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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":676
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":678
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":679
 *             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) {

    /* "src/pyrfc/_pyrfc.pyx":680
 *         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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":679
 *             self._open()
 *         rc = RfcConfirmTransaction(self._tHandle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":681
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":682
 *             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;

  /* "src/pyrfc/_pyrfc.pyx":683
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":684
 *         self.active_transaction = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_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;

    /* "src/pyrfc/_pyrfc.pyx":683
 *         rc = RfcDestroyTransaction(self._tHandle, &errorInfo)
 *         self.active_transaction = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":671
 *             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.pyrfc.Connection._confirm_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":689
 *     ## 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_5pyrfc_10Connection_49_get_unit_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_10Connection_48_get_unit_id[] = "Returns a unique 32 char bgRFC unit ID (GUID).";
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_48_get_unit_id(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_48_get_unit_id(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_wrapString __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_unit_id", 0);

  /* "src/pyrfc/_pyrfc.pyx":695
 *         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, 695, __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, 695, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":696
 * 
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":695
 *         cdef RFC_UNITID uid
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":697
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":698
 *             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) {

    /* "src/pyrfc/_pyrfc.pyx":699
 *         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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":698
 *             self._open()
 *         rc = RfcGetUnitID(self._handle, uid, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return wrapString(uid, RFC_UNITID_LN)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":700
 *         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, 700, __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_5pyrfc_wrapString(__pyx_v_uid, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __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;

  /* "src/pyrfc/_pyrfc.pyx":689
 *     ## 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.pyrfc.Connection._get_unit_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":702
 *         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_5pyrfc_10Connection_51_create_and_submit_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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, 702, __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, 702, __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, 702, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.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_5pyrfc_10Connection_50_create_and_submit_unit(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_50_create_and_submit_unit(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":715
 *         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, 715, __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, 715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = ((!__pyx_t_2) != 0);
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":716
 * 
 *         if not self.alive:
 *             self._open()             # <<<<<<<<<<<<<<
 * 
 *         # uid
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":715
 *         cdef SAP_UC* sapuc
 * 
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":719
 * 
 *         # uid
 *         uid = fillString(unit_id)             # <<<<<<<<<<<<<<
 *         # queue
 *         queue_names = queue_names or []
 */
  __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_v_unit_id); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_v_uid = __pyx_t_4;

  /* "src/pyrfc/_pyrfc.pyx":721
 *         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, 721, __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, 721, __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;

  /* "src/pyrfc/_pyrfc.pyx":722
 *         # 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, 722, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_6 == 0) != 0);
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":723
 *         queue_names = queue_names or []
 *         if len(queue_names) == 0:
 *             queueNameCount = 0             # <<<<<<<<<<<<<<
 *             queueNames = NULL
 *             #queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 */
    __pyx_v_queueNameCount = 0;

    /* "src/pyrfc/_pyrfc.pyx":724
 *         if len(queue_names) == 0:
 *             queueNameCount = 0
 *             queueNames = NULL             # <<<<<<<<<<<<<<
 *             #queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 *         else:
 */
    __pyx_v_queueNames = NULL;

    /* "src/pyrfc/_pyrfc.pyx":722
 *         # queue
 *         queue_names = queue_names or []
 *         if len(queue_names) == 0:             # <<<<<<<<<<<<<<
 *             queueNameCount = 0
 *             queueNames = NULL
 */
    goto __pyx_L6;
  }

  /* "src/pyrfc/_pyrfc.pyx":727
 *             #queueNames = <SAP_UC**> mallocU(queueNameCount * sizeof(SAP_UC*))
 *         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, 727, __pyx_L1_error)
    __pyx_v_queueNameCount = ((int)__pyx_t_6);

    /* "src/pyrfc/_pyrfc.pyx":728
 *         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 *)))));

    /* "src/pyrfc/_pyrfc.pyx":729
 *             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, 729, __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, 729, __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, 729, __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, 729, __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, 729, __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, 729, __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, 729, __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, 729, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "src/pyrfc/_pyrfc.pyx":730
 *             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_5pyrfc_fillString(__pyx_v_queue_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 730, __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, 730, __pyx_L1_error)
      (__pyx_v_queueNames[__pyx_t_9]) = __pyx_t_4;

      /* "src/pyrfc/_pyrfc.pyx":729
 *             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:;

  /* "src/pyrfc/_pyrfc.pyx":733
 *         # 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)));

  /* "src/pyrfc/_pyrfc.pyx":734
 *         # 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)));

  /* "src/pyrfc/_pyrfc.pyx":747
 *         #unitAttr.sendingDate[0] = '\0'         # (RFC_DATE sendingDate;			///< Sending date in UTC (GMT-0). Used only when the external program is server. In the client case the nwrfclib fills this automatically.
 *         #unitAttr.sendingTime[0] = '\0'         # (RFC_TIME sendingTime;			///< 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) {

    /* "src/pyrfc/_pyrfc.pyx":748
 *         #unitAttr.sendingTime[0] = '\0'         # (RFC_TIME sendingTime;			///< 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']
 *             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, 748, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "src/pyrfc/_pyrfc.pyx":749
 *         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, 749, __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, 749, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.kernelTrace = __pyx_t_10;

      /* "src/pyrfc/_pyrfc.pyx":748
 *         #unitAttr.sendingTime[0] = '\0'         # (RFC_TIME sendingTime;			///< 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']
 *             if 'sat_trace' in attributes:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":750
 *             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, 750, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":751
 *                 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, 751, __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, 751, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.satTrace = __pyx_t_10;

      /* "src/pyrfc/_pyrfc.pyx":750
 *             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:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":752
 *             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, 752, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "src/pyrfc/_pyrfc.pyx":753
 *                 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, 753, __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, 753, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.unitHistory = __pyx_t_10;

      /* "src/pyrfc/_pyrfc.pyx":752
 *             if 'sat_trace' in attributes:
 *                 unitAttr.satTrace = attributes['sat_trace']
 *             if 'unit_history' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":754
 *             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, 754, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":755
 *                 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, 755, __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, 755, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.lock = __pyx_t_10;

      /* "src/pyrfc/_pyrfc.pyx":754
 *             if 'unit_history' in attributes:
 *                 unitAttr.unitHistory = attributes['unit_history']
 *             if 'lock' in attributes:             # <<<<<<<<<<<<<<
 *                 unitAttr.lock = attributes['lock']
 *             if 'no_commit_check' in attributes:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":756
 *             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: # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 */
    __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, 756, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "src/pyrfc/_pyrfc.pyx":757
 *                 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.
 *                 sapuc = fillString(attributes['user'][0:12])
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_no_commit_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __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, 757, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_unitAttr.noCommitCheck = __pyx_t_10;

      /* "src/pyrfc/_pyrfc.pyx":756
 *             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: # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User.
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":758
 *             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])
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_user, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 758, __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, 758, __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) {

      /* "src/pyrfc/_pyrfc.pyx":759
 *                 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])             # <<<<<<<<<<<<<<
 *                 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, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 12, NULL, NULL, &__pyx_slice__8, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 759, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "src/pyrfc/_pyrfc.pyx":760
 *             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)
 *             if 'client' in attributes: # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000".
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_user); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 12, NULL, NULL, &__pyx_slice__8, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __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, 760, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.user, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "src/pyrfc/_pyrfc.pyx":761
 *                 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".
 *                 sapuc = fillString(attributes['client'][0:3])
 */
      free(__pyx_v_sapuc);

      /* "src/pyrfc/_pyrfc.pyx":758
 *             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])
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":762
 *                 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])
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 */
    __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_client, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 762, __pyx_L1_error)
    __pyx_t_2 = (__pyx_t_3 != 0);
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":763
 *                 free(sapuc)
 *             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, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__9, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 763, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "src/pyrfc/_pyrfc.pyx":764
 *             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)
 *             if 't_code' in attributes: # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "".
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_client); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 3, NULL, NULL, &__pyx_slice__9, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __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, 764, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.client, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "src/pyrfc/_pyrfc.pyx":765
 *                 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 "".
 *                 sapuc = fillString(attributes['t_code'][0:20])
 */
      free(__pyx_v_sapuc);

      /* "src/pyrfc/_pyrfc.pyx":762
 *                 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])
 *                 strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":766
 *                 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])
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 */
    __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, 766, __pyx_L1_error)
    __pyx_t_3 = (__pyx_t_2 != 0);
    if (__pyx_t_3) {

      /* "src/pyrfc/_pyrfc.pyx":767
 *                 free(sapuc)
 *             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, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 20, NULL, NULL, &__pyx_slice__10, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "src/pyrfc/_pyrfc.pyx":768
 *             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)
 *             if 'program' in attributes and attributes['program'] is not None: # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name.
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_t_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 20, NULL, NULL, &__pyx_slice__10, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __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, 768, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.tCode, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "src/pyrfc/_pyrfc.pyx":769
 *                 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.
 *                 sapuc = fillString(attributes['program'][0:40])
 */
      free(__pyx_v_sapuc);

      /* "src/pyrfc/_pyrfc.pyx":766
 *                 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])
 *                 strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":770
 *                 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])
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 */
    __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_program, __pyx_v_attributes, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 770, __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, 770, __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) {

      /* "src/pyrfc/_pyrfc.pyx":771
 *                 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])             # <<<<<<<<<<<<<<
 *                 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, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 40, NULL, NULL, &__pyx_slice__11, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_v_sapuc = __pyx_t_4;

      /* "src/pyrfc/_pyrfc.pyx":772
 *             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)
 *         #unitAttr.hostname = "";		# (SAP_UC[40+1]) Sender hostname. Used only when the external program is server. In the client case the nwrfclib fills this automatically.
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_program); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 40, NULL, NULL, &__pyx_slice__11, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __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, 772, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      strncpyU(__pyx_v_unitAttr.program, __pyx_v_sapuc, (__pyx_t_6 + 1));

      /* "src/pyrfc/_pyrfc.pyx":773
 *                 sapuc = fillString(attributes['program'][0:40])
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 *                 free(sapuc)             # <<<<<<<<<<<<<<
 *         #unitAttr.hostname = "";		# (SAP_UC[40+1]) Sender hostname. Used only when the external program is server. In the client case the nwrfclib fills this automatically.
 *         #unitAttr.sendingDate;			# (RFC_DATE) Sending date in UTC (GMT-0). Used only when the external program is server. In the client case the nwrfclib fills this automatically.
 */
      free(__pyx_v_sapuc);

      /* "src/pyrfc/_pyrfc.pyx":770
 *                 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])
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":747
 *         #unitAttr.sendingDate[0] = '\0'         # (RFC_DATE sendingDate;			///< Sending date in UTC (GMT-0). Used only when the external program is server. In the client case the nwrfclib fills this automatically.
 *         #unitAttr.sendingTime[0] = '\0'         # (RFC_TIME sendingTime;			///< 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']
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":778
 *         #unitAttr.sendingTime;			# (RFC_TIME) Sending time in UTC (GMT-0). Used only when the external program is server. In the client case the nwrfclib fills this automatically.
 * 
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":781
 * 
 *         # 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, 781, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_6 > 0) != 0);
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":782
 *         # 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, 782, __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, 782, __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, 782, __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, 782, __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, 782, __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, 782, __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, 782, __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, 782, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1);
      __pyx_t_1 = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "src/pyrfc/_pyrfc.pyx":783
 *         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, 783, __pyx_L1_error)
      free((__pyx_v_queueNames[__pyx_t_9]));

      /* "src/pyrfc/_pyrfc.pyx":782
 *         # 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;

    /* "src/pyrfc/_pyrfc.pyx":784
 *             for i, queue_name in enumerate(queue_names):
 *                 free(queueNames[i])
 *             free(queueNames)             # <<<<<<<<<<<<<<
 *         # uid (deallocate)
 *         free(uid)
 */
    free(__pyx_v_queueNames);

    /* "src/pyrfc/_pyrfc.pyx":781
 * 
 *         # queue (deallocate)
 *         if len(queue_names) > 0:             # <<<<<<<<<<<<<<
 *             for i, queue_name in enumerate(queue_names):
 *                 free(queueNames[i])
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":786
 *             free(queueNames)
 *         # uid (deallocate)
 *         free(uid)             # <<<<<<<<<<<<<<
 * 
 *         if self._uHandle == NULL:
 */
  free(__pyx_v_uid);

  /* "src/pyrfc/_pyrfc.pyx":788
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":789
 * 
 *         if self._uHandle == NULL:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         self.active_unit = True
 * 
 */
    __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 789, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":788
 *         free(uid)
 * 
 *         if self._uHandle == NULL:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         self.active_unit = True
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":790
 *         if self._uHandle == NULL:
 *             self._error(&errorInfo)
 *         self.active_unit = True             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_v_self->active_unit = 1;

  /* "src/pyrfc/_pyrfc.pyx":792
 *         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:*/ {

      /* "src/pyrfc/_pyrfc.pyx":793
 * 
 *         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, 793, __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, 793, __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, 793, __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, 793, __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, 793, __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, 793, __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, 793, __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, 793, __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, 793, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_8);
          __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 793, __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, 793, __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, 793, __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, 793, __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;

        /* "src/pyrfc/_pyrfc.pyx":794
 *         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_5pyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 794, __pyx_L27_error)
        __pyx_v_funcName = __pyx_t_4;

        /* "src/pyrfc/_pyrfc.pyx":795
 *             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));

        /* "src/pyrfc/_pyrfc.pyx":796
 *                 funcName = fillString(func_name)
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)             # <<<<<<<<<<<<<<
 *                 if not funcDesc:
 *                     self._error(&errorInfo)
 */
        free(__pyx_v_funcName);

        /* "src/pyrfc/_pyrfc.pyx":797
 *                 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) {

          /* "src/pyrfc/_pyrfc.pyx":798
 *                 free(funcName)
 *                 if not funcDesc:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 */
          __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 798, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "src/pyrfc/_pyrfc.pyx":797
 *                 funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo)
 *                 free(funcName)
 *                 if not funcDesc:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":799
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":800
 *                     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) {

          /* "src/pyrfc/_pyrfc.pyx":801
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:
 *                     self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 try:
 *                     for name, value in params.iteritems():
 */
          __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "src/pyrfc/_pyrfc.pyx":800
 *                     self._error(&errorInfo)
 *                 funcCont = RfcCreateFunction(funcDesc, &errorInfo)
 *                 if not funcCont:             # <<<<<<<<<<<<<<
 *                     self._error(&errorInfo)
 *                 try:
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":802
 *                 if not funcCont:
 *                     self._error(&errorInfo)
 *                 try:             # <<<<<<<<<<<<<<
 *                     for name, value in params.iteritems():
 *                         fillFunctionParameter(funcDesc, funcCont, name, value)
 */
        /*try:*/ {

          /* "src/pyrfc/_pyrfc.pyx":803
 *                     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, 803, __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, 803, __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, 803, __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;

            /* "src/pyrfc/_pyrfc.pyx":804
 *                 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_5pyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 804, __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;

          /* "src/pyrfc/_pyrfc.pyx":806
 *                         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));

          /* "src/pyrfc/_pyrfc.pyx":807
 *                     # 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) {

            /* "src/pyrfc/_pyrfc.pyx":808
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:
 *                         self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)
 */
            __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 808, __pyx_L42_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "src/pyrfc/_pyrfc.pyx":807
 *                     # Add RFC call to unit
 *                     rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo)
 *                     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                         self._error(&errorInfo)
 *                 finally:
 */
          }
        }

        /* "src/pyrfc/_pyrfc.pyx":810
 *                         self._error(&errorInfo)
 *                 finally:
 *                     RfcDestroyFunction(funcCont, NULL)             # <<<<<<<<<<<<<<
 *             # TODO: segfault here. FIXME
 *             # execute
 */
        /*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:;
        }

        /* "src/pyrfc/_pyrfc.pyx":793
 * 
 *         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;

      /* "src/pyrfc/_pyrfc.pyx":815
 *             #_# 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));

      /* "src/pyrfc/_pyrfc.pyx":816
 *             #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) {

        /* "src/pyrfc/_pyrfc.pyx":817
 *             rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:
 *                 self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         except RFCError as e:
 */
        __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "src/pyrfc/_pyrfc.pyx":816
 *             #with nogil:
 *             rc = RfcSubmitUnit(self._uHandle, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 self._error(&errorInfo)
 * 
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":792
 *         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;

    /* "src/pyrfc/_pyrfc.pyx":819
 *                 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, 819, __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.pyrfc.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, 819, __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:*/ {

        /* "src/pyrfc/_pyrfc.pyx":821
 *         except RFCError as e:
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)             # <<<<<<<<<<<<<<
 *             raise
 * 
 */
        (void)(RfcDestroyUnit(__pyx_v_self->_uHandle, NULL));

        /* "src/pyrfc/_pyrfc.pyx":822
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)
 *             raise             # <<<<<<<<<<<<<<
 * 
 *         #_#print " - wrapping Unit IDentifier."
 */
        __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, 822, __pyx_L57_error)
      }

      /* "src/pyrfc/_pyrfc.pyx":819
 *                 self._error(&errorInfo)
 * 
 *         except RFCError as e:             # <<<<<<<<<<<<<<
 *             # clean up actions
 *             RfcDestroyUnit(self._uHandle, NULL)
 */
      /*finally:*/ {
        __pyx_L57_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:;

    /* "src/pyrfc/_pyrfc.pyx":792
 *         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:;
  }

  /* "src/pyrfc/_pyrfc.pyx":825
 * 
 *         #_#print " - wrapping Unit IDentifier."
 *         unit_identifier = wrapUnitIdentifier(uIdentifier)             # <<<<<<<<<<<<<<
 *         return unit_identifier["queued"]
 * 
 */
  __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapUnitIdentifier(__pyx_v_uIdentifier); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_unit_identifier = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":826
 *         #_#print " - wrapping Unit IDentifier."
 *         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, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":702
 *         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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":828
 *         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_5pyrfc_10Connection_53_get_unit_state(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_52_get_unit_state(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_52_get_unit_state(struct __pyx_obj_5pyrfc_5pyrfc_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_v_unit_state2txt = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  RFC_UNIT_IDENTIFIER __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_get_unit_state", 0);

  /* "src/pyrfc/_pyrfc.pyx":831
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit)             # <<<<<<<<<<<<<<
 *         cdef RFC_UNIT_STATE state
 *         unit_state2txt = {
 */
  __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_fillUnitIdentifier(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 831, __pyx_L1_error)
  __pyx_v_uIdentifier = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":834
 *         cdef RFC_UNIT_STATE state
 *         unit_state2txt = {
 *             RFC_UNIT_NOT_FOUND: u"RFC_UNIT_NOT_FOUND",             # <<<<<<<<<<<<<<
 *             RFC_UNIT_IN_PROCESS: u"RFC_UNIT_IN_PROCESS",
 *             RFC_UNIT_COMMITTED: u"RFC_UNIT_COMMITTED",
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_NOT_FOUND); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_u_RFC_UNIT_NOT_FOUND) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":835
 *         unit_state2txt = {
 *             RFC_UNIT_NOT_FOUND: u"RFC_UNIT_NOT_FOUND",
 *             RFC_UNIT_IN_PROCESS: u"RFC_UNIT_IN_PROCESS",             # <<<<<<<<<<<<<<
 *             RFC_UNIT_COMMITTED: u"RFC_UNIT_COMMITTED",
 *             RFC_UNIT_ROLLED_BACK: u"RFC_UNIT_ROLLED_BACK",
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_IN_PROCESS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_u_RFC_UNIT_IN_PROCESS) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":836
 *             RFC_UNIT_NOT_FOUND: u"RFC_UNIT_NOT_FOUND",
 *             RFC_UNIT_IN_PROCESS: u"RFC_UNIT_IN_PROCESS",
 *             RFC_UNIT_COMMITTED: u"RFC_UNIT_COMMITTED",             # <<<<<<<<<<<<<<
 *             RFC_UNIT_ROLLED_BACK: u"RFC_UNIT_ROLLED_BACK",
 *             RFC_UNIT_CONFIRMED: u"RFC_UNIT_CONFIRMED"
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_COMMITTED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_u_RFC_UNIT_COMMITTED) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":837
 *             RFC_UNIT_IN_PROCESS: u"RFC_UNIT_IN_PROCESS",
 *             RFC_UNIT_COMMITTED: u"RFC_UNIT_COMMITTED",
 *             RFC_UNIT_ROLLED_BACK: u"RFC_UNIT_ROLLED_BACK",             # <<<<<<<<<<<<<<
 *             RFC_UNIT_CONFIRMED: u"RFC_UNIT_CONFIRMED"
 *         }
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_ROLLED_BACK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_u_RFC_UNIT_ROLLED_BACK) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":838
 *             RFC_UNIT_COMMITTED: u"RFC_UNIT_COMMITTED",
 *             RFC_UNIT_ROLLED_BACK: u"RFC_UNIT_ROLLED_BACK",
 *             RFC_UNIT_CONFIRMED: u"RFC_UNIT_CONFIRMED"             # <<<<<<<<<<<<<<
 *         }
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_CONFIRMED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_2, __pyx_t_3, __pyx_n_u_RFC_UNIT_CONFIRMED) < 0) __PYX_ERR(0, 834, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_unit_state2txt = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":841
 *         }
 * 
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError(u"No unit handle for this connection available.")
 *         if not self.alive:
 */
  __pyx_t_4 = ((!(__pyx_v_self->active_unit != 0)) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "src/pyrfc/_pyrfc.pyx":842
 * 
 *         if not self.active_unit:
 *             raise RFCError(u"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, 842, __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_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __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_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __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, 842, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":841
 *         }
 * 
 *         if not self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError(u"No unit handle for this connection available.")
 *         if not self.alive:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":843
 *         if not self.active_unit:
 *             raise RFCError(u"No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = ((!__pyx_t_4) != 0);
  if (__pyx_t_6) {

    /* "src/pyrfc/_pyrfc.pyx":844
 *             raise RFCError(u"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_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":843
 *         if not self.active_unit:
 *             raise RFCError(u"No unit handle for this connection available.")
 *         if not self.alive:             # <<<<<<<<<<<<<<
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":845
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":846
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return unit_state2txt[state]
 */
  __pyx_t_6 = ((__pyx_v_rc != RFC_OK) != 0);
  if (__pyx_t_6) {

    /* "src/pyrfc/_pyrfc.pyx":847
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 *         return unit_state2txt[state]
 * 
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":846
 *             self._open()
 *         rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         return unit_state2txt[state]
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":848
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 *         return unit_state2txt[state]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyInt_From_RFC_UNIT_STATE(__pyx_v_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_unit_state2txt, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":828
 *         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_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection._get_unit_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_unit_state2txt);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":851
 * 
 * 
 *     def _destroy_unit(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_55_destroy_unit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_54_destroy_unit(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_54_destroy_unit(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":854
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":855
 *         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, 855, __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, 855, __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, 855, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":854
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":856
 *         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, 856, __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, 856, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_1) != 0);
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":857
 *             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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 857, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":856
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":858
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":859
 *             self._open()
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)
 */
  __pyx_v_self->active_unit = 0;

  /* "src/pyrfc/_pyrfc.pyx":860
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":861
 *         self.active_unit = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     def _confirm_unit(self, unit):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":860
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":851
 * 
 * 
 *     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.pyrfc.Connection._destroy_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":863
 *             self._error(&errorInfo)
 * 
 *     def _confirm_unit(self, unit):             # <<<<<<<<<<<<<<
 *         cdef RFC_RC rc
 *         cdef RFC_ERROR_INFO errorInfo
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_57_confirm_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_56_confirm_unit(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_56_confirm_unit(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":866
 *         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_5pyrfc_fillUnitIdentifier(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 866, __pyx_L1_error)
  __pyx_v_uIdentifier = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":868
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":869
 * 
 *         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, 869, __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, 869, __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, 869, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":868
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":870
 *         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, 870, __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, 870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = ((!__pyx_t_2) != 0);
  if (__pyx_t_6) {

    /* "src/pyrfc/_pyrfc.pyx":871
 *             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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":870
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":872
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":873
 *             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) {

    /* "src/pyrfc/_pyrfc.pyx":874
 *         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_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":873
 *             self._open()
 *         rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":875
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":876
 *             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;

  /* "src/pyrfc/_pyrfc.pyx":877
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":878
 *         self.active_unit = False
 *         if rc != RFC_OK:
 *             self._error(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     ##########################################################################
 */
    __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":877
 *         rc = RfcDestroyUnit(self._uHandle, &errorInfo)
 *         self.active_unit = False
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._error(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":863
 *             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.pyrfc.Connection._confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":888
 *     # * 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_5pyrfc_10Connection_59initialize_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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, 888, __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, 888, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Connection.initialize_unit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_58initialize_unit(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), __pyx_v_background);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_58initialize_unit(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":903
 *         :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) {

    /* "src/pyrfc/_pyrfc.pyx":904
 *         """
 *         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, 904, __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, 904, __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;

    /* "src/pyrfc/_pyrfc.pyx":903
 *         :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;
  }

  /* "src/pyrfc/_pyrfc.pyx":905
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":906
 *             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, 906, __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, 906, __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;

    /* "src/pyrfc/_pyrfc.pyx":905
 *         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;
  }

  /* "src/pyrfc/_pyrfc.pyx":908
 *             id = self._get_transaction_id()
 *         else:
 *             raise RFCError("Argument 'background' must be a boolean value.")             # <<<<<<<<<<<<<<
 *         return {'background': background, 'id':id}
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __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, 908, __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, 908, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "src/pyrfc/_pyrfc.pyx":909
 *         else:
 *             raise RFCError("Argument 'background' must be a boolean value.")
 *         return {'background': background, 'id':id}             # <<<<<<<<<<<<<<
 * 
 *     def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __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, 909, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_id, __pyx_v_id) < 0) __PYX_ERR(0, 909, __pyx_L1_error)
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":888
 *     # * 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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":911
 *         return {'background': background, 'id':id}
 * 
 *     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_5pyrfc_10Connection_61fill_and_submit_unit(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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, 911, __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, 911, __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, 911, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.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_5pyrfc_10Connection_60fill_and_submit_unit(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_60fill_and_submit_unit(struct __pyx_obj_5pyrfc_5pyrfc_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 *);
  int __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fill_and_submit_unit", 0);

  /* "src/pyrfc/_pyrfc.pyx":964
 *         """
 * 
 *         if not isinstance(unit, 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 = PyDict_Check(__pyx_v_unit); 
  __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 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, 964, __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, 964, __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)) {

    /* "src/pyrfc/_pyrfc.pyx":965
 * 
 *         if not isinstance(unit, 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__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __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, 965, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":964
 *         """
 * 
 *         if not isinstance(unit, 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):
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":966
 *         if not isinstance(unit, 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, 966, __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, 966, __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)) {

    /* "src/pyrfc/_pyrfc.pyx":967
 *             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__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __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, 967, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":966
 *         if not isinstance(unit, 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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":968
 *         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, 968, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_5 == 0) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyrfc/_pyrfc.pyx":969
 *             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 not isinstance(func_name, basestring) or not isinstance(params, dict):
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __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, 969, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":968
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":970
 *         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 not isinstance(func_name, basestring) or not isinstance(params, 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, 970, __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, 970, __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, 970, __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, 970, __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, 970, __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, 970, __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, 970, __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, 970, __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, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 970, __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, 970, __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, 970, __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, 970, __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;

    /* "src/pyrfc/_pyrfc.pyx":971
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:
 *             if not isinstance(func_name, basestring) or not isinstance(params, dict):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:
 */
    __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_func_name); 
    __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
    if (!__pyx_t_2) {
    } else {
      __pyx_t_3 = __pyx_t_2;
      goto __pyx_L14_bool_binop_done;
    }
    __pyx_t_2 = PyDict_Check(__pyx_v_params); 
    __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
    __pyx_t_3 = __pyx_t_1;
    __pyx_L14_bool_binop_done:;
    if (unlikely(__pyx_t_3)) {

      /* "src/pyrfc/_pyrfc.pyx":972
 *         for func_name, params in calls:
 *             if not isinstance(func_name, basestring) or not isinstance(params, dict):
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")             # <<<<<<<<<<<<<<
 *         if self.active_unit:
 *             raise RFCError(u"There is an active unit for this connection. "
 */
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 972, __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, 972, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":971
 *             raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).")
 *         for func_name, params in calls:
 *             if not isinstance(func_name, basestring) or not isinstance(params, dict):             # <<<<<<<<<<<<<<
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":970
 *         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 not isinstance(func_name, basestring) or not isinstance(params, dict):
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":973
 *             if not isinstance(func_name, basestring) or not isinstance(params, dict):
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError(u"There is an active unit for this connection. "
 *                            u"Use destroy_unit() " +
 */
  __pyx_t_3 = (__pyx_v_self->active_unit != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyrfc/_pyrfc.pyx":974
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:
 *             raise RFCError(u"There is an active unit for this connection. "             # <<<<<<<<<<<<<<
 *                            u"Use destroy_unit() " +
 *                            u"or confirm_unit().")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 974, __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, 974, __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, 974, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":973
 *             if not isinstance(func_name, basestring) or not isinstance(params, dict):
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")
 *         if self.active_unit:             # <<<<<<<<<<<<<<
 *             raise RFCError(u"There is an active unit for this connection. "
 *                            u"Use destroy_unit() " +
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":977
 *                            u"Use destroy_unit() " +
 *                            u"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, 977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_bg = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":978
 *                            u"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, 978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_unit_id = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":980
 *         unit_id = unit['id']
 * 
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             if len(unit_id)!=RFC_UNITID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 */
  __pyx_t_3 = (__pyx_v_bg == Py_True);
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (__pyx_t_1) {

    /* "src/pyrfc/_pyrfc.pyx":981
 * 
 *         if bg is True:
 *             if len(unit_id)!=RFC_UNITID_LN:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 *             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, 981, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_5 != RFC_UNITID_LN) != 0);
    if (unlikely(__pyx_t_1)) {

      /* "src/pyrfc/_pyrfc.pyx":982
 *         if bg is True:
 *             if len(unit_id)!=RFC_UNITID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))             # <<<<<<<<<<<<<<
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 *         elif bg is False:
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Length_of_parameter_unit_id_must, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = __Pyx_PyInt_From_int(RFC_UNITID_LN); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 982, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 982, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":981
 * 
 *         if bg is True:
 *             if len(unit_id)!=RFC_UNITID_LN:             # <<<<<<<<<<<<<<
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 *             unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":983
 *             if len(unit_id)!=RFC_UNITID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 *             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_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_unit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = NULL;
    __pyx_t_12 = 0;
    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_12 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes};
      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes};
      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_GOTREF(__pyx_t_7);
    } else
    #endif
    {
      __pyx_t_8 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 983, __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_12, __pyx_v_unit_id);
      __Pyx_INCREF(__pyx_v_calls);
      __Pyx_GIVEREF(__pyx_v_calls);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_12, __pyx_v_calls);
      __Pyx_INCREF(__pyx_v_queue_names);
      __Pyx_GIVEREF(__pyx_v_queue_names);
      PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_12, __pyx_v_queue_names);
      __Pyx_INCREF(__pyx_v_attributes);
      __Pyx_GIVEREF(__pyx_v_attributes);
      PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_12, __pyx_v_attributes);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(PyObject_SetItem(__pyx_v_unit, __pyx_n_u_queued, __pyx_t_7) < 0)) __PYX_ERR(0, 983, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "src/pyrfc/_pyrfc.pyx":980
 *         unit_id = unit['id']
 * 
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             if len(unit_id)!=RFC_UNITID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 */
    goto __pyx_L17;
  }

  /* "src/pyrfc/_pyrfc.pyx":984
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 *             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("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 */
  __pyx_t_1 = (__pyx_v_bg == Py_False);
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_3)) {

    /* "src/pyrfc/_pyrfc.pyx":985
 *             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("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 *             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, 985, __pyx_L1_error)
    __pyx_t_3 = ((__pyx_t_5 != RFC_TID_LN) != 0);
    if (unlikely(__pyx_t_3)) {

      /* "src/pyrfc/_pyrfc.pyx":986
 *         elif bg is False:
 *             if len(unit_id)!=RFC_TID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))             # <<<<<<<<<<<<<<
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Length_of_parameter_unit_id_must, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyInt_From_int(RFC_TID_LN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __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_7 = (__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_7)) __PYX_ERR(0, 986, __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, 986, __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, 986, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":985
 *             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("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 *             if attributes is not None:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":987
 *             if len(unit_id)!=RFC_TID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 *             if attributes is not None:             # <<<<<<<<<<<<<<
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or isinstance(queue_names, 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)) {

      /* "src/pyrfc/_pyrfc.pyx":988
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")             # <<<<<<<<<<<<<<
 *             if queue_names is None or isinstance(queue_names, 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, 988, __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, 988, __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, 988, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":987
 *             if len(unit_id)!=RFC_TID_LN:
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 *             if attributes is not None:             # <<<<<<<<<<<<<<
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or isinstance(queue_names, list) and len(queue_names) == 0:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":989
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or isinstance(queue_names, 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 = PyList_Check(__pyx_v_queue_names); 
    __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, 989, __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) {

      /* "src/pyrfc/_pyrfc.pyx":990
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or isinstance(queue_names, 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, 990, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      __pyx_t_12 = 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_12 = 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_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 990, __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_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 990, __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_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 990, __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_12, __pyx_v_unit_id);
        __Pyx_INCREF(__pyx_v_calls);
        __Pyx_GIVEREF(__pyx_v_calls);
        PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_12, __pyx_v_calls);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 990, __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;

      /* "src/pyrfc/_pyrfc.pyx":991
 *             if queue_names is None or isinstance(queue_names, 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, 991, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":989
 *             if attributes is not None:
 *                 raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)")
 *             if queue_names is None or isinstance(queue_names, list) and len(queue_names) == 0:             # <<<<<<<<<<<<<<
 *                 self._create_and_submit_transaction(unit_id, calls)
 *                 unit['queued'] = False
 */
      goto __pyx_L21;
    }

    /* "src/pyrfc/_pyrfc.pyx":992
 *                 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, 992, __pyx_L1_error)
    __pyx_t_1 = ((__pyx_t_5 == 1) != 0);
    if (likely(__pyx_t_1)) {

      /* "src/pyrfc/_pyrfc.pyx":993
 *                 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, 993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_queue_name = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "src/pyrfc/_pyrfc.pyx":994
 *             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, 994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = NULL;
      __pyx_t_12 = 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_12 = 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_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __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_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __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_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 994, __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_12, __pyx_v_unit_id);
        __Pyx_INCREF(__pyx_v_calls);
        __Pyx_GIVEREF(__pyx_v_calls);
        PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_12, __pyx_v_calls);
        __Pyx_INCREF(__pyx_v_queue_name);
        __Pyx_GIVEREF(__pyx_v_queue_name);
        PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_12, __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, 994, __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;

      /* "src/pyrfc/_pyrfc.pyx":995
 *                 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, 995, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":992
 *                 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;
    }

    /* "src/pyrfc/_pyrfc.pyx":997
 *                 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, 997, __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, 997, __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, 997, __pyx_L1_error)
    }
    __pyx_L21:;

    /* "src/pyrfc/_pyrfc.pyx":984
 *                 raise TypeError("Length of parameter 'unit['id']' must be {} chars.".format(RFC_UNITID_LN))
 *             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("Length of parameter 'unit['id']' must be {} chars.".format(RFC_TID_LN))
 */
    goto __pyx_L17;
  }

  /* "src/pyrfc/_pyrfc.pyx":999
 *                 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, 999, __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, 999, __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, 999, __pyx_L1_error)
  }
  __pyx_L17:;

  /* "src/pyrfc/_pyrfc.pyx":1000
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":911
 *         return {'background': background, 'id':id}
 * 
 *     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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1002
 *         return unit
 * 
 *     def get_unit_state(self, unit):             # <<<<<<<<<<<<<<
 *         """Retrieves the processing status of the given background unit.
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_63get_unit_state(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_10Connection_62get_unit_state(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_62get_unit_state(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1017
 *             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, 1017, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1018
 *         """
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":1019
 *         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, 1019, __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, 1019, __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;

    /* "src/pyrfc/_pyrfc.pyx":1018
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             return self._get_unit_state(unit)
 *         elif bg is False:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1020
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1021
 *             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, 1021, __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, 1021, __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, 1021, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1020
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1023
 *             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, 1023, __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, 1023, __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, 1023, __pyx_L1_error)
  }

  /* "src/pyrfc/_pyrfc.pyx":1002
 *         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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1025
 *             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_5pyrfc_10Connection_65destroy_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_10Connection_64destroy_unit(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_64destroy_unit(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1035
 *                  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, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1036
 *         """
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":1037
 *         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, 1037, __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, 1037, __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;

    /* "src/pyrfc/_pyrfc.pyx":1036
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             self._destroy_unit()
 *         elif bg is False:
 */
    goto __pyx_L3;
  }

  /* "src/pyrfc/_pyrfc.pyx":1038
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1039
 *             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, 1039, __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, 1039, __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;

    /* "src/pyrfc/_pyrfc.pyx":1038
 *         if bg is True:
 *             self._destroy_unit()
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             self._destroy_transaction()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyrfc/_pyrfc.pyx":1041
 *             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, 1041, __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, 1041, __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, 1041, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "src/pyrfc/_pyrfc.pyx":1025
 *             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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1043
 *             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_5pyrfc_10Connection_67confirm_unit(PyObject *__pyx_v_self, PyObject *__pyx_v_unit); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_10Connection_66confirm_unit(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_unit));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_66confirm_unit(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1053
 *                  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, 1053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_bg = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1054
 *         """
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":1055
 *         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, 1055, __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, 1055, __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;

    /* "src/pyrfc/_pyrfc.pyx":1054
 *         """
 *         bg = unit['background']
 *         if bg is True:             # <<<<<<<<<<<<<<
 *             self._confirm_unit(unit)
 *         elif bg is False:
 */
    goto __pyx_L3;
  }

  /* "src/pyrfc/_pyrfc.pyx":1056
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1057
 *             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, 1057, __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, 1057, __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;

    /* "src/pyrfc/_pyrfc.pyx":1056
 *         if bg is True:
 *             self._confirm_unit(unit)
 *         elif bg is False:             # <<<<<<<<<<<<<<
 *             self._confirm_transaction()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "src/pyrfc/_pyrfc.pyx":1059
 *             self._confirm_transaction()
 *         else:
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")             # <<<<<<<<<<<<<<
 * 
 * class TypeDescription(object):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1059, __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, 1059, __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, 1059, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "src/pyrfc/_pyrfc.pyx":1043
 *             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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":207
 *     """
 *     cdef unsigned __bconfig
 *     cdef public object __config             # <<<<<<<<<<<<<<
 *     cdef bint active_transaction
 *     cdef bint active_unit
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Connection_8__config_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_8__config___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_8__config___get__(struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Connection_8__config_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_8__config_2__set__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_5pyrfc_10Connection_8__config_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);
  __Pyx_INCREF(__pyx_v_value);
  __Pyx_GIVEREF(__pyx_v_value);
  __Pyx_GOTREF(__pyx_v_self->__config);
  __Pyx_DECREF(__pyx_v_self->__config);
  __pyx_v_self->__config = __pyx_v_value;

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

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_10Connection_8__config_5__del__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_10Connection_8__config_5__del__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Connection_8__config_4__del__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static int __pyx_pf_5pyrfc_5pyrfc_10Connection_8__config_4__del__(struct __pyx_obj_5pyrfc_5pyrfc_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 = 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_5pyrfc_10Connection_69__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_68__reduce_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_68__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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__16, 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.pyrfc.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_5pyrfc_10Connection_71__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Connection_70__setstate_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Connection_70__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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__17, 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.pyrfc.Connection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1086
 * 
 *     """
 *     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_5pyrfc_15TypeDescription_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_15TypeDescription_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_15TypeDescription_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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, 1086, __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, 1086, __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, 1086, __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, 1086, __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, 1086, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.TypeDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_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_5pyrfc_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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  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("__init__", 0);

  /* "src/pyrfc/_pyrfc.pyx":1087
 *     """
 *     def __init__(self, name, nuc_length, uc_length):
 *         self.fields = []             # <<<<<<<<<<<<<<
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __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, 1087, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1088
 *     def __init__(self, name, nuc_length, uc_length):
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError("'name' (string) 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, 1088, __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, 1088, __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)) {

    /* "src/pyrfc/_pyrfc.pyx":1089
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         for int_field in [nuc_length, uc_length]:
 *             if not isinstance(int_field, (int, long)):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1089, __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, 1089, __pyx_L1_error)

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

  /* "src/pyrfc/_pyrfc.pyx":1090
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:             # <<<<<<<<<<<<<<
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __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_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __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_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1090, __pyx_L1_error)
    #else
    __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1090, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_int_field, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1091
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         for int_field in [nuc_length, uc_length]:
 *             if not isinstance(int_field, (int, long)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         self.name = name
 */
    __pyx_t_4 = PyInt_Check(__pyx_v_int_field); 
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_2 = __pyx_t_6;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = PyLong_Check(__pyx_v_int_field); 
    __pyx_t_4 = (__pyx_t_6 != 0);
    __pyx_t_2 = __pyx_t_4;
    __pyx_L9_bool_binop_done:;
    __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
    if (unlikely(__pyx_t_4)) {

      /* "src/pyrfc/_pyrfc.pyx":1092
 *         for int_field in [nuc_length, uc_length]:
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.nuc_length = nuc_length
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_must_be_of_type_integer, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_int_field) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_int_field);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1092, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 1092, __pyx_L1_error)

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

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

  /* "src/pyrfc/_pyrfc.pyx":1093
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         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, 1093, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1094
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         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, 1094, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1095
 *         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, 1095, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1086
 * 
 *     """
 *     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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1097
 *         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_5pyrfc_15TypeDescription_3add_field(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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: Type of the field\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_5pyrfc_15TypeDescription_3add_field = {"add_field", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_15TypeDescription_3add_field, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_15TypeDescription_2add_field};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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));

    /* "src/pyrfc/_pyrfc.pyx":1098
 * 
 *     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, 1097, __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, 1097, __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, 1097, __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, 1097, __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, 1097, __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, 1097, __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, 1097, __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, 1097, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.TypeDescription.add_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1097
 *         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_5pyrfc_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;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  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("add_field", 0);

  /* "src/pyrfc/_pyrfc.pyx":1118
 *         :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, 1118, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 < 1) != 0);
  if (__pyx_t_2) {

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

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

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

    /* "src/pyrfc/_pyrfc.pyx":1121
 *             return None
 *         if len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         if field_type not in _type2rfc:
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1121, __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, 1121, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1120
 *         if len(name)<1:
 *             return None
 *         if len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if field_type not in _type2rfc:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1122
 *         if len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if field_type not in _type2rfc:             # <<<<<<<<<<<<<<
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_type2rfc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_field_type, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1122, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_4 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_4)) {

    /* "src/pyrfc/_pyrfc.pyx":1123
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if field_type not in _type2rfc:
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")             # <<<<<<<<<<<<<<
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_type2rfc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_field_type_string_must_be_in, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __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, 1123, __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, 1123, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1122
 *         if len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if field_type not in _type2rfc:             # <<<<<<<<<<<<<<
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1124
 *         if field_type not in _type2rfc:
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:             # <<<<<<<<<<<<<<
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 */
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __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_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __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_5, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 1124, __pyx_L1_error)
    #else
    __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_XDECREF_SET(__pyx_v_int_field, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1125
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         self.fields.append({
 */
    __pyx_t_2 = PyInt_Check(__pyx_v_int_field); 
    __pyx_t_6 = (__pyx_t_2 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_4 = __pyx_t_6;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_6 = PyLong_Check(__pyx_v_int_field); 
    __pyx_t_2 = (__pyx_t_6 != 0);
    __pyx_t_4 = __pyx_t_2;
    __pyx_L9_bool_binop_done:;
    __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "src/pyrfc/_pyrfc.pyx":1126
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))             # <<<<<<<<<<<<<<
 *         self.fields.append({
 *             'name': name,
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_must_be_of_type_integer, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_8 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
        }
      }
      __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_int_field) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_int_field);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __PYX_ERR(0, 1126, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":1125
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:
 *             if not isinstance(int_field, (int, long)):             # <<<<<<<<<<<<<<
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         self.fields.append({
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":1124
 *         if field_type not in _type2rfc:
 *             raise TypeError("'field_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]:             # <<<<<<<<<<<<<<
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 */
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

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

  /* "src/pyrfc/_pyrfc.pyx":1128
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         self.fields.append({
 *             'name': name,             # <<<<<<<<<<<<<<
 *             'field_type': field_type,
 *             'nuc_length': nuc_length,
 */
  __pyx_t_7 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_name, __pyx_v_name) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1129
 *         self.fields.append({
 *             'name': name,
 *             'field_type': field_type,             # <<<<<<<<<<<<<<
 *             'nuc_length': nuc_length,
 *             'nuc_offset': nuc_offset,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_field_type, __pyx_v_field_type) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1130
 *             'name': name,
 *             'field_type': field_type,
 *             'nuc_length': nuc_length,             # <<<<<<<<<<<<<<
 *             'nuc_offset': nuc_offset,
 *             'uc_length': uc_length,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1131
 *             '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_7, __pyx_n_u_nuc_offset, __pyx_v_nuc_offset) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1132
 *             'nuc_length': nuc_length,
 *             'nuc_offset': nuc_offset,
 *             'uc_length': uc_length,             # <<<<<<<<<<<<<<
 *             'uc_offset': uc_offset,
 *             'decimals': decimals,
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1133
 *             'nuc_offset': nuc_offset,
 *             'uc_length': uc_length,
 *             'uc_offset': uc_offset,             # <<<<<<<<<<<<<<
 *             'decimals': decimals,
 *             'type_description': type_description
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_uc_offset, __pyx_v_uc_offset) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1134
 *             'uc_length': uc_length,
 *             'uc_offset': uc_offset,
 *             'decimals': decimals,             # <<<<<<<<<<<<<<
 *             'type_description': type_description
 *         })
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_decimals, __pyx_v_decimals) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1135
 *             'uc_offset': uc_offset,
 *             'decimals': decimals,
 *             'type_description': type_description             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  if (PyDict_SetItem(__pyx_t_7, __pyx_n_u_type_description, __pyx_v_type_description) < 0) __PYX_ERR(0, 1128, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1127
 *             if not isinstance(int_field, (int, long)):
 *                 raise TypeError("'{}' must be of type integer".format(int_field))
 *         self.fields.append({             # <<<<<<<<<<<<<<
 *             'name': name,
 *             'field_type': field_type,
 */
  __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1097
 *         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_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1138
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<TypeDescription '{}' with {} fields (n/uclength={}/{})>".format(
 *             self.name, len(self.fields), self.nuc_length, self.uc_length
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_15TypeDescription_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_15TypeDescription_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_15TypeDescription_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_15TypeDescription_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_15TypeDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  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("__repr__", 0);

  /* "src/pyrfc/_pyrfc.pyx":1139
 * 
 *     def __repr__(self):
 *         return "<TypeDescription '{}' with {} fields (n/uclength={}/{})>".format(             # <<<<<<<<<<<<<<
 *             self.name, len(self.fields), self.nuc_length, self.uc_length
 *         )
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_TypeDescription_with_fields_n_u, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyrfc/_pyrfc.pyx":1140
 *     def __repr__(self):
 *         return "<TypeDescription '{}' with {} fields (n/uclength={}/{})>".format(
 *             self.name, len(self.fields), self.nuc_length, self.uc_length             # <<<<<<<<<<<<<<
 *         )
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nuc_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_uc_length); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_6, __pyx_t_7};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1139, __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_3);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_7);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1138
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<TypeDescription '{}' with {} fields (n/uclength={}/{})>".format(
 *             self.name, len(self.fields), self.nuc_length, self.uc_length
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("pyrfc.pyrfc.TypeDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

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

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_19FunctionDescription_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_19FunctionDescription_1__init__ = {"__init__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_19FunctionDescription_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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, 1166, __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, 1166, __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, 1166, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.FunctionDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_19FunctionDescription___init__(__pyx_self, __pyx_v_self, __pyx_v_name);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1167
 *     """
 *     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, 1167, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1168
 *     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, 1168, __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, 1168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1166
 * 
 *     """
 *     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.pyrfc.FunctionDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1170
 *         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_5pyrfc_19FunctionDescription_3add_parameter(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_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: Type of the parameter\n        :type parameter_type: string\n        :param direction: Direction (RFC_IMPORT, RFC_EXPORT, RFC_CHANGING, RFC_TABLES)\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_5pyrfc_19FunctionDescription_3add_parameter = {"add_parameter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_19FunctionDescription_3add_parameter, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_19FunctionDescription_2add_parameter};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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__21));
    values[8] = ((PyObject *)((PyObject*)__pyx_kp_u__21));

    /* "src/pyrfc/_pyrfc.pyx":1172
 *     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, 1170, __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, 1170, __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, 1170, __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, 1170, __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, 1170, __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, 1170, __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, 1170, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.FunctionDescription.add_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1170
 *         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_5pyrfc_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;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_parameter", 0);

  /* "src/pyrfc/_pyrfc.pyx":1196
 *         :type type_description: object of class TypeDescription
 *         """
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if parameter_type not in _type2rfc:
 */
  __pyx_t_2 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1196, __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, 1196, __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)) {

    /* "src/pyrfc/_pyrfc.pyx":1197
 *         """
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         if parameter_type not in _type2rfc:
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __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, 1197, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1196
 *         :type type_description: object of class TypeDescription
 *         """
 *         if len(name)<1 or len(name)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if parameter_type not in _type2rfc:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1198
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if parameter_type not in _type2rfc:             # <<<<<<<<<<<<<<
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         if direction not in _direction2rfc:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_type2rfc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_parameter_type, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1198, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__pyx_t_1 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyrfc/_pyrfc.pyx":1199
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if parameter_type not in _type2rfc:
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")             # <<<<<<<<<<<<<<
 *         if direction not in _direction2rfc:
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_type2rfc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_parameter_type_string_must_be_i, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1199, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1198
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")
 *         if parameter_type not in _type2rfc:             # <<<<<<<<<<<<<<
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         if direction not in _direction2rfc:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1200
 *         if parameter_type not in _type2rfc:
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         if direction not in _direction2rfc:             # <<<<<<<<<<<<<<
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 *         if len(default_value)>30:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_direction2rfc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_direction, __pyx_t_4, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1200, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = (__pyx_t_3 != 0);
  if (unlikely(__pyx_t_1)) {

    /* "src/pyrfc/_pyrfc.pyx":1201
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         if direction not in _direction2rfc:
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")             # <<<<<<<<<<<<<<
 *         if len(default_value)>30:
 *             raise TypeError("'default_value' (string) must not exceed 30 chars.")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_direction2rfc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_direction_string_must_be_in, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_4, __pyx_kp_u__20); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1201, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1200
 *         if parameter_type not in _type2rfc:
 *             raise TypeError("'parameter_type' (string) must be in [" + ", ".join(_type2rfc) + "]")
 *         if direction not in _direction2rfc:             # <<<<<<<<<<<<<<
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 *         if len(default_value)>30:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1202
 *         if direction not in _direction2rfc:
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 *         if len(default_value)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError("'default_value' (string) 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, 1202, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_2 > 30) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "src/pyrfc/_pyrfc.pyx":1203
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 *         if len(default_value)>30:
 *             raise TypeError("'default_value' (string) must not exceed 30 chars.")             # <<<<<<<<<<<<<<
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) must not exceed 79 chars.")
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __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, 1203, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1202
 *         if direction not in _direction2rfc:
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 *         if len(default_value)>30:             # <<<<<<<<<<<<<<
 *             raise TypeError("'default_value' (string) must not exceed 30 chars.")
 *         if len(parameter_text)>79:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1204
 *         if len(default_value)>30:
 *             raise TypeError("'default_value' (string) must not exceed 30 chars.")
 *         if len(parameter_text)>79:             # <<<<<<<<<<<<<<
 *             raise TypeError("'parameter_text' (string) 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, 1204, __pyx_L1_error)
  __pyx_t_1 = ((__pyx_t_2 > 79) != 0);
  if (unlikely(__pyx_t_1)) {

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

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

  /* "src/pyrfc/_pyrfc.pyx":1206
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) 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, 1206, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

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

  /* "src/pyrfc/_pyrfc.pyx":1208
 *         self.parameters.append({
 *             'name': name,
 *             'parameter_type': parameter_type,             # <<<<<<<<<<<<<<
 *             'direction': direction,
 *             'nuc_length': nuc_length,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_parameter_type, __pyx_v_parameter_type) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1209
 *             'name': name,
 *             'parameter_type': parameter_type,
 *             'direction': direction,             # <<<<<<<<<<<<<<
 *             'nuc_length': nuc_length,
 *             'uc_length': uc_length,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_direction, __pyx_v_direction) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1210
 *             'parameter_type': parameter_type,
 *             'direction': direction,
 *             'nuc_length': nuc_length,             # <<<<<<<<<<<<<<
 *             'uc_length': uc_length,
 *             'decimals': decimals,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1211
 *             'direction': direction,
 *             'nuc_length': nuc_length,
 *             'uc_length': uc_length,             # <<<<<<<<<<<<<<
 *             'decimals': decimals,
 *             'default_value': default_value,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1212
 *             'nuc_length': nuc_length,
 *             'uc_length': uc_length,
 *             'decimals': decimals,             # <<<<<<<<<<<<<<
 *             'default_value': default_value,
 *             'parameter_text': parameter_text,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_decimals, __pyx_v_decimals) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1213
 *             'uc_length': uc_length,
 *             'decimals': decimals,
 *             'default_value': default_value,             # <<<<<<<<<<<<<<
 *             'parameter_text': parameter_text,
 *             'optional': optional,
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_default_value, __pyx_v_default_value) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1214
 *             'decimals': decimals,
 *             'default_value': default_value,
 *             'parameter_text': parameter_text,             # <<<<<<<<<<<<<<
 *             'optional': optional,
 *             'type_description': type_description
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_parameter_text, __pyx_v_parameter_text) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1215
 *             'default_value': default_value,
 *             'parameter_text': parameter_text,
 *             'optional': optional,             # <<<<<<<<<<<<<<
 *             'type_description': type_description
 *         })
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_optional, __pyx_v_optional) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1216
 *             'parameter_text': parameter_text,
 *             'optional': optional,
 *             'type_description': type_description             # <<<<<<<<<<<<<<
 *         })
 * 
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_u_type_description, __pyx_v_type_description) < 0) __PYX_ERR(0, 1207, __pyx_L1_error)

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

  /* "src/pyrfc/_pyrfc.pyx":1170
 *         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_5);
  __Pyx_AddTraceback("pyrfc.pyrfc.FunctionDescription.add_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1219
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<FunctionDescription '{}' with {} params>".format(
 *             self.name, len(self.parameters)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_19FunctionDescription_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_19FunctionDescription_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_19FunctionDescription_5__repr__, METH_O, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_19FunctionDescription_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":1220
 * 
 *     def __repr__(self):
 *         return "<FunctionDescription '{}' with {} params>".format(             # <<<<<<<<<<<<<<
 *             self.name, len(self.parameters)
 *         )
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_FunctionDescription_with_params, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyrfc/_pyrfc.pyx":1221
 *     def __repr__(self):
 *         return "<FunctionDescription '{}' with {} params>".format(
 *             self.name, len(self.parameters)             # <<<<<<<<<<<<<<
 *         )
 * ################################################################################
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(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_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1219
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<FunctionDescription '{}' with {} params>".format(
 *             self.name, len(self.parameters)
 */

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

/* "src/pyrfc/_pyrfc.pyx":1233
 * server_functions = {}
 * 
 * def default_auth_check(func_name=False, request_context = {}):             # <<<<<<<<<<<<<<
 *     _server_log(f"authorization check for '{func_name}'", request_context)
 *     return RFC_OK
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_11default_auth_check(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_11default_auth_check = {"default_auth_check", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_11default_auth_check, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_11default_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] = __pyx_k__24;
    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, 1233, __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, 1233, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.default_auth_check", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10default_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_5pyrfc_10default_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;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  Py_UCS4 __pyx_t_5;
  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("default_auth_check", 0);

  /* "src/pyrfc/_pyrfc.pyx":1234
 * 
 * def default_auth_check(func_name=False, request_context = {}):
 *     _server_log(f"authorization check for '{func_name}'", request_context)             # <<<<<<<<<<<<<<
 *     return RFC_OK
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_server_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = 0;
  __pyx_t_5 = 127;
  __Pyx_INCREF(__pyx_kp_u_authorization_check_for);
  __pyx_t_4 += 25;
  __Pyx_GIVEREF(__pyx_kp_u_authorization_check_for);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_authorization_check_for);
  __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1234, __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_3, 1, __pyx_t_6);
  __pyx_t_6 = 0;
  __Pyx_INCREF(__pyx_kp_u__25);
  __pyx_t_4 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__25);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__25);
  __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1234, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_6, __pyx_v_request_context};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_6, __pyx_v_request_context};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
    __Pyx_INCREF(__pyx_v_request_context);
    __Pyx_GIVEREF(__pyx_v_request_context);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_request_context);
    __pyx_t_6 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1235
 * def default_auth_check(func_name=False, request_context = {}):
 *     _server_log(f"authorization check for '{func_name}'", request_context)
 *     return RFC_OK             # <<<<<<<<<<<<<<
 * 
 * # global information about served functions / callbacks
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1233
 * server_functions = {}
 * 
 * def default_auth_check(func_name=False, request_context = {}):             # <<<<<<<<<<<<<<
 *     _server_log(f"authorization check for '{func_name}'", request_context)
 *     return RFC_OK
 */

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

/* "src/pyrfc/_pyrfc.pyx":1242
 * server_context = {}
 * 
 * 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_5pyrfc_13_server_log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_13_server_log = {"_server_log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_13_server_log, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_13_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, 1242, __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, 1242, __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, 1242, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc._server_log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_12_server_log(__pyx_self, __pyx_v_origin, __pyx_v_log_message);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_12_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);

  /* "src/pyrfc/_pyrfc.pyx":1243
 * 
 * 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, 1243, __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, 1243, __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, 1243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":1244
 * def _server_log(origin, log_message):
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")             # <<<<<<<<<<<<<<
 * 
 * cdef class ServerConnection:
 */
    __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1244, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = 0;
    __pyx_t_5 = 127;
    __Pyx_INCREF(__pyx_kp_u__26);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__26);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__26);
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1244, __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, 1244, __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, 1244, __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, 1244, __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, 1244, __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__27);
    __pyx_t_4 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__27);
    PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__27);
    __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_log_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1244, __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__25);
    __pyx_t_4 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__25);
    PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__25);
    __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1244, __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, 1244, __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;

    /* "src/pyrfc/_pyrfc.pyx":1243
 * 
 * def _server_log(origin, log_message):
 *     if server_context["server_log"]:             # <<<<<<<<<<<<<<
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1242
 * server_context = {}
 * 
 * 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.pyrfc._server_log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1252
 *     cdef public bint rstrip
 * 
 *     def __init__(self, **params):             # <<<<<<<<<<<<<<
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection___init__(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection___init__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1253
 * 
 *     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, 1253, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_ConnectionParameters), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1253, __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_5pyrfc_ConnectionParameters *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1254
 *     def __init__(self, **params):
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */
  __pyx_v_self->_handle = NULL;

  /* "src/pyrfc/_pyrfc.pyx":1255
 *         self._connection = ConnectionParameters(**params)
 *         self._handle = NULL
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     cdef _open(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1252
 *     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.pyrfc.ServerConnection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1257
 *         self._open()
 * 
 *     cdef _open(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         with nogil:
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_16ServerConnection__open(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1259
 *     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:*/ {

        /* "src/pyrfc/_pyrfc.pyx":1260
 *         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));
      }

      /* "src/pyrfc/_pyrfc.pyx":1259
 *     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:;
      }
  }

  /* "src/pyrfc/_pyrfc.pyx":1261
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1262
 *             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;

    /* "src/pyrfc/_pyrfc.pyx":1263
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1263, __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, 1263, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1261
 *         with nogil:
 *             self._handle = RfcCreateServer(self._connection._params, self._connection._params_count, &errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             self._handle = NULL
 *             raise wrapError(&errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1264
 *             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, 1264, __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, 1264, __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, 1264, __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, 1264, __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, 1264, __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, 1264, __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, 1264, __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;

  /* "src/pyrfc/_pyrfc.pyx":1257
 *         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.pyrfc.ServerConnection._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1266
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")
 * 
 *     cdef _close(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_16ServerConnection__close(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1268
 *     cdef _close(self):
 *         cdef RFC_ERROR_INFO errorInfo
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":1269
 *         cdef RFC_ERROR_INFO errorInfo
 *         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, 1269, __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, 1269, __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, 1269, __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, 1269, __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, 1269, __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, 1269, __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;

    /* "src/pyrfc/_pyrfc.pyx":1270
 *         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:*/ {

          /* "src/pyrfc/_pyrfc.pyx":1271
 *             _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));

          /* "src/pyrfc/_pyrfc.pyx":1272
 *             with nogil:
 *                 RfcShutdownServer(self._handle, 60, NULL);
 *                 RfcDestroyServer(self._handle, NULL);             # <<<<<<<<<<<<<<
 *                 self._handle = NULL
 * 
 */
          (void)(RfcDestroyServer(__pyx_v_self->_handle, NULL));

          /* "src/pyrfc/_pyrfc.pyx":1273
 *                 RfcShutdownServer(self._handle, 60, NULL);
 *                 RfcDestroyServer(self._handle, NULL);
 *                 self._handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def open(self):
 */
          __pyx_v_self->_handle = NULL;
        }

        /* "src/pyrfc/_pyrfc.pyx":1270
 *         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:;
        }
    }

    /* "src/pyrfc/_pyrfc.pyx":1268
 *     cdef _close(self):
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:             # <<<<<<<<<<<<<<
 *             _server_log("Server close", <uintptr_t>self._handle)
 *             with nogil:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1266
 *         _server_log("Server connection", f"{<uintptr_t>self._handle}")
 * 
 *     cdef _close(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         if self._handle != NULL:
 */

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

/* "src/pyrfc/_pyrfc.pyx":1275
 *                 self._handle = NULL
 * 
 *     def open(self):             # <<<<<<<<<<<<<<
 *         self._open()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_3open(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_2open(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_2open(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1276
 * 
 *     def open(self):
 *         self._open()             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1275
 *                 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.pyrfc.ServerConnection.open", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1278
 *         self._open()
 * 
 *     def close(self):             # <<<<<<<<<<<<<<
 *         self._close()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_4close(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_4close(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1279
 * 
 *     def close(self):
 *         self._close()             # <<<<<<<<<<<<<<
 * 
 *     def __bool__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1278
 *         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.pyrfc.ServerConnection.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1281
 *         self._close()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_7__bool__(PyObject *__pyx_v_self); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_7__bool__(PyObject *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6__bool__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6__bool__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1282
 * 
 *     def __bool__(self):
 *         return self.alive             # <<<<<<<<<<<<<<
 * 
 *     property handle:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __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, 1282, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1281
 *         self._close()
 * 
 *     def __bool__(self):             # <<<<<<<<<<<<<<
 *         return self.alive
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":1285
 * 
 *     property handle:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get server connection handle
 *             :returns: Server connection handle
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6handle_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6handle___get__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6handle___get__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1289
 *             :returns: Server connection handle
 *             """
 *             return <uintptr_t>self._handle             # <<<<<<<<<<<<<<
 * 
 *     property alive:
 */
  __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, 1289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1285
 * 
 *     property handle:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get server connection handle
 *             :returns: Server connection handle
 */

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

/* "src/pyrfc/_pyrfc.pyx":1292
 * 
 *     property alive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get conection alive property
 *             :returns: True when alive
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5alive_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5alive_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5alive___get__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5alive___get__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1297
 *             :type alive: 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, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1292
 * 
 *     property alive:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             """Get conection alive property
 *             :returns: True when alive
 */

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

/* "src/pyrfc/_pyrfc.pyx":1299
 *             return self._handle != NULL
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self._close()
 *         self._connection._free()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_9__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_8__del__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_8__del__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1300
 * 
 *     def __del__(self):
 *         self._close()             # <<<<<<<<<<<<<<
 *         self._connection._free()
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self->__pyx_vtab)->_close(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1301
 *     def __del__(self):
 *         self._close()
 *         self._connection._free()             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_RC metadataLookup(const SAP_UC* functionName, RFC_ATTRIBUTES rfcAttributes, RFC_FUNCTION_DESC_HANDLE *funcDescHandle) with gil:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_connection), __pyx_n_s_free); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __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, 1301, __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;

  /* "src/pyrfc/_pyrfc.pyx":1299
 *             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.pyrfc.ServerConnection.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1249
 *     cdef ConnectionParameters _connection
 *     cdef RFC_SERVER_HANDLE _handle
 *     cdef public bint debug             # <<<<<<<<<<<<<<
 *     cdef public bint rstrip
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5debug_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5debug_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5debug___get__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5debug___get__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1249, __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.pyrfc.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_5pyrfc_16ServerConnection_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_5debug_2__set__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_5debug_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1249, __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.pyrfc.ServerConnection.debug.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1250
 *     cdef RFC_SERVER_HANDLE _handle
 *     cdef public bint debug
 *     cdef public bint rstrip             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, **params):
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6rstrip_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6rstrip_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6rstrip___get__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6rstrip___get__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1250, __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.pyrfc.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_5pyrfc_16ServerConnection_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_6rstrip_2__set__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_5pyrfc_16ServerConnection_6rstrip_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1250, __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.pyrfc.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_5pyrfc_16ServerConnection_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_10__reduce_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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__28, 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.pyrfc.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_5pyrfc_16ServerConnection_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_16ServerConnection_12__setstate_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_16ServerConnection_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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__29, 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.pyrfc.ServerConnection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1303
 *         self._connection._free()
 * 
 * cdef RFC_RC metadataLookup(const SAP_UC* functionName, RFC_ATTRIBUTES rfcAttributes, RFC_FUNCTION_DESC_HANDLE *funcDescHandle) with gil:             # <<<<<<<<<<<<<<
 *     global server_functions
 *     function_name = wrapString(functionName)
 */

static RFC_RC __pyx_f_5pyrfc_5pyrfc_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;
  CYTHON_UNUSED PyObject *__pyx_v_callback = 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);

  /* "src/pyrfc/_pyrfc.pyx":1305
 * cdef RFC_RC metadataLookup(const SAP_UC* functionName, RFC_ATTRIBUTES rfcAttributes, RFC_FUNCTION_DESC_HANDLE *funcDescHandle) 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_5pyrfc_wrapString(__pyx_v_functionName, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_function_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1306
 *     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, 1306, __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, 1306, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":1307
 *     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, 1307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __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, 1307, __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__30);
    __pyx_t_6 += 2;
    __Pyx_GIVEREF(__pyx_kp_u__30);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__30);
    __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1307, __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, 1307, __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, 1307, __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, 1307, __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, 1307, __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;

    /* "src/pyrfc/_pyrfc.pyx":1308
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":1306
 *     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
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1309
 *         _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, 1309, __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, 1309, __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;

  /* "src/pyrfc/_pyrfc.pyx":1310
 *         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']
 *     _server_log("metadataLookup", f"Function '{function_name}' handle {<uintptr_t>funcDescHandle[0]}.")
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_metadata, __pyx_n_u_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_callback = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1311
 *     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, 1311, __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, 1311, __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));

  /* "src/pyrfc/_pyrfc.pyx":1312
 *     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, 1312, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1312, __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, 1312, __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);
  __pyx_t_6 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_handle);
  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u_handle);
  __pyx_t_8 = __Pyx_PyInt_FromSize_t(((uintptr_t)(__pyx_v_funcDescHandle[0]))); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1312, __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, 1312, __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__31);
  __pyx_t_6 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__31);
  PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_kp_u__31);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __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, 1312, __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, 1312, __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, 1312, __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, 1312, __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;

  /* "src/pyrfc/_pyrfc.pyx":1313
 *     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 RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil:
 */
  __pyx_r = RFC_OK;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1303
 *         self._connection._free()
 * 
 * cdef RFC_RC metadataLookup(const SAP_UC* functionName, RFC_ATTRIBUTES rfcAttributes, RFC_FUNCTION_DESC_HANDLE *funcDescHandle) with gil:             # <<<<<<<<<<<<<<
 *     global server_functions
 *     function_name = wrapString(functionName)
 */

  /* 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.pyrfc.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_XDECREF(__pyx_v_callback);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1315
 *     return RFC_OK
 * 
 * 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_5pyrfc_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_func_name = NULL;
  PyObject *__pyx_v_func_data = NULL;
  PyObject *__pyx_v_callback = NULL;
  PyObject *__pyx_v_server = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_func_desc = NULL;
  PyObject *__pyx_v_conn_attr = NULL;
  PyObject *__pyx_v_request_context = NULL;
  PyObject *__pyx_v_auth_function = NULL;
  PyObject *__pyx_v_new_error = NULL;
  PyObject *__pyx_v_func_handle_variables = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_exctype = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_name = 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;
  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;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  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 *);
  Py_ssize_t __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);

  /* "src/pyrfc/_pyrfc.pyx":1323
 *     global server_functions
 * 
 *     funcDesc = RfcDescribeFunction(funcHandle, NULL)             # <<<<<<<<<<<<<<
 *     RfcGetFunctionName(funcDesc, funcName, NULL)
 * 
 */
  __pyx_v_funcDesc = RfcDescribeFunction(__pyx_v_funcHandle, NULL);

  /* "src/pyrfc/_pyrfc.pyx":1324
 * 
 *     funcDesc = RfcDescribeFunction(funcHandle, NULL)
 *     RfcGetFunctionName(funcDesc, funcName, NULL)             # <<<<<<<<<<<<<<
 * 
 *     func_name = wrapString(funcName)
 */
  (void)(RfcGetFunctionName(__pyx_v_funcDesc, __pyx_v_funcName, NULL));

  /* "src/pyrfc/_pyrfc.pyx":1326
 *     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_1 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_funcName, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_func_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1327
 * 
 *     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_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_func_name, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "src/pyrfc/_pyrfc.pyx":1328
 *     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_4, __pyx_n_s_server_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1328, __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_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_function_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __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, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_7;
    __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_INCREF(__pyx_kp_u__25);
    __pyx_t_6 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__25);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__25);
    __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_10 = 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_10 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_genericHandler, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_4)) {
      PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_genericHandler, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __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, 1328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_5) {
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
      }
      __Pyx_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_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1329
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":1327
 * 
 *     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
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1331
 *         return RFC_NOT_FOUND
 * 
 *     func_data = server_functions[func_name]             # <<<<<<<<<<<<<<
 *     callback = func_data['callback']
 *     server = func_data['server']
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_func_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_func_data = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1332
 * 
 *     func_data = server_functions[func_name]
 *     callback = func_data['callback']             # <<<<<<<<<<<<<<
 *     server = func_data['server']
 *     func_desc = func_data['func_desc_handle']
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_callback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1332, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_callback = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1333
 *     func_data = server_functions[func_name]
 *     callback = func_data['callback']
 *     server = func_data['server']             # <<<<<<<<<<<<<<
 *     func_desc = func_data['func_desc_handle']
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_server); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_server = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1334
 *     callback = func_data['callback']
 *     server = func_data['server']
 *     func_desc = func_data['func_desc_handle']             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_func_desc_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_func_desc = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1336
 *     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:*/ {

      /* "src/pyrfc/_pyrfc.pyx":1337
 * 
 *     try:
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)             # <<<<<<<<<<<<<<
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))
 */
      __pyx_v_rc = RfcGetConnectionAttributes(__pyx_v_rfcHandle, (&__pyx_v_attributes), (&__pyx_v_errorInfo));

      /* "src/pyrfc/_pyrfc.pyx":1338
 *     try:
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))
 *             if not server.debug:
 */
      __pyx_t_3 = ((__pyx_v_rc != RFC_OK) != 0);
      if (__pyx_t_3) {

        /* "src/pyrfc/_pyrfc.pyx":1339
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))             # <<<<<<<<<<<<<<
 *             if not server.debug:
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Request_for_func_name_Error_whil, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1339, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1339, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_func_name, __pyx_v_func_name) < 0) __PYX_ERR(0, 1339, __pyx_L4_error)
        __pyx_t_5 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_rc, __pyx_t_5) < 0) __PYX_ERR(0, 1339, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1339, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 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_1))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_n_u_genericHandler, __pyx_t_5};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1339, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_9, __pyx_n_u_genericHandler, __pyx_t_5};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1339, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 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_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1339, __pyx_L4_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_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_5);
          PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __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, 1339, __pyx_L4_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;

        /* "src/pyrfc/_pyrfc.pyx":1340
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))
 *             if not server.debug:             # <<<<<<<<<<<<<<
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 *             conn_attr = {}
 */
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_server, __pyx_n_s_debug); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1340, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1340, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_2 = ((!__pyx_t_3) != 0);
        if (unlikely(__pyx_t_2)) {

          /* "src/pyrfc/_pyrfc.pyx":1341
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))
 *             if not server.debug:
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")             # <<<<<<<<<<<<<<
 *             conn_attr = {}
 *         else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1341, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_message, __pyx_kp_u_Invalid_connection_handle) < 0) __PYX_ERR(0, 1341, __pyx_L4_error)
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1341, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_Raise(__pyx_t_8, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
          __PYX_ERR(0, 1341, __pyx_L4_error)

          /* "src/pyrfc/_pyrfc.pyx":1340
 *         if rc != RFC_OK:
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))
 *             if not server.debug:             # <<<<<<<<<<<<<<
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 *             conn_attr = {}
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1342
 *             if not server.debug:
 *                 raise ExternalRuntimeError(message="Invalid connection handle.")
 *             conn_attr = {}             # <<<<<<<<<<<<<<
 *         else:
 *             conn_attr = wrapConnectionAttributes(attributes)
 */
        __pyx_t_8 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1342, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_v_conn_attr = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1338
 *     try:
 *         rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             _server_log("genericHandler", "Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).".format(func_name=func_name, rc=rc))
 *             if not server.debug:
 */
        goto __pyx_L10;
      }

      /* "src/pyrfc/_pyrfc.pyx":1344
 *             conn_attr = {}
 *         else:
 *             conn_attr = wrapConnectionAttributes(attributes)             # <<<<<<<<<<<<<<
 *             _server_log("genericHandler", "User '{user}' from system '{sysId}', client '{client}', host '{partnerHost}' invokes '{func_name}'".format(func_name=func_name, **conn_attr))
 * 
 */
      /*else*/ {
        __pyx_t_8 = __pyx_f_5pyrfc_5pyrfc_wrapConnectionAttributes(__pyx_v_attributes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1344, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_v_conn_attr = __pyx_t_8;
        __pyx_t_8 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1345
 *         else:
 *             conn_attr = wrapConnectionAttributes(attributes)
 *             _server_log("genericHandler", "User '{user}' from system '{sysId}', client '{client}', host '{partnerHost}' invokes '{func_name}'".format(func_name=func_name, **conn_attr))             # <<<<<<<<<<<<<<
 * 
 *         # Context of the request. Might later be extended by activeParameter information.
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_User_user_from_system_sysId_clie, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1345, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_func_name, __pyx_v_func_name) < 0) __PYX_ERR(0, 1345, __pyx_L4_error)
        __pyx_t_5 = __pyx_t_9;
        __pyx_t_9 = 0;
        if (unlikely(__pyx_v_conn_attr == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
          __PYX_ERR(0, 1345, __pyx_L4_error)
        }
        if (__Pyx_MergeKeywords(__pyx_t_5, __pyx_v_conn_attr) < 0) __PYX_ERR(0, 1345, __pyx_L4_error)
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1345, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_10 = 0;
        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_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_1)) {
          PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_genericHandler, __pyx_t_9};
          __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1345, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __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_5, __pyx_n_u_genericHandler, __pyx_t_9};
          __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1345, __pyx_L4_error)
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        } else
        #endif
        {
          __pyx_t_4 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1345, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (__pyx_t_5) {
            __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_9);
          PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_10, __pyx_t_9);
          __pyx_t_9 = 0;
          __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1345, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __pyx_L10:;

      /* "src/pyrfc/_pyrfc.pyx":1349
 *         # Context of the request. Might later be extended by activeParameter information.
 *         request_context = {
 *             'connection_attributes': conn_attr             # <<<<<<<<<<<<<<
 *         }
 * 
 */
      __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1349, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_u_connection_attributes, __pyx_v_conn_attr) < 0) __PYX_ERR(0, 1349, __pyx_L4_error)
      __pyx_v_request_context = ((PyObject*)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1353
 * 
 *         # Authorization check
 *         auth_function = server_context["auth_check"]             # <<<<<<<<<<<<<<
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_server_context); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1353, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_n_u_auth_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_v_auth_function = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1354
 *         # 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_8 = __pyx_v_auth_function; __pyx_t_4 = NULL;
      __pyx_t_10 = 0;
      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_10 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func_name, __pyx_v_request_context};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
        PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_func_name, __pyx_v_request_context};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L4_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
      } else
      #endif
      {
        __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1354, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (__pyx_t_4) {
          __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
        }
        __Pyx_INCREF(__pyx_v_func_name);
        __Pyx_GIVEREF(__pyx_v_func_name);
        PyTuple_SET_ITEM(__pyx_t_9, 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_9, 1+__pyx_t_10, __pyx_v_request_context);
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_14 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1354, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_rc = __pyx_t_14;

      /* "src/pyrfc/_pyrfc.pyx":1355
 *         auth_function = server_context["auth_check"]
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             new_error = ExternalRuntimeError(
 *                 message=f"Invalid exception raised by callback function: rc",
 */
      __pyx_t_2 = ((__pyx_v_rc != RFC_OK) != 0);
      if (__pyx_t_2) {

        /* "src/pyrfc/_pyrfc.pyx":1356
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *                 message=f"Invalid exception raised by callback function: rc",
 *                 code=RFC_EXTERNAL_FAILURE
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);

        /* "src/pyrfc/_pyrfc.pyx":1357
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(
 *                 message=f"Invalid exception raised by callback function: rc",             # <<<<<<<<<<<<<<
 *                 code=RFC_EXTERNAL_FAILURE
 *             )
 */
        __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1357, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_8);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_message, __pyx_kp_u_Invalid_exception_raised_by_call) < 0) __PYX_ERR(0, 1357, __pyx_L4_error)

        /* "src/pyrfc/_pyrfc.pyx":1358
 *             new_error = ExternalRuntimeError(
 *                 message=f"Invalid exception raised by callback function: rc",
 *                 code=RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *             )
 *             fillError(new_error, serverErrorInfo)
 */
        __pyx_t_9 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1358, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_code, __pyx_t_9) < 0) __PYX_ERR(0, 1357, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1356
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:
 *             new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *                 message=f"Invalid exception raised by callback function: rc",
 *                 code=RFC_EXTERNAL_FAILURE
 */
        __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1356, __pyx_L4_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_v_new_error = __pyx_t_9;
        __pyx_t_9 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1360
 *                 code=RFC_EXTERNAL_FAILURE
 *             )
 *             fillError(new_error, serverErrorInfo)             # <<<<<<<<<<<<<<
 *             return RFC_EXTERNAL_FAILURE
 * 
 */
        __pyx_t_9 = __pyx_f_5pyrfc_5pyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1360, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1361
 *             )
 *             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_L8_try_return;

        /* "src/pyrfc/_pyrfc.pyx":1355
 *         auth_function = server_context["auth_check"]
 *         rc = auth_function(func_name, request_context)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             new_error = ExternalRuntimeError(
 *                 message=f"Invalid exception raised by callback function: rc",
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":1365
 *         # 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
 *         result = callback(request_context, **func_handle_variables)
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_server, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1365, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = __pyx_f_5pyrfc_5pyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcHandle, RFC_EXPORT, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1365, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_v_func_handle_variables = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1367
 *         func_handle_variables = wrapResult(funcDesc, funcHandle, RFC_EXPORT, server.rstrip)
 *         # Invoke callback function
 *         result = callback(request_context, **func_handle_variables)             # <<<<<<<<<<<<<<
 *     # Server exception handling: cf. Schmidt and Li (2009b, p. 7)
 *     except ABAPApplicationError as e: # ABAP_EXCEPTION in implementing function
 */
      __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1367, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_INCREF(__pyx_v_request_context);
      __Pyx_GIVEREF(__pyx_v_request_context);
      PyTuple_SET_ITEM(__pyx_t_8, 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, 1367, __pyx_L4_error)
      }
      if (likely(PyDict_CheckExact(__pyx_v_func_handle_variables))) {
        __pyx_t_9 = PyDict_Copy(__pyx_v_func_handle_variables); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1367, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
      } else {
        __pyx_t_9 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_func_handle_variables, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1367, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_9);
      }
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L4_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_v_result = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1336
 *     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_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1369
 *         result = callback(request_context, **func_handle_variables)
 *     # Server exception handling: cf. Schmidt and Li (2009b, p. 7)
 *     except ABAPApplicationError as e: # ABAP_EXCEPTION in implementing function             # <<<<<<<<<<<<<<
 *         # Parameter: key ( optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # ret RFC_ABAP_EXCEPTION
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ABAPApplicationError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1369, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_8);
    __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pyrfc.pyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 1369, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_e = __pyx_t_9;
      /*try:*/ {

        /* "src/pyrfc/_pyrfc.pyx":1372
 *         # Parameter: key ( optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # ret RFC_ABAP_EXCEPTION
 *         fillError(e, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.".format(func_name, e))
 */
        __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1372, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1373
 *         # ret RFC_ABAP_EXCEPTION
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set.             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.".format(func_name, e))
 *         return RFC_ABAP_EXCEPTION
 */
        __pyx_v_serverErrorInfo->code = RFC_ABAP_EXCEPTION;

        /* "src/pyrfc/_pyrfc.pyx":1374
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.".format(func_name, e))             # <<<<<<<<<<<<<<
 *         return RFC_ABAP_EXCEPTION
 *     except ABAPRuntimeError as e: # RFC_ABAP_MESSAGE
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Request_for_raises_ABAPApplicati, __pyx_n_s_format); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1374, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_17 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_16))) {
          __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
          if (likely(__pyx_t_17)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
            __Pyx_INCREF(__pyx_t_17);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_16, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_func_name, __pyx_v_e};
          __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
          PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_v_func_name, __pyx_v_e};
          __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_GOTREF(__pyx_t_15);
        } else
        #endif
        {
          __pyx_t_18 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_18);
          if (__pyx_t_17) {
            __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_17); __pyx_t_17 = NULL;
          }
          __Pyx_INCREF(__pyx_v_func_name);
          __Pyx_GIVEREF(__pyx_v_func_name);
          PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_10, __pyx_v_func_name);
          __Pyx_INCREF(__pyx_v_e);
          __Pyx_GIVEREF(__pyx_v_e);
          PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_10, __pyx_v_e);
          __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_18, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        }
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_n_u_genericHandler, __pyx_t_15};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_n_u_genericHandler, __pyx_t_15};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        } else
        #endif
        {
          __pyx_t_18 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_18);
          if (__pyx_t_16) {
            __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_16); __pyx_t_16 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_10, __pyx_t_15);
          __pyx_t_15 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1375
 *         serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.".format(func_name, e))
 *         return RFC_ABAP_EXCEPTION             # <<<<<<<<<<<<<<
 *     except ABAPRuntimeError as e: # RFC_ABAP_MESSAGE
 *         # msg_type, msg_class, msg_number, msg_v1-v4
 */
        __pyx_r = RFC_ABAP_EXCEPTION;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L17_return;
      }

      /* "src/pyrfc/_pyrfc.pyx":1369
 *         result = callback(request_context, **func_handle_variables)
 *     # Server exception handling: cf. Schmidt and Li (2009b, p. 7)
 *     except ABAPApplicationError as e: # ABAP_EXCEPTION in implementing function             # <<<<<<<<<<<<<<
 *         # Parameter: key ( optional: msg_type, msg_class, msg_number, msg_v1-v4)
 *         # ret RFC_ABAP_EXCEPTION
 */
      /*finally:*/ {
        __pyx_L18_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_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_19 = __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_19; __pyx_filename = __pyx_t_20;
          goto __pyx_L6_except_error;
        }
        __pyx_L17_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_e);
          __pyx_v_e = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L7_except_return;
        }
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":1376
 *         _server_log("genericHandler", "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.".format(func_name, e))
 *         return RFC_ABAP_EXCEPTION
 *     except ABAPRuntimeError as e: # RFC_ABAP_MESSAGE             # <<<<<<<<<<<<<<
 *         # msg_type, msg_class, msg_number, msg_v1-v4
 *         # ret RFC_ABAP_MESSAGE
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ABAPRuntimeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1376, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_19 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_8);
    __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0;
    if (__pyx_t_19) {
      __Pyx_AddTraceback("pyrfc.pyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 1376, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_e = __pyx_t_9;
      /*try:*/ {

        /* "src/pyrfc/_pyrfc.pyx":1379
 *         # msg_type, msg_class, msg_number, msg_v1-v4
 *         # ret RFC_ABAP_MESSAGE
 *         fillError(e, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.".format(func_name, e))
 */
        __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1379, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1380
 *         # ret RFC_ABAP_MESSAGE
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set.             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.".format(func_name, e))
 *         return RFC_ABAP_MESSAGE
 */
        __pyx_v_serverErrorInfo->code = RFC_ABAP_MESSAGE;

        /* "src/pyrfc/_pyrfc.pyx":1381
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.".format(func_name, e))             # <<<<<<<<<<<<<<
 *         return RFC_ABAP_MESSAGE
 *     except ExternalRuntimeError as e: # System failure
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Request_for_raises_ABAPRuntimeEr, __pyx_n_s_format); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1381, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_15);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_15, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_15)) {
          PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_v_func_name, __pyx_v_e};
          __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_18);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
          PyObject *__pyx_temp[3] = {__pyx_t_16, __pyx_v_func_name, __pyx_v_e};
          __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_GOTREF(__pyx_t_18);
        } else
        #endif
        {
          __pyx_t_17 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_17);
          if (__pyx_t_16) {
            __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_16); __pyx_t_16 = NULL;
          }
          __Pyx_INCREF(__pyx_v_func_name);
          __Pyx_GIVEREF(__pyx_v_func_name);
          PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_19, __pyx_v_func_name);
          __Pyx_INCREF(__pyx_v_e);
          __Pyx_GIVEREF(__pyx_v_e);
          PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_19, __pyx_v_e);
          __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_18);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_19 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_19 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_n_u_genericHandler, __pyx_t_18};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        } else
        #endif
        {
          __pyx_t_17 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_17);
          if (__pyx_t_15) {
            __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_15); __pyx_t_15 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_17, 0+__pyx_t_19, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_18);
          PyTuple_SET_ITEM(__pyx_t_17, 1+__pyx_t_19, __pyx_t_18);
          __pyx_t_18 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_17, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1382
 *         serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.".format(func_name, e))
 *         return RFC_ABAP_MESSAGE             # <<<<<<<<<<<<<<
 *     except ExternalRuntimeError as e: # System failure
 *         # Parameter: message
 */
        __pyx_r = RFC_ABAP_MESSAGE;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L28_return;
      }

      /* "src/pyrfc/_pyrfc.pyx":1376
 *         _server_log("genericHandler", "Request for '{}' raises ABAPApplicationError {} - code set to RFC_ABAP_EXCEPTION.".format(func_name, e))
 *         return RFC_ABAP_EXCEPTION
 *     except ABAPRuntimeError as e: # RFC_ABAP_MESSAGE             # <<<<<<<<<<<<<<
 *         # msg_type, msg_class, msg_number, msg_v1-v4
 *         # ret RFC_ABAP_MESSAGE
 */
      /*finally:*/ {
        __pyx_L29_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_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_19 = __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_19; __pyx_clineno = __pyx_t_10; __pyx_filename = __pyx_t_27;
          goto __pyx_L6_except_error;
        }
        __pyx_L28_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_e);
          __pyx_v_e = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L7_except_return;
        }
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":1383
 *         _server_log("genericHandler", "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.".format(func_name, e))
 *         return RFC_ABAP_MESSAGE
 *     except ExternalRuntimeError as e: # System failure             # <<<<<<<<<<<<<<
 *         # Parameter: message
 *         # ret RFC_EXTERNAL_FAILURE
 */
    __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_9, &__pyx_t_8);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1383, __pyx_L6_except_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_ErrRestore(__pyx_t_1, __pyx_t_9, __pyx_t_8);
    __pyx_t_1 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0;
    if (__pyx_t_10) {
      __Pyx_AddTraceback("pyrfc.pyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 1383, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_e = __pyx_t_9;
      /*try:*/ {

        /* "src/pyrfc/_pyrfc.pyx":1386
 *         # Parameter: message
 *         # ret RFC_EXTERNAL_FAILURE
 *         fillError(e, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ExternalRuntimeError {} - code set to RFC_EXTERNAL_FAILURE.".format(func_name, e))
 */
        __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1386, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1387
 *         # ret RFC_EXTERNAL_FAILURE
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set.             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler", "Request for '{}' raises ExternalRuntimeError {} - code set to RFC_EXTERNAL_FAILURE.".format(func_name, e))
 *         return RFC_EXTERNAL_FAILURE
 */
        __pyx_v_serverErrorInfo->code = RFC_EXTERNAL_FAILURE;

        /* "src/pyrfc/_pyrfc.pyx":1388
 *         fillError(e, serverErrorInfo)
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ExternalRuntimeError {} - code set to RFC_EXTERNAL_FAILURE.".format(func_name, e))             # <<<<<<<<<<<<<<
 *         return RFC_EXTERNAL_FAILURE
 *     except:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1388, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Request_for_raises_ExternalRunti, __pyx_n_s_format); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1388, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_18);
        __pyx_t_15 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_18);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_18, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_18)) {
          PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_func_name, __pyx_v_e};
          __pyx_t_17 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_17);
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
          PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_v_func_name, __pyx_v_e};
          __pyx_t_17 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_GOTREF(__pyx_t_17);
        } else
        #endif
        {
          __pyx_t_16 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1388, __pyx_L40_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_v_func_name);
          __Pyx_GIVEREF(__pyx_v_func_name);
          PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_10, __pyx_v_func_name);
          __Pyx_INCREF(__pyx_v_e);
          __Pyx_GIVEREF(__pyx_v_e);
          PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_10, __pyx_v_e);
          __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_17);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __pyx_t_18 = NULL;
        __pyx_t_10 = 0;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_18)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_18);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_10 = 1;
          }
        }
        #if CYTHON_FAST_PYCALL
        if (PyFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_n_u_genericHandler, __pyx_t_17};
          __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        } else
        #endif
        #if CYTHON_FAST_PYCCALL
        if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
          PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_n_u_genericHandler, __pyx_t_17};
          __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        } else
        #endif
        {
          __pyx_t_16 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_16);
          if (__pyx_t_18) {
            __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_18); __pyx_t_18 = NULL;
          }
          __Pyx_INCREF(__pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_n_u_genericHandler);
          PyTuple_SET_ITEM(__pyx_t_16, 0+__pyx_t_10, __pyx_n_u_genericHandler);
          __Pyx_GIVEREF(__pyx_t_17);
          PyTuple_SET_ITEM(__pyx_t_16, 1+__pyx_t_10, __pyx_t_17);
          __pyx_t_17 = 0;
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_16, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1388, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1389
 *         serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set.
 *         _server_log("genericHandler", "Request for '{}' raises ExternalRuntimeError {} - code set to RFC_EXTERNAL_FAILURE.".format(func_name, e))
 *         return RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *     except:
 *         exctype, value = exc_info()[:2]
 */
        __pyx_r = RFC_EXTERNAL_FAILURE;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L39_return;
      }

      /* "src/pyrfc/_pyrfc.pyx":1383
 *         _server_log("genericHandler", "Request for '{}' raises ABAPRuntimeError {} - code set to RFC_ABAP_MESSAGE.".format(func_name, e))
 *         return RFC_ABAP_MESSAGE
 *     except ExternalRuntimeError as e: # System failure             # <<<<<<<<<<<<<<
 *         # Parameter: message
 *         # ret RFC_EXTERNAL_FAILURE
 */
      /*finally:*/ {
        __pyx_L40_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_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_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_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_19; __pyx_filename = __pyx_t_28;
          goto __pyx_L6_except_error;
        }
        __pyx_L39_return: {
          __pyx_t_14 = __pyx_r;
          __Pyx_DECREF(__pyx_v_e);
          __pyx_v_e = NULL;
          __pyx_r = __pyx_t_14;
          goto __pyx_L7_except_return;
        }
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":1390
 *         _server_log("genericHandler", "Request for '{}' raises ExternalRuntimeError {} - code set to RFC_EXTERNAL_FAILURE.".format(func_name, e))
 *         return RFC_EXTERNAL_FAILURE
 *     except:             # <<<<<<<<<<<<<<
 *         exctype, value = exc_info()[:2]
 *         _server_log("genericHandler",
 */
    /*except:*/ {
      __Pyx_AddTraceback("pyrfc.pyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_8) < 0) __PYX_ERR(0, 1390, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GOTREF(__pyx_t_8);

      /* "src/pyrfc/_pyrfc.pyx":1391
 *         return RFC_EXTERNAL_FAILURE
 *     except:
 *         exctype, value = exc_info()[:2]             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler",
 *             "Request for '{}' raises an invalid exception:\n Exception: {}\n Values: {}\n"
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_16 = NULL;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
        }
      }
      __pyx_t_4 = (__pyx_t_16) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_16) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 2, NULL, NULL, &__pyx_slice__32, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1391, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      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, 1391, __pyx_L6_except_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_16 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_16 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_16);
        #else
        __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_16 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1391, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_16);
        #endif
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_17 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1391, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_17);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_29 = Py_TYPE(__pyx_t_17)->tp_iternext;
        index = 0; __pyx_t_4 = __pyx_t_29(__pyx_t_17); if (unlikely(!__pyx_t_4)) goto __pyx_L48_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_4);
        index = 1; __pyx_t_16 = __pyx_t_29(__pyx_t_17); if (unlikely(!__pyx_t_16)) goto __pyx_L48_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_16);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_29(__pyx_t_17), 2) < 0) __PYX_ERR(0, 1391, __pyx_L6_except_error)
        __pyx_t_29 = NULL;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        goto __pyx_L49_unpacking_done;
        __pyx_L48_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
        __pyx_t_29 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1391, __pyx_L6_except_error)
        __pyx_L49_unpacking_done:;
      }
      __pyx_v_exctype = __pyx_t_4;
      __pyx_t_4 = 0;
      __pyx_v_value = __pyx_t_16;
      __pyx_t_16 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1392
 *     except:
 *         exctype, value = exc_info()[:2]
 *         _server_log("genericHandler",             # <<<<<<<<<<<<<<
 *             "Request for '{}' raises an invalid exception:\n Exception: {}\n Values: {}\n"
 *             "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n"
 */
      __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_server_log); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1392, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_16);

      /* "src/pyrfc/_pyrfc.pyx":1396
 *             "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n"
 *             "The values of the request were:\n"
 *             "params: {}\nrequest_context: {}".format(             # <<<<<<<<<<<<<<
 *                 func_name, exctype, value, func_handle_variables, request_context
 *             )
 */
      __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Request_for_raises_an_invalid_ex, __pyx_n_s_format); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1396, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_17);

      /* "src/pyrfc/_pyrfc.pyx":1397
 *             "The values of the request were:\n"
 *             "params: {}\nrequest_context: {}".format(
 *                 func_name, exctype, value, func_handle_variables, request_context             # <<<<<<<<<<<<<<
 *             )
 *         )
 */
      if (unlikely(!__pyx_v_func_handle_variables)) { __Pyx_RaiseUnboundLocalError("func_handle_variables"); __PYX_ERR(0, 1397, __pyx_L6_except_error) }
      if (unlikely(!__pyx_v_request_context)) { __Pyx_RaiseUnboundLocalError("request_context"); __PYX_ERR(0, 1397, __pyx_L6_except_error) }
      __pyx_t_18 = NULL;
      __pyx_t_19 = 0;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) {
        __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_17);
        if (likely(__pyx_t_18)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_17);
          __Pyx_INCREF(__pyx_t_18);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_17, function);
          __pyx_t_19 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[6] = {__pyx_t_18, __pyx_v_func_name, __pyx_v_exctype, __pyx_v_value, __pyx_v_func_handle_variables, __pyx_v_request_context};
        __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_19, 5+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L6_except_error)
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_17)) {
        PyObject *__pyx_temp[6] = {__pyx_t_18, __pyx_v_func_name, __pyx_v_exctype, __pyx_v_value, __pyx_v_func_handle_variables, __pyx_v_request_context};
        __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_17, __pyx_temp+1-__pyx_t_19, 5+__pyx_t_19); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L6_except_error)
        __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
        __Pyx_GOTREF(__pyx_t_4);
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(5+__pyx_t_19); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1396, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_18) {
          __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_18); __pyx_t_18 = NULL;
        }
        __Pyx_INCREF(__pyx_v_func_name);
        __Pyx_GIVEREF(__pyx_v_func_name);
        PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_19, __pyx_v_func_name);
        __Pyx_INCREF(__pyx_v_exctype);
        __Pyx_GIVEREF(__pyx_v_exctype);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_19, __pyx_v_exctype);
        __Pyx_INCREF(__pyx_v_value);
        __Pyx_GIVEREF(__pyx_v_value);
        PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_19, __pyx_v_value);
        __Pyx_INCREF(__pyx_v_func_handle_variables);
        __Pyx_GIVEREF(__pyx_v_func_handle_variables);
        PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_19, __pyx_v_func_handle_variables);
        __Pyx_INCREF(__pyx_v_request_context);
        __Pyx_GIVEREF(__pyx_v_request_context);
        PyTuple_SET_ITEM(__pyx_t_15, 4+__pyx_t_19, __pyx_v_request_context);
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
      __pyx_t_17 = NULL;
      __pyx_t_19 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_17)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_17);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
          __pyx_t_19 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_16)) {
        PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L6_except_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_16)) {
        PyObject *__pyx_temp[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_4};
        __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_16, __pyx_temp+1-__pyx_t_19, 2+__pyx_t_19); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L6_except_error)
        __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_15 = PyTuple_New(2+__pyx_t_19); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1392, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_15);
        if (__pyx_t_17) {
          __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_15, 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_15, 0+__pyx_t_19, __pyx_n_u_genericHandler);
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_19, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L6_except_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      }
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1400
 *             )
 *         )
 *         new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *             message="Invalid exception raised by callback function.",
 *             code=RFC_EXTERNAL_FAILURE
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1400, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_5);

      /* "src/pyrfc/_pyrfc.pyx":1401
 *         )
 *         new_error = ExternalRuntimeError(
 *             message="Invalid exception raised by callback function.",             # <<<<<<<<<<<<<<
 *             code=RFC_EXTERNAL_FAILURE
 *         )
 */
      __pyx_t_16 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1401, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_16);
      if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_message, __pyx_kp_u_Invalid_exception_raised_by_call_2) < 0) __PYX_ERR(0, 1401, __pyx_L6_except_error)

      /* "src/pyrfc/_pyrfc.pyx":1402
 *         new_error = ExternalRuntimeError(
 *             message="Invalid exception raised by callback function.",
 *             code=RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 *         )
 *         fillError(new_error, serverErrorInfo)
 */
      __pyx_t_15 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1402, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_15);
      if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_code, __pyx_t_15) < 0) __PYX_ERR(0, 1401, __pyx_L6_except_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1400
 *             )
 *         )
 *         new_error = ExternalRuntimeError(             # <<<<<<<<<<<<<<
 *             message="Invalid exception raised by callback function.",
 *             code=RFC_EXTERNAL_FAILURE
 */
      __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_16); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1400, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF_SET(__pyx_v_new_error, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1404
 *             code=RFC_EXTERNAL_FAILURE
 *         )
 *         fillError(new_error, serverErrorInfo)             # <<<<<<<<<<<<<<
 *         return RFC_EXTERNAL_FAILURE
 * 
 */
      __pyx_t_15 = __pyx_f_5pyrfc_5pyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1404, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1405
 *         )
 *         fillError(new_error, serverErrorInfo)
 *         return RFC_EXTERNAL_FAILURE             # <<<<<<<<<<<<<<
 * 
 *     for name, value in result.iteritems():
 */
      __pyx_r = RFC_EXTERNAL_FAILURE;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L7_except_return;
    }
    __pyx_L6_except_error:;

    /* "src/pyrfc/_pyrfc.pyx":1336
 *     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_L8_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_L7_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_L9_try_end:;
  }

  /* "src/pyrfc/_pyrfc.pyx":1407
 *         return RFC_EXTERNAL_FAILURE
 * 
 *     for name, value in result.iteritems():             # <<<<<<<<<<<<<<
 *         fillFunctionParameter(funcDesc, funcHandle, name, value)
 *     return RFC_OK
 */
  __pyx_t_6 = 0;
  if (unlikely(__pyx_v_result == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems");
    __PYX_ERR(0, 1407, __pyx_L1_error)
  }
  __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_result, 0, __pyx_n_s_iteritems, (&__pyx_t_30), (&__pyx_t_19)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_8);
  __pyx_t_8 = __pyx_t_9;
  __pyx_t_9 = 0;
  while (1) {
    __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_30, &__pyx_t_6, &__pyx_t_9, &__pyx_t_1, NULL, __pyx_t_19);
    if (unlikely(__pyx_t_10 == 0)) break;
    if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 1407, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_9);
    __pyx_t_9 = 0;
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1408
 * 
 *     for name, value in result.iteritems():
 *         fillFunctionParameter(funcDesc, funcHandle, name, value)             # <<<<<<<<<<<<<<
 *     return RFC_OK
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcHandle, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1409
 *     for name, value in result.iteritems():
 *         fillFunctionParameter(funcDesc, funcHandle, name, value)
 *     return RFC_OK             # <<<<<<<<<<<<<<
 * 
 * class BasicServer(BaseHTTPRequestHandler):
 */
  __pyx_r = RFC_OK;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1315
 *     return RFC_OK
 * 
 * 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_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_WriteUnraisable("pyrfc.pyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = (RFC_RC) 0;
  __pyx_L0:;
  __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_func_desc);
  __Pyx_XDECREF(__pyx_v_conn_attr);
  __Pyx_XDECREF(__pyx_v_request_context);
  __Pyx_XDECREF(__pyx_v_auth_function);
  __Pyx_XDECREF(__pyx_v_new_error);
  __Pyx_XDECREF(__pyx_v_func_handle_variables);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_exctype);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_RefNannyFinishContext();
  #ifdef WITH_THREAD
  __Pyx_PyGILState_Release(__pyx_gilstate_save);
  #endif
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1413
 * class BasicServer(BaseHTTPRequestHandler):
 *     # TODO: management-console
 *     def _set_response(self):             # <<<<<<<<<<<<<<
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_11BasicServer_1_set_response(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_11BasicServer_1_set_response = {"_set_response", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_11BasicServer_1_set_response, METH_O, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_11BasicServer_1_set_response(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_set_response (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_11BasicServer__set_response(__pyx_self, ((PyObject *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":1414
 *     # TODO: management-console
 *     def _set_response(self):
 *         self.send_response(200)             # <<<<<<<<<<<<<<
 *         self.send_header('Content-type', 'text/html')
 *         self.end_headers()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_send_response); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_200) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_200);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __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;

  /* "src/pyrfc/_pyrfc.pyx":1415
 *     def _set_response(self):
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')             # <<<<<<<<<<<<<<
 *         self.end_headers()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_send_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __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;

  /* "src/pyrfc/_pyrfc.pyx":1416
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')
 *         self.end_headers()             # <<<<<<<<<<<<<<
 * 
 *     def do_GET(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_end_headers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __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;

  /* "src/pyrfc/_pyrfc.pyx":1413
 * class BasicServer(BaseHTTPRequestHandler):
 *     # TODO: management-console
 *     def _set_response(self):             # <<<<<<<<<<<<<<
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')
 */

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

/* "src/pyrfc/_pyrfc.pyx":1418
 *         self.end_headers()
 * 
 *     def do_GET(self):             # <<<<<<<<<<<<<<
 *         #_server_log("HTTP GET", f"path: {self.path}\nheaders:\n{self.headers}\n")
 *         self._set_response()
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_11BasicServer_3do_GET(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_11BasicServer_3do_GET = {"do_GET", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_11BasicServer_3do_GET, METH_O, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_11BasicServer_3do_GET(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("do_GET (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_11BasicServer_2do_GET(__pyx_self, ((PyObject *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":1420
 *     def do_GET(self):
 *         #_server_log("HTTP GET", f"path: {self.path}\nheaders:\n{self.headers}\n")
 *         self._set_response()             # <<<<<<<<<<<<<<
 *         self.wfile.write("Press CTRL-C to end".encode("utf-8"))
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_response); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __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, 1420, __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;

  /* "src/pyrfc/_pyrfc.pyx":1421
 *         #_server_log("HTTP GET", f"path: {self.path}\nheaders:\n{self.headers}\n")
 *         self._set_response()
 *         self.wfile.write("Press CTRL-C to end".encode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_wfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_b_Press_CTRL_C_to_end) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_b_Press_CTRL_C_to_end);
  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1418
 *         self.end_headers()
 * 
 *     def do_GET(self):             # <<<<<<<<<<<<<<
 *         #_server_log("HTTP GET", f"path: {self.path}\nheaders:\n{self.headers}\n")
 *         self._set_response()
 */

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

/* "src/pyrfc/_pyrfc.pyx":1461
 *     cdef ServerConnection _server_connection
 * 
 *     def __init__(self, server_params, client_params, config={}):             # <<<<<<<<<<<<<<
 *         cdef uintptr_t handle
 * 
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_6Server_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_6Server_1__init__(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("__init__ (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] = __pyx_k__34;
    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("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1461, __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, "__init__") < 0)) __PYX_ERR(0, 1461, __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("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1461, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Server.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server___init__(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_6Server___init__(struct __pyx_obj_5pyrfc_5pyrfc_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;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "src/pyrfc/_pyrfc.pyx":1465
 * 
 *         # config parsing
 *         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, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __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 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_self->debug = __pyx_t_3;

  /* "src/pyrfc/_pyrfc.pyx":1466
 *         # config parsing
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1466, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->rstrip = __pyx_t_3;

  /* "src/pyrfc/_pyrfc.pyx":1467
 *         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, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __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, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_server_log_2, __pyx_t_2) < 0)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1468
 *         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, 1468, __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, 1468, __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_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __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_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_n_u_auth_check, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __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, 1468, __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_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1468, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_n_u_auth_check, __pyx_t_2) < 0)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1469
 *         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_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_server_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_n_u_port, __pyx_t_1) < 0)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1471
 *         server_context["port"] = config.get("port", 8080)
 * 
 *         self._client_connection = Connection(**client_params)             # <<<<<<<<<<<<<<
 *         self._server_connection = ServerConnection(**server_params)
 * 
 */
  if (unlikely(__pyx_v_client_params == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1471, __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, 1471, __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, 1471, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
  }
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Connection), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __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->_client_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_client_connection));
  __pyx_v_self->_client_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1472
 * 
 *         self._client_connection = Connection(**client_params)
 *         self._server_connection = ServerConnection(**server_params)             # <<<<<<<<<<<<<<
 * 
 *     def add_function(self, func_name, callback):
 */
  if (unlikely(__pyx_v_server_params == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType");
    __PYX_ERR(0, 1472, __pyx_L1_error)
  }
  if (likely(PyDict_CheckExact(__pyx_v_server_params))) {
    __pyx_t_2 = PyDict_Copy(__pyx_v_server_params); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  } else {
    __pyx_t_2 = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, __pyx_v_server_params, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1472, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
  }
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_ServerConnection), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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_5pyrfc_ServerConnection *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1461
 *     cdef ServerConnection _server_connection
 * 
 *     def __init__(self, server_params, client_params, config={}):             # <<<<<<<<<<<<<<
 *         cdef uintptr_t handle
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":1474
 *         self._server_connection = ServerConnection(**server_params)
 * 
 *     def add_function(self, func_name, callback):             # <<<<<<<<<<<<<<
 *         """
 *         Installs a function in the server.
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_3add_function(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_6Server_2add_function[] = "\n        Installs a function in the server.\n\n        :param func_name: A RFM 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_5pyrfc_6Server_3add_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, 1474, __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, 1474, __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, 1474, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Server.add_function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_2add_function(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self), __pyx_v_func_name, __pyx_v_callback);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_2add_function(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1489
 *         """
 *         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, 1489, __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, 1489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyrfc/_pyrfc.pyx":1490
 *         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, 1490, __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, 1490, __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, 1490, __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, 1490, __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, 1490, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1489
 *         """
 *         global server_functions
 *         if func_name in server_functions:             # <<<<<<<<<<<<<<
 *             raise TypeError(f"Server function '{func_name}' already installed.")
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1492
 *             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, 1492, __pyx_L1_error)
  __pyx_t_2 = ((!__pyx_t_3) != 0);
  if (__pyx_t_2) {

    /* "src/pyrfc/_pyrfc.pyx":1493
 * 
 *         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, 1493, __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, 1493, __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;

    /* "src/pyrfc/_pyrfc.pyx":1492
 *             raise TypeError(f"Server function '{func_name}' already installed.")
 * 
 *         if not self._client_connection:             # <<<<<<<<<<<<<<
 *             self._client_connection.open()
 *         cdef RFC_ERROR_INFO errorInfo
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1495
 *             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_5pyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_8 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1495, __pyx_L1_error)
  memcpy(&(__pyx_v_funcName[0]), __pyx_t_8, sizeof(__pyx_v_funcName[0]) * ((30 + 1) - 0));

  /* "src/pyrfc/_pyrfc.pyx":1496
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":1497
 *         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, 1497, __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, 1497, __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;

  /* "src/pyrfc/_pyrfc.pyx":1499
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1500
 * 
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *         server_functions[func_name] = {
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1500, __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, 1500, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1499
 *         self._client_connection.close()
 * 
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1503
 * 
 *         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, 1503, __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, 1503, __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, 1503, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1504
 *         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, 1503, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1505
 *             "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, 1503, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1502
 *             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, 1502, __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, 1502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1508
 *         }
 * 
 *         _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, 1508, __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, 1508, __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, 1508, __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, 1508, __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, 1508, __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;

  /* "src/pyrfc/_pyrfc.pyx":1509
 * 
 *         _server_log("Server function installed", func_name)
 *         _server_log("Server function installed", server_functions[func_name])             # <<<<<<<<<<<<<<
 * 
 *     def _serve_http(self, server_class=HTTPServer, handler_class=BasicServer):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_log); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1509, __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, 1509, __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, 1509, __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, 1509, __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, 1509, __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, 1509, __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, 1509, __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;

  /* "src/pyrfc/_pyrfc.pyx":1474
 *         self._server_connection = ServerConnection(**server_params)
 * 
 *     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.pyrfc.Server.add_function", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1511
 *         _server_log("Server function installed", server_functions[func_name])
 * 
 *     def _serve_http(self, server_class=HTTPServer, handler_class=BasicServer):             # <<<<<<<<<<<<<<
 *         server_address = ('', server_context["port"])
 *         httpd = server_class(server_address, handler_class)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_5_serve_http(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_5_serve_http(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_server_class = 0;
  PyObject *__pyx_v_handler_class = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_serve_http (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_server_class,&__pyx_n_s_handler_class,0};
    PyObject* values[2] = {0,0};
    values[0] = __pyx_k__38;
    values[1] = __pyx_k__39;
    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_server_class);
          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_handler_class);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_serve_http") < 0)) __PYX_ERR(0, 1511, __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_server_class = values[0];
    __pyx_v_handler_class = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("_serve_http", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1511, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Server._serve_http", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_4_serve_http(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self), __pyx_v_server_class, __pyx_v_handler_class);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_4_serve_http(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, PyObject *__pyx_v_server_class, PyObject *__pyx_v_handler_class) {
  PyObject *__pyx_v_server_address = NULL;
  PyObject *__pyx_v_httpd = 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;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  char const *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_serve_http", 0);

  /* "src/pyrfc/_pyrfc.pyx":1512
 * 
 *     def _serve_http(self, server_class=HTTPServer, handler_class=BasicServer):
 *         server_address = ('', server_context["port"])             # <<<<<<<<<<<<<<
 *         httpd = server_class(server_address, handler_class)
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_port); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_kp_u__21);
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__21);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_v_server_address = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1513
 *     def _serve_http(self, server_class=HTTPServer, handler_class=BasicServer):
 *         server_address = ('', server_context["port"])
 *         httpd = server_class(server_address, handler_class)             # <<<<<<<<<<<<<<
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")
 *         try:
 */
  __Pyx_INCREF(__pyx_v_server_class);
  __pyx_t_2 = __pyx_v_server_class; __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_server_address, __pyx_v_handler_class};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_server_address, __pyx_v_handler_class};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_server_address);
    __Pyx_GIVEREF(__pyx_v_server_address);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_server_address);
    __Pyx_INCREF(__pyx_v_handler_class);
    __Pyx_GIVEREF(__pyx_v_handler_class);
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_handler_class);
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_httpd = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1514
 *         server_address = ('', server_context["port"])
 *         httpd = server_class(server_address, handler_class)
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")             # <<<<<<<<<<<<<<
 *         try:
 *             httpd.serve_forever()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __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;

  /* "src/pyrfc/_pyrfc.pyx":1515
 *         httpd = server_class(server_address, handler_class)
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")
 *         try:             # <<<<<<<<<<<<<<
 *             httpd.serve_forever()
 *         except KeyboardInterrupt:
 */
  /*try:*/ {
    {
      __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:*/ {

        /* "src/pyrfc/_pyrfc.pyx":1516
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")
 *         try:
 *             httpd.serve_forever()             # <<<<<<<<<<<<<<
 *         except KeyboardInterrupt:
 *             pass # self._close()
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_httpd, __pyx_n_s_serve_forever); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1516, __pyx_L6_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1515
 *         httpd = server_class(server_address, handler_class)
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")
 *         try:             # <<<<<<<<<<<<<<
 *             httpd.serve_forever()
 *         except KeyboardInterrupt:
 */
      }
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L11_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1517
 *         try:
 *             httpd.serve_forever()
 *         except KeyboardInterrupt:             # <<<<<<<<<<<<<<
 *             pass # self._close()
 *         finally:
 */
      __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyboardInterrupt);
      if (__pyx_t_4) {
        __Pyx_ErrRestore(0,0,0);
        goto __pyx_L7_exception_handled;
      }
      goto __pyx_L8_except_error;
      __pyx_L8_except_error:;

      /* "src/pyrfc/_pyrfc.pyx":1515
 *         httpd = server_class(server_address, handler_class)
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")
 *         try:             # <<<<<<<<<<<<<<
 *             httpd.serve_forever()
 *         except KeyboardInterrupt:
 */
      __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_L4_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
      __pyx_L11_try_end:;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":1520
 *             pass # self._close()
 *         finally:
 *             httpd.server_close()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_httpd, __pyx_n_s_server_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = NULL;
      if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
        }
      }
      __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __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;
      goto __pyx_L5;
    }
    __pyx_L4_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      __pyx_t_4 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename;
      {
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_httpd, __pyx_n_s_server_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = NULL;
        if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
          }
        }
        __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L13_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (PY_MAJOR_VERSION >= 3) {
        __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);
      }
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_7);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ErrRestore(__pyx_t_8, __pyx_t_7, __pyx_t_6);
      __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_6 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
      __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10;
      goto __pyx_L1_error;
      __pyx_L13_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __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);
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L5:;
  }

  /* "src/pyrfc/_pyrfc.pyx":1511
 *         _server_log("Server function installed", server_functions[func_name])
 * 
 *     def _serve_http(self, server_class=HTTPServer, handler_class=BasicServer):             # <<<<<<<<<<<<<<
 *         server_address = ('', server_context["port"])
 *         httpd = server_class(server_address, handler_class)
 */

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

/* "src/pyrfc/_pyrfc.pyx":1523
 * 
 * 
 *     def serve(self, timeout=None):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_7serve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_7serve(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_timeout = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("serve (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout,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_timeout);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "serve") < 0)) __PYX_ERR(0, 1523, __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_timeout = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("serve", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1523, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Server.serve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_6serve(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self), __pyx_v_timeout);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_6serve(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_timeout) {
  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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("serve", 0);

  /* "src/pyrfc/_pyrfc.pyx":1526
 *         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_5pyrfc_genericHandler, __pyx_f_5pyrfc_5pyrfc_metadataLookup, (&__pyx_v_errorInfo));

  /* "src/pyrfc/_pyrfc.pyx":1527
 * 
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1528
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __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, 1528, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1527
 * 
 *         cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1530
 *             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));

  /* "src/pyrfc/_pyrfc.pyx":1531
 * 
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", "launched")
 */
  __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)) {

    /* "src/pyrfc/_pyrfc.pyx":1532
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         _server_log("Server", "launched")
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __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, 1532, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1531
 * 
 *         rc = RfcLaunchServer(self._server_connection._handle, &errorInfo)
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", "launched")
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1533
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", "launched")             # <<<<<<<<<<<<<<
 * 
 *         self._serve_http()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1535
 *         _server_log("Server", "launched")
 * 
 *         self._serve_http()             # <<<<<<<<<<<<<<
 * 
 *         return rc
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serve_http); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __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_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1537
 *         self._serve_http()
 * 
 *         return rc             # <<<<<<<<<<<<<<
 * 
 *     def close(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1523
 * 
 * 
 *     def serve(self, timeout=None):             # <<<<<<<<<<<<<<
 *         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_AddTraceback("pyrfc.pyrfc.Server.serve", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1539
 *         return rc
 * 
 *     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_5pyrfc_6Server_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_6Server_8close[] = " 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_5pyrfc_6Server_9close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("close (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_8close(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_8close(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1546
 *         servers are registered.
 *         """
 *         self._close()             # <<<<<<<<<<<<<<
 * 
 *     def _close(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1546, __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, 1546, __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;

  /* "src/pyrfc/_pyrfc.pyx":1539
 *         return rc
 * 
 *     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.pyrfc.Server.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1548
 *         self._close()
 * 
 *     def _close(self):             # <<<<<<<<<<<<<<
 *         """ Close the connection (private function)
 *         :raises: :exc:`~pyrfc.RFCError` or a subclass
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_11_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_5pyrfc_5pyrfc_6Server_10_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_5pyrfc_6Server_11_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_5pyrfc_6Server_10_close(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_10_close(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1554
 *         """
 *         # 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, 1554, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "src/pyrfc/_pyrfc.pyx":1555
 *         # 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, 1555, __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, 1555, __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;

    /* "src/pyrfc/_pyrfc.pyx":1554
 *         """
 *         # Shutdown server
 *         if self._server_connection:             # <<<<<<<<<<<<<<
 *             self._server_connection.close()
 *         # Remove all installed server functions
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1557
 *             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, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_after_remove = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1559
 *         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, 1559, __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, 1559, __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, 1559, __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, 1559, __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;

    /* "src/pyrfc/_pyrfc.pyx":1560
 *         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, 1560, __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, 1560, __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, 1560, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "src/pyrfc/_pyrfc.pyx":1561
 *         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, 1561, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":1560
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":1562
 *             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, 1562, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1548
 *         self._close()
 * 
 *     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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1564
 *         server_functions = after_remove
 * 
 *     cdef _error(self, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *         """
 *         Error treatment of a connection.
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_6Server__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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);

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

  /* "src/pyrfc/_pyrfc.pyx":1564
 *         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.pyrfc.Server._error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1456
 *              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_5pyrfc_6Server_5debug_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_5debug_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_5debug___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_5debug___get__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1456, __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.pyrfc.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_5pyrfc_6Server_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_6Server_5debug_2__set__(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_5pyrfc_6Server_5debug_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1456, __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.pyrfc.Server.debug.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1457
 *     """
 *     cdef public bint debug
 *     cdef public bint rstrip             # <<<<<<<<<<<<<<
 *     cdef Connection _client_connection
 *     cdef ServerConnection _server_connection
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_6rstrip_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_6rstrip_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_6rstrip___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_6rstrip___get__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1457, __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.pyrfc.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_5pyrfc_6Server_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_6Server_6rstrip_2__set__(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_value));

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

static int __pyx_pf_5pyrfc_5pyrfc_6Server_6rstrip_2__set__(struct __pyx_obj_5pyrfc_5pyrfc_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, 1457, __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.pyrfc.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):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_12__reduce_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_6Server_12__reduce_cython__(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = (self._client_connection, self._server_connection, self.debug, self.rstrip)             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_client_connection));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_client_connection));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->_client_connection));
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_server_connection));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_server_connection));
  PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self->_server_connection));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_v_state = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = (self._client_connection, self._server_connection, self.debug, self.rstrip)
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_3 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v__dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "(tree fragment)":7
 *     state = (self._client_connection, self._server_connection, self.debug, self.rstrip)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_4 = (__pyx_v__dict != Py_None);
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__dict);
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = self._client_connection is not None or self._server_connection is not None
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = (self._client_connection, self._server_connection, self.debug, self.rstrip)
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = self._client_connection is not None or self._server_connection is not None             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, None), state
 */
  /*else*/ {
    __pyx_t_4 = (((PyObject *)__pyx_v_self->_client_connection) != Py_None);
    __pyx_t_6 = (__pyx_t_4 != 0);
    if (!__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = (((PyObject *)__pyx_v_self->_server_connection) != Py_None);
    __pyx_t_4 = (__pyx_t_6 != 0);
    __pyx_t_5 = __pyx_t_4;
    __pyx_L4_bool_binop_done:;
    __pyx_v_use_setstate = __pyx_t_5;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._client_connection is not None or self._server_connection is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, None), state
 *     else:
 */
  __pyx_t_5 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_5) {

    /* "(tree fragment)":13
 *         use_setstate = self._client_connection is not None or self._server_connection is not None
 *     if use_setstate:
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_Server); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_202447126);
    __Pyx_GIVEREF(__pyx_int_202447126);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_202447126);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_3, 2, Py_None);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_2 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = self._client_connection is not None or self._server_connection is not None
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, None), state
 *     else:
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Server__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pyx_unpickle_Server); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_202447126);
    __Pyx_GIVEREF(__pyx_int_202447126);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_202447126);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_state);
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

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

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Server__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_6Server_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_6Server_14__setstate_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

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

  /* "(tree fragment)":17
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_Server__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc___pyx_unpickle_Server__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_Server, (type(self), 0xc111916, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_Server__set_state(self, __pyx_state)
 */

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

/* "src/pyrfc/_pyrfc.pyx":1585
 * 
 * 
 * cdef RFC_TYPE_DESC_HANDLE fillTypeDescription(type_desc):             # <<<<<<<<<<<<<<
 *     """
 *     :param type_desc: object of class TypeDescription
 */

static RFC_TYPE_DESC_HANDLE __pyx_f_5pyrfc_5pyrfc_fillTypeDescription(PyObject *__pyx_v_type_desc) {
  CYTHON_UNUSED PyObject *__pyx_v_RFC_RC = 0;
  RFC_ERROR_INFO __pyx_v_errorInfo;
  RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc;
  RFC_FIELD_DESC __pyx_v_fieldDesc;
  SAP_UC *__pyx_v_sapuc;
  RFC_RC __pyx_v_rc;
  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);

  /* "src/pyrfc/_pyrfc.pyx":1590
 *     :return: Handle of RFC_TYPE_DESC_HANDLE
 *     """
 *     cdef RFC_RC = RFC_OK             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_TYPE_DESC_HANDLE typeDesc
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_RFC_RC = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1597
 * 
 *     # 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, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sapuc = __pyx_t_2;

  /* "src/pyrfc/_pyrfc.pyx":1598
 *     # 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));

  /* "src/pyrfc/_pyrfc.pyx":1599
 *     sapuc = fillString(type_desc.name)
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)
 *     free(sapuc)             # <<<<<<<<<<<<<<
 *     if typeDesc == NULL:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_sapuc);

  /* "src/pyrfc/_pyrfc.pyx":1600
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":1601
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __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, 1601, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1600
 *     typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo)
 *     free(sapuc)
 *     if typeDesc == NULL:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1602
 *     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, 1602, __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, 1602, __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, 1602, __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, 1602, __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));

  /* "src/pyrfc/_pyrfc.pyx":1603
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1604
 *     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));

    /* "src/pyrfc/_pyrfc.pyx":1605
 *     if rc != RFC_OK:
 *         RfcDestroyTypeDesc(typeDesc, NULL)
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     for field_desc in type_desc.fields:
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1605, __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, 1605, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1603
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1607
 *         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, 1607, __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, 1607, __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, 1607, __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, 1607, __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, 1607, __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, 1607, __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, 1607, __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, 1607, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_field_desc, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1609
 *     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, 1609, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1609, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "src/pyrfc/_pyrfc.pyx":1610
 *         # Set name
 *         sapuc = fillString(field_desc['name'])
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *         fieldDesc.type = _type2rfc[field_desc['field_type']] # set type
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __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, 1610, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_fieldDesc.name, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1611
 *         sapuc = fillString(field_desc['name'])
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *         fieldDesc.type = _type2rfc[field_desc['field_type']] # set type
 *         fieldDesc.nucLength = field_desc['nuc_length']
 */
    free(__pyx_v_sapuc);

    /* "src/pyrfc/_pyrfc.pyx":1612
 *         strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1)
 *         free(sapuc)
 *         fieldDesc.type = _type2rfc[field_desc['field_type']] # set type             # <<<<<<<<<<<<<<
 *         fieldDesc.nucLength = field_desc['nuc_length']
 *         fieldDesc.nucOffset = field_desc['nuc_offset']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_type2rfc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1612, __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, 1612, __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, 1612, __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_12 = ((RFCTYPE)__Pyx_PyInt_As_RFCTYPE(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1612, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_fieldDesc.type = __pyx_t_12;

    /* "src/pyrfc/_pyrfc.pyx":1613
 *         free(sapuc)
 *         fieldDesc.type = _type2rfc[field_desc['field_type']] # set type
 *         fieldDesc.nucLength = field_desc['nuc_length']             # <<<<<<<<<<<<<<
 *         fieldDesc.nucOffset = field_desc['nuc_offset']
 *         fieldDesc.ucLength = field_desc['uc_length']
 */
    __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_nuc_length); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1613, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_fieldDesc.nucLength = __pyx_t_5;

    /* "src/pyrfc/_pyrfc.pyx":1614
 *         fieldDesc.type = _type2rfc[field_desc['field_type']] # set type
 *         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_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_nuc_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_fieldDesc.nucOffset = __pyx_t_5;

    /* "src/pyrfc/_pyrfc.pyx":1615
 *         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_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_uc_length); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1615, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_fieldDesc.ucLength = __pyx_t_5;

    /* "src/pyrfc/_pyrfc.pyx":1616
 *         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_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_uc_offset); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1616, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_fieldDesc.ucOffset = __pyx_t_5;

    /* "src/pyrfc/_pyrfc.pyx":1617
 *         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_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_decimals); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_11); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1617, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_v_fieldDesc.decimals = __pyx_t_5;

    /* "src/pyrfc/_pyrfc.pyx":1618
 *         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_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1618, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = (__pyx_t_11 != Py_None);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_13 = (__pyx_t_3 != 0);
    if (__pyx_t_13) {

      /* "src/pyrfc/_pyrfc.pyx":1619
 *         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_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1619, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_v_fieldDesc.typeDescHandle = __pyx_f_5pyrfc_5pyrfc_fillTypeDescription(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1618
 *         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;
    }

    /* "src/pyrfc/_pyrfc.pyx":1621
 *             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:;

    /* "src/pyrfc/_pyrfc.pyx":1622
 *         else:
 *             fieldDesc.typeDescHandle = NULL
 *         fieldDesc.extendedDescription = NULL             # <<<<<<<<<<<<<<
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_v_fieldDesc.extendedDescription = NULL;

    /* "src/pyrfc/_pyrfc.pyx":1623
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":1624
 *         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)) {

      /* "src/pyrfc/_pyrfc.pyx":1625
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:
 *             RfcDestroyTypeDesc(typeDesc, NULL)             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
      (void)(RfcDestroyTypeDesc(__pyx_v_typeDesc, NULL));

      /* "src/pyrfc/_pyrfc.pyx":1626
 *         if rc != RFC_OK:
 *             RfcDestroyTypeDesc(typeDesc, NULL)
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     return typeDesc
 */
      __pyx_t_11 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1626, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_Raise(__pyx_t_11, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __PYX_ERR(0, 1626, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":1624
 *         fieldDesc.extendedDescription = NULL
 *         rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             RfcDestroyTypeDesc(typeDesc, NULL)
 *             raise wrapError(&errorInfo)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":1607
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":1628
 *             raise wrapError(&errorInfo)
 * 
 *     return typeDesc             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_FUNCTION_DESC_HANDLE fillFunctionDescription(func_desc):
 */
  __pyx_r = __pyx_v_typeDesc;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1585
 * 
 * 
 * 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.pyrfc.fillTypeDescription", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_RFC_RC);
  __Pyx_XDECREF(__pyx_v_field_desc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1630
 *     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_5pyrfc_fillFunctionDescription(PyObject *__pyx_v_func_desc) {
  CYTHON_UNUSED PyObject *__pyx_v_RFC_RC = 0;
  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);

  /* "src/pyrfc/_pyrfc.pyx":1635
 *     :return: Handle of RFC_FUNCTION_DESC_HANDLE
 *     """
 *     cdef RFC_RC = RFC_OK             # <<<<<<<<<<<<<<
 *     cdef RFC_ERROR_INFO errorInfo
 *     cdef RFC_FUNCTION_DESC_HANDLE funcDesc
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_RFC_RC = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1642
 * 
 *     # 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, 1642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_sapuc = __pyx_t_2;

  /* "src/pyrfc/_pyrfc.pyx":1643
 *     # 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));

  /* "src/pyrfc/_pyrfc.pyx":1644
 *     sapuc = fillString(func_desc.name)
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)
 *     free(sapuc)             # <<<<<<<<<<<<<<
 *     if funcDesc == NULL:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_sapuc);

  /* "src/pyrfc/_pyrfc.pyx":1645
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":1646
 *     free(sapuc)
 *     if funcDesc == NULL:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     for param_desc in func_desc.parameters:
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1646, __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, 1646, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1645
 *     funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo)
 *     free(sapuc)
 *     if funcDesc == NULL:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1648
 *         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, 1648, __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, 1648, __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, 1648, __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, 1648, __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, 1648, __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, 1648, __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, 1648, __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, 1648, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_param_desc, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1649
 * 
 *     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, 1649, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1649, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "src/pyrfc/_pyrfc.pyx":1650
 *     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 = _type2rfc[param_desc['parameter_type']] # set type
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __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, 1650, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_paramDesc.name, __pyx_v_sapuc, (__pyx_t_7 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1651
 *         sapuc = fillString(param_desc['name'])
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 *         free(sapuc)             # <<<<<<<<<<<<<<
 *         paramDesc.type = _type2rfc[param_desc['parameter_type']] # set type
 *         paramDesc.direction = _direction2rfc[param_desc['direction']]
 */
    free(__pyx_v_sapuc);

    /* "src/pyrfc/_pyrfc.pyx":1652
 *         strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1)
 *         free(sapuc)
 *         paramDesc.type = _type2rfc[param_desc['parameter_type']] # set type             # <<<<<<<<<<<<<<
 *         paramDesc.direction = _direction2rfc[param_desc['direction']]
 *         paramDesc.nucLength = param_desc['nuc_length']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_type2rfc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __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, 1652, __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, 1652, __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_10 = ((RFCTYPE)__Pyx_PyInt_As_RFCTYPE(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1652, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_v_paramDesc.type = __pyx_t_10;

    /* "src/pyrfc/_pyrfc.pyx":1653
 *         free(sapuc)
 *         paramDesc.type = _type2rfc[param_desc['parameter_type']] # set type
 *         paramDesc.direction = _direction2rfc[param_desc['direction']]             # <<<<<<<<<<<<<<
 *         paramDesc.nucLength = param_desc['nuc_length']
 *         paramDesc.ucLength = param_desc['uc_length']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_direction2rfc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_direction); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1653, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_11 = ((RFC_DIRECTION)__Pyx_PyInt_As_RFC_DIRECTION(__pyx_t_1)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1653, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_paramDesc.direction = __pyx_t_11;

    /* "src/pyrfc/_pyrfc.pyx":1654
 *         paramDesc.type = _type2rfc[param_desc['parameter_type']] # set type
 *         paramDesc.direction = _direction2rfc[param_desc['direction']]
 *         paramDesc.nucLength = param_desc['nuc_length']             # <<<<<<<<<<<<<<
 *         paramDesc.ucLength = param_desc['uc_length']
 *         paramDesc.decimals = param_desc['decimals']
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_nuc_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1654, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_paramDesc.nucLength = __pyx_t_12;

    /* "src/pyrfc/_pyrfc.pyx":1655
 *         paramDesc.direction = _direction2rfc[param_desc['direction']]
 *         paramDesc.nucLength = param_desc['nuc_length']
 *         paramDesc.ucLength = param_desc['uc_length']             # <<<<<<<<<<<<<<
 *         paramDesc.decimals = param_desc['decimals']
 *         # defaultValue
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_uc_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1655, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_paramDesc.ucLength = __pyx_t_12;

    /* "src/pyrfc/_pyrfc.pyx":1656
 *         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_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_decimals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1656, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_paramDesc.decimals = __pyx_t_12;

    /* "src/pyrfc/_pyrfc.pyx":1658
 *         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_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_default_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1658, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "src/pyrfc/_pyrfc.pyx":1659
 *         # defaultValue
 *         sapuc = fillString(param_desc['default_value'])
 *         strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1)             # <<<<<<<<<<<<<<
 *         free(sapuc)
 *         # parameterText
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_default_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __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, 1659, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_paramDesc.defaultValue, __pyx_v_sapuc, (__pyx_t_7 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1660
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1662
 *         free(sapuc)
 *         # parameterText
 *         sapuc = fillString(param_desc['parameter_text'])             # <<<<<<<<<<<<<<
 *         strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1)
 *         free(sapuc)
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1662, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_sapuc = __pyx_t_2;

    /* "src/pyrfc/_pyrfc.pyx":1663
 *         # 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_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1663, __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, 1663, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_paramDesc.parameterText, __pyx_v_sapuc, (__pyx_t_7 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1664
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1665
 *         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_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_optional); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1665, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_v_paramDesc.optional = __pyx_t_3;

    /* "src/pyrfc/_pyrfc.pyx":1666
 *         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_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = (__pyx_t_1 != Py_None);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = (__pyx_t_3 != 0);
    if (__pyx_t_13) {

      /* "src/pyrfc/_pyrfc.pyx":1667
 *         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_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_v_paramDesc.typeDescHandle = __pyx_f_5pyrfc_5pyrfc_fillTypeDescription(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyrfc/_pyrfc.pyx":1666
 *         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;
    }

    /* "src/pyrfc/_pyrfc.pyx":1669
 *             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:;

    /* "src/pyrfc/_pyrfc.pyx":1670
 *         else:
 *             paramDesc.typeDescHandle = NULL
 *         paramDesc.extendedDescription = NULL             # <<<<<<<<<<<<<<
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:
 */
    __pyx_v_paramDesc.extendedDescription = NULL;

    /* "src/pyrfc/_pyrfc.pyx":1671
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":1672
 *         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)) {

      /* "src/pyrfc/_pyrfc.pyx":1673
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:
 *             RfcDestroyFunctionDesc(funcDesc, NULL)             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
      (void)(RfcDestroyFunctionDesc(__pyx_v_funcDesc, NULL));

      /* "src/pyrfc/_pyrfc.pyx":1674
 *         if rc != RFC_OK:
 *             RfcDestroyFunctionDesc(funcDesc, NULL)
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 *     return funcDesc
 */
      __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __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, 1674, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":1672
 *         paramDesc.extendedDescription = NULL
 *         rc = RfcAddParameter(funcDesc, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             RfcDestroyFunctionDesc(funcDesc, NULL)
 *             raise wrapError(&errorInfo)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":1648
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":1676
 *             raise wrapError(&errorInfo)
 * 
 *     return funcDesc             # <<<<<<<<<<<<<<
 * 
 * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *:
 */
  __pyx_r = __pyx_v_funcDesc;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1630
 *     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.pyrfc.fillFunctionDescription", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_RFC_RC);
  __Pyx_XDECREF(__pyx_v_param_desc);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1678
 *     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_5pyrfc_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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillUnitIdentifier", 0);

  /* "src/pyrfc/_pyrfc.pyx":1681
 *     cdef RFC_UNIT_IDENTIFIER uIdentifier
 *     cdef SAP_UC* sapuc
 *     uIdentifier.unitType = fillString(u"Q" if unit['queued'] else u"T")[0]             # <<<<<<<<<<<<<<
 *     if len(unit['id'] != RFC_UNITID_LN):
 *         raise RFCError("Invalid length of unit['id'] (should be {}, but found {}).".format(
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_queued); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1681, __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, 1681, __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_5pyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1681, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_uIdentifier.unitType = (__pyx_t_4[0]);

  /* "src/pyrfc/_pyrfc.pyx":1682
 *     cdef SAP_UC* sapuc
 *     uIdentifier.unitType = fillString(u"Q" if unit['queued'] else u"T")[0]
 *     if len(unit['id'] != RFC_UNITID_LN):             # <<<<<<<<<<<<<<
 *         raise RFCError("Invalid length of unit['id'] (should be {}, but found {}).".format(
 *             RFC_UNITID_LN, len(unit['id'])
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(RFC_UNITID_LN); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__pyx_t_6 != 0);
  if (unlikely(__pyx_t_3)) {

    /* "src/pyrfc/_pyrfc.pyx":1683
 *     uIdentifier.unitType = fillString(u"Q" if unit['queued'] else u"T")[0]
 *     if len(unit['id'] != RFC_UNITID_LN):
 *         raise RFCError("Invalid length of unit['id'] (should be {}, but found {}).".format(             # <<<<<<<<<<<<<<
 *             RFC_UNITID_LN, len(unit['id'])
 *         ))
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Invalid_length_of_unit_id_should, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);

    /* "src/pyrfc/_pyrfc.pyx":1684
 *     if len(unit['id'] != RFC_UNITID_LN):
 *         raise RFCError("Invalid length of unit['id'] (should be {}, but found {}).".format(
 *             RFC_UNITID_LN, len(unit['id'])             # <<<<<<<<<<<<<<
 *         ))
 *     sapuc = fillString(unit['id'])
 */
    __pyx_t_8 = __Pyx_PyInt_From_int(RFC_UNITID_LN); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_6 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1684, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1684, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_10 = NULL;
    __pyx_t_11 = 0;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_11 = 1;
      }
    }
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
      PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_t_9};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else
    #endif
    {
      __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      if (__pyx_t_10) {
        __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_9);
      __pyx_t_8 = 0;
      __pyx_t_9 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1683, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 1683, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1682
 *     cdef SAP_UC* sapuc
 *     uIdentifier.unitType = fillString(u"Q" if unit['queued'] else u"T")[0]
 *     if len(unit['id'] != RFC_UNITID_LN):             # <<<<<<<<<<<<<<
 *         raise RFCError("Invalid length of unit['id'] (should be {}, but found {}).".format(
 *             RFC_UNITID_LN, len(unit['id'])
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1686
 *             RFC_UNITID_LN, len(unit['id'])
 *         ))
 *     sapuc = fillString(unit['id'])             # <<<<<<<<<<<<<<
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 *     free(sapuc)
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_sapuc = __pyx_t_4;

  /* "src/pyrfc/_pyrfc.pyx":1687
 *         ))
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":1688
 *     sapuc = fillString(unit['id'])
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 *     free(sapuc)             # <<<<<<<<<<<<<<
 *     return uIdentifier
 * 
 */
  free(__pyx_v_sapuc);

  /* "src/pyrfc/_pyrfc.pyx":1689
 *     strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1)
 *     free(sapuc)
 *     return uIdentifier             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __pyx_r = __pyx_v_uIdentifier;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1678
 *     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_5);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("pyrfc.pyrfc.fillUnitIdentifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1695
 * ################################################################################
 * 
 * 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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1699
 *     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_5pyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1699, __pyx_L1_error)
  __pyx_v_cName = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":1700
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":1701
 *     cName = fillString(name)
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)
 *     free(cName)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  free(__pyx_v_cName);

  /* "src/pyrfc/_pyrfc.pyx":1702
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":1703
 *     free(cName)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1703, __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, 1703, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1702
 *     rc = RfcGetParameterDescByName(funcDesc, cName, &paramDesc, &errorInfo)
 *     free(cName)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1704
 *     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_5pyrfc_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, 1704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1695
 * ################################################################################
 * 
 * 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.pyrfc.fillFunctionParameter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1706
 *     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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1711
 *     cdef RFC_STRUCTURE_HANDLE struct
 *     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_5pyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1711, __pyx_L1_error)
  __pyx_v_cName = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":1712
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":1713
 *     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);

  /* "src/pyrfc/_pyrfc.pyx":1714
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":1715
 *     free(cName)
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 * 
 */
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1715, __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, 1715, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1714
 *     rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo)
 *     free(cName)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1716
 *     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_5pyrfc_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, 1716, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1706
 *     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.pyrfc.fillStructureField", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1718
 *     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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1721
 *     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, 1721, __pyx_L1_error)
  __pyx_v_rowCount = ((unsigned int)__pyx_t_1);

  /* "src/pyrfc/_pyrfc.pyx":1722
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":1723
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":1724
 *     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));

    /* "src/pyrfc/_pyrfc.pyx":1725
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":1726
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 *         if not lineHandle:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         line = lines[i]
 *         # line = lines[0]
 */
      __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1726, __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, 1726, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":1725
 *     while i < rowCount:
 *         lineHandle = RfcAppendNewRow(container, &errorInfo)
 *         if not lineHandle:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         line = lines[i]
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":1727
 *         if not lineHandle:
 *             raise wrapError(&errorInfo)
 *         line = lines[i]             # <<<<<<<<<<<<<<
 *         # line = lines[0]
 *         if type(line) is dict:
 */
    __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, 1727, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1729
 *         line = lines[i]
 *         # line = lines[0]
 *         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) {

      /* "src/pyrfc/_pyrfc.pyx":1730
 *         # line = lines[0]
 *         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, 1730, __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, 1730, __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, 1730, __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;

        /* "src/pyrfc/_pyrfc.pyx":1731
 *         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_5pyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_lineHandle, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1731, __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;

      /* "src/pyrfc/_pyrfc.pyx":1729
 *         line = lines[i]
 *         # line = lines[0]
 *         if type(line) is dict:             # <<<<<<<<<<<<<<
 *             for name, value in line.iteritems():
 *                 fillStructureField(typeDesc, lineHandle, name, value)
 */
      goto __pyx_L6;
    }

    /* "src/pyrfc/_pyrfc.pyx":1733
 *                 fillStructureField(typeDesc, lineHandle, name, value)
 *         else:
 *             fillStructureField(typeDesc, lineHandle, '', line)             # <<<<<<<<<<<<<<
 *         i += 1
 *         # https://stackoverflow.com/questions/33626623/the-most-efficient-way-to-remove-first-n-elements-in-a-list
 */
    /*else*/ {
      __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_lineHandle, __pyx_kp_u__21, __pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1733, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_L6:;

    /* "src/pyrfc/_pyrfc.pyx":1734
 *         else:
 *             fillStructureField(typeDesc, lineHandle, '', line)
 *         i += 1             # <<<<<<<<<<<<<<
 *         # https://stackoverflow.com/questions/33626623/the-most-efficient-way-to-remove-first-n-elements-in-a-list
 *         # del lines[:1]
 */
    __pyx_v_i = (__pyx_v_i + 1);
  }

  /* "src/pyrfc/_pyrfc.pyx":1718
 *     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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1738
 *         # del lines[: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_5pyrfc_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;
  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;
  int __pyx_t_20;
  PyObject *__pyx_t_21 = NULL;
  RFC_INT __pyx_t_22;
  RFC_INT8 __pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  Py_UCS4 __pyx_t_25;
  char const *__pyx_t_26;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillVariable", 0);
  __Pyx_INCREF(__pyx_v_value);

  /* "src/pyrfc/_pyrfc.pyx":1746
 *     cdef SAP_RAW* bValue
 *     #print ("fill", wrapString(cName), 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:*/ {

      /* "src/pyrfc/_pyrfc.pyx":1747
 *     #print ("fill", wrapString(cName), 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:

        /* "src/pyrfc/_pyrfc.pyx":1748
 *     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)) {

          /* "src/pyrfc/_pyrfc.pyx":1749
 *         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, 1749, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1749, __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, 1749, __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, 1749, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1748
 *     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)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1750
 *             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));

        /* "src/pyrfc/_pyrfc.pyx":1751
 *                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)) {

          /* "src/pyrfc/_pyrfc.pyx":1752
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1752, __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, 1752, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1751
 *                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():
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1753
 *             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, 1753, __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, 1753, __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, 1753, __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;

          /* "src/pyrfc/_pyrfc.pyx":1754
 *                 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_5pyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_struct, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1754, __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;

        /* "src/pyrfc/_pyrfc.pyx":1747
 *     #print ("fill", wrapString(cName), 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:

        /* "src/pyrfc/_pyrfc.pyx":1756
 *                 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)) {

          /* "src/pyrfc/_pyrfc.pyx":1757
 *         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, 1757, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1757, __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, 1757, __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, 1757, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1756
 *                 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)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1758
 *             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));

        /* "src/pyrfc/_pyrfc.pyx":1759
 *                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)) {

          /* "src/pyrfc/_pyrfc.pyx":1760
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1760, __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, 1760, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1759
 *                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)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1761
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)
 *             fillTable(typeDesc, table, value)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_BYTE:
 *             bValue = fillBytes(value)
 */
        __pyx_t_6 = __pyx_f_5pyrfc_5pyrfc_fillTable(__pyx_v_typeDesc, __pyx_v_table, __pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1761, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1755
 *             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:

        /* "src/pyrfc/_pyrfc.pyx":1763
 *             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_5pyrfc_fillBytes(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_RAW *)NULL))) __PYX_ERR(0, 1763, __pyx_L3_error)
        __pyx_v_bValue = __pyx_t_13;

        /* "src/pyrfc/_pyrfc.pyx":1764
 *         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, 1764, __pyx_L3_error)
        __pyx_v_rc = RfcSetBytes(__pyx_v_container, __pyx_v_cName, __pyx_v_bValue, ((unsigned int)__pyx_t_9), (&__pyx_v_errorInfo));

        /* "src/pyrfc/_pyrfc.pyx":1765
 *             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);

        /* "src/pyrfc/_pyrfc.pyx":1762
 *                 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:

        /* "src/pyrfc/_pyrfc.pyx":1767
 *             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_5pyrfc_fillBytes(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_RAW *)NULL))) __PYX_ERR(0, 1767, __pyx_L3_error)
        __pyx_v_bValue = __pyx_t_13;

        /* "src/pyrfc/_pyrfc.pyx":1768
 *         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, 1768, __pyx_L3_error)
        __pyx_v_rc = RfcSetXString(__pyx_v_container, __pyx_v_cName, __pyx_v_bValue, ((unsigned int)__pyx_t_9), (&__pyx_v_errorInfo));

        /* "src/pyrfc/_pyrfc.pyx":1769
 *             bValue = fillBytes(value)
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_CHAR:
 *             if not isinstance(value, str):
 */
        free(__pyx_v_bValue);

        /* "src/pyrfc/_pyrfc.pyx":1766
 *             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:

        /* "src/pyrfc/_pyrfc.pyx":1771
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:
 *             if not isinstance(value, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        __pyx_t_4 = PyUnicode_Check(__pyx_v_value); 
        __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
        if (unlikely(__pyx_t_5)) {

          /* "src/pyrfc/_pyrfc.pyx":1772
 *         elif typ == RFCTYPE_CHAR:
 *             if not isinstance(value, 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, 1772, __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, 1772, __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, 1772, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1771
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:
 *             if not isinstance(value, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1773
 *             if not isinstance(value, 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_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1773, __pyx_L3_error)
        __pyx_v_cValue = __pyx_t_14;

        /* "src/pyrfc/_pyrfc.pyx":1774
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":1775
 *             cValue = fillString(value)
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_STRING:
 *             if not isinstance(value, str):
 */
        free(__pyx_v_cValue);

        /* "src/pyrfc/_pyrfc.pyx":1770
 *             rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo)
 *             free(bValue)
 *         elif typ == RFCTYPE_CHAR:             # <<<<<<<<<<<<<<
 *             if not isinstance(value, str):
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_STRING:

        /* "src/pyrfc/_pyrfc.pyx":1777
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:
 *             if not isinstance(value, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        __pyx_t_5 = PyUnicode_Check(__pyx_v_value); 
        __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0);
        if (unlikely(__pyx_t_4)) {

          /* "src/pyrfc/_pyrfc.pyx":1778
 *         elif typ == RFCTYPE_STRING:
 *             if not isinstance(value, 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, 1778, __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, 1778, __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, 1778, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1777
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:
 *             if not isinstance(value, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1779
 *             if not isinstance(value, 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_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1779, __pyx_L3_error)
        __pyx_v_cValue = __pyx_t_14;

        /* "src/pyrfc/_pyrfc.pyx":1780
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":1781
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_NUM:
 *             try:
 */
        free(__pyx_v_cValue);

        /* "src/pyrfc/_pyrfc.pyx":1776
 *             rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ == RFCTYPE_STRING:             # <<<<<<<<<<<<<<
 *             if not isinstance(value, str):
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_NUM:

        /* "src/pyrfc/_pyrfc.pyx":1783
 *             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:*/ {

            /* "src/pyrfc/_pyrfc.pyx":1784
 *         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, 1784, __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, 1784, __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, 1784, __pyx_L17_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (likely(__pyx_t_4)) {

              /* "src/pyrfc/_pyrfc.pyx":1785
 *             try:
 *                 if value.isdigit():
 *                     cValue = fillString(value)             # <<<<<<<<<<<<<<
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 *                     free(cValue)
 */
              __pyx_t_14 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1785, __pyx_L17_error)
              __pyx_v_cValue = __pyx_t_14;

              /* "src/pyrfc/_pyrfc.pyx":1786
 *                 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));

              /* "src/pyrfc/_pyrfc.pyx":1787
 *                     cValue = fillString(value)
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 *                     free(cValue)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise
 */
              free(__pyx_v_cValue);

              /* "src/pyrfc/_pyrfc.pyx":1784
 *         elif typ == RFCTYPE_NUM:
 *             try:
 *                 if value.isdigit():             # <<<<<<<<<<<<<<
 *                     cValue = fillString(value)
 *                     rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
              goto __pyx_L23;
            }

            /* "src/pyrfc/_pyrfc.pyx":1789
 *                     free(cValue)
 *                 else:
 *                     raise             # <<<<<<<<<<<<<<
 *             except:
 *                 raise TypeError('a numeric string is required, received', value, 'of type', type(value))
 */
            /*else*/ {
              __Pyx_ReraiseException(); __PYX_ERR(0, 1789, __pyx_L17_error)
            }
            __pyx_L23:;

            /* "src/pyrfc/_pyrfc.pyx":1783
 *             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;

          /* "src/pyrfc/_pyrfc.pyx":1790
 *                 else:
 *                     raise
 *             except:             # <<<<<<<<<<<<<<
 *                 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:
 */
          /*except:*/ {
            __Pyx_AddTraceback("pyrfc.pyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_11, &__pyx_t_7) < 0) __PYX_ERR(0, 1790, __pyx_L19_except_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GOTREF(__pyx_t_7);

            /* "src/pyrfc/_pyrfc.pyx":1791
 *                     raise
 *             except:
 *                 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, 1791, __pyx_L19_except_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, 1791, __pyx_L19_except_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, 1791, __pyx_L19_except_error)
          }
          __pyx_L19_except_error:;

          /* "src/pyrfc/_pyrfc.pyx":1783
 *             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:;
        }

        /* "src/pyrfc/_pyrfc.pyx":1782
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ == RFCTYPE_NUM:             # <<<<<<<<<<<<<<
 *             try:
 *                 if value.isdigit():
 */
        break;
        case RFCTYPE_BCD:

        /* "src/pyrfc/_pyrfc.pyx":1792
 *             except:
 *                 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:

        /* "src/pyrfc/_pyrfc.pyx":1794
 *         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:*/ {

            /* "src/pyrfc/_pyrfc.pyx":1795
 *             # 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_20 = (__pyx_t_5 != 0);
            if (!__pyx_t_20) {
            } else {
              __pyx_t_4 = __pyx_t_20;
              goto __pyx_L33_bool_binop_done;
            }
            __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1795, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_20 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_7);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_5 = (__pyx_t_20 != 0);
            __pyx_t_4 = __pyx_t_5;
            __pyx_L33_bool_binop_done:;
            if (__pyx_t_4) {

              /* "src/pyrfc/_pyrfc.pyx":1796
 *             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, 1796, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_v_svalue = __pyx_t_7;
              __pyx_t_7 = 0;

              /* "src/pyrfc/_pyrfc.pyx":1795
 *             # 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_L32;
            }

            /* "src/pyrfc/_pyrfc.pyx":1799
 *                 else:
 *                     # string passed from application should be locale correct, do nothing
 *                     svalue = value             # <<<<<<<<<<<<<<
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = localeconv()['decimal_point']
 */
            /*else*/ {
              __Pyx_INCREF(__pyx_v_value);
              __pyx_v_svalue = __pyx_v_value;
            }
            __pyx_L32:;

            /* "src/pyrfc/_pyrfc.pyx":1801
 *                     svalue = value
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = localeconv()['decimal_point']             # <<<<<<<<<<<<<<
 *                 if locale_radix != ".":
 *                     Decimal(svalue.replace(locale_radix, '.'))
 */
            __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_localeconv); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1801, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_11);
            __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_CallOneArg(__pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1801, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_t_7, __pyx_n_u_decimal_point); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1801, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_v_locale_radix = __pyx_t_11;
            __pyx_t_11 = 0;

            /* "src/pyrfc/_pyrfc.pyx":1802
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = localeconv()['decimal_point']
 *                 if locale_radix != ".":             # <<<<<<<<<<<<<<
 *                     Decimal(svalue.replace(locale_radix, '.'))
 *                 else:
 */
            __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_locale_radix, __pyx_kp_u__31, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1802, __pyx_L26_error)
            if (__pyx_t_4) {

              /* "src/pyrfc/_pyrfc.pyx":1803
 *                 locale_radix = localeconv()['decimal_point']
 *                 if locale_radix != ".":
 *                     Decimal(svalue.replace(locale_radix, '.'))             # <<<<<<<<<<<<<<
 *                 else:
 *                     Decimal(svalue)
 */
              __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1803, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_svalue, __pyx_n_s_replace); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1803, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_19);
              __pyx_t_18 = NULL;
              __pyx_t_10 = 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_10 = 1;
                }
              }
              #if CYTHON_FAST_PYCALL
              if (PyFunction_Check(__pyx_t_19)) {
                PyObject *__pyx_temp[3] = {__pyx_t_18, __pyx_v_locale_radix, __pyx_kp_u__31};
                __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L26_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_kp_u__31};
                __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_19, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L26_error)
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_GOTREF(__pyx_t_6);
              } else
              #endif
              {
                __pyx_t_21 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1803, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_21);
                if (__pyx_t_18) {
                  __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_21, 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_21, 0+__pyx_t_10, __pyx_v_locale_radix);
                __Pyx_INCREF(__pyx_kp_u__31);
                __Pyx_GIVEREF(__pyx_kp_u__31);
                PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_10, __pyx_kp_u__31);
                __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_19, __pyx_t_21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1803, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              }
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
              __pyx_t_19 = NULL;
              if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
                __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_7);
                if (likely(__pyx_t_19)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
                  __Pyx_INCREF(__pyx_t_19);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_7, function);
                }
              }
              __pyx_t_11 = (__pyx_t_19) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_19, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1803, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

              /* "src/pyrfc/_pyrfc.pyx":1802
 *                 # decimal separator must be "." for the Decimal parsing check
 *                 locale_radix = localeconv()['decimal_point']
 *                 if locale_radix != ".":             # <<<<<<<<<<<<<<
 *                     Decimal(svalue.replace(locale_radix, '.'))
 *                 else:
 */
              goto __pyx_L35;
            }

            /* "src/pyrfc/_pyrfc.pyx":1805
 *                     Decimal(svalue.replace(locale_radix, '.'))
 *                 else:
 *                     Decimal(svalue)             # <<<<<<<<<<<<<<
 *                 cValue = fillString(svalue)
 *             except:
 */
            /*else*/ {
              __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1805, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_7);
              __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_11 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_svalue) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_svalue);
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1805, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_11);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            }
            __pyx_L35:;

            /* "src/pyrfc/_pyrfc.pyx":1806
 *                 else:
 *                     Decimal(svalue)
 *                 cValue = fillString(svalue)             # <<<<<<<<<<<<<<
 *             except:
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 */
            __pyx_t_14 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_v_svalue); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1806, __pyx_L26_error)
            __pyx_v_cValue = __pyx_t_14;

            /* "src/pyrfc/_pyrfc.pyx":1794
 *         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_L31_try_end;
          __pyx_L26_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_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

          /* "src/pyrfc/_pyrfc.pyx":1807
 *                     Decimal(svalue)
 *                 cValue = fillString(svalue)
 *             except:             # <<<<<<<<<<<<<<
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 */
          /*except:*/ {
            __Pyx_AddTraceback("pyrfc.pyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1807, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_11);
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_GOTREF(__pyx_t_6);

            /* "src/pyrfc/_pyrfc.pyx":1808
 *                 cValue = fillString(svalue)
 *             except:
 *                 raise TypeError('a decimal value required, received', value, 'of type', type(value))             # <<<<<<<<<<<<<<
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 */
            __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1808, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __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_19, 0, __pyx_kp_u_a_decimal_value_required_receive);
            __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_21 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1808, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_21);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_Raise(__pyx_t_21, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            __PYX_ERR(0, 1808, __pyx_L28_except_error)
          }
          __pyx_L28_except_error:;

          /* "src/pyrfc/_pyrfc.pyx":1794
 *         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_L31_try_end:;
        }

        /* "src/pyrfc/_pyrfc.pyx":1809
 *             except:
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":1810
 *                 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);

        /* "src/pyrfc/_pyrfc.pyx":1792
 *             except:
 *                 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:

        /* "src/pyrfc/_pyrfc.pyx":1811
 *             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:

        /* "src/pyrfc/_pyrfc.pyx":1812
 *             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)) {

          /* "src/pyrfc/_pyrfc.pyx":1813
 *         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_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1813, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_kp_u_an_integer_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_integer_required_received);
          PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_an_integer_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_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1813, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __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, 1813, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1812
 *             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)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1814
 *             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_22 = __Pyx_PyInt_As_RFC_INT(__pyx_v_value); if (unlikely((__pyx_t_22 == ((RFC_INT)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1814, __pyx_L3_error)
        __pyx_v_rc = RfcSetInt(__pyx_v_container, __pyx_v_cName, __pyx_t_22, (&__pyx_v_errorInfo));

        /* "src/pyrfc/_pyrfc.pyx":1811
 *             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:

        /* "src/pyrfc/_pyrfc.pyx":1816
 *             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)) {

          /* "src/pyrfc/_pyrfc.pyx":1817
 *         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_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1817, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_INCREF(__pyx_kp_u_an_integer_required_received);
          __Pyx_GIVEREF(__pyx_kp_u_an_integer_required_received);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_an_integer_required_received);
          __Pyx_INCREF(__pyx_v_value);
          __Pyx_GIVEREF(__pyx_v_value);
          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_value);
          __Pyx_INCREF(__pyx_kp_u_of_type);
          __Pyx_GIVEREF(__pyx_kp_u_of_type);
          PyTuple_SET_ITEM(__pyx_t_7, 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_7, 3, ((PyObject *)Py_TYPE(__pyx_v_value)));
          __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1817, __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, 1817, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1816
 *             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)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1818
 *             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 not isinstance(value, str):
 */
        __pyx_t_23 = __Pyx_PyInt_As_RFC_INT8(__pyx_v_value); if (unlikely((__pyx_t_23 == ((RFC_INT8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1818, __pyx_L3_error)
        __pyx_v_rc = RfcSetInt8(__pyx_v_container, __pyx_v_cName, __pyx_t_23, (&__pyx_v_errorInfo));

        /* "src/pyrfc/_pyrfc.pyx":1815
 *                 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:

        /* "src/pyrfc/_pyrfc.pyx":1820
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:
 *             if not isinstance(value, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        __pyx_t_4 = PyUnicode_Check(__pyx_v_value); 
        __pyx_t_5 = ((!(__pyx_t_4 != 0)) != 0);
        if (unlikely(__pyx_t_5)) {

          /* "src/pyrfc/_pyrfc.pyx":1821
 *         elif typ == RFCTYPE_UTCLONG:
 *             if not isinstance(value, 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_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1821, __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_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1821, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __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, 1821, __pyx_L3_error)

          /* "src/pyrfc/_pyrfc.pyx":1820
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:
 *             if not isinstance(value, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 *             cValue = fillString(value)
 */
        }

        /* "src/pyrfc/_pyrfc.pyx":1822
 *             if not isinstance(value, 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_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1822, __pyx_L3_error)
        __pyx_v_cValue = __pyx_t_14;

        /* "src/pyrfc/_pyrfc.pyx":1823
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":1824
 *             cValue = fillString(value)
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_DATE:
 *             if value:
 */
        free(__pyx_v_cValue);

        /* "src/pyrfc/_pyrfc.pyx":1819
 *                 raise TypeError('an integer required, received', value, 'of type', type(value))
 *             rc = RfcSetInt8(container, cName, value, &errorInfo)
 *         elif typ == RFCTYPE_UTCLONG:             # <<<<<<<<<<<<<<
 *             if not isinstance(value, str):
 *                 raise TypeError('an string is required, received', value, 'of type', type(value))
 */
        break;
        case RFCTYPE_DATE:

        /* "src/pyrfc/_pyrfc.pyx":1826
 *             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, 1826, __pyx_L3_error)
        if (__pyx_t_5) {

          /* "src/pyrfc/_pyrfc.pyx":1827
 *         elif typ == RFCTYPE_DATE:
 *             if value:
 *                 format_ok = True             # <<<<<<<<<<<<<<
 *                 if type(value) is date:
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))
 */
          __pyx_v_format_ok = 1;

          /* "src/pyrfc/_pyrfc.pyx":1828
 *             if value:
 *                 format_ok = True
 *                 if type(value) is date:             # <<<<<<<<<<<<<<
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))
 *                 else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1828, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_7);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_4 = (__pyx_t_5 != 0);
          if (__pyx_t_4) {

            /* "src/pyrfc/_pyrfc.pyx":1829
 *                 format_ok = True
 *                 if type(value) is date:
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))             # <<<<<<<<<<<<<<
 *                 else:
 *                     try:
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_04d_02d_02d, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1829, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_year); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1829, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_month); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1829, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_21);
            __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_day); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1829, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_18 = NULL;
            __pyx_t_10 = 0;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_18)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_18);
                __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[4] = {__pyx_t_18, __pyx_t_11, __pyx_t_21, __pyx_t_19};
              __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1829, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
              PyObject *__pyx_temp[4] = {__pyx_t_18, __pyx_t_11, __pyx_t_21, __pyx_t_19};
              __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1829, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
              __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            } else
            #endif
            {
              __pyx_t_24 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1829, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_24);
              if (__pyx_t_18) {
                __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_18); __pyx_t_18 = NULL;
              }
              __Pyx_GIVEREF(__pyx_t_11);
              PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_10, __pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_21);
              PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_10, __pyx_t_21);
              __Pyx_GIVEREF(__pyx_t_19);
              PyTuple_SET_ITEM(__pyx_t_24, 2+__pyx_t_10, __pyx_t_19);
              __pyx_t_11 = 0;
              __pyx_t_21 = 0;
              __pyx_t_19 = 0;
              __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_24, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1829, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_7);
              __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_14 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_7); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1829, __pyx_L3_error)
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_v_cValue = __pyx_t_14;

            /* "src/pyrfc/_pyrfc.pyx":1828
 *             if value:
 *                 format_ok = True
 *                 if type(value) is date:             # <<<<<<<<<<<<<<
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))
 *                 else:
 */
            goto __pyx_L42;
          }

          /* "src/pyrfc/_pyrfc.pyx":1831
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))
 *                 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:*/ {

                /* "src/pyrfc/_pyrfc.pyx":1832
 *                 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, 1832, __pyx_L43_error)
                __pyx_t_4 = ((__pyx_t_9 != 8) != 0);
                if (__pyx_t_4) {

                  /* "src/pyrfc/_pyrfc.pyx":1833
 *                     try:
 *                         if len(value) != 8:
 *                             format_ok = False             # <<<<<<<<<<<<<<
 *                         else:
 *                             if len(value.rstrip()) > 0:
 */
                  __pyx_v_format_ok = 0;

                  /* "src/pyrfc/_pyrfc.pyx":1832
 *                 else:
 *                     try:
 *                         if len(value) != 8:             # <<<<<<<<<<<<<<
 *                             format_ok = False
 *                         else:
 */
                  goto __pyx_L49;
                }

                /* "src/pyrfc/_pyrfc.pyx":1835
 *                             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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1835, __pyx_L43_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __pyx_t_24 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
                    __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_6);
                    if (likely(__pyx_t_24)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                      __Pyx_INCREF(__pyx_t_24);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_6, function);
                    }
                  }
                  __pyx_t_7 = (__pyx_t_24) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_24) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
                  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1835, __pyx_L43_error)
                  __Pyx_GOTREF(__pyx_t_7);
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __pyx_t_9 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1835, __pyx_L43_error)
                  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                  __pyx_t_4 = ((__pyx_t_9 > 0) != 0);
                  if (__pyx_t_4) {

                    /* "src/pyrfc/_pyrfc.pyx":1836
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except:
 */
                    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __pyx_t_24 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 4, NULL, NULL, &__pyx_slice__42, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __pyx_t_19 = __Pyx_PyNumber_Int(__pyx_t_24); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_19);
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __pyx_t_24 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 6, NULL, NULL, &__pyx_slice__43, 1, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __pyx_t_21 = __Pyx_PyNumber_Int(__pyx_t_24); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_21);
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __pyx_t_24 = __Pyx_PyObject_GetSlice(__pyx_v_value, 6, 8, NULL, NULL, &__pyx_slice__44, 1, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_t_24); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1836, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_11);
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __pyx_t_24 = NULL;
                    __pyx_t_10 = 0;
                    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
                      __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_6);
                      if (likely(__pyx_t_24)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                        __Pyx_INCREF(__pyx_t_24);
                        __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[4] = {__pyx_t_24, __pyx_t_19, __pyx_t_21, __pyx_t_11};
                      __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1836, __pyx_L43_error)
                      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_24, __pyx_t_19, __pyx_t_21, __pyx_t_11};
                      __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1836, __pyx_L43_error)
                      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_18 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1836, __pyx_L43_error)
                      __Pyx_GOTREF(__pyx_t_18);
                      if (__pyx_t_24) {
                        __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_24); __pyx_t_24 = NULL;
                      }
                      __Pyx_GIVEREF(__pyx_t_19);
                      PyTuple_SET_ITEM(__pyx_t_18, 0+__pyx_t_10, __pyx_t_19);
                      __Pyx_GIVEREF(__pyx_t_21);
                      PyTuple_SET_ITEM(__pyx_t_18, 1+__pyx_t_10, __pyx_t_21);
                      __Pyx_GIVEREF(__pyx_t_11);
                      PyTuple_SET_ITEM(__pyx_t_18, 2+__pyx_t_10, __pyx_t_11);
                      __pyx_t_19 = 0;
                      __pyx_t_21 = 0;
                      __pyx_t_11 = 0;
                      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_18, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1836, __pyx_L43_error)
                      __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_7); __pyx_t_7 = 0;

                    /* "src/pyrfc/_pyrfc.pyx":1835
 *                             format_ok = False
 *                         else:
 *                             if len(value.rstrip()) > 0:             # <<<<<<<<<<<<<<
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)
 */
                  }

                  /* "src/pyrfc/_pyrfc.pyx":1837
 *                             if len(value.rstrip()) > 0:
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *                     except:
 *                         format_ok = False
 */
                  __pyx_t_14 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1837, __pyx_L43_error)
                  __pyx_v_cValue = __pyx_t_14;
                }
                __pyx_L49:;

                /* "src/pyrfc/_pyrfc.pyx":1831
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))
 *                 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_L48_try_end;
              __pyx_L43_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_21); __pyx_t_21 = 0;
              __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "src/pyrfc/_pyrfc.pyx":1838
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))
 *                             cValue = fillString(value)
 *                     except:             # <<<<<<<<<<<<<<
 *                         format_ok = False
 *                 if not format_ok:
 */
              /*except:*/ {
                __Pyx_AddTraceback("pyrfc.pyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_18) < 0) __PYX_ERR(0, 1838, __pyx_L45_except_error)
                __Pyx_GOTREF(__pyx_t_7);
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_GOTREF(__pyx_t_18);

                /* "src/pyrfc/_pyrfc.pyx":1839
 *                             cValue = fillString(value)
 *                     except:
 *                         format_ok = False             # <<<<<<<<<<<<<<
 *                 if not format_ok:
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 */
                __pyx_v_format_ok = 0;
                __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                goto __pyx_L44_exception_handled;
              }
              __pyx_L45_except_error:;

              /* "src/pyrfc/_pyrfc.pyx":1831
 *                     cValue = fillString('{:04d}{:02d}{:02d}'.format(value.year, value.month, value.day))
 *                 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_L44_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_L48_try_end:;
            }
          }
          __pyx_L42:;

          /* "src/pyrfc/_pyrfc.pyx":1840
 *                     except:
 *                         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)) {

            /* "src/pyrfc/_pyrfc.pyx":1841
 *                         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_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1841, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_INCREF(__pyx_kp_u_date_value_required_received);
            __Pyx_GIVEREF(__pyx_kp_u_date_value_required_received);
            PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_date_value_required_received);
            __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_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1841, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __Pyx_Raise(__pyx_t_6, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __PYX_ERR(0, 1841, __pyx_L3_error)

            /* "src/pyrfc/_pyrfc.pyx":1840
 *                     except:
 *                         format_ok = False
 *                 if not format_ok:             # <<<<<<<<<<<<<<
 *                     raise TypeError('date value required, received', value, 'of type', type(value))
 *                 rc = RfcSetDate(container, cName, cValue, &errorInfo)
 */
          }

          /* "src/pyrfc/_pyrfc.pyx":1842
 *                 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));

          /* "src/pyrfc/_pyrfc.pyx":1843
 *                     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);

          /* "src/pyrfc/_pyrfc.pyx":1826
 *             free(cValue)
 *         elif typ == RFCTYPE_DATE:
 *             if value:             # <<<<<<<<<<<<<<
 *                 format_ok = True
 *                 if type(value) is date:
 */
          goto __pyx_L41;
        }

        /* "src/pyrfc/_pyrfc.pyx":1845
 *                 free(cValue)
 *             else:
 *                 rc = RFC_OK             # <<<<<<<<<<<<<<
 *         elif typ == RFCTYPE_TIME:
 *             if value:
 */
        /*else*/ {
          __pyx_v_rc = RFC_OK;
        }
        __pyx_L41:;

        /* "src/pyrfc/_pyrfc.pyx":1825
 *             rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo)
 *             free(cValue)
 *         elif typ == RFCTYPE_DATE:             # <<<<<<<<<<<<<<
 *             if value:
 *                 format_ok = True
 */
        break;
        case RFCTYPE_TIME:

        /* "src/pyrfc/_pyrfc.pyx":1847
 *                 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, 1847, __pyx_L3_error)
        if (__pyx_t_4) {

          /* "src/pyrfc/_pyrfc.pyx":1848
 *         elif typ == RFCTYPE_TIME:
 *             if value:
 *                 format_ok = True             # <<<<<<<<<<<<<<
 *                 if type(value) is time:
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))
 */
          __pyx_v_format_ok = 1;

          /* "src/pyrfc/_pyrfc.pyx":1849
 *             if value:
 *                 format_ok = True
 *                 if type(value) is time:             # <<<<<<<<<<<<<<
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))
 *                 else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_time); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1849, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_6);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_5 = (__pyx_t_4 != 0);
          if (__pyx_t_5) {

            /* "src/pyrfc/_pyrfc.pyx":1850
 *                 format_ok = True
 *                 if type(value) is time:
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))             # <<<<<<<<<<<<<<
 *                 else:
 *                     try:
 */
            __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_02d_02d_02d, __pyx_n_s_format); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1850, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_hour); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1850, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_minute); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1850, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_11);
            __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_second); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1850, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_21);
            __pyx_t_19 = NULL;
            __pyx_t_10 = 0;
            if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
              __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_18);
              if (likely(__pyx_t_19)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                __Pyx_INCREF(__pyx_t_19);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_18, function);
                __pyx_t_10 = 1;
              }
            }
            #if CYTHON_FAST_PYCALL
            if (PyFunction_Check(__pyx_t_18)) {
              PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_7, __pyx_t_11, __pyx_t_21};
              __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1850, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            } else
            #endif
            #if CYTHON_FAST_PYCCALL
            if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
              PyObject *__pyx_temp[4] = {__pyx_t_19, __pyx_t_7, __pyx_t_11, __pyx_t_21};
              __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1850, __pyx_L3_error)
              __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
              __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
            } else
            #endif
            {
              __pyx_t_24 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1850, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_24);
              if (__pyx_t_19) {
                __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_t_19); __pyx_t_19 = NULL;
              }
              __Pyx_GIVEREF(__pyx_t_7);
              PyTuple_SET_ITEM(__pyx_t_24, 0+__pyx_t_10, __pyx_t_7);
              __Pyx_GIVEREF(__pyx_t_11);
              PyTuple_SET_ITEM(__pyx_t_24, 1+__pyx_t_10, __pyx_t_11);
              __Pyx_GIVEREF(__pyx_t_21);
              PyTuple_SET_ITEM(__pyx_t_24, 2+__pyx_t_10, __pyx_t_21);
              __pyx_t_7 = 0;
              __pyx_t_11 = 0;
              __pyx_t_21 = 0;
              __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_24, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1850, __pyx_L3_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
            }
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_14 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_6); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1850, __pyx_L3_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_v_cValue = __pyx_t_14;

            /* "src/pyrfc/_pyrfc.pyx":1849
 *             if value:
 *                 format_ok = True
 *                 if type(value) is time:             # <<<<<<<<<<<<<<
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))
 *                 else:
 */
            goto __pyx_L55;
          }

          /* "src/pyrfc/_pyrfc.pyx":1852
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))
 *                 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:*/ {

                /* "src/pyrfc/_pyrfc.pyx":1853
 *                 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, 1853, __pyx_L56_error)
                __pyx_t_5 = ((__pyx_t_9 != 6) != 0);
                if (__pyx_t_5) {

                  /* "src/pyrfc/_pyrfc.pyx":1854
 *                     try:
 *                         if len(value) != 6:
 *                             format_ok = False             # <<<<<<<<<<<<<<
 *                         else:
 *                             if len(value.rstrip()) > 0:
 */
                  __pyx_v_format_ok = 0;

                  /* "src/pyrfc/_pyrfc.pyx":1853
 *                 else:
 *                     try:
 *                         if len(value) != 6:             # <<<<<<<<<<<<<<
 *                             format_ok = False
 *                         else:
 */
                  goto __pyx_L62;
                }

                /* "src/pyrfc/_pyrfc.pyx":1856
 *                             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_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1856, __pyx_L56_error)
                  __Pyx_GOTREF(__pyx_t_18);
                  __pyx_t_24 = NULL;
                  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) {
                    __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_18);
                    if (likely(__pyx_t_24)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                      __Pyx_INCREF(__pyx_t_24);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_18, function);
                    }
                  }
                  __pyx_t_6 = (__pyx_t_24) ? __Pyx_PyObject_CallOneArg(__pyx_t_18, __pyx_t_24) : __Pyx_PyObject_CallNoArg(__pyx_t_18);
                  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1856, __pyx_L56_error)
                  __Pyx_GOTREF(__pyx_t_6);
                  __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                  __pyx_t_9 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1856, __pyx_L56_error)
                  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __pyx_t_5 = ((__pyx_t_9 > 0) != 0);
                  if (__pyx_t_5) {

                    /* "src/pyrfc/_pyrfc.pyx":1857
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except:
 */
                    __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_time); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_18);
                    __pyx_t_24 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 2, NULL, NULL, &__pyx_slice__32, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __pyx_t_21 = __Pyx_PyNumber_Int(__pyx_t_24); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_21);
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __pyx_t_24 = __Pyx_PyObject_GetSlice(__pyx_v_value, 2, 4, NULL, NULL, &__pyx_slice__45, 1, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_t_24); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_11);
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __pyx_t_24 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 6, NULL, NULL, &__pyx_slice__43, 1, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_24);
                    __pyx_t_7 = __Pyx_PyNumber_Int(__pyx_t_24); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1857, __pyx_L56_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0;
                    __pyx_t_24 = NULL;
                    __pyx_t_10 = 0;
                    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) {
                      __pyx_t_24 = PyMethod_GET_SELF(__pyx_t_18);
                      if (likely(__pyx_t_24)) {
                        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18);
                        __Pyx_INCREF(__pyx_t_24);
                        __Pyx_INCREF(function);
                        __Pyx_DECREF_SET(__pyx_t_18, function);
                        __pyx_t_10 = 1;
                      }
                    }
                    #if CYTHON_FAST_PYCALL
                    if (PyFunction_Check(__pyx_t_18)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_24, __pyx_t_21, __pyx_t_11, __pyx_t_7};
                      __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1857, __pyx_L56_error)
                      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    } else
                    #endif
                    #if CYTHON_FAST_PYCCALL
                    if (__Pyx_PyFastCFunction_Check(__pyx_t_18)) {
                      PyObject *__pyx_temp[4] = {__pyx_t_24, __pyx_t_21, __pyx_t_11, __pyx_t_7};
                      __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_18, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1857, __pyx_L56_error)
                      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
                      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    } else
                    #endif
                    {
                      __pyx_t_19 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1857, __pyx_L56_error)
                      __Pyx_GOTREF(__pyx_t_19);
                      if (__pyx_t_24) {
                        __Pyx_GIVEREF(__pyx_t_24); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_24); __pyx_t_24 = NULL;
                      }
                      __Pyx_GIVEREF(__pyx_t_21);
                      PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_10, __pyx_t_21);
                      __Pyx_GIVEREF(__pyx_t_11);
                      PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_10, __pyx_t_11);
                      __Pyx_GIVEREF(__pyx_t_7);
                      PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_10, __pyx_t_7);
                      __pyx_t_21 = 0;
                      __pyx_t_11 = 0;
                      __pyx_t_7 = 0;
                      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_19, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1857, __pyx_L56_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
                    }
                    __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
                    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

                    /* "src/pyrfc/_pyrfc.pyx":1856
 *                             format_ok = False
 *                         else:
 *                             if len(value.rstrip()) > 0:             # <<<<<<<<<<<<<<
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)
 */
                  }

                  /* "src/pyrfc/_pyrfc.pyx":1858
 *                             if len(value.rstrip()) > 0:
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)             # <<<<<<<<<<<<<<
 *                     except:
 *                         format_ok = False
 */
                  __pyx_t_14 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_14 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1858, __pyx_L56_error)
                  __pyx_v_cValue = __pyx_t_14;
                }
                __pyx_L62:;

                /* "src/pyrfc/_pyrfc.pyx":1852
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))
 *                 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_L61_try_end;
              __pyx_L56_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_21); __pyx_t_21 = 0;
              __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

              /* "src/pyrfc/_pyrfc.pyx":1859
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))
 *                             cValue = fillString(value)
 *                     except:             # <<<<<<<<<<<<<<
 *                         format_ok = False
 * 
 */
              /*except:*/ {
                __Pyx_AddTraceback("pyrfc.pyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_18, &__pyx_t_19) < 0) __PYX_ERR(0, 1859, __pyx_L58_except_error)
                __Pyx_GOTREF(__pyx_t_6);
                __Pyx_GOTREF(__pyx_t_18);
                __Pyx_GOTREF(__pyx_t_19);

                /* "src/pyrfc/_pyrfc.pyx":1860
 *                             cValue = fillString(value)
 *                     except:
 *                         format_ok = False             # <<<<<<<<<<<<<<
 * 
 *                 if not format_ok:
 */
                __pyx_v_format_ok = 0;
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
                __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
                goto __pyx_L57_exception_handled;
              }
              __pyx_L58_except_error:;

              /* "src/pyrfc/_pyrfc.pyx":1852
 *                     cValue = fillString('{:02d}{:02d}{:02d}'.format(value.hour, value.minute, value.second))
 *                 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_L57_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_L61_try_end:;
            }
          }
          __pyx_L55:;

          /* "src/pyrfc/_pyrfc.pyx":1862
 *                         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)) {

            /* "src/pyrfc/_pyrfc.pyx":1863
 * 
 *                 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, 1863, __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_18 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_19, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1863, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            __Pyx_Raise(__pyx_t_18, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __PYX_ERR(0, 1863, __pyx_L3_error)

            /* "src/pyrfc/_pyrfc.pyx":1862
 *                         format_ok = False
 * 
 *                 if not format_ok:             # <<<<<<<<<<<<<<
 *                     raise TypeError('time value required, received', value, 'of type', type(value))
 *                 rc = RfcSetTime(container, cName, cValue, &errorInfo)
 */
          }

          /* "src/pyrfc/_pyrfc.pyx":1864
 *                 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));

          /* "src/pyrfc/_pyrfc.pyx":1865
 *                     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);

          /* "src/pyrfc/_pyrfc.pyx":1847
 *                 rc = RFC_OK
 *         elif typ == RFCTYPE_TIME:
 *             if value:             # <<<<<<<<<<<<<<
 *                 format_ok = True
 *                 if type(value) is time:
 */
          goto __pyx_L54;
        }

        /* "src/pyrfc/_pyrfc.pyx":1867
 *                 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_L54:;

        /* "src/pyrfc/_pyrfc.pyx":1846
 *             else:
 *                 rc = RFC_OK
 *         elif typ == RFCTYPE_TIME:             # <<<<<<<<<<<<<<
 *             if value:
 *                 format_ok = True
 */
        break;
        default:

        /* "src/pyrfc/_pyrfc.pyx":1869
 *                 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, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_19);
        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = 0;
        __pyx_t_25 = 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_6, 0, __pyx_kp_u_Unknown_RFC_type);
        __pyx_t_7 = __Pyx_PyUnicode_From_RFCTYPE(__pyx_v_typ, 0, ' ', 'd'); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_25 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_25) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_25;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_kp_u_when_filling);
        __pyx_t_9 += 14;
        __Pyx_GIVEREF(__pyx_kp_u_when_filling);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_when_filling);
        __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_25 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_25) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_25;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_11);
        __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_9, __pyx_t_25); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_19))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_19);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_19);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_19, function);
          }
        }
        __pyx_t_18 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_19, __pyx_t_6, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_19, __pyx_t_11);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1869, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_18);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __Pyx_Raise(__pyx_t_18, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
        __PYX_ERR(0, 1869, __pyx_L3_error)
        break;
      }

      /* "src/pyrfc/_pyrfc.pyx":1746
 *     cdef SAP_RAW* bValue
 *     #print ("fill", wrapString(cName), 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_21); __pyx_t_21 = 0;
    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "src/pyrfc/_pyrfc.pyx":1870
 *         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.pyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_11) < 0) __PYX_ERR(0, 1870, __pyx_L5_except_error)
      __Pyx_GOTREF(__pyx_t_18);
      __Pyx_GOTREF(__pyx_t_19);
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_19);
      __pyx_v_e = __pyx_t_19;
      /*try:*/ {

        /* "src/pyrfc/_pyrfc.pyx":1874
 *         # 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_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1874, __pyx_L72_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1874, __pyx_L72_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_21 = PyTuple_New(1); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1874, __pyx_L72_error)
        __Pyx_GOTREF(__pyx_t_21);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_7);
        __pyx_t_7 = 0;
        __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_21); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1874, __pyx_L72_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
        if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_7) < 0) __PYX_ERR(0, 1874, __pyx_L72_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "src/pyrfc/_pyrfc.pyx":1875
 *         # mistakes easier in complex mapping scenarios.
 *         e.args += (wrapString(cName), )
 *         raise             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
        __Pyx_GIVEREF(__pyx_t_18);
        __Pyx_GIVEREF(__pyx_t_19);
        __Pyx_XGIVEREF(__pyx_t_11);
        __Pyx_ErrRestoreWithState(__pyx_t_18, __pyx_t_19, __pyx_t_11);
        __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_11 = 0; 
        __PYX_ERR(0, 1875, __pyx_L72_error)
      }

      /* "src/pyrfc/_pyrfc.pyx":1870
 *         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_L72_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __Pyx_XDECREF(__pyx_t_21); __pyx_t_21 = 0;
          __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
          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_27);
          __Pyx_XGOTREF(__pyx_t_28);
          __Pyx_XGOTREF(__pyx_t_29);
          __pyx_t_10 = __pyx_lineno; __pyx_t_12 = __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_27);
            __Pyx_XGIVEREF(__pyx_t_28);
            __Pyx_XGIVEREF(__pyx_t_29);
            __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
          }
          __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_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
          __pyx_lineno = __pyx_t_10; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_26;
          goto __pyx_L5_except_error;
        }
      }
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "src/pyrfc/_pyrfc.pyx":1746
 *     cdef SAP_RAW* bValue
 *     #print ("fill", wrapString(cName), 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:;
  }

  /* "src/pyrfc/_pyrfc.pyx":1876
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":1877
 *         raise
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 * 
 * cdef SAP_RAW* fillBytes(pystr) except NULL:
 */
    __pyx_t_11 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1877, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_Raise(__pyx_t_11, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __PYX_ERR(0, 1877, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1876
 *         e.args += (wrapString(cName), )
 *         raise
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1738
 *         # del lines[: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_21);
  __Pyx_XDECREF(__pyx_t_24);
  __Pyx_AddTraceback("pyrfc.pyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __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;
}

/* "src/pyrfc/_pyrfc.pyx":1879
 *         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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1880
 * 
 * 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, 1880, __pyx_L1_error)
  __pyx_v_size = __pyx_t_1;

  /* "src/pyrfc/_pyrfc.pyx":1881
 * 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));

  /* "src/pyrfc/_pyrfc.pyx":1882
 *     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, 1882, __pyx_L1_error)
  (void)(memcpy(__pyx_v_bytes, ((char *)__pyx_t_2), __pyx_v_size));

  /* "src/pyrfc/_pyrfc.pyx":1883
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":1879
 *         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.pyrfc.fillBytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1885
 *     return bytes
 * 
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = { ABAPApplicationError: ABAP_APPLICATION_FAILURE,
 *                     ABAPRuntimeError: ABAP_RUNTIME_FAILURE,
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1886
 * 
 * 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, 1886, __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, 1886, __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, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1887
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):
 *     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, 1887, __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, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1888
 *     group2error = { 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, 1888, __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, 1888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1889
 *                     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, 1889, __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, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1890
 *                     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, 1890, __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, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1891
 *                     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, 1891, __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, 1891, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1892
 *                     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, 1892, __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, 1892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 1886, __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;

  /* "src/pyrfc/_pyrfc.pyx":1894
 *                     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, 1894, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  if (unlikely(__pyx_t_5)) {

    /* "src/pyrfc/_pyrfc.pyx":1895
 *     }
 *     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, 1895, __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, 1895, __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, 1895, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1894
 *                     ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE
 *     }
 *     if type(exception) not in group2error:             # <<<<<<<<<<<<<<
 *         raise RFCError("Not a valid error group.")
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1897
 *         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, 1897, __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, 1897, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_errorInfo->group = __pyx_t_6;

  /* "src/pyrfc/_pyrfc.pyx":1899
 *     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, 1899, __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, 1899, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1901
 *     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, 1901, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0x200, NULL, NULL, &__pyx_slice__46, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1901, __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;

    /* "src/pyrfc/_pyrfc.pyx":1902
 *         #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_5pyrfc_fillString(__pyx_v_str); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1902, __pyx_L1_error)
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1903
 *         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, 1903, __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);

    /* "src/pyrfc/_pyrfc.pyx":1904
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1899
 *     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]
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1905
 *         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, 1905, __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, 1905, __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, 1905, __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, 1905, __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;

  /* "src/pyrfc/_pyrfc.pyx":1906
 *         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, 1906, __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, 1906, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1907
 *     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, 1907, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 0x80, NULL, NULL, &__pyx_slice__47, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1907, __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;

    /* "src/pyrfc/_pyrfc.pyx":1908
 *     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_5pyrfc_fillString(__pyx_v_str); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1908, __pyx_L1_error)
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1909
 *         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, 1909, __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);

    /* "src/pyrfc/_pyrfc.pyx":1910
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1906
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1911
 *         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, 1911, __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, 1911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1912
 *         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, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 20, NULL, NULL, &__pyx_slice__10, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1913
 *     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, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 20, NULL, NULL, &__pyx_slice__10, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __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, 1913, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgClass, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1914
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1911
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1915
 *         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, 1915, __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, 1915, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1916
 *         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, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 1, NULL, NULL, &__pyx_slice__48, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1916, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1917
 *     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, 1917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 1, NULL, NULL, &__pyx_slice__48, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __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, 1917, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgType, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1918
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1915
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1919
 *         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, 1919, __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, 1919, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1920
 *         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, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__9, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1920, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1921
 *     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, 1921, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__9, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __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, 1921, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgNumber, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1922
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1919
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1923
 *         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, 1923, __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, 1923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1924
 *         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, 1924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1924, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1925
 *     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, 1925, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __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, 1925, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV1, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1926
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1923
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1927
 *         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, 1927, __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, 1927, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1928
 *         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, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1928, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1929
 *     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, 1929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1929, __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, 1929, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV2, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1930
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1927
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1931
 *         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, 1931, __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, 1931, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1932
 *         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, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1932, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1933
 *     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, 1933, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __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, 1933, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV3, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1934
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1931
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1935
 *         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, 1935, __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, 1935, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "src/pyrfc/_pyrfc.pyx":1936
 *         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, 1936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1936, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1936, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_v_sapuc = __pyx_t_7;

    /* "src/pyrfc/_pyrfc.pyx":1937
 *     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, 1937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__49, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __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, 1937, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    strncpyU(__pyx_v_errorInfo->abapMsgV4, __pyx_v_sapuc, (__pyx_t_9 + 1));

    /* "src/pyrfc/_pyrfc.pyx":1938
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":1935
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1885
 *     return bytes
 * 
 * cdef fillError(exception, RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = { ABAPApplicationError: ABAP_APPLICATION_FAILURE,
 *                     ABAPRuntimeError: ABAP_RUNTIME_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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":1940
 *         free(sapuc)
 * 
 * cdef SAP_UC* fillString(pyuc) except NULL:             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static SAP_UC *__pyx_f_5pyrfc_5pyrfc_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;
  unsigned char *__pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fillString", 0);

  /* "src/pyrfc/_pyrfc.pyx":1943
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     ucbytes = pyuc.encode('utf-8')             # <<<<<<<<<<<<<<
 *     cdef unsigned ucbytes_len = int(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, 1943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u_utf_8);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __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;

  /* "src/pyrfc/_pyrfc.pyx":1944
 *     cdef RFC_ERROR_INFO errorInfo
 *     ucbytes = pyuc.encode('utf-8')
 *     cdef unsigned ucbytes_len = int(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, 1944, __pyx_L1_error)
  __pyx_v_ucbytes_len = ((unsigned int)__pyx_t_4);

  /* "src/pyrfc/_pyrfc.pyx":1945
 *     ucbytes = pyuc.encode('utf-8')
 *     cdef unsigned ucbytes_len = int(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);

  /* "src/pyrfc/_pyrfc.pyx":1946
 *     cdef unsigned ucbytes_len = int(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);

  /* "src/pyrfc/_pyrfc.pyx":1947
 *     cdef unsigned sapuc_size = ucbytes_len + 1
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)
 *     sapuc[0] = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned result_len = 0
 *     rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 */
  (__pyx_v_sapuc[0]) = 0;

  /* "src/pyrfc/_pyrfc.pyx":1948
 *     cdef SAP_UC* sapuc = mallocU(sapuc_size)
 *     sapuc[0] = 0
 *     cdef unsigned result_len = 0             # <<<<<<<<<<<<<<
 *     rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:
 */
  __pyx_v_result_len = 0;

  /* "src/pyrfc/_pyrfc.pyx":1949
 *     sapuc[0] = 0
 *     cdef unsigned result_len = 0
 *     rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)             # <<<<<<<<<<<<<<
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 */
  __pyx_t_5 = __Pyx_PyObject_AsWritableUString(__pyx_v_ucbytes); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1949, __pyx_L1_error)
  __pyx_v_rc = RfcUTF8ToSAPUC(__pyx_t_5, __pyx_v_ucbytes_len, __pyx_v_sapuc, (&__pyx_v_sapuc_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo));

  /* "src/pyrfc/_pyrfc.pyx":1950
 *     cdef unsigned result_len = 0
 *     rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     return sapuc
 */
  __pyx_t_6 = ((__pyx_v_rc != RFC_OK) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "src/pyrfc/_pyrfc.pyx":1951
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __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, 1951, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":1950
 *     cdef unsigned result_len = 0
 *     rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     return sapuc
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":1952
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     return sapuc             # <<<<<<<<<<<<<<
 * 
 * ################################################################################
 */
  __pyx_r = __pyx_v_sapuc;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1940
 *         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.pyrfc.fillString", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ucbytes);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":1959
 * # wrapper functions take C values and returns Python values
 * 
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):             # <<<<<<<<<<<<<<
 *     return {
 *           'dest': wrapString(attributes.dest, 64, True).rstrip('\0')                        # RFC destination
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":1960
 * 
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):
 *     return {             # <<<<<<<<<<<<<<
 *           'dest': wrapString(attributes.dest, 64, True).rstrip('\0')                        # RFC destination
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')                                    # Own host name
 */
  __Pyx_XDECREF(__pyx_r);

  /* "src/pyrfc/_pyrfc.pyx":1961
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):
 *     return {
 *           'dest': wrapString(attributes.dest, 64, True).rstrip('\0')                        # RFC destination             # <<<<<<<<<<<<<<
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')                                    # Own host name
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')                      # Partner host name
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(25); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __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_5pyrfc_wrapString(__pyx_v_attributes.dest, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1961, __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, 1961, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_dest, __pyx_t_2) < 0) __PYX_ERR(0, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1962
 *     return {
 *           'dest': wrapString(attributes.dest, 64, True).rstrip('\0')                        # RFC destination
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')                                    # Own host name             # <<<<<<<<<<<<<<
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')                      # Partner host name
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')                            # R/3 system number
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.host, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1962, __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, 1962, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1962, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1963
 *           'dest': wrapString(attributes.dest, 64, True).rstrip('\0')                        # RFC destination
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')                                    # Own host name
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')                      # Partner host name             # <<<<<<<<<<<<<<
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')                            # R/3 system number
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')                                    # R/3 system ID
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerHost, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __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, 1963, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1964
 *         , 'host': wrapString(attributes.host, 100, True).rstrip('\0')                                    # Own host name
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')                      # Partner host name
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')                            # R/3 system number             # <<<<<<<<<<<<<<
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')                                    # R/3 system ID
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')                                  # Client ("Mandant")
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.sysNumber, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1964, __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, 1964, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1965
 *         , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0')                      # Partner host name
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')                            # R/3 system number
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')                                    # R/3 system ID             # <<<<<<<<<<<<<<
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')                                  # Client ("Mandant")
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')                                     # User
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.sysId, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1965, __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, 1965, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1965, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1966
 *         , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0')                            # R/3 system number
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')                                    # R/3 system ID
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')                                  # Client ("Mandant")             # <<<<<<<<<<<<<<
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')                                     # User
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')                              # Language
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.client, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1966, __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, 1966, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1966, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1967
 *         , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0')                                    # R/3 system ID
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')                                  # Client ("Mandant")
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')                                     # User             # <<<<<<<<<<<<<<
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')                              # Language
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')                                    # Trace level (0-3)
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.user, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __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, 1967, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1968
 *         , 'client': wrapString(attributes.client, 3, True).rstrip('\0')                                  # Client ("Mandant")
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')                                     # User
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')                              # Language             # <<<<<<<<<<<<<<
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')                                    # Trace level (0-3)
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')                        # 2-byte ISO-Language
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.language, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1968, __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, 1968, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1969
 *         , 'user': wrapString(attributes.user, 12, True).rstrip('\0')                                     # User
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')                              # Language
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')                                    # Trace level (0-3)             # <<<<<<<<<<<<<<
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')                        # 2-byte ISO-Language
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')                              # Own code page
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.trace, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1969, __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, 1969, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1969, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1970
 *         , 'language': wrapString(attributes.language, 2, True).rstrip('\0')                              # Language
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')                                    # Trace level (0-3)
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')                        # 2-byte ISO-Language             # <<<<<<<<<<<<<<
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')                              # Own code page
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')                # Partner code page
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.isoLanguage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1970, __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, 1970, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1971
 *         , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0')                                    # Trace level (0-3)
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')                        # 2-byte ISO-Language
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')                              # Own code page             # <<<<<<<<<<<<<<
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')                # Partner code page
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')                                # C/S: RFC Client / RFC Server
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.codepage, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __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, 1971, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1972
 *         , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0')                        # 2-byte ISO-Language
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')                              # Own code page
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')                # Partner code page             # <<<<<<<<<<<<<<
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')                                # C/S: RFC Client / RFC Server
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')                                            # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerCodepage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1972, __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, 1972, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1973
 *         , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0')                              # Own code page
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')                # Partner code page
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')                                # C/S: RFC Client / RFC Server             # <<<<<<<<<<<<<<
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')                                            # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')                              # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.rfcRole, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1973, __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, 1973, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1974
 *         , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0')                # Partner code page
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')                                # C/S: RFC Client / RFC Server
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')                                            # 2/3/E/R: R/2,R/3,Ext,Reg.Ext             # <<<<<<<<<<<<<<
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')                              # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')                                        # My system release
 */
  __pyx_t_4.__pyx_n = 1;
  __pyx_t_4.uclen = __pyx_int_1;
  __pyx_t_5 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_attributes.type, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1974, __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, 1974, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1974, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1975
 *         , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0')                                # C/S: RFC Client / RFC Server
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')                                            # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')                              # 2/3/E/R: R/2,R/3,Ext,Reg.Ext             # <<<<<<<<<<<<<<
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')                                        # My system release
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')                          # Partner system release
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerType, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1975, __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, 1975, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1975, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1976
 *         , 'type': wrapString(attributes.type, 1).rstrip('\0')                                            # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')                              # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')                                        # My system release             # <<<<<<<<<<<<<<
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')                          # Partner system release
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')                            # Partner kernel release
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.rel, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1976, __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, 1976, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1977
 *         , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0')                              # 2/3/E/R: R/2,R/3,Ext,Reg.Ext
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')                                        # My system release
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')                          # Partner system release             # <<<<<<<<<<<<<<
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')                            # Partner kernel release
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')                          # CPI-C Conversation ID
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerRel, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1977, __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, 1977, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1977, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1978
 *         , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0')                                        # My system release
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')                          # Partner system release
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')                            # Partner kernel release             # <<<<<<<<<<<<<<
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')                          # CPI-C Conversation ID
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')                            # Name of the calling APAB program (report, module pool)
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.kernelRel, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1978, __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, 1978, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1978, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1979
 *         , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0')                          # Partner system release
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')                            # Partner kernel release
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')                          # CPI-C Conversation ID             # <<<<<<<<<<<<<<
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')                            # Name of the calling APAB program (report, module pool)
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')        # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.cpicConvId, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1979, __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, 1979, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1979, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1980
 *         , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0')                            # Partner kernel release
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')                          # CPI-C Conversation ID
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')                            # Name of the calling APAB program (report, module pool)             # <<<<<<<<<<<<<<
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')        # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')    # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.progName, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1980, __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, 1980, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1981
 *         , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0')                          # CPI-C Conversation ID
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')                            # Name of the calling APAB program (report, module pool)
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')        # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.             # <<<<<<<<<<<<<<
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')    # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')                           # Partner system code page
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerBytesPerChar, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1981, __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, 1981, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1981, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1982
 *         , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0')                            # Name of the calling APAB program (report, module pool)
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')        # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')    # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.             # <<<<<<<<<<<<<<
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')                           # Partner system code page
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')                       # Partner system code page IPv6
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerSystemCodepage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1982, __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, 1982, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1982, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1983
 *         , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0')        # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')    # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')                           # Partner system code page             # <<<<<<<<<<<<<<
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')                       # Partner system code page IPv6
 *         , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0')                             # Reserved for later use
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerIP, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1983, __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, 1983, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1983, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1984
 *         , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0')    # Number of bytes per character in the backend's current codepage. Note this is different from the semantics of the PCS parameter.
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')                           # Partner system code page
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')                       # Partner system code page IPv6             # <<<<<<<<<<<<<<
 *         , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0')                             # Reserved for later use
 *  }
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.partnerIPv6, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1984, __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, 1984, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1984, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1985
 *         , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0')                           # Partner system code page
 *         , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0')                       # Partner system code page IPv6
 *         , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0')                             # Reserved for later use             # <<<<<<<<<<<<<<
 *  }
 * 
 */
  __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_5pyrfc_wrapString(__pyx_v_attributes.reserved, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1985, __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, 1985, __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__50) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__50);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1985, __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, 1961, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":1959
 * # wrapper functions take C values and returns Python values
 * 
 * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes):             # <<<<<<<<<<<<<<
 *     return {
 *           'dest': wrapString(attributes.dest, 64, True).rstrip('\0')                        # RFC destination
 */

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

/* "src/pyrfc/_pyrfc.pyx":1989
 * 
 * 
 * cdef wrapTypeDescription(RFC_TYPE_DESC_HANDLE typeDesc):             # <<<<<<<<<<<<<<
 *     """ Parses a RFC_TYPE_DESC_HANDLE
 * 
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2002
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":2003
 * 
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2004
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __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, 2004, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2003
 * 
 *     rc = RfcGetTypeName(typeDesc, typeName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     name = wrapString(typeName)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2005
 *     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_5pyrfc_wrapString(__pyx_v_typeName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2006
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2007
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2008
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __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, 2008, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2007
 *     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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2009
 *     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); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2009, __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, 2009, __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, 2009, __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, 2009, __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, 2009, __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, 2009, __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, 2009, __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;

  /* "src/pyrfc/_pyrfc.pyx":2011
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":2012
 * 
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2013
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2013, __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, 2013, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2012
 * 
 *     rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     for i in range(fieldCount):
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2014
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":2015
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2016
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2017
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2017, __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, 2017, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2016
 *     for i in range(fieldCount):
 *         rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         field_description = {
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2019
 *             raise wrapError(&errorInfo)
 *         field_description = {
 *             'name': wrapString(fieldDesc.name),             # <<<<<<<<<<<<<<
 *             'field_type': wrapString(<SAP_UC*>RfcGetTypeAsString(fieldDesc.type)),
 *             'nuc_length': fieldDesc.nucLength,
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_fieldDesc.name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __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, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2020
 *         field_description = {
 *             'name': wrapString(fieldDesc.name),
 *             'field_type': wrapString(<SAP_UC*>RfcGetTypeAsString(fieldDesc.type)),             # <<<<<<<<<<<<<<
 *             'nuc_length': fieldDesc.nucLength,
 *             'nuc_offset': fieldDesc.nucOffset,
 */
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapString(((SAP_UC *)RfcGetTypeAsString(__pyx_v_fieldDesc.type)), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_field_type, __pyx_t_3) < 0) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2021
 *             'name': wrapString(fieldDesc.name),
 *             'field_type': wrapString(<SAP_UC*>RfcGetTypeAsString(fieldDesc.type)),
 *             'nuc_length': fieldDesc.nucLength,             # <<<<<<<<<<<<<<
 *             'nuc_offset': fieldDesc.nucOffset,
 *             'uc_length': fieldDesc.ucLength,
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.nucLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2021, __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, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2022
 *             'field_type': wrapString(<SAP_UC*>RfcGetTypeAsString(fieldDesc.type)),
 *             'nuc_length': fieldDesc.nucLength,
 *             'nuc_offset': fieldDesc.nucOffset,             # <<<<<<<<<<<<<<
 *             'uc_length': fieldDesc.ucLength,
 *             'uc_offset': fieldDesc.ucOffset,
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.nucOffset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nuc_offset, __pyx_t_3) < 0) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2023
 *             'nuc_length': fieldDesc.nucLength,
 *             'nuc_offset': fieldDesc.nucOffset,
 *             'uc_length': fieldDesc.ucLength,             # <<<<<<<<<<<<<<
 *             'uc_offset': fieldDesc.ucOffset,
 *             'decimals': fieldDesc.decimals
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.ucLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2023, __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, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2024
 *             'nuc_offset': fieldDesc.nucOffset,
 *             'uc_length': fieldDesc.ucLength,
 *             'uc_offset': fieldDesc.ucOffset,             # <<<<<<<<<<<<<<
 *             'decimals': fieldDesc.decimals
 *         }
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.ucOffset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2024, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_uc_offset, __pyx_t_3) < 0) __PYX_ERR(0, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2025
 *             'uc_length': fieldDesc.ucLength,
 *             'uc_offset': fieldDesc.ucOffset,
 *             'decimals': fieldDesc.decimals             # <<<<<<<<<<<<<<
 *         }
 *         if fieldDesc.typeDescHandle is NULL:
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.decimals); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2025, __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, 2019, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_field_description, ((PyObject*)__pyx_t_2));
    __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2027
 *             '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) {

      /* "src/pyrfc/_pyrfc.pyx":2028
 *         }
 *         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, 2028, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2027
 *             'decimals': fieldDesc.decimals
 *         }
 *         if fieldDesc.typeDescHandle is NULL:             # <<<<<<<<<<<<<<
 *             field_description['type_description'] = None
 *         else:
 */
      goto __pyx_L9;
    }

    /* "src/pyrfc/_pyrfc.pyx":2030
 *             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_5pyrfc_wrapTypeDescription(__pyx_v_fieldDesc.typeDescHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2030, __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, 2030, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L9:;

    /* "src/pyrfc/_pyrfc.pyx":2032
 *             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, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyDict_Copy(__pyx_v_field_description); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }

  /* "src/pyrfc/_pyrfc.pyx":2034
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":1989
 * 
 * 
 * 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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2036
 *     return type_desc
 * 
 * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("wrapFunctionDescription", 0);

  /* "src/pyrfc/_pyrfc.pyx":2043
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":2044
 * 
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2045
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __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, 2045, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2044
 * 
 *     rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2046
 *     if rc != RFC_OK:
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)             # <<<<<<<<<<<<<<
 *     func_desc = FunctionDescription(name)
 * 
 */
  __pyx_t_2 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_functionName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_name = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2047
 *         raise wrapError(&errorInfo)
 *     name = wrapString(functionName)
 *     func_desc = FunctionDescription(name)             # <<<<<<<<<<<<<<
 * 
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FunctionDescription); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2047, __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, 2047, __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;

  /* "src/pyrfc/_pyrfc.pyx":2049
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":2050
 * 
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2051
 *     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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __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, 2051, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2050
 * 
 *     rc = RfcGetParameterCount(funcDesc, &paramCount, &errorInfo)
 *     if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *         raise wrapError(&errorInfo)
 *     for i in range(paramCount):
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2052
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":2053
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2054
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2055
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2055, __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, 2055, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2054
 *     for i in range(paramCount):
 *         rc = RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         parameter_description = {
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2057
 *             raise wrapError(&errorInfo)
 *         parameter_description = {
 *             'name': wrapString(paramDesc.name),             # <<<<<<<<<<<<<<
 *             'parameter_type': wrapString(<SAP_UC*>RfcGetTypeAsString(paramDesc.type)),
 *             'direction': wrapString(<SAP_UC*>RfcGetDirectionAsString(paramDesc.direction)),
 */
    __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2057, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_paramDesc.name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2057, __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, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2058
 *         parameter_description = {
 *             'name': wrapString(paramDesc.name),
 *             'parameter_type': wrapString(<SAP_UC*>RfcGetTypeAsString(paramDesc.type)),             # <<<<<<<<<<<<<<
 *             'direction': wrapString(<SAP_UC*>RfcGetDirectionAsString(paramDesc.direction)),
 *             'nuc_length': paramDesc.nucLength,
 */
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapString(((SAP_UC *)RfcGetTypeAsString(__pyx_v_paramDesc.type)), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2058, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_parameter_type, __pyx_t_3) < 0) __PYX_ERR(0, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2059
 *             'name': wrapString(paramDesc.name),
 *             'parameter_type': wrapString(<SAP_UC*>RfcGetTypeAsString(paramDesc.type)),
 *             'direction': wrapString(<SAP_UC*>RfcGetDirectionAsString(paramDesc.direction)),             # <<<<<<<<<<<<<<
 *             'nuc_length': paramDesc.nucLength,
 *             'uc_length': paramDesc.ucLength,
 */
    __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapString(((SAP_UC *)RfcGetDirectionAsString(__pyx_v_paramDesc.direction)), NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_direction, __pyx_t_3) < 0) __PYX_ERR(0, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2060
 *             'parameter_type': wrapString(<SAP_UC*>RfcGetTypeAsString(paramDesc.type)),
 *             'direction': wrapString(<SAP_UC*>RfcGetDirectionAsString(paramDesc.direction)),
 *             '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, 2060, __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, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2061
 *             'direction': wrapString(<SAP_UC*>RfcGetDirectionAsString(paramDesc.direction)),
 *             '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, 2061, __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, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2062
 *             '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, 2062, __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, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2063
 *             '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_5pyrfc_wrapString(__pyx_v_paramDesc.defaultValue, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2063, __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, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2064
 *             'decimals': paramDesc.decimals,
 *             '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_f_5pyrfc_5pyrfc_wrapString(__pyx_v_paramDesc.parameterText, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __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, 2057, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2065
 *             '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, 2065, __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, 2065, __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, 2065, __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, 2057, __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;

    /* "src/pyrfc/_pyrfc.pyx":2068
 *             # skip: void* extendedDescription;	///< 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) {

      /* "src/pyrfc/_pyrfc.pyx":2069
 *         }
 *         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, 2069, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2068
 *             # skip: void* extendedDescription;	///< 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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2071
 *             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_5pyrfc_wrapTypeDescription(__pyx_v_paramDesc.typeDescHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2071, __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, 2071, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_L8:;

    /* "src/pyrfc/_pyrfc.pyx":2072
 *         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, 2072, __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, 2072, __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, 2072, __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;
  }

  /* "src/pyrfc/_pyrfc.pyx":2074
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":2036
 *     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_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2077
 * 
 * 
 * cdef wrapResult(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_FUNCTION_HANDLE container, RFC_DIRECTION filter_parameter_direction, config):             # <<<<<<<<<<<<<<
 *     """
 *     :param funcDesc: a C pointer to a function description.
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2090
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":2091
 *     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, 2091, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2092
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":2093
 *     result = {}
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)             # <<<<<<<<<<<<<<
 *         if paramDesc.direction != filter_parameter_direction:
 *             result[wrapString(paramDesc.name)] = wrapVariable(paramDesc.type, container, paramDesc.name, paramDesc.nucLength, paramDesc.typeDescHandle, config)
 */
    (void)(RfcGetParameterDescByIndex(__pyx_v_funcDesc, __pyx_v_i, (&__pyx_v_paramDesc), NULL));

    /* "src/pyrfc/_pyrfc.pyx":2094
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:             # <<<<<<<<<<<<<<
 *             result[wrapString(paramDesc.name)] = wrapVariable(paramDesc.type, container, paramDesc.name, paramDesc.nucLength, paramDesc.typeDescHandle, config)
 *     return result
 */
    __pyx_t_5 = ((__pyx_v_paramDesc.direction != __pyx_v_filter_parameter_direction) != 0);
    if (__pyx_t_5) {

      /* "src/pyrfc/_pyrfc.pyx":2095
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:
 *             result[wrapString(paramDesc.name)] = wrapVariable(paramDesc.type, container, paramDesc.name, paramDesc.nucLength, paramDesc.typeDescHandle, config)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_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, 2095, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_paramDesc.name, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2095, __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, 2095, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "src/pyrfc/_pyrfc.pyx":2094
 *     for i in range(paramCount):
 *         RfcGetParameterDescByIndex(funcDesc, i, &paramDesc, NULL)
 *         if paramDesc.direction != filter_parameter_direction:             # <<<<<<<<<<<<<<
 *             result[wrapString(paramDesc.name)] = wrapVariable(paramDesc.type, container, paramDesc.name, paramDesc.nucLength, paramDesc.typeDescHandle, config)
 *     return result
 */
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":2096
 *         if paramDesc.direction != filter_parameter_direction:
 *             result[wrapString(paramDesc.name)] = wrapVariable(paramDesc.type, container, paramDesc.name, paramDesc.nucLength, paramDesc.typeDescHandle, 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;

  /* "src/pyrfc/_pyrfc.pyx":2077
 * 
 * 
 * cdef wrapResult(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_FUNCTION_HANDLE container, RFC_DIRECTION filter_parameter_direction, config):             # <<<<<<<<<<<<<<
 *     """
 *     :param funcDesc: a C pointer to a function description.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2098
 *     return result
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):             # <<<<<<<<<<<<<<
 *     return {
 *         'queued': u"Q" == wrapString(&uIdentifier.unitType, 1),
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2099
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):
 *     return {             # <<<<<<<<<<<<<<
 *         'queued': u"Q" == wrapString(&uIdentifier.unitType, 1),
 *         'id': wrapString(uIdentifier.unitID)
 */
  __Pyx_XDECREF(__pyx_r);

  /* "src/pyrfc/_pyrfc.pyx":2100
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):
 *     return {
 *         'queued': u"Q" == wrapString(&uIdentifier.unitType, 1),             # <<<<<<<<<<<<<<
 *         'id': wrapString(uIdentifier.unitID)
 *     }
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2100, __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_5pyrfc_wrapString((&__pyx_v_uIdentifier.unitType), &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2100, __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, 2100, __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, 2100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2101
 *     return {
 *         'queued': u"Q" == wrapString(&uIdentifier.unitType, 1),
 *         'id': wrapString(uIdentifier.unitID)             # <<<<<<<<<<<<<<
 *     }
 * 
 */
  __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_uIdentifier.unitID, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2101, __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, 2100, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":2098
 *     return result
 * 
 * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier):             # <<<<<<<<<<<<<<
 *     return {
 *         'queued': u"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.pyrfc.wrapUnitIdentifier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2104
 *     }
 * 
 * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2109
 *     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));

  /* "src/pyrfc/_pyrfc.pyx":2110
 *     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, 2110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2111
 *     RfcGetFieldCount(typeDesc, &fieldCount, NULL)
 *     result = {}
 *     for i in range(fieldCount):             # <<<<<<<<<<<<<<
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, config)
 */
  __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;

    /* "src/pyrfc/_pyrfc.pyx":2112
 *     result = {}
 *     for i in range(fieldCount):
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)             # <<<<<<<<<<<<<<
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, config)
 *     if len(result) == 1:
 */
    (void)(RfcGetFieldDescByIndex(__pyx_v_typeDesc, __pyx_v_i, (&__pyx_v_fieldDesc), NULL));

    /* "src/pyrfc/_pyrfc.pyx":2113
 *     for i in range(fieldCount):
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, config)             # <<<<<<<<<<<<<<
 *     if len(result) == 1:
 *         if '' in result:
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_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, 2113, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_fieldDesc.name, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2113, __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, 2113, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "src/pyrfc/_pyrfc.pyx":2114
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, 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, 2114, __pyx_L1_error)
  __pyx_t_7 = ((__pyx_t_6 == 1) != 0);
  if (__pyx_t_7) {

    /* "src/pyrfc/_pyrfc.pyx":2115
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, config)
 *     if len(result) == 1:
 *         if '' in result:             # <<<<<<<<<<<<<<
 *             result = result['']
 *     return result
 */
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__21, __pyx_v_result, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2115, __pyx_L1_error)
    __pyx_t_8 = (__pyx_t_7 != 0);
    if (__pyx_t_8) {

      /* "src/pyrfc/_pyrfc.pyx":2116
 *     if len(result) == 1:
 *         if '' in result:
 *             result = result['']             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_kp_u__21); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2116, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "src/pyrfc/_pyrfc.pyx":2115
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, config)
 *     if len(result) == 1:
 *         if '' in result:             # <<<<<<<<<<<<<<
 *             result = result['']
 *     return result
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2114
 *         RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL)
 *         result[wrapString(fieldDesc.name)] = wrapVariable(fieldDesc.type, container, fieldDesc.name, fieldDesc.nucLength, fieldDesc.typeDescHandle, config)
 *     if len(result) == 1:             # <<<<<<<<<<<<<<
 *         if '' in result:
 *             result = result['']
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2117
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":2104
 *     }
 * 
 * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2130
 * #        return wrapStructure(self.typeDesc, self.container)
 * 
 * cdef wrapTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2139
 *     # 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)));

  /* "src/pyrfc/_pyrfc.pyx":2140
 *     # 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, 2140, __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;

  /* "src/pyrfc/_pyrfc.pyx":2141
 *     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;

    /* "src/pyrfc/_pyrfc.pyx":2142
 *     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);

    /* "src/pyrfc/_pyrfc.pyx":2143
 *     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)));

    /* "src/pyrfc/_pyrfc.pyx":2144
 *         rowCount -= 1
 *         RfcMoveTo(container, rowCount, &errorInfo)
 *         table[rowCount] = wrapStructure(typeDesc, container, config)             # <<<<<<<<<<<<<<
 *         RfcDeleteCurrentRow(container, &errorInfo)
 *     return table
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapStructure(__pyx_v_typeDesc, __pyx_v_container, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2144, __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, 2144, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2145
 *         RfcMoveTo(container, rowCount, &errorInfo)
 *         table[rowCount] = wrapStructure(typeDesc, container, config)
 *         RfcDeleteCurrentRow(container, &errorInfo)             # <<<<<<<<<<<<<<
 *     return table
 * 
 */
    (void)(RfcDeleteCurrentRow(__pyx_v_container, (&__pyx_v_errorInfo)));
  }

  /* "src/pyrfc/_pyrfc.pyx":2146
 *         table[rowCount] = wrapStructure(typeDesc, container, config)
 *         RfcDeleteCurrentRow(container, &errorInfo)
 *     return table             # <<<<<<<<<<<<<<
 * 
 * cdef wrapVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, unsigned cLen, RFC_TYPE_DESC_HANDLE typeDesc, config):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_table);
  __pyx_r = __pyx_v_table;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":2130
 * #        return wrapStructure(self.typeDesc, self.container)
 * 
 * cdef wrapTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2148
 *     return table
 * 
 * cdef wrapVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, unsigned cLen, RFC_TYPE_DESC_HANDLE typeDesc, config):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2165
 *     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:

    /* "src/pyrfc/_pyrfc.pyx":2166
 *     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));

    /* "src/pyrfc/_pyrfc.pyx":2167
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2168
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2168, __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, 2168, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2167
 *     if typ == RFCTYPE_STRUCTURE:
 *         rc = RfcGetStructure(container, cName, &structure, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return wrapStructure(typeDesc, structure, config)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2169
 *         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_5pyrfc_wrapStructure(__pyx_v_typeDesc, __pyx_v_structure, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2169, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2165
 *     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:

    /* "src/pyrfc/_pyrfc.pyx":2171
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2172
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2173
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2173, __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, 2173, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2172
 *     elif typ == RFCTYPE_TABLE:
 *         rc = RfcGetTable(container, cName, &table, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return wrapTable(typeDesc, table, config)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2174
 *         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_5pyrfc_wrapTable(__pyx_v_typeDesc, __pyx_v_table, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2170
 *             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:

    /* "src/pyrfc/_pyrfc.pyx":2176
 *         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);

    /* "src/pyrfc/_pyrfc.pyx":2177
 *     elif typ == RFCTYPE_CHAR:
 *         charValue = mallocU(cLen)
 *         try:             # <<<<<<<<<<<<<<
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 */
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2178
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2179
 *         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)) {

        /* "src/pyrfc/_pyrfc.pyx":2180
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2180, __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, 2180, __pyx_L6_error)

        /* "src/pyrfc/_pyrfc.pyx":2179
 *         try:
 *             rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(charValue, cLen, config & _MASK_RSTRIP)
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2181
 *             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, 2181, __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, 2181, __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, 2181, __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_5pyrfc_wrapString(__pyx_v_charValue, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2181, __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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2183
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2175
 *             raise wrapError(&errorInfo)
 *         return wrapTable(typeDesc, table, config)
 *     elif typ == RFCTYPE_CHAR:             # <<<<<<<<<<<<<<
 *         charValue = mallocU(cLen)
 *         try:
 */
    break;
    case RFCTYPE_STRING:

    /* "src/pyrfc/_pyrfc.pyx":2185
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":2186
 *     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:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2187
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2188
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2189
 *             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)) {

        /* "src/pyrfc/_pyrfc.pyx":2190
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __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, 2190, __pyx_L12_error)

        /* "src/pyrfc/_pyrfc.pyx":2189
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(stringValue, resultLen)
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2191
 *             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, 2191, __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_5pyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2191, __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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2193
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2184
 *         finally:
 *             free(charValue)
 *     elif typ == RFCTYPE_STRING:             # <<<<<<<<<<<<<<
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:
 */
    break;
    case RFCTYPE_NUM:

    /* "src/pyrfc/_pyrfc.pyx":2195
 *             free(stringValue)
 *     elif typ == RFCTYPE_NUM:
 *         numValue = mallocU(cLen)             # <<<<<<<<<<<<<<
 *         try:
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 */
    __pyx_v_numValue = mallocU(__pyx_v_cLen);

    /* "src/pyrfc/_pyrfc.pyx":2196
 *     elif typ == RFCTYPE_NUM:
 *         numValue = mallocU(cLen)
 *         try:             # <<<<<<<<<<<<<<
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 */
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2197
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2198
 *         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)) {

        /* "src/pyrfc/_pyrfc.pyx":2199
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2199, __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, 2199, __pyx_L18_error)

        /* "src/pyrfc/_pyrfc.pyx":2198
 *         try:
 *             rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return wrapString(numValue, cLen)
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2200
 *             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, 2200, __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_5pyrfc_wrapString(__pyx_v_numValue, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2200, __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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2202
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2194
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_NUM:             # <<<<<<<<<<<<<<
 *         numValue = mallocU(cLen)
 *         try:
 */
    break;
    case RFCTYPE_BYTE:

    /* "src/pyrfc/_pyrfc.pyx":2204
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":2205
 *     elif typ == RFCTYPE_BYTE:
 *         byteValue = <SAP_RAW*> malloc(cLen)
 *         try:             # <<<<<<<<<<<<<<
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 */
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2206
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2207
 *         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)) {

        /* "src/pyrfc/_pyrfc.pyx":2208
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             return byteValue[:cLen]
 *         finally:
 */
        __pyx_t_3 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2208, __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, 2208, __pyx_L24_error)

        /* "src/pyrfc/_pyrfc.pyx":2207
 *         try:
 *             rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:cLen]
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2209
 *             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, 2209, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L23_return;
    }

    /* "src/pyrfc/_pyrfc.pyx":2211
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2203
 *         finally:
 *             free(numValue)
 *     elif typ == RFCTYPE_BYTE:             # <<<<<<<<<<<<<<
 *         byteValue = <SAP_RAW*> malloc(cLen)
 *         try:
 */
    break;
    case RFCTYPE_XSTRING:

    /* "src/pyrfc/_pyrfc.pyx":2213
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":2214
 *     elif typ == RFCTYPE_XSTRING:
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:             # <<<<<<<<<<<<<<
 *             byteValue = <SAP_RAW*> malloc(strLen+1)
 *             byteValue[strLen] = 0
 */
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2215
 *         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)));

      /* "src/pyrfc/_pyrfc.pyx":2216
 *         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;

      /* "src/pyrfc/_pyrfc.pyx":2217
 *             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));

      /* "src/pyrfc/_pyrfc.pyx":2218
 *             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)) {

        /* "src/pyrfc/_pyrfc.pyx":2219
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2219, __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, 2219, __pyx_L30_error)

        /* "src/pyrfc/_pyrfc.pyx":2218
 *             byteValue[strLen] = 0
 *             rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             return byteValue[:resultLen]
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2220
 *             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, 2220, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L29_return;
    }

    /* "src/pyrfc/_pyrfc.pyx":2222
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2212
 *         finally:
 *             free(byteValue)
 *     elif typ == RFCTYPE_XSTRING:             # <<<<<<<<<<<<<<
 *         rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         try:
 */
    break;
    case RFCTYPE_BCD:

    /* "src/pyrfc/_pyrfc.pyx":2229
 *         # 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);

    /* "src/pyrfc/_pyrfc.pyx":2230
 *         # => (2*cLen)+1
 *         strLen = 2*cLen + 1
 *         try:             # <<<<<<<<<<<<<<
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2231
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2232
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2233
 *             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) {

        /* "src/pyrfc/_pyrfc.pyx":2236
 *                 #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);

        /* "src/pyrfc/_pyrfc.pyx":2237
 *                 #      "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;

        /* "src/pyrfc/_pyrfc.pyx":2238
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":2239
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":2233
 *             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))
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2240
 *                 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)) {

        /* "src/pyrfc/_pyrfc.pyx":2241
 *                 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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2241, __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, 2241, __pyx_L36_error)

        /* "src/pyrfc/_pyrfc.pyx":2240
 *                 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))
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2242
 *             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, 2242, __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, 2242, __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, 2242, __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_5pyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2242, __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, 2242, __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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2244
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2223
 *         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:

    /* "src/pyrfc/_pyrfc.pyx":2245
 *         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:

    /* "src/pyrfc/_pyrfc.pyx":2253
 *         # and exponent char, sign and exponent
 *         # => +9
 *         strLen = 2*cLen + 10             # <<<<<<<<<<<<<<
 *         try:
 *             stringValue = mallocU(strLen+1)
 */
    __pyx_v_strLen = ((2 * __pyx_v_cLen) + 10);

    /* "src/pyrfc/_pyrfc.pyx":2254
 *         # => +9
 *         strLen = 2*cLen + 10
 *         try:             # <<<<<<<<<<<<<<
 *             stringValue = mallocU(strLen+1)
 *             rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo)
 */
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2255
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2256
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2257
 *             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) {

        /* "src/pyrfc/_pyrfc.pyx":2260
 *                 #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);

        /* "src/pyrfc/_pyrfc.pyx":2261
 *                 #      "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;

        /* "src/pyrfc/_pyrfc.pyx":2262
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":2263
 *                 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));

        /* "src/pyrfc/_pyrfc.pyx":2257
 *             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))
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2264
 *                 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)) {

        /* "src/pyrfc/_pyrfc.pyx":2265
 *                 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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2265, __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, 2265, __pyx_L43_error)

        /* "src/pyrfc/_pyrfc.pyx":2264
 *                 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))
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2266
 *             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, 2266, __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, 2266, __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, 2266, __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_5pyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2266, __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, 2266, __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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2268
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2245
 *         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:

    /* "src/pyrfc/_pyrfc.pyx":2270
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":2271
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2272
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2272, __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, 2272, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2271
 *     elif typ == RFCTYPE_FLOAT:
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return floatValue
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2273
 *         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, 2273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2269
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_FLOAT:             # <<<<<<<<<<<<<<
 *         rc = RfcGetFloat(container, cName, &floatValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT:

    /* "src/pyrfc/_pyrfc.pyx":2275
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2276
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2277
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __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, 2277, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2276
 *     elif typ == RFCTYPE_INT:
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return intValue
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2278
 *         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, 2278, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2274
 *             raise wrapError(&errorInfo)
 *         return floatValue
 *     elif typ == RFCTYPE_INT:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt(container, cName, &intValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT1:

    /* "src/pyrfc/_pyrfc.pyx":2280
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2281
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2282
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2282, __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, 2282, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2281
 *     elif typ == RFCTYPE_INT1:
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int1Value
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2283
 *         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, 2283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2279
 *             raise wrapError(&errorInfo)
 *         return intValue
 *     elif typ == RFCTYPE_INT1:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt1(container, cName, &int1Value, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT2:

    /* "src/pyrfc/_pyrfc.pyx":2285
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2286
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2287
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2287, __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, 2287, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2286
 *     elif typ == RFCTYPE_INT2:
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int2Value
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2288
 *         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, 2288, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2284
 *             raise wrapError(&errorInfo)
 *         return int1Value
 *     elif typ == RFCTYPE_INT2:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt2(container, cName, &int2Value, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_INT8:

    /* "src/pyrfc/_pyrfc.pyx":2290
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2291
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2292
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2292, __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, 2292, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2291
 *     elif typ == RFCTYPE_INT8:
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         return int8Value
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2293
 *         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, 2293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2289
 *             raise wrapError(&errorInfo)
 *         return int2Value
 *     elif typ == RFCTYPE_INT8:             # <<<<<<<<<<<<<<
 *         rc = RfcGetInt8(container, cName, &int8Value, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_UTCLONG:

    /* "src/pyrfc/_pyrfc.pyx":2296
 *     elif typ == RFCTYPE_UTCLONG:
 *         # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         strLen = 27 # is fixed             # <<<<<<<<<<<<<<
 *         try:
 *             stringValue = mallocU(strLen+1)
 */
    __pyx_v_strLen = 27;

    /* "src/pyrfc/_pyrfc.pyx":2297
 *         # 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:*/ {

      /* "src/pyrfc/_pyrfc.pyx":2298
 *         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));

      /* "src/pyrfc/_pyrfc.pyx":2300
 *             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));

      /* "src/pyrfc/_pyrfc.pyx":2301
 *             # 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)) {

        /* "src/pyrfc/_pyrfc.pyx":2302
 *             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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2302, __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, 2302, __pyx_L55_error)

        /* "src/pyrfc/_pyrfc.pyx":2301
 *             # 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)
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2303
 *             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, 2303, __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_5pyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2303, __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;

      /* "src/pyrfc/_pyrfc.pyx":2305
 *             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__51, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L55_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_u__31); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __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__52, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __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, 2305, __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;
    }

    /* "src/pyrfc/_pyrfc.pyx":2307
 *             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;
      }
    }

    /* "src/pyrfc/_pyrfc.pyx":2294
 *             raise wrapError(&errorInfo)
 *         return int8Value
 *     elif typ == RFCTYPE_UTCLONG:             # <<<<<<<<<<<<<<
 *         # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo)
 *         strLen = 27 # is fixed
 */
    break;
    case RFCTYPE_DATE:

    /* "src/pyrfc/_pyrfc.pyx":2309
 *             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));

    /* "src/pyrfc/_pyrfc.pyx":2310
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2311
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2311, __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, 2311, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2310
 *     elif typ == RFCTYPE_DATE:
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         value = wrapString(dateValue, 8)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2312
 *         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_5pyrfc_wrapString(__pyx_v_dateValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_value = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2314
 *         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, 2314, __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, 2314, __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, 2314, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_1) {

      /* "src/pyrfc/_pyrfc.pyx":2315
 *         # 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, 2315, __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, 2315, __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) {

        /* "src/pyrfc/_pyrfc.pyx":2316
 *         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;

        /* "src/pyrfc/_pyrfc.pyx":2315
 *         # return date or None
 *         if config & _MASK_DTIME:
 *             if (value == '00000000') or not value:             # <<<<<<<<<<<<<<
 *                 return None
 *             return datetime.strptime(value, '%Y%m%d').date()
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2317
 *             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, 2317, __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, 2317, __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, 2317, __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, 2317, __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, 2317, __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, 2317, __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, 2317, __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, 2317, __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;

      /* "src/pyrfc/_pyrfc.pyx":2314
 *         value = wrapString(dateValue, 8)
 *         # return date or None
 *         if config & _MASK_DTIME:             # <<<<<<<<<<<<<<
 *             if (value == '00000000') or not value:
 *                 return None
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2319
 *             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, 2319, __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, 2319, __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) {

      /* "src/pyrfc/_pyrfc.pyx":2320
 *         # 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__21);
      __pyx_r = __pyx_kp_u__21;
      goto __pyx_L0;

      /* "src/pyrfc/_pyrfc.pyx":2319
 *             return datetime.strptime(value, '%Y%m%d').date()
 *         # return date string or ''
 *         if (value == '00000000') or not value:             # <<<<<<<<<<<<<<
 *               return ''
 *         return value
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2321
 *         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;

    /* "src/pyrfc/_pyrfc.pyx":2308
 *         finally:
 *             free(stringValue)
 *     elif typ == RFCTYPE_DATE:             # <<<<<<<<<<<<<<
 *         rc = RfcGetDate(container, cName, dateValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    case RFCTYPE_TIME:

    /* "src/pyrfc/_pyrfc.pyx":2323
 *         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));

    /* "src/pyrfc/_pyrfc.pyx":2324
 *     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)) {

      /* "src/pyrfc/_pyrfc.pyx":2325
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2325, __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, 2325, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2324
 *     elif typ == RFCTYPE_TIME:
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         value = wrapString(timeValue, 6)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2326
 *         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_5pyrfc_wrapString(__pyx_v_timeValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2326, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_value = __pyx_t_4;
    __pyx_t_4 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2328
 *         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, 2328, __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, 2328, __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, 2328, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
    if (__pyx_t_1) {

      /* "src/pyrfc/_pyrfc.pyx":2329
 *         # 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, 2329, __pyx_L1_error)
      __pyx_t_23 = ((!__pyx_t_1) != 0);
      if (__pyx_t_23) {

        /* "src/pyrfc/_pyrfc.pyx":2330
 *         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;

        /* "src/pyrfc/_pyrfc.pyx":2329
 *         # return time or None
 *         if config & _MASK_DTIME:
 *             if not value:             # <<<<<<<<<<<<<<
 *                 return None
 *             return datetime.strptime(value, '%H%M%S').time()
 */
      }

      /* "src/pyrfc/_pyrfc.pyx":2331
 *             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, 2331, __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, 2331, __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, 2331, __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, 2331, __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, 2331, __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, 2331, __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, 2331, __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, 2331, __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;

      /* "src/pyrfc/_pyrfc.pyx":2328
 *         value = wrapString(timeValue, 6)
 *         # return time or None
 *         if config & _MASK_DTIME:             # <<<<<<<<<<<<<<
 *             if not value:
 *                 return None
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2333
 *             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, 2333, __pyx_L1_error)
    __pyx_t_1 = ((!__pyx_t_23) != 0);
    if (__pyx_t_1) {

      /* "src/pyrfc/_pyrfc.pyx":2334
 *         # return time string or ''
 *         if not value:
 *             return ''             # <<<<<<<<<<<<<<
 *         return value
 *     else:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_kp_u__21);
      __pyx_r = __pyx_kp_u__21;
      goto __pyx_L0;

      /* "src/pyrfc/_pyrfc.pyx":2333
 *             return datetime.strptime(value, '%H%M%S').time()
 *         # return time string or ''
 *         if not value:             # <<<<<<<<<<<<<<
 *             return ''
 *         return value
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2335
 *         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;

    /* "src/pyrfc/_pyrfc.pyx":2322
 *               return ''
 *         return value
 *     elif typ == RFCTYPE_TIME:             # <<<<<<<<<<<<<<
 *         rc = RfcGetTime(container, cName, timeValue, &errorInfo)
 *         if rc != RFC_OK:
 */
    break;
    default:

    /* "src/pyrfc/_pyrfc.pyx":2337
 *         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, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_25);
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2337, __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, 2337, __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_5pyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2337, __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, 2337, __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, 2337, __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, 2337, __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, 2337, __pyx_L1_error)
    break;
  }

  /* "src/pyrfc/_pyrfc.pyx":2148
 *     return table
 * 
 * cdef wrapVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, unsigned cLen, RFC_TYPE_DESC_HANDLE typeDesc, config):             # <<<<<<<<<<<<<<
 *     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_19);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2339
 *         raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName)))
 * 
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = { ABAP_APPLICATION_FAILURE: ABAPApplicationError,
 *                     ABAP_RUNTIME_FAILURE: ABAPRuntimeError,
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2340
 * 
 * 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, 2340, __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, 2340, __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, 2340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2341
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):
 *     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, 2341, __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, 2341, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2342
 *     group2error = { 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, 2342, __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, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2343
 *                     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, 2343, __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, 2343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2344
 *                     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, 2344, __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, 2344, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2345
 *                     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, 2345, __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, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2340, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2346
 *                     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, 2346, __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, 2346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2340, __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;

  /* "src/pyrfc/_pyrfc.pyx":2348
 *                     EXTERNAL_AUTHORIZATION_FAILURE: ExternalAuthorizationError
 *     }
 *     error = group2error[errorInfo.group]             # <<<<<<<<<<<<<<
 *     return error(wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key),
 *         wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFC_ERROR_GROUP(__pyx_v_errorInfo->group); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __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, 2348, __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;

  /* "src/pyrfc/_pyrfc.pyx":2349
 *     }
 *     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_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->message, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __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, 2349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);

  /* "src/pyrfc/_pyrfc.pyx":2350
 *     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),
 *         wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4))
 */
  __pyx_t_5 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgClass, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgType, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgNumber, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);

  /* "src/pyrfc/_pyrfc.pyx":2351
 *     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_8 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgV1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgV2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);

  /* "src/pyrfc/_pyrfc.pyx":2352
 *         wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber),
 *         wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2),
 *         wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4))             # <<<<<<<<<<<<<<
 * 
 * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False):
 */
  __pyx_t_10 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgV3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2352, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __pyx_f_5pyrfc_5pyrfc_wrapString(__pyx_v_errorInfo->abapMsgV4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2352, __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, 2349, __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, 2349, __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, 2349, __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, 2349, __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;

  /* "src/pyrfc/_pyrfc.pyx":2339
 *         raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName)))
 * 
 * cdef wrapError(RFC_ERROR_INFO* errorInfo):             # <<<<<<<<<<<<<<
 *     group2error = { ABAP_APPLICATION_FAILURE: ABAPApplicationError,
 *                     ABAP_RUNTIME_FAILURE: ABAPRuntimeError,
 */

  /* 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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2354
 *         wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4))
 * 
 * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapString(SAP_UC const *__pyx_v_uc, struct __pyx_opt_args_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2357
 *     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, 2357, __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, 2357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyrfc/_pyrfc.pyx":2358
 *     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, 2358, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_uclen, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2357
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:             # <<<<<<<<<<<<<<
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2359
 *     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, 2359, __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, 2359, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyrfc/_pyrfc.pyx":2360
 *         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__21);
    __pyx_r = __pyx_kp_u__21;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2359
 *     if uclen == -1:
 *         uclen = strlenU(uc)
 *     if uclen == 0:             # <<<<<<<<<<<<<<
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2361
 *     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, 2361, __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, 2361, __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, 2361, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_utf8_size = __pyx_t_4;

  /* "src/pyrfc/_pyrfc.pyx":2362
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2363
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":2364
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":2365
 *     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, 2365, __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));

  /* "src/pyrfc/_pyrfc.pyx":2366
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2368
 *     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, 2368, __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, 2368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2368, __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, 2368, __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, 2368, __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, 2368, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2366
 *     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))
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2369
 *         # 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;

  /* "src/pyrfc/_pyrfc.pyx":2370
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 *     utf8[result_len] = 0
 *     try:             # <<<<<<<<<<<<<<
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode('utf-8')
 */
  /*try:*/ {

    /* "src/pyrfc/_pyrfc.pyx":2371
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode('utf-8')
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_rstrip); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2371, __pyx_L7_error)
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":2372
 *     try:
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             return utf8[:result_len].decode('utf-8')
 */
      __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, 2372, __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, 2372, __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, 2372, __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, 2372, __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_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_kp_u_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_utf_8);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2372, __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;

      /* "src/pyrfc/_pyrfc.pyx":2371
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode('utf-8')
 *         else:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2374
 *             return utf8[:result_len].rstrip().decode('utf-8')
 *         else:
 *             return utf8[:result_len].decode('utf-8')             # <<<<<<<<<<<<<<
 *     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, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2374, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_return;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":2376
 *             return utf8[:result_len].decode('utf-8')
 *     finally:
 *         free(utf8)             # <<<<<<<<<<<<<<
 * 
 * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=False):
 */
  /*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;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":2354
 *         wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4))
 * 
 * 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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2378
 *         free(utf8)
 * 
 * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=False):             # <<<<<<<<<<<<<<
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_wrapString(SAP_UC *__pyx_v_uc, struct __pyx_opt_args_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2381
 *     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, 2381, __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, 2381, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyrfc/_pyrfc.pyx":2382
 *     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, 2382, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_uclen, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2381
 *     cdef RFC_RC rc
 *     cdef RFC_ERROR_INFO errorInfo
 *     if uclen == -1:             # <<<<<<<<<<<<<<
 *         uclen = strlenU(uc)
 *     if uclen == 0:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2383
 *     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, 2383, __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, 2383, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "src/pyrfc/_pyrfc.pyx":2384
 *         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__21);
    __pyx_r = __pyx_kp_u__21;
    goto __pyx_L0;

    /* "src/pyrfc/_pyrfc.pyx":2383
 *     if uclen == -1:
 *         uclen = strlenU(uc)
 *     if uclen == 0:             # <<<<<<<<<<<<<<
 *         return ''
 *     cdef unsigned utf8_size = uclen * 5 + 1
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2385
 *     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, 2385, __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, 2385, __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, 2385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_utf8_size = __pyx_t_4;

  /* "src/pyrfc/_pyrfc.pyx":2386
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2387
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":2388
 *     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;

  /* "src/pyrfc/_pyrfc.pyx":2389
 *     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, 2389, __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));

  /* "src/pyrfc/_pyrfc.pyx":2390
 *     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)) {

    /* "src/pyrfc/_pyrfc.pyx":2392
 *     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, 2392, __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, 2392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2392, __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, 2392, __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, 2392, __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, 2392, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2390
 *     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))
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2393
 *         # 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;

  /* "src/pyrfc/_pyrfc.pyx":2394
 *         raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size))
 *     utf8[result_len] = 0
 *     try:             # <<<<<<<<<<<<<<
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode('UTF-8')
 */
  /*try:*/ {

    /* "src/pyrfc/_pyrfc.pyx":2395
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode('UTF-8')
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_rstrip); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2395, __pyx_L7_error)
    if (__pyx_t_2) {

      /* "src/pyrfc/_pyrfc.pyx":2396
 *     try:
 *         if rstrip:
 *             return utf8[:result_len].rstrip().decode('UTF-8')             # <<<<<<<<<<<<<<
 *         else:
 *             return utf8[:result_len].decode('UTF-8')
 */
      __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, 2396, __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, 2396, __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, 2396, __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, 2396, __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_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_kp_u_UTF_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_u_UTF_8);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2396, __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;

      /* "src/pyrfc/_pyrfc.pyx":2395
 *     utf8[result_len] = 0
 *     try:
 *         if rstrip:             # <<<<<<<<<<<<<<
 *             return utf8[:result_len].rstrip().decode('UTF-8')
 *         else:
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2398
 *             return utf8[:result_len].rstrip().decode('UTF-8')
 *         else:
 *             return utf8[:result_len].decode('UTF-8')             # <<<<<<<<<<<<<<
 *     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, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2398, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L6_return;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":2400
 *             return utf8[:result_len].decode('UTF-8')
 *     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;
    }
  }

  /* "src/pyrfc/_pyrfc.pyx":2378
 *         free(utf8)
 * 
 * cdef wrapString(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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2412
 *     cdef _connections
 * 
 *     def __init__(self, connections = []):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 */

/* Python wrapper */
static int __pyx_pw_5pyrfc_5pyrfc_10Throughput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_5pyrfc_5pyrfc_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] = __pyx_k__53;
    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, 2412, __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, 2412, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Throughput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Throughput___init__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self), __pyx_v_connections);

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

static int __pyx_pf_5pyrfc_5pyrfc_10Throughput___init__(struct __pyx_obj_5pyrfc_5pyrfc_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;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF(__pyx_v_connections);

  /* "src/pyrfc/_pyrfc.pyx":2415
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 *         self._throughput_handle = NULL             # <<<<<<<<<<<<<<
 *         self._connections = set()
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 */
  __pyx_v_self->_throughput_handle = NULL;

  /* "src/pyrfc/_pyrfc.pyx":2416
 *         cdef RFC_RC rc
 *         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, 2416, __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;

  /* "src/pyrfc/_pyrfc.pyx":2417
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2418
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":2419
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *         Throughput._registry.append(self)
 *         if not isinstance(connections, list):
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2419, __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, 2419, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2418
 *         self._connections = set()
 *         self._throughput_handle = RfcCreateThroughput(&errorInfo)
 *         if errorInfo.code != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2420
 *         if errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)             # <<<<<<<<<<<<<<
 *         if not isinstance(connections, list):
 *             connections = [connections]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Throughput), __pyx_n_s_registry); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2420, __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, 2420, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2421
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)
 *         if not isinstance(connections, list):             # <<<<<<<<<<<<<<
 *             connections = [connections]
 *         for conn in connections:
 */
  __pyx_t_2 = PyList_Check(__pyx_v_connections); 
  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
  if (__pyx_t_4) {

    /* "src/pyrfc/_pyrfc.pyx":2422
 *         Throughput._registry.append(self)
 *         if not isinstance(connections, 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, 2422, __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;

    /* "src/pyrfc/_pyrfc.pyx":2421
 *             raise wrapError(&errorInfo)
 *         Throughput._registry.append(self)
 *         if not isinstance(connections, list):             # <<<<<<<<<<<<<<
 *             connections = [connections]
 *         for conn in connections:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2423
 *         if not isinstance(connections, 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_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_connections); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2423, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2423, __pyx_L1_error)
  }
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2423, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 2423, __pyx_L1_error)
        #else
        __pyx_t_7 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        #endif
      }
    } else {
      __pyx_t_7 = __pyx_t_6(__pyx_t_1);
      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, 2423, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_7);
    }
    __Pyx_XDECREF_SET(__pyx_v_conn, __pyx_t_7);
    __pyx_t_7 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2424
 *             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_4 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_5pyrfc_5pyrfc_Connection); 
    __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0);
    if (unlikely(__pyx_t_2)) {

      /* "src/pyrfc/_pyrfc.pyx":2425
 *         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_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_kp_u_Connection_object_required_recei);
      __Pyx_GIVEREF(__pyx_kp_u_Connection_object_required_recei);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Connection_object_required_recei);
      __Pyx_INCREF(__pyx_v_conn);
      __Pyx_GIVEREF(__pyx_v_conn);
      PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_conn);
      __Pyx_INCREF(__pyx_kp_u_of_type);
      __Pyx_GIVEREF(__pyx_kp_u_of_type);
      PyTuple_SET_ITEM(__pyx_t_7, 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_7, 3, ((PyObject *)Py_TYPE(__pyx_v_conn)));
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2425, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __PYX_ERR(0, 2425, __pyx_L1_error)

      /* "src/pyrfc/_pyrfc.pyx":2424
 *             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)
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2426
 *             if not isinstance(conn, Connection):
 *                 raise TypeError('Connection object required, received', conn, 'of type', type(conn))
 *             self.setOnConnection(conn)             # <<<<<<<<<<<<<<
 * 
 *     property connections:
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setOnConnection); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_9, __pyx_v_conn) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_conn);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2426, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2423
 *         if not isinstance(connections, 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;

  /* "src/pyrfc/_pyrfc.pyx":2412
 *     cdef _connections
 * 
 *     def __init__(self, connections = []):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrfc.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2429
 * 
 *     property connections:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._connections
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_11connections_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_11connections_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Throughput_11connections___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":2430
 *     property connections:
 *         def __get__(self):
 *             return self._connections             # <<<<<<<<<<<<<<
 * 
 *     property _handle:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->_connections);
  __pyx_r = __pyx_v_self->_connections;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":2429
 * 
 *     property connections:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._connections
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":2433
 * 
 *     property _handle:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <uintptr_t>self._throughput_handle
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_7_handle_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_7_handle___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_7_handle___get__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2434
 *     property _handle:
 *         def __get__(self):
 *             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, 2434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":2433
 * 
 *     property _handle:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return <uintptr_t>self._throughput_handle
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":2436
 *             return <uintptr_t>self._throughput_handle
 * 
 *     def setOnConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_3setOnConnection(PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2436, __pyx_L1_error)
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Throughput_2setOnConnection(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self), ((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_2setOnConnection(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2438
 *     def setOnConnection(self, Connection connection):
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2439
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":2440
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2440, __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, 2440, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2439
 *         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)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2441
 *         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, 2441, __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, 2441, __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;

  /* "src/pyrfc/_pyrfc.pyx":2436
 *             return <uintptr_t>self._throughput_handle
 * 
 *     def setOnConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &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.pyrfc.Throughput.setOnConnection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2444
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_5getFromConnection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_10Throughput_5getFromConnection = {"getFromConnection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Throughput_5getFromConnection, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_5getFromConnection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_5pyrfc_5pyrfc_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, 2444, __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_5pyrfc_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, 2444, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.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_5pyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2444, __pyx_L1_error)
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_4getFromConnection(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2446
 *     def getFromConnection(Connection connection):
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2447
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":2448
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2448, __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, 2448, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2447
 *         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:
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2449
 *         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_5pyrfc_Throughput), __pyx_n_s_registry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __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, 2449, __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, 2449, __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, 2449, __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, 2449, __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, 2449, __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, 2449, __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, 2449, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":2450
 *             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_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2450, __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, 2450, __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, 2450, __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, 2450, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (__pyx_t_1) {

      /* "src/pyrfc/_pyrfc.pyx":2451
 *         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;

      /* "src/pyrfc/_pyrfc.pyx":2450
 *             raise wrapError(&errorInfo)
 *         for t in Throughput._registry:
 *             if t._handle == <uintptr_t>throughput:             # <<<<<<<<<<<<<<
 *                 return t
 *         return None
 */
    }

    /* "src/pyrfc/_pyrfc.pyx":2449
 *         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;

  /* "src/pyrfc/_pyrfc.pyx":2452
 *             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;

  /* "src/pyrfc/_pyrfc.pyx":2444
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 */

  /* 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.pyrfc.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;
}

/* "src/pyrfc/_pyrfc.pyx":2454
 *         return None
 * 
 *     def removeFromConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_7removeFromConnection(PyObject *__pyx_v_self, PyObject *__pyx_v_connection); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2454, __pyx_L1_error)
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Throughput_6removeFromConnection(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self), ((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_6removeFromConnection(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2456
 *     def removeFromConnection(self, Connection connection):
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2457
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":2458
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2458, __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, 2458, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2457
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 *         self._connections.remove(connection)
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2459
 *         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, 2459, __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, 2459, __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;

  /* "src/pyrfc/_pyrfc.pyx":2454
 *         return None
 * 
 *     def removeFromConnection(self, Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &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.pyrfc.Throughput.removeFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2461
 *         self._connections.remove(connection)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_9reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_8reset(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_8reset(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2463
 *     def reset(self):
 *         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));

  /* "src/pyrfc/_pyrfc.pyx":2464
 *         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)) {

    /* "src/pyrfc/_pyrfc.pyx":2465
 *         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_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2465, __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, 2465, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2464
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo)
 *         if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *             raise wrapError(&errorInfo)
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2461
 *         self._connections.remove(connection)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &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.pyrfc.Throughput.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2467
 *             raise wrapError(&errorInfo)
 * 
 *     cdef _destroy(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc_10Throughput__destroy(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *__pyx_v_self) {
  RFC_ERROR_INFO __pyx_v_errorInfo;
  CYTHON_UNUSED 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);

  /* "src/pyrfc/_pyrfc.pyx":2470
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_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, 2470, __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, 2470, __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, 2470, __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;

  /* "src/pyrfc/_pyrfc.pyx":2471
 *         cdef RFC_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;

  /* "src/pyrfc/_pyrfc.pyx":2472
 *         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) {

    /* "src/pyrfc/_pyrfc.pyx":2473
 *         self._connections = None
 *         if self._throughput_handle != NULL:
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)             # <<<<<<<<<<<<<<
 *             self._throughput_handle = NULL
 * 
 */
    __pyx_v_rc = RfcDestroyThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo));

    /* "src/pyrfc/_pyrfc.pyx":2474
 *         if self._throughput_handle != NULL:
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 *             self._throughput_handle = NULL             # <<<<<<<<<<<<<<
 * 
 *     def __del__(self):
 */
    __pyx_v_self->_throughput_handle = NULL;

    /* "src/pyrfc/_pyrfc.pyx":2472
 *         self._registry.clear()
 *         self._connections = None
 *         if self._throughput_handle != NULL:             # <<<<<<<<<<<<<<
 *             rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo)
 *             self._throughput_handle = NULL
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2467
 *             raise wrapError(&errorInfo)
 * 
 *     cdef _destroy(self):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_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.pyrfc.Throughput._destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2476
 *             self._throughput_handle = NULL
 * 
 *     def __del__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_11__del__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_10__del__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_10__del__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2477
 * 
 *     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, 2477, __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, 2477, __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;

  /* "src/pyrfc/_pyrfc.pyx":2476
 *             self._throughput_handle = NULL
 * 
 *     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.pyrfc.Throughput.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2479
 *         self.destroy()
 * 
 *     def __exit__(self, type, value, traceback):             # <<<<<<<<<<<<<<
 *         self._destroy()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_13__exit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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, 2479, __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, 2479, __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, 2479, __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, 2479, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.Throughput.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Throughput_12__exit__(((struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_12__exit__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2480
 * 
 *     def __exit__(self, type, value, traceback):
 *         self._destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __enter__(self):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_5pyrfc_Throughput *)__pyx_v_self->__pyx_vtab)->_destroy(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2479
 *         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.pyrfc.Throughput.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "src/pyrfc/_pyrfc.pyx":2482
 *         self._destroy()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_15__enter__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_14__enter__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

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

  /* "src/pyrfc/_pyrfc.pyx":2483
 * 
 *     def __enter__(self):
 *         return self             # <<<<<<<<<<<<<<
 * 
 *     property stats:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __pyx_r = ((PyObject *)__pyx_v_self);
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":2482
 *         self._destroy()
 * 
 *     def __enter__(self):             # <<<<<<<<<<<<<<
 *         return self
 * 
 */

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

/* "src/pyrfc/_pyrfc.pyx":2486
 * 
 *     property stats:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef RFC_ERROR_INFO errorInfo
 *             cdef RFC_RC rc
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_10Throughput_5stats_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_10Throughput_5stats___get__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_5stats___get__(struct __pyx_obj_5pyrfc_5pyrfc_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);

  /* "src/pyrfc/_pyrfc.pyx":2497
 *             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, 2497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__stats = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2499
 *             _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)) {

    /* "src/pyrfc/_pyrfc.pyx":2500
 * 
 *             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, 2500, __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, 2500, __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, 2500, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2499
 *             _stats = {}
 * 
 *             if self._throughput_handle == NULL:             # <<<<<<<<<<<<<<
 *                 raise RFCError('No connections assigned')
 * 
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2502
 *                 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));

  /* "src/pyrfc/_pyrfc.pyx":2503
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2504
 *             rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['numberOfCalls'] = numberOfCalls
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2504, __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, 2504, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2503
 * 
 *             rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['numberOfCalls'] = numberOfCalls
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2505
 *             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, 2505, __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, 2505, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2507
 *             _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));

  /* "src/pyrfc/_pyrfc.pyx":2508
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2509
 *             rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['sentBytes'] = sentBytes
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2509, __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, 2509, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2508
 * 
 *             rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['sentBytes'] = sentBytes
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2510
 *             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, 2510, __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, 2510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2512
 *             _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));

  /* "src/pyrfc/_pyrfc.pyx":2513
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2514
 *             rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['receivedBytes'] = receivedBytes
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __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, 2514, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2513
 * 
 *             rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['receivedBytes'] = receivedBytes
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2515
 *             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, 2515, __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, 2515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2517
 *             _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));

  /* "src/pyrfc/_pyrfc.pyx":2518
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2519
 *             rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['applicationTime'] = applicationTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2519, __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, 2519, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2518
 * 
 *             rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['applicationTime'] = applicationTime
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2520
 *             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, 2520, __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, 2520, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2522
 *             _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));

  /* "src/pyrfc/_pyrfc.pyx":2523
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2524
 *             rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['totalTime'] = totalTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2524, __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, 2524, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2523
 * 
 *             rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['totalTime'] = totalTime
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2525
 *             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, 2525, __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, 2525, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2527
 *             _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));

  /* "src/pyrfc/_pyrfc.pyx":2528
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2529
 *             rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['serializationTime'] = serializationTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2529, __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, 2529, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2528
 * 
 *             rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['serializationTime'] = serializationTime
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2530
 *             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, 2530, __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, 2530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2532
 *             _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));

  /* "src/pyrfc/_pyrfc.pyx":2533
 * 
 *             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)) {

    /* "src/pyrfc/_pyrfc.pyx":2534
 *             rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)
 *             if rc != RFC_OK:
 *                 raise wrapError(&errorInfo)             # <<<<<<<<<<<<<<
 *             _stats['deserializationTime'] = deserializationTime
 * 
 */
    __pyx_t_1 = __pyx_f_5pyrfc_5pyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2534, __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, 2534, __pyx_L1_error)

    /* "src/pyrfc/_pyrfc.pyx":2533
 * 
 *             rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo)
 *             if rc != RFC_OK:             # <<<<<<<<<<<<<<
 *                 raise wrapError(&errorInfo)
 *             _stats['deserializationTime'] = deserializationTime
 */
  }

  /* "src/pyrfc/_pyrfc.pyx":2535
 *             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, 2535, __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, 2535, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2537
 *             _stats['deserializationTime'] = deserializationTime
 * 
 *             return _stats             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v__stats);
  __pyx_r = __pyx_v__stats;
  goto __pyx_L0;

  /* "src/pyrfc/_pyrfc.pyx":2486
 * 
 *     property stats:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             cdef RFC_ERROR_INFO errorInfo
 *             cdef RFC_RC rc
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("pyrfc.pyrfc.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_5pyrfc_10Throughput_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_16__reduce_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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__54, 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.pyrfc.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_5pyrfc_10Throughput_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_5pyrfc_5pyrfc_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_5pyrfc_10Throughput_18__setstate_cython__(((struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_10Throughput_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_5pyrfc_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__55, 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.pyrfc.Throughput.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_Server(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_5pyrfc_5pyrfc_15__pyx_unpickle_Server(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_5pyrfc_5pyrfc_15__pyx_unpickle_Server = {"__pyx_unpickle_Server", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_15__pyx_unpickle_Server, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_5pyrfc_5pyrfc_15__pyx_unpickle_Server(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_Server (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Server", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Server", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Server") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Server", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrfc.pyrfc.__pyx_unpickle_Server", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_5pyrfc_5pyrfc_14__pyx_unpickle_Server(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

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

static PyObject *__pyx_pf_5pyrfc_5pyrfc_14__pyx_unpickle_Server(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Server", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xc111916, 0x0a74ccc, 0x2ef6928):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__56, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xc111916, 0x0a74ccc, 0x2ef6928):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)
 *     __pyx_result = Server.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xc111916, 0x0a74ccc, 0x2ef6928):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = Server.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __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_4 = (__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_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xc111916, 0x0a74ccc, 0x2ef6928):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)
 *     __pyx_result = Server.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Server), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)
 *     __pyx_result = Server.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = Server.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_5pyrfc_5pyrfc___pyx_unpickle_Server__set_state(((struct __pyx_obj_5pyrfc_5pyrfc_Server *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xc111916, 0x0a74ccc, 0x2ef6928) = (_client_connection, _server_connection, debug, rstrip))" % __pyx_checksum)
 *     __pyx_result = Server.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_Server(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

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

/* "(tree fragment)":11
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

static PyObject *__pyx_f_5pyrfc_5pyrfc___pyx_unpickle_Server__set_state(struct __pyx_obj_5pyrfc_5pyrfc_Server *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_Server__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pyrfc_5pyrfc_Connection))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_client_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_client_connection));
  __pyx_v___pyx_result->_client_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5pyrfc_5pyrfc_ServerConnection))))) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v___pyx_result->_server_connection);
  __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_server_connection));
  __pyx_v___pyx_result->_server_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)__pyx_t_1);
  __pyx_t_1 = 0;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->debug = __pyx_t_2;
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result->rstrip = __pyx_t_2;

  /* "(tree fragment)":13
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 13, __pyx_L1_error)
  }
  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_4 = ((__pyx_t_3 > 4) != 0);
  if (__pyx_t_4) {
  } else {
    __pyx_t_2 = __pyx_t_4;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
  __pyx_t_5 = (__pyx_t_4 != 0);
  __pyx_t_2 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "(tree fragment)":14
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[4])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 14, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[4])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_Server__set_state(<Server> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_Server__set_state(Server __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_result._client_connection = __pyx_state[0]; __pyx_result._server_connection = __pyx_state[1]; __pyx_result.debug = __pyx_state[2]; __pyx_result.rstrip = __pyx_state[3]
 *     if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
 */

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

/* "array.pxd":93
 *             __data_union data
 * 
 *         def __getbuffer__(self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));

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

static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) {
  PyObject *__pyx_v_item_count = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  char __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  if (__pyx_v_info == NULL) {
    PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    return -1;
  }
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(__pyx_v_info->obj);

  /* "array.pxd":98
 *             # In particular strided access is always provided regardless
 *             # of flags
 *             item_count = Py_SIZE(self)             # <<<<<<<<<<<<<<
 * 
 *             info.suboffsets = NULL
 */
  __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_item_count = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "array.pxd":100
 *             item_count = Py_SIZE(self)
 * 
 *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
 *             info.buf = self.data.as_chars
 *             info.readonly = 0
 */
  __pyx_v_info->suboffsets = NULL;

  /* "array.pxd":101
 * 
 *             info.suboffsets = NULL
 *             info.buf = self.data.as_chars             # <<<<<<<<<<<<<<
 *             info.readonly = 0
 *             info.ndim = 1
 */
  __pyx_t_2 = __pyx_v_self->data.as_chars;
  __pyx_v_info->buf = __pyx_t_2;

  /* "array.pxd":102
 *             info.suboffsets = NULL
 *             info.buf = self.data.as_chars
 *             info.readonly = 0             # <<<<<<<<<<<<<<
 *             info.ndim = 1
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
 */
  __pyx_v_info->readonly = 0;

  /* "array.pxd":103
 *             info.buf = self.data.as_chars
 *             info.readonly = 0
 *             info.ndim = 1             # <<<<<<<<<<<<<<
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
 *             info.len = info.itemsize * item_count
 */
  __pyx_v_info->ndim = 1;

  /* "array.pxd":104
 *             info.readonly = 0
 *             info.ndim = 1
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)             # <<<<<<<<<<<<<<
 *             info.len = info.itemsize * item_count
 * 
 */
  __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
  __pyx_v_info->itemsize = __pyx_t_3;

  /* "array.pxd":105
 *             info.ndim = 1
 *             info.itemsize = self.ob_descr.itemsize   # e.g. sizeof(float)
 *             info.len = info.itemsize * item_count             # <<<<<<<<<<<<<<
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 */
  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 105, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_info->len = __pyx_t_5;

  /* "array.pxd":107
 *             info.len = info.itemsize * item_count
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)             # <<<<<<<<<<<<<<
 *             if not info.shape:
 *                 raise MemoryError()
 */
  __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));

  /* "array.pxd":108
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 *             if not info.shape:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing
 */
  __pyx_t_6 = ((!(__pyx_v_info->shape != 0)) != 0);
  if (unlikely(__pyx_t_6)) {

    /* "array.pxd":109
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 *             if not info.shape:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 *             info.shape[0] = item_count      # constant regardless of resizing
 *             info.strides = &info.itemsize
 */
    PyErr_NoMemory(); __PYX_ERR(2, 109, __pyx_L1_error)

    /* "array.pxd":108
 * 
 *             info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
 *             if not info.shape:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing
 */
  }

  /* "array.pxd":110
 *             if not info.shape:
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing             # <<<<<<<<<<<<<<
 *             info.strides = &info.itemsize
 * 
 */
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(2, 110, __pyx_L1_error)
  (__pyx_v_info->shape[0]) = __pyx_t_5;

  /* "array.pxd":111
 *                 raise MemoryError()
 *             info.shape[0] = item_count      # constant regardless of resizing
 *             info.strides = &info.itemsize             # <<<<<<<<<<<<<<
 * 
 *             info.format = <char*> (info.shape + 1)
 */
  __pyx_v_info->strides = (&__pyx_v_info->itemsize);

  /* "array.pxd":113
 *             info.strides = &info.itemsize
 * 
 *             info.format = <char*> (info.shape + 1)             # <<<<<<<<<<<<<<
 *             info.format[0] = self.ob_descr.typecode
 *             info.format[1] = 0
 */
  __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));

  /* "array.pxd":114
 * 
 *             info.format = <char*> (info.shape + 1)
 *             info.format[0] = self.ob_descr.typecode             # <<<<<<<<<<<<<<
 *             info.format[1] = 0
 *             info.obj = self
 */
  __pyx_t_7 = __pyx_v_self->ob_descr->typecode;
  (__pyx_v_info->format[0]) = __pyx_t_7;

  /* "array.pxd":115
 *             info.format = <char*> (info.shape + 1)
 *             info.format[0] = self.ob_descr.typecode
 *             info.format[1] = 0             # <<<<<<<<<<<<<<
 *             info.obj = self
 * 
 */
  (__pyx_v_info->format[1]) = 0;

  /* "array.pxd":116
 *             info.format[0] = self.ob_descr.typecode
 *             info.format[1] = 0
 *             info.obj = self             # <<<<<<<<<<<<<<
 * 
 *         def __releasebuffer__(self, Py_buffer* info):
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_info->obj);
  __Pyx_DECREF(__pyx_v_info->obj);
  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);

  /* "array.pxd":93
 *             __data_union data
 * 
 *         def __getbuffer__(self, Py_buffer* info, int flags):             # <<<<<<<<<<<<<<
 *             # This implementation of getbuffer is geared towards Cython
 *             # requirements, and does not yet fulfill the PEP.
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  if (__pyx_v_info->obj != NULL) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  goto __pyx_L2;
  __pyx_L0:;
  if (__pyx_v_info->obj == Py_None) {
    __Pyx_GOTREF(__pyx_v_info->obj);
    __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
  }
  __pyx_L2:;
  __Pyx_XDECREF(__pyx_v_item_count);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":118
 *             info.obj = self
 * 
 *         def __releasebuffer__(self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             PyObject_Free(info.shape)
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
static CYTHON_UNUSED void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));

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

static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* "array.pxd":119
 * 
 *         def __releasebuffer__(self, Py_buffer* info):
 *             PyObject_Free(info.shape)             # <<<<<<<<<<<<<<
 * 
 *     array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
 */
  PyObject_Free(__pyx_v_info->shape);

  /* "array.pxd":118
 *             info.obj = self
 * 
 *         def __releasebuffer__(self, Py_buffer* info):             # <<<<<<<<<<<<<<
 *             PyObject_Free(info.shape)
 * 
 */

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

/* "array.pxd":130
 * 
 * 
 * cdef inline array clone(array template, Py_ssize_t length, bint zero):             # <<<<<<<<<<<<<<
 *     """ fast creation of a new array, given a template array.
 *     type will be same as template.
 */

static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) {
  arrayobject *__pyx_v_op = 0;
  arrayobject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clone", 0);

  /* "array.pxd":134
 *     type will be same as template.
 *     if zero is true, new array will be initialized with zeroes."""
 *     cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)             # <<<<<<<<<<<<<<
 *     if zero and op is not None:
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 */
  __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_op = ((arrayobject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "array.pxd":135
 *     if zero is true, new array will be initialized with zeroes."""
 *     cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
 *     if zero and op is not None:             # <<<<<<<<<<<<<<
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 *     return op
 */
  __pyx_t_3 = (__pyx_v_zero != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_2 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_2 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_2) {

    /* "array.pxd":136
 *     cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
 *     if zero and op is not None:
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)             # <<<<<<<<<<<<<<
 *     return op
 * 
 */
    (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));

    /* "array.pxd":135
 *     if zero is true, new array will be initialized with zeroes."""
 *     cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
 *     if zero and op is not None:             # <<<<<<<<<<<<<<
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 *     return op
 */
  }

  /* "array.pxd":137
 *     if zero and op is not None:
 *         memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
 *     return op             # <<<<<<<<<<<<<<
 * 
 * cdef inline array copy(array self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_op));
  __pyx_r = __pyx_v_op;
  goto __pyx_L0;

  /* "array.pxd":130
 * 
 * 
 * cdef inline array clone(array template, Py_ssize_t length, bint zero):             # <<<<<<<<<<<<<<
 *     """ fast creation of a new array, given a template array.
 *     type will be same as template.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_op);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":139
 *     return op
 * 
 * cdef inline array copy(array self):             # <<<<<<<<<<<<<<
 *     """ make a copy of an array. """
 *     cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 */

static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
  arrayobject *__pyx_v_op = 0;
  arrayobject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("copy", 0);

  /* "array.pxd":141
 * cdef inline array copy(array self):
 *     """ make a copy of an array. """
 *     cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)             # <<<<<<<<<<<<<<
 *     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
 *     return op
 */
  __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_op = ((arrayobject *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "array.pxd":142
 *     """ make a copy of an array. """
 *     cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 *     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)             # <<<<<<<<<<<<<<
 *     return op
 * 
 */
  (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize)));

  /* "array.pxd":143
 *     cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 *     memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
 *     return op             # <<<<<<<<<<<<<<
 * 
 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_op));
  __pyx_r = __pyx_v_op;
  goto __pyx_L0;

  /* "array.pxd":139
 *     return op
 * 
 * cdef inline array copy(array self):             # <<<<<<<<<<<<<<
 *     """ make a copy of an array. """
 *     cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_op);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "array.pxd":145
 *     return op
 * 
 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:             # <<<<<<<<<<<<<<
 *     """ efficient appending of new stuff of same type
 *     (e.g. of same array type)
 */

static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
  Py_ssize_t __pyx_v_itemsize;
  Py_ssize_t __pyx_v_origsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend_buffer", 0);

  /* "array.pxd":149
 *     (e.g. of same array type)
 *     n: number of elements (not number of bytes!) """
 *     cdef Py_ssize_t itemsize = self.ob_descr.itemsize             # <<<<<<<<<<<<<<
 *     cdef Py_ssize_t origsize = Py_SIZE(self)
 *     resize_smart(self, origsize + n)
 */
  __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
  __pyx_v_itemsize = __pyx_t_1;

  /* "array.pxd":150
 *     n: number of elements (not number of bytes!) """
 *     cdef Py_ssize_t itemsize = self.ob_descr.itemsize
 *     cdef Py_ssize_t origsize = Py_SIZE(self)             # <<<<<<<<<<<<<<
 *     resize_smart(self, origsize + n)
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
 */
  __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));

  /* "array.pxd":151
 *     cdef Py_ssize_t itemsize = self.ob_descr.itemsize
 *     cdef Py_ssize_t origsize = Py_SIZE(self)
 *     resize_smart(self, origsize + n)             # <<<<<<<<<<<<<<
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
 *     return 0
 */
  __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 151, __pyx_L1_error)

  /* "array.pxd":152
 *     cdef Py_ssize_t origsize = Py_SIZE(self)
 *     resize_smart(self, origsize + n)
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)             # <<<<<<<<<<<<<<
 *     return 0
 * 
 */
  (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)));

  /* "array.pxd":153
 *     resize_smart(self, origsize + n)
 *     memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
 *     return 0             # <<<<<<<<<<<<<<
 * 
 * cdef inline int extend(array self, array other) except -1:
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "array.pxd":145
 *     return op
 * 
 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:             # <<<<<<<<<<<<<<
 *     """ efficient appending of new stuff of same type
 *     (e.g. of same array type)
 */

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

/* "array.pxd":155
 *     return 0
 * 
 * cdef inline int extend(array self, array other) except -1:             # <<<<<<<<<<<<<<
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 */

static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "array.pxd":157
 * cdef inline int extend(array self, array other) except -1:
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:             # <<<<<<<<<<<<<<
 *         PyErr_BadArgument()
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 */
  __pyx_t_1 = ((__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode) != 0);
  if (__pyx_t_1) {

    /* "array.pxd":158
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 *         PyErr_BadArgument()             # <<<<<<<<<<<<<<
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 */
    __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(2, 158, __pyx_L1_error)

    /* "array.pxd":157
 * cdef inline int extend(array self, array other) except -1:
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:             # <<<<<<<<<<<<<<
 *         PyErr_BadArgument()
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 */
  }

  /* "array.pxd":159
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 *         PyErr_BadArgument()
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))             # <<<<<<<<<<<<<<
 * 
 * cdef inline void zero(array self):
 */
  __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 159, __pyx_L1_error)
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "array.pxd":155
 *     return 0
 * 
 * cdef inline int extend(array self, array other) except -1:             # <<<<<<<<<<<<<<
 *     """ extend array with data from another array; types must match. """
 *     if self.ob_descr.typecode != other.ob_descr.typecode:
 */

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

/* "array.pxd":161
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 * cdef inline void zero(array self):             # <<<<<<<<<<<<<<
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
 */

static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("zero", 0);

  /* "array.pxd":163
 * cdef inline void zero(array self):
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)             # <<<<<<<<<<<<<<
 */
  (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));

  /* "array.pxd":161
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 * cdef inline void zero(array self):             # <<<<<<<<<<<<<<
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
 */

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

static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_ConnectionParameters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_5pyrfc_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)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_5pyrfc_5pyrfc_ConnectionParameters[] = {
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_3__del__, METH_NOARGS, 0},
  {"_free", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_5_free, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5pyrfc_5pyrfc_ConnectionParameters = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc.pyrfc.ConnectionParameters", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_5pyrfc_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*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_5pyrfc_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*/
  __pyx_pw_5pyrfc_5pyrfc_20ConnectionParameters_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_5pyrfc_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
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_Connection __pyx_vtable_5pyrfc_5pyrfc_Connection;

static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_Connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_Connection *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_5pyrfc_Connection;
  p->__config = Py_None; Py_INCREF(Py_None);
  p->_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_5pyrfc_Connection(PyObject *o) {
  struct __pyx_obj_5pyrfc_5pyrfc_Connection *p = (struct __pyx_obj_5pyrfc_5pyrfc_Connection *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__config);
  Py_CLEAR(p->_connection);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_5pyrfc_Connection(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_5pyrfc_Connection *p = (struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_Connection(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_5pyrfc_Connection *p = (struct __pyx_obj_5pyrfc_5pyrfc_Connection *)o;
  tmp = ((PyObject*)p->__config);
  p->__config = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_connection);
  p->_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Connection_version(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Connection_7version_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Connection_options(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Connection_7options_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Connection_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Connection_6handle_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Connection_alive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Connection_5alive_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Connection___config(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Connection_8__config_1__get__(o);
}

static int __pyx_setprop_5pyrfc_5pyrfc_10Connection___config(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_5pyrfc_10Connection_8__config_3__set__(o, v);
  }
  else {
    return __pyx_pw_5pyrfc_5pyrfc_10Connection_8__config_5__del__(o);
  }
}

static PyMethodDef __pyx_methods_5pyrfc_5pyrfc_Connection[] = {
  {"free", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_3free, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_2free},
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_5__del__, METH_NOARGS, 0},
  {"__enter__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_7__enter__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_9__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"open", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_11open, METH_NOARGS, 0},
  {"reopen", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_13reopen, METH_NOARGS, 0},
  {"close", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_15close, METH_NOARGS, 0},
  {"cancel", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_17cancel, METH_NOARGS, 0},
  {"_close", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_21_close, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_20_close},
  {"_cancel", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_23_cancel, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_22_cancel},
  {"ping", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_25ping, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_24ping},
  {"reset_server_context", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_27reset_server_context, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_26reset_server_context},
  {"get_connection_attributes", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_29get_connection_attributes, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_28get_connection_attributes},
  {"get_function_description", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_31get_function_description, METH_O, __pyx_doc_5pyrfc_5pyrfc_10Connection_30get_function_description},
  {"call", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_33call, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_10Connection_32call},
  {"type_desc_get", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_35type_desc_get, METH_O, __pyx_doc_5pyrfc_5pyrfc_10Connection_34type_desc_get},
  {"type_desc_remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_37type_desc_remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_10Connection_36type_desc_remove},
  {"func_desc_remove", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_39func_desc_remove, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_10Connection_38func_desc_remove},
  {"_get_transaction_id", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_41_get_transaction_id, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_40_get_transaction_id},
  {"_create_and_submit_transaction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_43_create_and_submit_transaction, METH_VARARGS|METH_KEYWORDS, 0},
  {"_destroy_transaction", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_45_destroy_transaction, METH_NOARGS, 0},
  {"_confirm_transaction", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_47_confirm_transaction, METH_NOARGS, 0},
  {"_get_unit_id", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_49_get_unit_id, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_10Connection_48_get_unit_id},
  {"_create_and_submit_unit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_51_create_and_submit_unit, METH_VARARGS|METH_KEYWORDS, 0},
  {"_get_unit_state", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_53_get_unit_state, METH_O, 0},
  {"_destroy_unit", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_55_destroy_unit, METH_NOARGS, 0},
  {"_confirm_unit", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_57_confirm_unit, METH_O, 0},
  {"initialize_unit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_59initialize_unit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_10Connection_58initialize_unit},
  {"fill_and_submit_unit", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Connection_61fill_and_submit_unit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_10Connection_60fill_and_submit_unit},
  {"get_unit_state", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_63get_unit_state, METH_O, __pyx_doc_5pyrfc_5pyrfc_10Connection_62get_unit_state},
  {"destroy_unit", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_65destroy_unit, METH_O, __pyx_doc_5pyrfc_5pyrfc_10Connection_64destroy_unit},
  {"confirm_unit", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_67confirm_unit, METH_O, __pyx_doc_5pyrfc_5pyrfc_10Connection_66confirm_unit},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_69__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Connection_71__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_5pyrfc_Connection[] = {
  {(char *)"version", __pyx_getprop_5pyrfc_5pyrfc_10Connection_version, 0, (char *)0, 0},
  {(char *)"options", __pyx_getprop_5pyrfc_5pyrfc_10Connection_options, 0, (char *)0, 0},
  {(char *)"handle", __pyx_getprop_5pyrfc_5pyrfc_10Connection_handle, 0, (char *)0, 0},
  {(char *)"alive", __pyx_getprop_5pyrfc_5pyrfc_10Connection_alive, 0, (char *)0, 0},
  {(char *)"__config", __pyx_getprop_5pyrfc_5pyrfc_10Connection___config, __pyx_setprop_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_Connection = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc.pyrfc.Connection", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_5pyrfc_Connection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_5pyrfc_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 instance. Allowed keys are:\n\n           ``rstrip``\n             right strips strings returned from RFC call (default is True)\n           ``return_import_params``\n             importing parameters are returned by the RFC call (default is False)\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\n    :type params: Keyword parameters\n\n    :raises: :exc:`~pyrfc.RFCError` or a subclass\n             thereof if the connection attempt fails.\n    ", /*tp_doc*/
  __pyx_tp_traverse_5pyrfc_5pyrfc_Connection, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_5pyrfc_Connection, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_5pyrfc_Connection, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_5pyrfc_Connection, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_5pyrfc_10Connection_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_5pyrfc_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
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_ServerConnection __pyx_vtable_5pyrfc_5pyrfc_ServerConnection;

static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_ServerConnection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_ServerConnection *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_5pyrfc_ServerConnection;
  p->_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_5pyrfc_ServerConnection(PyObject *o) {
  struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *p = (struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_connection);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_5pyrfc_ServerConnection(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *p = (struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)o;
  if (p->_connection) {
    e = (*v)(((PyObject *)p->_connection), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_5pyrfc_ServerConnection(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *p = (struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)o;
  tmp = ((PyObject*)p->_connection);
  p->_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6handle_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_alive(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5alive_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_debug(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5debug_1__get__(o);
}

static int __pyx_setprop_5pyrfc_5pyrfc_16ServerConnection_debug(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5debug_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_rstrip(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6rstrip_1__get__(o);
}

static int __pyx_setprop_5pyrfc_5pyrfc_16ServerConnection_rstrip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_6rstrip_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5pyrfc_5pyrfc_ServerConnection[] = {
  {"open", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_3open, METH_NOARGS, 0},
  {"close", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_5close, METH_NOARGS, 0},
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_9__del__, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_16ServerConnection_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_5pyrfc_ServerConnection[] = {
  {(char *)"handle", __pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_handle, 0, (char *)0, 0},
  {(char *)"alive", __pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_alive, 0, (char *)0, 0},
  {(char *)"debug", __pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_debug, __pyx_setprop_5pyrfc_5pyrfc_16ServerConnection_debug, (char *)0, 0},
  {(char *)"rstrip", __pyx_getprop_5pyrfc_5pyrfc_16ServerConnection_rstrip, __pyx_setprop_5pyrfc_5pyrfc_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_5pyrfc_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_5pyrfc_ServerConnection = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc.pyrfc.ServerConnection", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_5pyrfc_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_5pyrfc_ServerConnection, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_5pyrfc_ServerConnection, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_5pyrfc_ServerConnection, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_5pyrfc_ServerConnection, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_5pyrfc_16ServerConnection_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_5pyrfc_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
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_Server __pyx_vtable_5pyrfc_5pyrfc_Server;

static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_Server(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_Server *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_5pyrfc_Server;
  p->_client_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)Py_None); Py_INCREF(Py_None);
  p->_server_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_5pyrfc_Server(PyObject *o) {
  struct __pyx_obj_5pyrfc_5pyrfc_Server *p = (struct __pyx_obj_5pyrfc_5pyrfc_Server *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_client_connection);
  Py_CLEAR(p->_server_connection);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_5pyrfc_Server(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_5pyrfc_Server *p = (struct __pyx_obj_5pyrfc_5pyrfc_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;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_5pyrfc_Server(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_5pyrfc_Server *p = (struct __pyx_obj_5pyrfc_5pyrfc_Server *)o;
  tmp = ((PyObject*)p->_client_connection);
  p->_client_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_Connection *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_server_connection);
  p->_server_connection = ((struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_6Server_debug(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_6Server_5debug_1__get__(o);
}

static int __pyx_setprop_5pyrfc_5pyrfc_6Server_debug(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_5pyrfc_6Server_5debug_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_6Server_rstrip(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_6Server_6rstrip_1__get__(o);
}

static int __pyx_setprop_5pyrfc_5pyrfc_6Server_rstrip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
  if (v) {
    return __pyx_pw_5pyrfc_5pyrfc_6Server_6rstrip_3__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_5pyrfc_5pyrfc_Server[] = {
  {"add_function", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_6Server_3add_function, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyrfc_5pyrfc_6Server_2add_function},
  {"_serve_http", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_6Server_5_serve_http, METH_VARARGS|METH_KEYWORDS, 0},
  {"serve", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_6Server_7serve, METH_VARARGS|METH_KEYWORDS, 0},
  {"close", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_6Server_9close, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_6Server_8close},
  {"_close", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_6Server_11_close, METH_NOARGS, __pyx_doc_5pyrfc_5pyrfc_6Server_10_close},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_6Server_13__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_6Server_15__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_5pyrfc_Server[] = {
  {(char *)"debug", __pyx_getprop_5pyrfc_5pyrfc_6Server_debug, __pyx_setprop_5pyrfc_5pyrfc_6Server_debug, (char *)0, 0},
  {(char *)"rstrip", __pyx_getprop_5pyrfc_5pyrfc_6Server_rstrip, __pyx_setprop_5pyrfc_5pyrfc_6Server_rstrip, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5pyrfc_5pyrfc_Server = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc.pyrfc.Server", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_5pyrfc_Server), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_5pyrfc_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 SAP 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_5pyrfc_Server, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_5pyrfc_Server, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_5pyrfc_Server, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_5pyrfc_Server, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_5pyrfc_6Server_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_5pyrfc_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
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_5pyrfc_5pyrfc_Throughput __pyx_vtable_5pyrfc_5pyrfc_Throughput;

static PyObject *__pyx_tp_new_5pyrfc_5pyrfc_Throughput(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_5pyrfc_5pyrfc_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_5pyrfc_Throughput *)o);
  p->__pyx_vtab = __pyx_vtabptr_5pyrfc_5pyrfc_Throughput;
  p->_connections = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_5pyrfc_5pyrfc_Throughput(PyObject *o) {
  struct __pyx_obj_5pyrfc_5pyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_connections);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_5pyrfc_5pyrfc_Throughput(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5pyrfc_5pyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)o;
  if (p->_connections) {
    e = (*v)(p->_connections, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_5pyrfc_5pyrfc_Throughput(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_5pyrfc_5pyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_5pyrfc_Throughput *)o;
  tmp = ((PyObject*)p->_connections);
  p->_connections = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Throughput_connections(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Throughput_11connections_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Throughput__handle(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Throughput_7_handle_1__get__(o);
}

static PyObject *__pyx_getprop_5pyrfc_5pyrfc_10Throughput_stats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_5pyrfc_5pyrfc_10Throughput_5stats_1__get__(o);
}

static PyMethodDef __pyx_methods_5pyrfc_5pyrfc_Throughput[] = {
  {"setOnConnection", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_3setOnConnection, METH_O, 0},
  {"getFromConnection", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Throughput_5getFromConnection, METH_VARARGS|METH_KEYWORDS, 0},
  {"removeFromConnection", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_7removeFromConnection, METH_O, 0},
  {"reset", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_9reset, METH_NOARGS, 0},
  {"__del__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_11__del__, METH_NOARGS, 0},
  {"__exit__", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5pyrfc_5pyrfc_10Throughput_13__exit__, METH_VARARGS|METH_KEYWORDS, 0},
  {"__enter__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_15__enter__, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_5pyrfc_5pyrfc_10Throughput_19__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_5pyrfc_5pyrfc_Throughput[] = {
  {(char *)"connections", __pyx_getprop_5pyrfc_5pyrfc_10Throughput_connections, 0, (char *)0, 0},
  {(char *)"_handle", __pyx_getprop_5pyrfc_5pyrfc_10Throughput__handle, 0, (char *)0, 0},
  {(char *)"stats", __pyx_getprop_5pyrfc_5pyrfc_10Throughput_stats, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_5pyrfc_5pyrfc_Throughput = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrfc.pyrfc.Throughput", /*tp_name*/
  sizeof(struct __pyx_obj_5pyrfc_5pyrfc_Throughput), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5pyrfc_5pyrfc_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_5pyrfc_Throughput, /*tp_traverse*/
  __pyx_tp_clear_5pyrfc_5pyrfc_Throughput, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5pyrfc_5pyrfc_Throughput, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_5pyrfc_5pyrfc_Throughput, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_5pyrfc_5pyrfc_10Throughput_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5pyrfc_5pyrfc_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
  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_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_PARAMETER_DEFVALUE",
    "RFC_PARAMETER_DESC",
    "RFC_PARAMETER_TEXT",
    "RFC_RC",
    "RFC_SERVER_FUNCTION",
    "RFC_SERVER_HANDLE",
    "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_RFC_BYTE",
    "__pyx_ctuple_RFC_BYTE_struct",
    "__pyx_ctuple_int",
    "__pyx_ctuple_int__and_Py_ssize_t",
    "__pyx_ctuple_int__and_Py_ssize_t_struct",
    "__pyx_ctuple_int_struct",
    "__pyx_ctuple_long",
    "__pyx_ctuple_long__and_long__and_long",
    "__pyx_ctuple_long__and_long__and_long_struct",
    "__pyx_ctuple_long_struct",
    "__pyx_ctuple_unsigned__space_int",
    "__pyx_ctuple_unsigned__space_int_struct",
    "__pyx_opt_args_5pyrfc_5pyrfc_wrapString",
    "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_pyrfc(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_pyrfc},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "pyrfc",
    __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_02d_02d_02d, __pyx_k_02d_02d_02d, sizeof(__pyx_k_02d_02d_02d), 0, 1, 0, 0},
  {&__pyx_kp_u_04d_02d_02d, __pyx_k_04d_02d_02d, sizeof(__pyx_k_04d_02d_02d), 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_n_s_BaseHTTPRequestHandler, __pyx_k_BaseHTTPRequestHandler, sizeof(__pyx_k_BaseHTTPRequestHandler), 0, 0, 1, 1},
  {&__pyx_n_s_BasicServer, __pyx_k_BasicServer, sizeof(__pyx_k_BasicServer), 0, 0, 1, 1},
  {&__pyx_n_s_BasicServer__set_response, __pyx_k_BasicServer__set_response, sizeof(__pyx_k_BasicServer__set_response), 0, 0, 1, 1},
  {&__pyx_n_s_BasicServer_do_GET, __pyx_k_BasicServer_do_GET, sizeof(__pyx_k_BasicServer_do_GET), 0, 0, 1, 1},
  {&__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_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_Content_type, __pyx_k_Content_type, sizeof(__pyx_k_Content_type), 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_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_n_s_FunctionDescription, __pyx_k_FunctionDescription, sizeof(__pyx_k_FunctionDescription), 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_FunctionDescription_with_params, __pyx_k_FunctionDescription_with_params, sizeof(__pyx_k_FunctionDescription_with_params), 0, 1, 0, 0},
  {&__pyx_n_s_HIGHEST_PROTOCOL, __pyx_k_HIGHEST_PROTOCOL, sizeof(__pyx_k_HIGHEST_PROTOCOL), 0, 0, 1, 1},
  {&__pyx_n_s_HTTPServer, __pyx_k_HTTPServer, sizeof(__pyx_k_HTTPServer), 0, 0, 1, 1},
  {&__pyx_kp_u_HTTP_Server, __pyx_k_HTTP_Server, sizeof(__pyx_k_HTTP_Server), 0, 1, 0, 0},
  {&__pyx_kp_u_H_M_S, __pyx_k_H_M_S, sizeof(__pyx_k_H_M_S), 0, 1, 0, 0},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 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_exception_raised_by_call_2, __pyx_k_Invalid_exception_raised_by_call_2, sizeof(__pyx_k_Invalid_exception_raised_by_call_2), 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_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1},
  {&__pyx_n_s_KeyboardInterrupt, __pyx_k_KeyboardInterrupt, sizeof(__pyx_k_KeyboardInterrupt), 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_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__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_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_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_kp_b_Press_CTRL_C_to_end, __pyx_k_Press_CTRL_C_to_end, sizeof(__pyx_k_Press_CTRL_C_to_end), 0, 0, 0, 0},
  {&__pyx_n_u_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 1, 0, 1},
  {&__pyx_n_s_RFCError, __pyx_k_RFCError, sizeof(__pyx_k_RFCError), 0, 0, 1, 1},
  {&__pyx_n_u_RFCTYPE_BCD, __pyx_k_RFCTYPE_BCD, sizeof(__pyx_k_RFCTYPE_BCD), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_BYTE, __pyx_k_RFCTYPE_BYTE, sizeof(__pyx_k_RFCTYPE_BYTE), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_CHAR, __pyx_k_RFCTYPE_CHAR, sizeof(__pyx_k_RFCTYPE_CHAR), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_DATE, __pyx_k_RFCTYPE_DATE, sizeof(__pyx_k_RFCTYPE_DATE), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_FLOAT, __pyx_k_RFCTYPE_FLOAT, sizeof(__pyx_k_RFCTYPE_FLOAT), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_INT, __pyx_k_RFCTYPE_INT, sizeof(__pyx_k_RFCTYPE_INT), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_INT1, __pyx_k_RFCTYPE_INT1, sizeof(__pyx_k_RFCTYPE_INT1), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_INT2, __pyx_k_RFCTYPE_INT2, sizeof(__pyx_k_RFCTYPE_INT2), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_INT8, __pyx_k_RFCTYPE_INT8, sizeof(__pyx_k_RFCTYPE_INT8), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_NUM, __pyx_k_RFCTYPE_NUM, sizeof(__pyx_k_RFCTYPE_NUM), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_STRING, __pyx_k_RFCTYPE_STRING, sizeof(__pyx_k_RFCTYPE_STRING), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_STRUCTURE, __pyx_k_RFCTYPE_STRUCTURE, sizeof(__pyx_k_RFCTYPE_STRUCTURE), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_TABLE, __pyx_k_RFCTYPE_TABLE, sizeof(__pyx_k_RFCTYPE_TABLE), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_TIME, __pyx_k_RFCTYPE_TIME, sizeof(__pyx_k_RFCTYPE_TIME), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_UTCLONG, __pyx_k_RFCTYPE_UTCLONG, sizeof(__pyx_k_RFCTYPE_UTCLONG), 0, 1, 0, 1},
  {&__pyx_n_u_RFCTYPE_XSTRING, __pyx_k_RFCTYPE_XSTRING, sizeof(__pyx_k_RFCTYPE_XSTRING), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_CHANGING, __pyx_k_RFC_CHANGING, sizeof(__pyx_k_RFC_CHANGING), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_EXPORT, __pyx_k_RFC_EXPORT, sizeof(__pyx_k_RFC_EXPORT), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_IMPORT, __pyx_k_RFC_IMPORT, sizeof(__pyx_k_RFC_IMPORT), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_TABLES, __pyx_k_RFC_TABLES, sizeof(__pyx_k_RFC_TABLES), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_UNIT_COMMITTED, __pyx_k_RFC_UNIT_COMMITTED, sizeof(__pyx_k_RFC_UNIT_COMMITTED), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_UNIT_CONFIRMED, __pyx_k_RFC_UNIT_CONFIRMED, sizeof(__pyx_k_RFC_UNIT_CONFIRMED), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_UNIT_IN_PROCESS, __pyx_k_RFC_UNIT_IN_PROCESS, sizeof(__pyx_k_RFC_UNIT_IN_PROCESS), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_UNIT_NOT_FOUND, __pyx_k_RFC_UNIT_NOT_FOUND, sizeof(__pyx_k_RFC_UNIT_NOT_FOUND), 0, 1, 0, 1},
  {&__pyx_n_u_RFC_UNIT_ROLLED_BACK, __pyx_k_RFC_UNIT_ROLLED_BACK, sizeof(__pyx_k_RFC_UNIT_ROLLED_BACK), 0, 1, 0, 1},
  {&__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_Remote_function_module_s_invocat, __pyx_k_Remote_function_module_s_invocat, sizeof(__pyx_k_Remote_function_module_s_invocat), 0, 1, 0, 0},
  {&__pyx_kp_u_Request_for_func_name_Error_whil, __pyx_k_Request_for_func_name_Error_whil, sizeof(__pyx_k_Request_for_func_name_Error_whil), 0, 1, 0, 0},
  {&__pyx_kp_u_Request_for_raises_ABAPApplicati, __pyx_k_Request_for_raises_ABAPApplicati, sizeof(__pyx_k_Request_for_raises_ABAPApplicati), 0, 1, 0, 0},
  {&__pyx_kp_u_Request_for_raises_ABAPRuntimeEr, __pyx_k_Request_for_raises_ABAPRuntimeEr, sizeof(__pyx_k_Request_for_raises_ABAPRuntimeEr), 0, 1, 0, 0},
  {&__pyx_kp_u_Request_for_raises_ExternalRunti, __pyx_k_Request_for_raises_ExternalRunti, sizeof(__pyx_k_Request_for_raises_ExternalRunti), 0, 1, 0, 0},
  {&__pyx_kp_u_Request_for_raises_an_invalid_ex, __pyx_k_Request_for_raises_an_invalid_ex, sizeof(__pyx_k_Request_for_raises_an_invalid_ex), 0, 1, 0, 0},
  {&__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_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_TypeDescription, __pyx_k_TypeDescription, sizeof(__pyx_k_TypeDescription), 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_kp_u_TypeDescription_with_fields_n_u, __pyx_k_TypeDescription_with_fields_n_u, sizeof(__pyx_k_TypeDescription_with_fields_n_u), 0, 1, 0, 0},
  {&__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_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 1, 0, 0},
  {&__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_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 1, 0, 0},
  {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
  {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0},
  {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
  {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0},
  {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0},
  {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
  {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0},
  {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0},
  {&__pyx_kp_u__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 1, 0, 0},
  {&__pyx_n_s__57, __pyx_k__57, sizeof(__pyx_k__57), 0, 0, 1, 1},
  {&__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_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_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_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_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_n_u_codepage, __pyx_k_codepage, sizeof(__pyx_k_codepage), 0, 1, 0, 1},
  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
  {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1},
  {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 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_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_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_must_not_e, __pyx_k_default_value_string_must_not_e, sizeof(__pyx_k_default_value_string_must_not_e), 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_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 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_n_s_direction2rfc, __pyx_k_direction2rfc, sizeof(__pyx_k_direction2rfc), 0, 0, 1, 1},
  {&__pyx_kp_u_direction_string_must_be_in, __pyx_k_direction_string_must_be_in, sizeof(__pyx_k_direction_string_must_be_in), 0, 1, 0, 0},
  {&__pyx_n_s_do_GET, __pyx_k_do_GET, sizeof(__pyx_k_do_GET), 0, 0, 1, 1},
  {&__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_dumps, __pyx_k_dumps, sizeof(__pyx_k_dumps), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_end_headers, __pyx_k_end_headers, sizeof(__pyx_k_end_headers), 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_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_must_be_in, __pyx_k_field_type_string_must_be_in, sizeof(__pyx_k_field_type_string_must_be_in), 0, 1, 0, 0},
  {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
  {&__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_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_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_kp_u_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 1, 0, 0},
  {&__pyx_n_s_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 0, 1, 1},
  {&__pyx_n_s_handler_class, __pyx_k_handler_class, sizeof(__pyx_k_handler_class), 0, 0, 1, 1},
  {&__pyx_n_u_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 1, 0, 1},
  {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1},
  {&__pyx_n_s_http_server, __pyx_k_http_server, sizeof(__pyx_k_http_server), 0, 0, 1, 1},
  {&__pyx_n_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_int_field, __pyx_k_int_field, sizeof(__pyx_k_int_field), 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_u_language, __pyx_k_language, sizeof(__pyx_k_language), 0, 1, 0, 1},
  {&__pyx_n_u_launched, __pyx_k_launched, sizeof(__pyx_k_launched), 0, 1, 0, 1},
  {&__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_loads, __pyx_k_loads, sizeof(__pyx_k_loads), 0, 0, 1, 1},
  {&__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_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_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_kp_u_name_string_should_be_from_1_30, __pyx_k_name_string_should_be_from_1_30, sizeof(__pyx_k_name_string_should_be_from_1_30), 0, 1, 0, 0},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 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_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_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
  {&__pyx_n_s_objstr, __pyx_k_objstr, sizeof(__pyx_k_objstr), 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_must_not, __pyx_k_parameter_text_string_must_not, sizeof(__pyx_k_parameter_text_string_must_not), 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_must_be_i, __pyx_k_parameter_type_string_must_be_i, sizeof(__pyx_k_parameter_type_string_must_be_i), 0, 1, 0, 0},
  {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1},
  {&__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_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 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_s_py_to_string, __pyx_k_py_to_string, sizeof(__pyx_k_py_to_string), 0, 0, 1, 1},
  {&__pyx_n_s_pyrfc_pyrfc, __pyx_k_pyrfc_pyrfc, sizeof(__pyx_k_pyrfc_pyrfc), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_Server, __pyx_k_pyx_unpickle_Server, sizeof(__pyx_k_pyx_unpickle_Server), 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_u_queued, __pyx_k_queued, sizeof(__pyx_k_queued), 0, 1, 0, 1},
  {&__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_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_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 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_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_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__params_cannot_be_converted, __pyx_k_self__params_cannot_be_converted, sizeof(__pyx_k_self__params_cannot_be_converted), 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_s_send_header, __pyx_k_send_header, sizeof(__pyx_k_send_header), 0, 0, 1, 1},
  {&__pyx_n_s_send_response, __pyx_k_send_response, sizeof(__pyx_k_send_response), 0, 0, 1, 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_forever, __pyx_k_serve_forever, sizeof(__pyx_k_serve_forever), 0, 0, 1, 1},
  {&__pyx_n_s_serve_http, __pyx_k_serve_http, sizeof(__pyx_k_serve_http), 0, 0, 1, 1},
  {&__pyx_n_u_server, __pyx_k_server, sizeof(__pyx_k_server), 0, 1, 0, 1},
  {&__pyx_n_s_server_class, __pyx_k_server_class, sizeof(__pyx_k_server_class), 0, 0, 1, 1},
  {&__pyx_n_s_server_close, __pyx_k_server_close, sizeof(__pyx_k_server_close), 0, 0, 1, 1},
  {&__pyx_n_s_server_context, __pyx_k_server_context, sizeof(__pyx_k_server_context), 0, 0, 1, 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_response, __pyx_k_set_response, sizeof(__pyx_k_set_response), 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_s_src_pyrfc__pyrfc_pyx, __pyx_k_src_pyrfc__pyrfc_pyx, sizeof(__pyx_k_src_pyrfc__pyrfc_pyx), 0, 0, 1, 0},
  {&__pyx_kp_u_started_press_CTRC_C_to_end, __pyx_k_started_press_CTRC_C_to_end, sizeof(__pyx_k_started_press_CTRC_C_to_end), 0, 1, 0, 0},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_string_to_py, __pyx_k_string_to_py, sizeof(__pyx_k_string_to_py), 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_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 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_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_kp_u_text_html, __pyx_k_text_html, sizeof(__pyx_k_text_html), 0, 1, 0, 0},
  {&__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_s_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 0, 1, 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_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_type2rfc, __pyx_k_type2rfc, sizeof(__pyx_k_type2rfc), 0, 0, 1, 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_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 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_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_kp_u_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 1, 0, 0},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_wfile, __pyx_k_wfile, sizeof(__pyx_k_wfile), 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_wrapping, __pyx_k_when_wrapping, sizeof(__pyx_k_when_wrapping), 0, 1, 0, 0},
  {&__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_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
  {&__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, 1061, __pyx_L1_error)
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2443, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 161, __pyx_L1_error)
  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 729, __pyx_L1_error)
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1244, __pyx_L1_error)
  __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) __PYX_ERR(0, 1517, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 109, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_self__params_cannot_be_converted); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "(tree fragment)":4
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self._params cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self__params_cannot_be_converted); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "src/pyrfc/_pyrfc.pyx":248
 *         # set connection config, rstrip default True
 *         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__4 = PyTuple_Pack(2, __pyx_n_u_dtime, Py_False); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "src/pyrfc/_pyrfc.pyx":249
 *         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)
 *         # set internal configuration
 */
  __pyx_tuple__5 = PyTuple_Pack(2, __pyx_n_u_return_import_params, Py_False); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "src/pyrfc/_pyrfc.pyx":250
 *         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)             # <<<<<<<<<<<<<<
 *         # set internal configuration
 *         self.__bconfig = 0
 */
  __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_u_rstrip, Py_True); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 250, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "src/pyrfc/_pyrfc.pyx":759
 *                 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])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1)
 *                 free(sapuc)
 */
  __pyx_slice__8 = PySlice_New(__pyx_int_0, __pyx_int_12, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__8);
  __Pyx_GIVEREF(__pyx_slice__8);

  /* "src/pyrfc/_pyrfc.pyx":763
 *                 free(sapuc)
 *             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__9 = PySlice_New(__pyx_int_0, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__9);
  __Pyx_GIVEREF(__pyx_slice__9);

  /* "src/pyrfc/_pyrfc.pyx":767
 *                 free(sapuc)
 *             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__10 = PySlice_New(__pyx_int_0, __pyx_int_20, Py_None); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 767, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__10);
  __Pyx_GIVEREF(__pyx_slice__10);

  /* "src/pyrfc/_pyrfc.pyx":771
 *                 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])             # <<<<<<<<<<<<<<
 *                 strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1)
 *                 free(sapuc)
 */
  __pyx_slice__11 = PySlice_New(__pyx_int_0, __pyx_int_40, Py_None); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 771, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__11);
  __Pyx_GIVEREF(__pyx_slice__11);

  /* "src/pyrfc/_pyrfc.pyx":965
 * 
 *         if not isinstance(unit, 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__12 = PyTuple_Pack(1, __pyx_kp_u_Parameter_unit_not_valid_Please); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "src/pyrfc/_pyrfc.pyx":967
 *             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__13 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_be_iterable); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "src/pyrfc/_pyrfc.pyx":969
 *             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 not isinstance(func_name, basestring) or not isinstance(params, dict):
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_contain_at); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "src/pyrfc/_pyrfc.pyx":972
 *         for func_name, params in calls:
 *             if not isinstance(func_name, basestring) or not isinstance(params, dict):
 *                 raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).")             # <<<<<<<<<<<<<<
 *         if self.active_unit:
 *             raise RFCError(u"There is an active unit for this connection. "
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_contain_val); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "(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__16 = PyTuple_Pack(1, __pyx_kp_s_self__handle_self__tHandle_self); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "(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__17 = PyTuple_Pack(1, __pyx_kp_s_self__handle_self__tHandle_self); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "src/pyrfc/_pyrfc.pyx":1089
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 *             raise TypeError("'name' (string) should be from 1-30 chars.")             # <<<<<<<<<<<<<<
 *         for int_field in [nuc_length, uc_length]:
 *             if not isinstance(int_field, (int, long)):
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_name_string_should_be_from_1_30); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1089, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "src/pyrfc/_pyrfc.pyx":1203
 *             raise TypeError("'direction' (string) must be in [" + ", ".join(_direction2rfc) + "]")
 *         if len(default_value)>30:
 *             raise TypeError("'default_value' (string) must not exceed 30 chars.")             # <<<<<<<<<<<<<<
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) must not exceed 79 chars.")
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_u_default_value_string_must_not_e); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "src/pyrfc/_pyrfc.pyx":1205
 *             raise TypeError("'default_value' (string) must not exceed 30 chars.")
 *         if len(parameter_text)>79:
 *             raise TypeError("'parameter_text' (string) must not exceed 79 chars.")             # <<<<<<<<<<<<<<
 *         self.parameters.append({
 *             'name': name,
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_u_parameter_text_string_must_not); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1205, __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__28 = PyTuple_Pack(1, __pyx_kp_s_self__handle_cannot_be_converted); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(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__29 = PyTuple_Pack(1, __pyx_kp_s_self__handle_cannot_be_converted); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "src/pyrfc/_pyrfc.pyx":1391
 *         return RFC_EXTERNAL_FAILURE
 *     except:
 *         exctype, value = exc_info()[:2]             # <<<<<<<<<<<<<<
 *         _server_log("genericHandler",
 *             "Request for '{}' raises an invalid exception:\n Exception: {}\n Values: {}\n"
 */
  __pyx_slice__32 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__32)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__32);
  __Pyx_GIVEREF(__pyx_slice__32);

  /* "src/pyrfc/_pyrfc.pyx":1415
 *     def _set_response(self):
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')             # <<<<<<<<<<<<<<
 *         self.end_headers()
 * 
 */
  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_kp_u_Content_type, __pyx_kp_u_text_html); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1415, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "src/pyrfc/_pyrfc.pyx":1465
 * 
 *         # config parsing
 *         self.debug = config.get('debug', False)             # <<<<<<<<<<<<<<
 *         self.rstrip = config.get('rstrip', True)
 *         server_context["server_log"] = config.get("server_log", False)
 */
  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_n_u_debug, Py_False); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 1465, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "src/pyrfc/_pyrfc.pyx":1467
 *         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__36 = PyTuple_Pack(2, __pyx_n_u_server_log_2, Py_False); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "src/pyrfc/_pyrfc.pyx":1469
 *         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__37 = PyTuple_Pack(2, __pyx_n_u_port, __pyx_int_8080); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 1469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "src/pyrfc/_pyrfc.pyx":1514
 *         server_address = ('', server_context["port"])
 *         httpd = server_class(server_address, handler_class)
 *         _server_log("HTTP Server", "started, press CTRC-C to end ...")             # <<<<<<<<<<<<<<
 *         try:
 *             httpd.serve_forever()
 */
  __pyx_tuple__40 = PyTuple_Pack(2, __pyx_kp_u_HTTP_Server, __pyx_kp_u_started_press_CTRC_C_to_end); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "src/pyrfc/_pyrfc.pyx":1533
 *         if rc != RFC_OK or errorInfo.code != RFC_OK:
 *             raise wrapError(&errorInfo)
 *         _server_log("Server", "launched")             # <<<<<<<<<<<<<<
 * 
 *         self._serve_http()
 */
  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_u_Server, __pyx_n_u_launched); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "src/pyrfc/_pyrfc.pyx":1836
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 date(int(value[:4]), int(value[4:6]), int(value[6:8]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except:
 */
  __pyx_slice__42 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__42)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__42);
  __Pyx_GIVEREF(__pyx_slice__42);
  __pyx_slice__43 = PySlice_New(__pyx_int_4, __pyx_int_6, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__43);
  __Pyx_GIVEREF(__pyx_slice__43);
  __pyx_slice__44 = PySlice_New(__pyx_int_6, __pyx_int_8, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 1836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__44);
  __Pyx_GIVEREF(__pyx_slice__44);

  /* "src/pyrfc/_pyrfc.pyx":1857
 *                         else:
 *                             if len(value.rstrip()) > 0:
 *                                 time(int(value[:2]), int(value[2:4]), int(value[4:6]))             # <<<<<<<<<<<<<<
 *                             cValue = fillString(value)
 *                     except:
 */
  __pyx_slice__45 = PySlice_New(__pyx_int_2, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__45)) __PYX_ERR(0, 1857, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__45);
  __Pyx_GIVEREF(__pyx_slice__45);

  /* "src/pyrfc/_pyrfc.pyx":1901
 *     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__46 = PySlice_New(__pyx_int_0, __pyx_int_512, Py_None); if (unlikely(!__pyx_slice__46)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__46);
  __Pyx_GIVEREF(__pyx_slice__46);

  /* "src/pyrfc/_pyrfc.pyx":1907
 *     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__47 = PySlice_New(__pyx_int_0, __pyx_int_128, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 1907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__47);
  __Pyx_GIVEREF(__pyx_slice__47);

  /* "src/pyrfc/_pyrfc.pyx":1916
 *         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__48 = PySlice_New(__pyx_int_0, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__48)) __PYX_ERR(0, 1916, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__48);
  __Pyx_GIVEREF(__pyx_slice__48);

  /* "src/pyrfc/_pyrfc.pyx":1924
 *         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__49 = PySlice_New(__pyx_int_0, __pyx_int_50, Py_None); if (unlikely(!__pyx_slice__49)) __PYX_ERR(0, 1924, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__49);
  __Pyx_GIVEREF(__pyx_slice__49);

  /* "src/pyrfc/_pyrfc.pyx":2305
 *             utcValue = wrapString(stringValue, resultLen)
 *             # replace the "," separator with "."
 *             return utcValue[:19]+'.'+utcValue[20:]             # <<<<<<<<<<<<<<
 *         finally:
 *             free(stringValue)
 */
  __pyx_slice__51 = PySlice_New(Py_None, __pyx_int_19, Py_None); if (unlikely(!__pyx_slice__51)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__51);
  __Pyx_GIVEREF(__pyx_slice__51);
  __pyx_slice__52 = PySlice_New(__pyx_int_20, Py_None, Py_None); if (unlikely(!__pyx_slice__52)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__52);
  __Pyx_GIVEREF(__pyx_slice__52);

  /* "(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__54 = PyTuple_Pack(1, __pyx_kp_s_self__throughput_handle_cannot_b); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "(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__55 = PyTuple_Pack(1, __pyx_kp_s_self__throughput_handle_cannot_b); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);
  __pyx_tuple__56 = PyTuple_Pack(3, __pyx_int_202447126, __pyx_int_10964172, __pyx_int_49244456); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "src/pyrfc/_pyrfc.pyx":79
 * ################################################################################
 * 
 * def py_to_string(obj):             # <<<<<<<<<<<<<<
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);
  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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__pyrfc_pyx, __pyx_n_s_py_to_string, 79, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 79, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":82
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 * def string_to_py(objstr):             # <<<<<<<<<<<<<<
 *     return pickle.loads(objstr)
 * 
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_n_s_objstr); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);
  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 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__pyrfc_pyx, __pyx_n_s_string_to_py, 82, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 82, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":85
 *     return pickle.loads(objstr)
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level
 */
  __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_patchlevel); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);
  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 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__pyrfc_pyx, __pyx_n_s_get_nwrfclib_version, 85, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 85, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":95
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 * 
 * def set_ini_file_directory(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the directory in which to search for the sapnwrfc.ini file
 * 
 */
  __pyx_tuple__64 = PyTuple_Pack(4, __pyx_n_s_path_name, __pyx_n_s_errorInfo, __pyx_n_s_pathName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);
  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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__pyrfc_pyx, __pyx_n_s_set_ini_file_directory, 95, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 95, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":114
 *         raise wrapError(&errorInfo)
 * 
 * def set_cryptolib_path(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
 * 
 */
  __pyx_tuple__66 = PyTuple_Pack(4, __pyx_n_s_path_name, __pyx_n_s_errorInfo, __pyx_n_s_pathName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);
  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 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__pyrfc_pyx, __pyx_n_s_set_cryptolib_path, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 114, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1061
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 * class TypeDescription(object):             # <<<<<<<<<<<<<<
 *     """ A type description
 * 
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "src/pyrfc/_pyrfc.pyx":1086
 * 
 *     """
 *     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, 1086, __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__pyrfc_pyx, __pyx_n_s_init, 1086, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1086, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1097
 *         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, 1097, __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__pyrfc_pyx, __pyx_n_s_add_field, 1097, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __pyx_tuple__73 = PyTuple_Pack(2, ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "src/pyrfc/_pyrfc.pyx":1138
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<TypeDescription '{}' with {} fields (n/uclength={}/{})>".format(
 *             self.name, len(self.fields), self.nuc_length, self.uc_length
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 1138, __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__pyrfc_pyx, __pyx_n_s_repr, 1138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 1138, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1143
 *         )
 * 
 * class FunctionDescription(object):             # <<<<<<<<<<<<<<
 *     """ A function description
 * 
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "src/pyrfc/_pyrfc.pyx":1166
 * 
 *     """
 *     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, 1166, __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__pyrfc_pyx, __pyx_n_s_init, 1166, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1166, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1170
 *         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, 1170, __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__pyrfc_pyx, __pyx_n_s_add_parameter, 1170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __pyx_tuple__81 = PyTuple_Pack(5, ((PyObject *)__pyx_int_0), ((PyObject*)__pyx_kp_u__21), ((PyObject*)__pyx_kp_u__21), ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "src/pyrfc/_pyrfc.pyx":1219
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<FunctionDescription '{}' with {} params>".format(
 *             self.name, len(self.parameters)
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 1219, __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__pyrfc_pyx, __pyx_n_s_repr, 1219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1219, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1233
 * server_functions = {}
 * 
 * def default_auth_check(func_name=False, request_context = {}):             # <<<<<<<<<<<<<<
 *     _server_log(f"authorization check for '{func_name}'", request_context)
 *     return RFC_OK
 */
  __pyx_tuple__84 = PyTuple_Pack(2, __pyx_n_s_func_name, __pyx_n_s_request_context); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 1233, __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__pyrfc_pyx, __pyx_n_s_default_auth_check, 1233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1233, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1242
 * server_context = {}
 * 
 * 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, 1242, __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__pyrfc_pyx, __pyx_n_s_server_log, 1242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 1242, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1413
 * class BasicServer(BaseHTTPRequestHandler):
 *     # TODO: management-console
 *     def _set_response(self):             # <<<<<<<<<<<<<<
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);
  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__pyrfc_pyx, __pyx_n_s_set_response, 1413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1413, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":1418
 *         self.end_headers()
 * 
 *     def do_GET(self):             # <<<<<<<<<<<<<<
 *         #_server_log("HTTP GET", f"path: {self.path}\nheaders:\n{self.headers}\n")
 *         self._set_response()
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);
  __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__pyrfc_pyx, __pyx_n_s_do_GET, 1418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1418, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":2444
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 */
  __pyx_tuple__92 = PyTuple_Pack(4, __pyx_n_s_connection, __pyx_n_s_errorInfo, __pyx_n_s_throughput, __pyx_n_s_t); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__pyrfc_pyx, __pyx_n_s_getFromConnection, 2444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 2444, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_Server(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__94 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);
  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Server, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_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_200 = PyInt_FromLong(200); if (unlikely(!__pyx_int_200)) __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_10964172 = PyInt_FromLong(10964172L); if (unlikely(!__pyx_int_10964172)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_49244456 = PyInt_FromLong(49244456L); if (unlikely(!__pyx_int_49244456)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_202447126 = PyInt_FromLong(202447126L); if (unlikely(!__pyx_int_202447126)) __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_5pyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_5pyrfc_ConnectionParameters.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_5pyrfc_ConnectionParameters.tp_dictoffset && __pyx_type_5pyrfc_5pyrfc_ConnectionParameters.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_5pyrfc_ConnectionParameters.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConnectionParameters, (PyObject *)&__pyx_type_5pyrfc_5pyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_5pyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 141, __pyx_L1_error)
  __pyx_ptype_5pyrfc_5pyrfc_ConnectionParameters = &__pyx_type_5pyrfc_5pyrfc_ConnectionParameters;
  __pyx_vtabptr_5pyrfc_5pyrfc_Connection = &__pyx_vtable_5pyrfc_5pyrfc_Connection;
  __pyx_vtable_5pyrfc_5pyrfc_Connection._reopen = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_Connection *))__pyx_f_5pyrfc_5pyrfc_10Connection__reopen;
  __pyx_vtable_5pyrfc_5pyrfc_Connection._open = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_Connection *))__pyx_f_5pyrfc_5pyrfc_10Connection__open;
  __pyx_vtable_5pyrfc_5pyrfc_Connection._error = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_Connection *, RFC_ERROR_INFO *))__pyx_f_5pyrfc_5pyrfc_10Connection__error;
  if (PyType_Ready(&__pyx_type_5pyrfc_5pyrfc_Connection) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_5pyrfc_Connection.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_5pyrfc_Connection.tp_dictoffset && __pyx_type_5pyrfc_5pyrfc_Connection.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_5pyrfc_Connection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_5pyrfc_Connection.tp_dict, __pyx_vtabptr_5pyrfc_5pyrfc_Connection) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Connection, (PyObject *)&__pyx_type_5pyrfc_5pyrfc_Connection) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_5pyrfc_Connection) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  __pyx_ptype_5pyrfc_5pyrfc_Connection = &__pyx_type_5pyrfc_5pyrfc_Connection;
  __pyx_vtabptr_5pyrfc_5pyrfc_ServerConnection = &__pyx_vtable_5pyrfc_5pyrfc_ServerConnection;
  __pyx_vtable_5pyrfc_5pyrfc_ServerConnection._open = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *))__pyx_f_5pyrfc_5pyrfc_16ServerConnection__open;
  __pyx_vtable_5pyrfc_5pyrfc_ServerConnection._close = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_ServerConnection *))__pyx_f_5pyrfc_5pyrfc_16ServerConnection__close;
  if (PyType_Ready(&__pyx_type_5pyrfc_5pyrfc_ServerConnection) < 0) __PYX_ERR(0, 1246, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_5pyrfc_ServerConnection.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_5pyrfc_ServerConnection.tp_dictoffset && __pyx_type_5pyrfc_5pyrfc_ServerConnection.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_5pyrfc_ServerConnection.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_5pyrfc_ServerConnection.tp_dict, __pyx_vtabptr_5pyrfc_5pyrfc_ServerConnection) < 0) __PYX_ERR(0, 1246, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ServerConnection, (PyObject *)&__pyx_type_5pyrfc_5pyrfc_ServerConnection) < 0) __PYX_ERR(0, 1246, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_5pyrfc_ServerConnection) < 0) __PYX_ERR(0, 1246, __pyx_L1_error)
  __pyx_ptype_5pyrfc_5pyrfc_ServerConnection = &__pyx_type_5pyrfc_5pyrfc_ServerConnection;
  __pyx_vtabptr_5pyrfc_5pyrfc_Server = &__pyx_vtable_5pyrfc_5pyrfc_Server;
  __pyx_vtable_5pyrfc_5pyrfc_Server._error = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_Server *, RFC_ERROR_INFO *))__pyx_f_5pyrfc_5pyrfc_6Server__error;
  if (PyType_Ready(&__pyx_type_5pyrfc_5pyrfc_Server) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_5pyrfc_Server.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_5pyrfc_Server.tp_dictoffset && __pyx_type_5pyrfc_5pyrfc_Server.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_5pyrfc_Server.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_5pyrfc_Server.tp_dict, __pyx_vtabptr_5pyrfc_5pyrfc_Server) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Server, (PyObject *)&__pyx_type_5pyrfc_5pyrfc_Server) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_5pyrfc_Server) < 0) __PYX_ERR(0, 1424, __pyx_L1_error)
  __pyx_ptype_5pyrfc_5pyrfc_Server = &__pyx_type_5pyrfc_5pyrfc_Server;
  __pyx_vtabptr_5pyrfc_5pyrfc_Throughput = &__pyx_vtable_5pyrfc_5pyrfc_Throughput;
  __pyx_vtable_5pyrfc_5pyrfc_Throughput._destroy = (PyObject *(*)(struct __pyx_obj_5pyrfc_5pyrfc_Throughput *))__pyx_f_5pyrfc_5pyrfc_10Throughput__destroy;
  if (PyType_Ready(&__pyx_type_5pyrfc_5pyrfc_Throughput) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_5pyrfc_5pyrfc_Throughput.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5pyrfc_5pyrfc_Throughput.tp_dictoffset && __pyx_type_5pyrfc_5pyrfc_Throughput.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_5pyrfc_5pyrfc_Throughput.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_5pyrfc_5pyrfc_Throughput.tp_dict, __pyx_vtabptr_5pyrfc_5pyrfc_Throughput) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Throughput, (PyObject *)&__pyx_type_5pyrfc_5pyrfc_Throughput) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5pyrfc_5pyrfc_Throughput) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
  __pyx_ptype_5pyrfc_5pyrfc_Throughput = &__pyx_type_5pyrfc_5pyrfc_Throughput;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_ptype_7cpython_5array_array = __Pyx_ImportType(__pyx_t_1, "array", "array", sizeof(arrayobject), __Pyx_ImportType_CheckSize_Warn);
   if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(2, 58, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initpyrfc(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initpyrfc(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_pyrfc(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_pyrfc(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_pyrfc(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  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 'pyrfc' 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_pyrfc(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("pyrfc", __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__pyrfc) {
    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.pyrfc")) {
      if (unlikely(PyDict_SetItemString(modules, "pyrfc.pyrfc", __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)
  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "src/pyrfc/_pyrfc.pyx":9
 * """ The _pyrfc C-extension module """
 * 
 * from sys import platform, exc_info             # <<<<<<<<<<<<<<
 * from threading import Thread
 * from datetime import date, time, datetime
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_platform);
  __Pyx_GIVEREF(__pyx_n_s_platform);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_platform);
  __Pyx_INCREF(__pyx_n_s_exc_info);
  __Pyx_GIVEREF(__pyx_n_s_exc_info);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_exc_info);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, __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_platform); 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_platform, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __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, 9, __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, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":10
 * 
 * from sys import platform, exc_info
 * from threading import Thread             # <<<<<<<<<<<<<<
 * from datetime import date, time, datetime
 * from locale import localeconv
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __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_t_1 = __Pyx_Import(__pyx_n_s_threading, __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_Thread); 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_Thread, __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;

  /* "src/pyrfc/_pyrfc.pyx":11
 * from sys import platform, exc_info
 * from threading import Thread
 * from datetime import date, time, datetime             # <<<<<<<<<<<<<<
 * from locale import localeconv
 * from os.path import isfile, join
 */
  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_date);
  __Pyx_GIVEREF(__pyx_n_s_date);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_date);
  __Pyx_INCREF(__pyx_n_s_time);
  __Pyx_GIVEREF(__pyx_n_s_time);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_time);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_datetime);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __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_date); 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_date, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_time); 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_time, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __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;

  /* "src/pyrfc/_pyrfc.pyx":12
 * from threading import Thread
 * from datetime import date, time, datetime
 * from locale import localeconv             # <<<<<<<<<<<<<<
 * from os.path import isfile, join
 * import pickle
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_localeconv);
  __Pyx_GIVEREF(__pyx_n_s_localeconv);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_localeconv);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_locale, __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_localeconv); 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_localeconv, __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;

  /* "src/pyrfc/_pyrfc.pyx":13
 * from datetime import date, time, datetime
 * from locale import localeconv
 * from os.path import isfile, join             # <<<<<<<<<<<<<<
 * import pickle
 * from decimal import Decimal
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_isfile);
  __Pyx_GIVEREF(__pyx_n_s_isfile);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_isfile);
  __Pyx_INCREF(__pyx_n_s_join);
  __Pyx_GIVEREF(__pyx_n_s_join);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_join);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, __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_isfile); 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_isfile, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_join); 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_join, __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;

  /* "src/pyrfc/_pyrfc.pyx":14
 * from locale import localeconv
 * from os.path import isfile, join
 * import pickle             # <<<<<<<<<<<<<<
 * from decimal import Decimal
 * from libc.stdlib cimport malloc, free
 */
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pickle, 0, 0); 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_pickle, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":15
 * from os.path import isfile, join
 * import pickle
 * from decimal import Decimal             # <<<<<<<<<<<<<<
 * from libc.stdlib cimport malloc, free
 * from libc.stdint cimport uintptr_t
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Decimal);
  __Pyx_GIVEREF(__pyx_n_s_Decimal);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Decimal);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_decimal, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __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_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Decimal, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":21
 * #from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free
 * from cpython cimport array
 * from http.server import BaseHTTPRequestHandler, HTTPServer             # <<<<<<<<<<<<<<
 * from . csapnwrfc cimport *
 * from . _exception import *
 */
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_BaseHTTPRequestHandler);
  __Pyx_GIVEREF(__pyx_n_s_BaseHTTPRequestHandler);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BaseHTTPRequestHandler);
  __Pyx_INCREF(__pyx_n_s_HTTPServer);
  __Pyx_GIVEREF(__pyx_n_s_HTTPServer);
  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_HTTPServer);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_http_server, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __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_BaseHTTPRequestHandler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BaseHTTPRequestHandler, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HTTPServer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_HTTPServer, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":23
 * from http.server import BaseHTTPRequestHandler, HTTPServer
 * from . csapnwrfc cimport *
 * from . _exception import *             # <<<<<<<<<<<<<<
 * 
 * try:
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s__57);
  __Pyx_GIVEREF(__pyx_n_s__57);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__57);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_exception, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_import_star(__pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":25
 * from . _exception import *
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from collections.abc import Iterable
 * except:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "src/pyrfc/_pyrfc.pyx":26
 * 
 * try:
 *     from collections.abc import Iterable             # <<<<<<<<<<<<<<
 * except:
 *     from collections import Iterable
 */
      __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L2_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, 26, __pyx_L2_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, 26, __pyx_L2_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L2_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "src/pyrfc/_pyrfc.pyx":25
 * from . _exception import *
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from collections.abc import Iterable
 * except:
 */
    }
    __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;
    goto __pyx_L7_try_end;
    __pyx_L2_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "src/pyrfc/_pyrfc.pyx":27
 * try:
 *     from collections.abc import Iterable
 * except:             # <<<<<<<<<<<<<<
 *     from collections import Iterable
 * 
 */
    /*except:*/ {
      __Pyx_AddTraceback("pyrfc.pyrfc", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 27, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_6);

      /* "src/pyrfc/_pyrfc.pyx":28
 *     from collections.abc import Iterable
 * except:
 *     from collections import Iterable             # <<<<<<<<<<<<<<
 * 
 * # inverts the enumeration of RFC_DIRECTION
 */
      __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_n_s_Iterable);
      __Pyx_GIVEREF(__pyx_n_s_Iterable);
      PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_Iterable);
      __pyx_t_8 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_7, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 28, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_8, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 28, __pyx_L4_except_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_7) < 0) __PYX_ERR(0, 28, __pyx_L4_except_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L3_exception_handled;
    }
    __pyx_L4_except_error:;

    /* "src/pyrfc/_pyrfc.pyx":25
 * from . _exception import *
 * 
 * try:             # <<<<<<<<<<<<<<
 *     from collections.abc import Iterable
 * except:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L3_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    __pyx_L7_try_end:;
  }

  /* "src/pyrfc/_pyrfc.pyx":31
 * 
 * # inverts the enumeration of RFC_DIRECTION
 * _direction2rfc = {'RFC_IMPORT': RFC_IMPORT, 'RFC_EXPORT': RFC_EXPORT,             # <<<<<<<<<<<<<<
 *                   'RFC_CHANGING': RFC_CHANGING, 'RFC_TABLES': RFC_TABLES}
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_IMPORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFC_IMPORT, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_EXPORT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFC_EXPORT, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":32
 * # inverts the enumeration of RFC_DIRECTION
 * _direction2rfc = {'RFC_IMPORT': RFC_IMPORT, 'RFC_EXPORT': RFC_EXPORT,
 *                   'RFC_CHANGING': RFC_CHANGING, 'RFC_TABLES': RFC_TABLES}             # <<<<<<<<<<<<<<
 * 
 * # inverts the enum of RFCTYPE
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_CHANGING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFC_CHANGING, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_TABLES); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFC_TABLES, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_direction2rfc, __pyx_t_6) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":36
 * # inverts the enum of RFCTYPE
 * _type2rfc = {
 *     'RFCTYPE_CHAR': RFCTYPE_CHAR,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_DATE': RFCTYPE_DATE,
 *     'RFCTYPE_BCD': RFCTYPE_BCD,
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_CHAR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_CHAR, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":37
 * _type2rfc = {
 *     'RFCTYPE_CHAR': RFCTYPE_CHAR,
 *     'RFCTYPE_DATE': RFCTYPE_DATE,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_BCD': RFCTYPE_BCD,
 *     'RFCTYPE_TIME': RFCTYPE_TIME,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DATE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_DATE, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":38
 *     'RFCTYPE_CHAR': RFCTYPE_CHAR,
 *     'RFCTYPE_DATE': RFCTYPE_DATE,
 *     'RFCTYPE_BCD': RFCTYPE_BCD,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_TIME': RFCTYPE_TIME,
 *     'RFCTYPE_BYTE': RFCTYPE_BYTE,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_BCD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_BCD, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":39
 *     'RFCTYPE_DATE': RFCTYPE_DATE,
 *     'RFCTYPE_BCD': RFCTYPE_BCD,
 *     'RFCTYPE_TIME': RFCTYPE_TIME,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_BYTE': RFCTYPE_BYTE,
 *     'RFCTYPE_TABLE': RFCTYPE_TABLE,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TIME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_TIME, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":40
 *     'RFCTYPE_BCD': RFCTYPE_BCD,
 *     'RFCTYPE_TIME': RFCTYPE_TIME,
 *     'RFCTYPE_BYTE': RFCTYPE_BYTE,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_TABLE': RFCTYPE_TABLE,
 *     'RFCTYPE_NUM': RFCTYPE_NUM,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_BYTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_BYTE, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":41
 *     'RFCTYPE_TIME': RFCTYPE_TIME,
 *     'RFCTYPE_BYTE': RFCTYPE_BYTE,
 *     'RFCTYPE_TABLE': RFCTYPE_TABLE,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_NUM': RFCTYPE_NUM,
 *     'RFCTYPE_FLOAT': RFCTYPE_FLOAT,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_TABLE, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":42
 *     'RFCTYPE_BYTE': RFCTYPE_BYTE,
 *     'RFCTYPE_TABLE': RFCTYPE_TABLE,
 *     'RFCTYPE_NUM': RFCTYPE_NUM,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_FLOAT': RFCTYPE_FLOAT,
 *     'RFCTYPE_INT': RFCTYPE_INT,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_NUM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_NUM, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":43
 *     'RFCTYPE_TABLE': RFCTYPE_TABLE,
 *     'RFCTYPE_NUM': RFCTYPE_NUM,
 *     'RFCTYPE_FLOAT': RFCTYPE_FLOAT,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_INT': RFCTYPE_INT,
 *     'RFCTYPE_INT2': RFCTYPE_INT2,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_FLOAT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_FLOAT, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":44
 *     'RFCTYPE_NUM': RFCTYPE_NUM,
 *     'RFCTYPE_FLOAT': RFCTYPE_FLOAT,
 *     'RFCTYPE_INT': RFCTYPE_INT,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_INT2': RFCTYPE_INT2,
 *     'RFCTYPE_INT1': RFCTYPE_INT1,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_INT, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":45
 *     'RFCTYPE_FLOAT': RFCTYPE_FLOAT,
 *     'RFCTYPE_INT': RFCTYPE_INT,
 *     'RFCTYPE_INT2': RFCTYPE_INT2,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_INT1': RFCTYPE_INT1,
 *     'RFCTYPE_INT8': RFCTYPE_INT8,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_INT2, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":46
 *     'RFCTYPE_INT': RFCTYPE_INT,
 *     'RFCTYPE_INT2': RFCTYPE_INT2,
 *     'RFCTYPE_INT1': RFCTYPE_INT1,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_INT8': RFCTYPE_INT8,
 *     'RFCTYPE_UTCLONG': RFCTYPE_UTCLONG,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_INT1, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":47
 *     'RFCTYPE_INT2': RFCTYPE_INT2,
 *     'RFCTYPE_INT1': RFCTYPE_INT1,
 *     'RFCTYPE_INT8': RFCTYPE_INT8,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_UTCLONG': RFCTYPE_UTCLONG,
 *     'RFCTYPE_STRUCTURE': RFCTYPE_STRUCTURE,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_INT8, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":48
 *     'RFCTYPE_INT1': RFCTYPE_INT1,
 *     'RFCTYPE_INT8': RFCTYPE_INT8,
 *     'RFCTYPE_UTCLONG': RFCTYPE_UTCLONG,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_STRUCTURE': RFCTYPE_STRUCTURE,
 *     'RFCTYPE_STRING': RFCTYPE_STRING,
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCLONG); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_UTCLONG, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":49
 *     'RFCTYPE_INT8': RFCTYPE_INT8,
 *     'RFCTYPE_UTCLONG': RFCTYPE_UTCLONG,
 *     'RFCTYPE_STRUCTURE': RFCTYPE_STRUCTURE,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_STRING': RFCTYPE_STRING,
 *     'RFCTYPE_XSTRING': RFCTYPE_XSTRING
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_STRUCTURE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_STRUCTURE, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":50
 *     'RFCTYPE_UTCLONG': RFCTYPE_UTCLONG,
 *     'RFCTYPE_STRUCTURE': RFCTYPE_STRUCTURE,
 *     'RFCTYPE_STRING': RFCTYPE_STRING,             # <<<<<<<<<<<<<<
 *     'RFCTYPE_XSTRING': RFCTYPE_XSTRING
 * }
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_STRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_STRING, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":51
 *     'RFCTYPE_STRUCTURE': RFCTYPE_STRUCTURE,
 *     'RFCTYPE_STRING': RFCTYPE_STRING,
 *     'RFCTYPE_XSTRING': RFCTYPE_XSTRING             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_XSTRING); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_RFCTYPE_XSTRING, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_type2rfc, __pyx_t_6) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":55
 * 
 * # 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, 55, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":56
 * # 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, 56, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":57
 * _MASK_DTIME = 0x01
 * _MASK_RETURN_IMPORT_PARAMS = 0x02
 * _MASK_RSTRIP = 0x04             # <<<<<<<<<<<<<<
 * 
 * # NOTES ON ERROR HANDLING
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MASK_RSTRIP, __pyx_int_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error)

  /* "src/pyrfc/_pyrfc.pyx":79
 * ################################################################################
 * 
 * def py_to_string(obj):             # <<<<<<<<<<<<<<
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_1py_to_string, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_py_to_string, __pyx_t_6) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":82
 *     return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
 * 
 * def string_to_py(objstr):             # <<<<<<<<<<<<<<
 *     return pickle.loads(objstr)
 * 
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_3string_to_py, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_to_py, __pyx_t_6) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":85
 *     return pickle.loads(objstr)
 * 
 * def get_nwrfclib_version():             # <<<<<<<<<<<<<<
 *     """Get SAP NW RFC Lib version
 *     :returns: tuple of major, minor and patch level
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_5get_nwrfclib_version, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_nwrfclib_version, __pyx_t_6) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":95
 *     return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform}
 * 
 * def set_ini_file_directory(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the directory in which to search for the sapnwrfc.ini file
 * 
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_7set_ini_file_directory, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_ini_file_directory, __pyx_t_6) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":114
 *         raise wrapError(&errorInfo)
 * 
 * def set_cryptolib_path(path_name):             # <<<<<<<<<<<<<<
 *     """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.
 * 
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_9set_cryptolib_path, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_cryptolib_path, __pyx_t_6) < 0) __PYX_ERR(0, 114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":245
 *             return self._handle != NULL
 * 
 *     def __init__(self, config={}, **params):             # <<<<<<<<<<<<<<
 *         # set connection config, rstrip default True
 *         self.__config = {}
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_k__3 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":458
 *         return wrapFunctionDescription(funcDesc)
 * 
 *     def call(self, func_name, options={}, **params):             # <<<<<<<<<<<<<<
 *         """ Invokes a remote-enabled function module via RFC.
 * 
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_k__7 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1061
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 * class TypeDescription(object):             # <<<<<<<<<<<<<<
 *     """ A type description
 * 
 */
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__68); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_tuple__68, __pyx_n_s_TypeDescription, __pyx_n_s_TypeDescription, (PyObject *) NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_kp_s_A_type_description_This_class_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyrfc/_pyrfc.pyx":1086
 * 
 *     """
 *     def __init__(self, name, nuc_length, uc_length):             # <<<<<<<<<<<<<<
 *         self.fields = []
 *         if len(name)<1 or len(name)>30:
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_15TypeDescription_1__init__, 0, __pyx_n_s_TypeDescription___init, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1097
 *         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_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_15TypeDescription_3add_field, 0, __pyx_n_s_TypeDescription_add_field, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__73);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_add_field, __pyx_t_2) < 0) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1138
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<TypeDescription '{}' with {} fields (n/uclength={}/{})>".format(
 *             self.name, len(self.fields), self.nuc_length, self.uc_length
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_15TypeDescription_5__repr__, 0, __pyx_n_s_TypeDescription___repr, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_2) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1061
 *             raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)")
 * 
 * class TypeDescription(object):             # <<<<<<<<<<<<<<
 *     """ A type description
 * 
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_TypeDescription, __pyx_tuple__68, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TypeDescription, __pyx_t_2) < 0) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1143
 *         )
 * 
 * class FunctionDescription(object):             # <<<<<<<<<<<<<<
 *     """ A function description
 * 
 */
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__76); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_tuple__76, __pyx_n_s_FunctionDescription, __pyx_n_s_FunctionDescription, (PyObject *) NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_kp_s_A_function_description_This_cla); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "src/pyrfc/_pyrfc.pyx":1166
 * 
 *     """
 *     def __init__(self, name):             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.parameters = []
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_19FunctionDescription_1__init__, 0, __pyx_n_s_FunctionDescription___init, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1170
 *         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_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_19FunctionDescription_3add_parameter, 0, __pyx_n_s_FunctionDescription_add_paramete, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__81);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_add_parameter, __pyx_t_2) < 0) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1219
 *         })
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return "<FunctionDescription '{}' with {} params>".format(
 *             self.name, len(self.parameters)
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_19FunctionDescription_5__repr__, 0, __pyx_n_s_FunctionDescription___repr, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_SetNameInClass(__pyx_t_1, __pyx_n_s_repr, __pyx_t_2) < 0) __PYX_ERR(0, 1219, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1143
 *         )
 * 
 * class FunctionDescription(object):             # <<<<<<<<<<<<<<
 *     """ A function description
 * 
 */
  __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_FunctionDescription, __pyx_tuple__76, __pyx_t_1, NULL, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_FunctionDescription, __pyx_t_2) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1231
 * #                   "callback": Python function,
 * #                   "server": Server object)
 * server_functions = {}             # <<<<<<<<<<<<<<
 * 
 * def default_auth_check(func_name=False, request_context = {}):
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_functions, __pyx_t_6) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1233
 * server_functions = {}
 * 
 * def default_auth_check(func_name=False, request_context = {}):             # <<<<<<<<<<<<<<
 *     _server_log(f"authorization check for '{func_name}'", request_context)
 *     return RFC_OK
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_k__24 = __pyx_t_6;
  __Pyx_GIVEREF(__pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_11default_auth_check, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_auth_check, __pyx_t_6) < 0) __PYX_ERR(0, 1233, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1240
 * # "auth_check": Default authorization check function
 * # "server_log": Server logging flag, default False
 * server_context = {}             # <<<<<<<<<<<<<<
 * 
 * def _server_log(origin, log_message):
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_context, __pyx_t_6) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1242
 * server_context = {}
 * 
 * def _server_log(origin, log_message):             # <<<<<<<<<<<<<<
 *     if server_context["server_log"]:
 *         print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'")
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_13_server_log, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_log, __pyx_t_6) < 0) __PYX_ERR(0, 1242, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1411
 *     return RFC_OK
 * 
 * class BasicServer(BaseHTTPRequestHandler):             # <<<<<<<<<<<<<<
 *     # TODO: management-console
 *     def _set_response(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_BaseHTTPRequestHandler); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_1, __pyx_n_s_BasicServer, __pyx_n_s_BasicServer, (PyObject *) NULL, __pyx_n_s_pyrfc_pyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "src/pyrfc/_pyrfc.pyx":1413
 * class BasicServer(BaseHTTPRequestHandler):
 *     # TODO: management-console
 *     def _set_response(self):             # <<<<<<<<<<<<<<
 *         self.send_response(200)
 *         self.send_header('Content-type', 'text/html')
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_11BasicServer_1_set_response, 0, __pyx_n_s_BasicServer__set_response, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_set_response, __pyx_t_8) < 0) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1418
 *         self.end_headers()
 * 
 *     def do_GET(self):             # <<<<<<<<<<<<<<
 *         #_server_log("HTTP GET", f"path: {self.path}\nheaders:\n{self.headers}\n")
 *         self._set_response()
 */
  __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_5pyrfc_11BasicServer_3do_GET, 0, __pyx_n_s_BasicServer_do_GET, NULL, __pyx_n_s_pyrfc_pyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_do_GET, __pyx_t_8) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1411
 *     return RFC_OK
 * 
 * class BasicServer(BaseHTTPRequestHandler):             # <<<<<<<<<<<<<<
 *     # TODO: management-console
 *     def _set_response(self):
 */
  __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_BasicServer, __pyx_t_1, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BasicServer, __pyx_t_8) < 0) __PYX_ERR(0, 1411, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1461
 *     cdef ServerConnection _server_connection
 * 
 *     def __init__(self, server_params, client_params, config={}):             # <<<<<<<<<<<<<<
 *         cdef uintptr_t handle
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__34 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1511
 *         _server_log("Server function installed", server_functions[func_name])
 * 
 *     def _serve_http(self, server_class=HTTPServer, handler_class=BasicServer):             # <<<<<<<<<<<<<<
 *         server_address = ('', server_context["port"])
 *         httpd = server_class(server_address, handler_class)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_HTTPServer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__38 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_BasicServer); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__39 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2407
 * 
 * cdef class Throughput:
 *     _registry = []             # <<<<<<<<<<<<<<
 * 
 *     cdef RFC_THROUGHPUT_HANDLE _throughput_handle
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Throughput->tp_dict, __pyx_n_s_registry, __pyx_t_1) < 0) __PYX_ERR(0, 2407, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_5pyrfc_Throughput);

  /* "src/pyrfc/_pyrfc.pyx":2412
 *     cdef _connections
 * 
 *     def __init__(self, connections = []):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_RC rc
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_k__53 = __pyx_t_1;
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "src/pyrfc/_pyrfc.pyx":2444
 * 
 *     @staticmethod
 *     def getFromConnection(Connection connection):             # <<<<<<<<<<<<<<
 *         cdef RFC_ERROR_INFO errorInfo
 *         cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_10Throughput_5getFromConnection, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Throughput->tp_dict, __pyx_n_s_getFromConnection, __pyx_t_1) < 0) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_5pyrfc_Throughput);

  /* "src/pyrfc/_pyrfc.pyx":2443
 *         self._connections.add(connection)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def getFromConnection(Connection connection):
 *         cdef RFC_ERROR_INFO errorInfo
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Throughput, __pyx_n_s_getFromConnection); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2443, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_5pyrfc_Throughput->tp_dict, __pyx_n_s_getFromConnection, __pyx_t_6) < 0) __PYX_ERR(0, 2444, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  PyType_Modified(__pyx_ptype_5pyrfc_5pyrfc_Throughput);

  /* "(tree fragment)":1
 * def __pyx_unpickle_Server(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_6 = PyCFunction_NewEx(&__pyx_mdef_5pyrfc_5pyrfc_15__pyx_unpickle_Server, NULL, __pyx_n_s_pyrfc_pyrfc); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Server, __pyx_t_6) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "src/pyrfc/_pyrfc.pyx":1
 * # SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>             # <<<<<<<<<<<<<<
 * #
 * # SPDX-License-Identifier: Apache-2.0
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_6) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "array.pxd":161
 *     return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
 * 
 * cdef inline void zero(array self):             # <<<<<<<<<<<<<<
 *     """ set all elements of array to zero. """
 *     memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init pyrfc.pyrfc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyrfc.pyrfc");
  }
  __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);
}

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

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

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

/* 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_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

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

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

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* 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;
    } else {
        return __Pyx_IterFinish();
    }
    return 0;
}

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

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

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

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

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

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

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

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

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* WriteUnraisableException */
static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

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

/* None */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

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

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

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

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

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

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

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

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

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

/* ExtTypeTest */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* HasAttr */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

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

/* TypeImport */
#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
    size_t size, enum __Pyx_ImportType_CheckSize check_size)
{
    PyObject *result = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    result = PyObject_GetAttrString(module, class_name);
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if ((size_t)basicsize < size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        goto bad;
    }
    else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. "
            "Expected %zd from C header, got %zd from PyObject",
            module_name, class_name, size, basicsize);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(result);
    return NULL;
}
#endif

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

/* 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);
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
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 CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
    0,
#endif
};
static int __pyx_CyFunction_init(void) {
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* 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_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (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);
    }
}

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

/* 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 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
            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
            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_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_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_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
            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_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_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 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
            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 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
            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
            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
            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;
}

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

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

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