diff --git a/.gitignore b/.gitignore index bb0ec6c..ed4101f 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ output.json .coverage coverage*.* +# cpp source removed from git +src/pyrfc/_cyrfc.cpp diff --git a/src/pyrfc/_cyrfc.cpp b/src/pyrfc/_cyrfc.cpp deleted file mode 100644 index 56c3728..0000000 --- a/src/pyrfc/_cyrfc.cpp +++ /dev/null @@ -1,61487 +0,0 @@ -/* Generated by Cython 3.0.0 */ - -/* BEGIN: Cython Metadata -{ - "distutils": { - "define_macros": [ - [ - "NDEBUG", - null - ], - [ - "_LARGEFILE_SOURCE", - null - ], - [ - "_CONSOLE", - null - ], - [ - "_FILE_OFFSET_BITS", - 64 - ], - [ - "SAPonUNIX", - null - ], - [ - "SAPwithUNICODE", - null - ], - [ - "SAPwithTHREADS", - null - ], - [ - "SAPonLIN", - null - ] - ], - "depends": [], - "extra_compile_args": [ - "-Wall", - "-O2", - "-fexceptions", - "-funsigned-char", - "-fno-strict-aliasing", - "-Wall", - "-Wno-uninitialized", - "-Wno-deprecated-declarations", - "-Wno-unused-function", - "-Wcast-align", - "-fPIC", - "-pthread", - "-minline-all-stringops", - "-I/usr/local/sap/nwrfcsdk/include" - ], - "extra_link_args": [ - "-L/usr/local/sap/nwrfcsdk/lib" - ], - "language": "c++", - "libraries": [ - "sapnwrfc", - "sapucum" - ], - "name": "pyrfc._cyrfc", - "sources": [ - "src/pyrfc/_cyrfc.pyx" - ] - }, - "module_name": "pyrfc._cyrfc" -} -END: Cython Metadata */ - -#ifndef PY_SSIZE_T_CLEAN -#define PY_SSIZE_T_CLEAN -#endif /* PY_SSIZE_T_CLEAN */ -#if defined(CYTHON_LIMITED_API) && 0 - #ifndef Py_LIMITED_API - #if CYTHON_LIMITED_API+0 > 0x03030000 - #define Py_LIMITED_API CYTHON_LIMITED_API - #else - #define Py_LIMITED_API 0x03030000 - #endif - #endif -#endif - -#include "Python.h" -#ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. -#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.7+ or Python 3.3+. -#else -#define CYTHON_ABI "3_0_0" -#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI -#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030000F0 -#define CYTHON_FUTURE_DIVISION 1 -#include -#ifndef offsetof - #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) -#endif -#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) - #ifndef __stdcall - #define __stdcall - #endif - #ifndef __cdecl - #define __cdecl - #endif - #ifndef __fastcall - #define __fastcall - #endif -#endif -#ifndef DL_IMPORT - #define DL_IMPORT(t) t -#endif -#ifndef DL_EXPORT - #define DL_EXPORT(t) t -#endif -#define __PYX_COMMA , -#ifndef HAVE_LONG_LONG - #define HAVE_LONG_LONG -#endif -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG -#endif -#ifndef Py_HUGE_VAL - #define Py_HUGE_VAL HUGE_VAL -#endif -#if defined(GRAALVM_PYTHON) - /* For very preliminary testing purposes. Most variables are set the same as PyPy. - The existence of this section does not imply that anything works or is even tested */ - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_CPYTHON 0 - #define CYTHON_COMPILING_IN_LIMITED_API 0 - #define CYTHON_COMPILING_IN_GRAAL 1 - #define CYTHON_COMPILING_IN_NOGIL 0 - #undef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 0 - #undef CYTHON_USE_TYPE_SPECS - #define CYTHON_USE_TYPE_SPECS 0 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #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_GIL - #define CYTHON_FAST_GIL 0 - #undef CYTHON_METH_FASTCALL - #define CYTHON_METH_FASTCALL 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #ifndef CYTHON_PEP487_INIT_SUBCLASS - #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) - #endif - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 1 - #undef CYTHON_USE_MODULE_STATE - #define CYTHON_USE_MODULE_STATE 0 - #undef CYTHON_USE_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(PYPY_VERSION) - #define CYTHON_COMPILING_IN_PYPY 1 - #define CYTHON_COMPILING_IN_CPYTHON 0 - #define CYTHON_COMPILING_IN_LIMITED_API 0 - #define CYTHON_COMPILING_IN_GRAAL 0 - #define CYTHON_COMPILING_IN_NOGIL 0 - #undef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 0 - #undef CYTHON_USE_TYPE_SPECS - #define CYTHON_USE_TYPE_SPECS 0 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #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_GIL - #define CYTHON_FAST_GIL 0 - #undef CYTHON_METH_FASTCALL - #define CYTHON_METH_FASTCALL 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #ifndef CYTHON_PEP487_INIT_SUBCLASS - #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3) - #endif - #if PY_VERSION_HEX < 0x03090000 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) - #define CYTHON_PEP489_MULTI_PHASE_INIT 1 - #endif - #undef CYTHON_USE_MODULE_STATE - #define CYTHON_USE_MODULE_STATE 0 - #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00) - #undef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS 0 - #undef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK 0 - #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC - #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 - #endif -#elif defined(CYTHON_LIMITED_API) - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_CPYTHON 0 - #define CYTHON_COMPILING_IN_LIMITED_API 1 - #define CYTHON_COMPILING_IN_GRAAL 0 - #define CYTHON_COMPILING_IN_NOGIL 0 - #undef CYTHON_CLINE_IN_TRACEBACK - #define CYTHON_CLINE_IN_TRACEBACK 0 - #undef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 0 - #undef CYTHON_USE_TYPE_SPECS - #define CYTHON_USE_TYPE_SPECS 1 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #undef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 0 - #undef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 0 - #ifndef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #endif - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #ifndef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 0 - #endif - #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_GIL - #define CYTHON_FAST_GIL 0 - #undef CYTHON_METH_FASTCALL - #define CYTHON_METH_FASTCALL 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #ifndef CYTHON_PEP487_INIT_SUBCLASS - #define CYTHON_PEP487_INIT_SUBCLASS 1 - #endif - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #undef CYTHON_USE_MODULE_STATE - #define CYTHON_USE_MODULE_STATE 1 - #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 - #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_CPYTHON 0 - #define CYTHON_COMPILING_IN_LIMITED_API 0 - #define CYTHON_COMPILING_IN_GRAAL 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_CPYTHON 1 - #define CYTHON_COMPILING_IN_LIMITED_API 0 - #define CYTHON_COMPILING_IN_GRAAL 0 - #define CYTHON_COMPILING_IN_NOGIL 0 - #ifndef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 1 - #endif - #ifndef CYTHON_USE_TYPE_SPECS - #define CYTHON_USE_TYPE_SPECS 0 - #endif - #ifndef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 1 - #endif - #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 - #ifndef 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 - #ifndef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_GIL - #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6) - #endif - #ifndef CYTHON_METH_FASTCALL - #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1) - #endif - #ifndef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 1 - #endif - #ifndef CYTHON_PEP487_INIT_SUBCLASS - #define CYTHON_PEP487_INIT_SUBCLASS 1 - #endif - #if PY_VERSION_HEX < 0x03050000 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) - #define CYTHON_PEP489_MULTI_PHASE_INIT 1 - #endif - #ifndef CYTHON_USE_MODULE_STATE - #define CYTHON_USE_MODULE_STATE 0 - #endif - #if PY_VERSION_HEX < 0x030400a1 - #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 - #elif !defined(CYTHON_USE_TP_FINALIZE) - #define CYTHON_USE_TP_FINALIZE 1 - #endif - #if PY_VERSION_HEX < 0x030600B1 - #undef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS 0 - #elif !defined(CYTHON_USE_DICT_VERSIONS) - #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5) - #endif - #if PY_VERSION_HEX < 0x030700A3 - #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 1 - #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 !defined(CYTHON_VECTORCALL) -#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) -#endif -#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) -#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(__cplusplus) - /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 - * but leads to warnings with -pedantic, since it is a C++17 feature */ - #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) - #if __has_cpp_attribute(maybe_unused) - #define CYTHON_UNUSED [[maybe_unused]] - #endif - #endif - #endif -#endif -#ifndef CYTHON_UNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -#endif -#ifndef CYTHON_UNUSED_VAR -# if defined(__cplusplus) - template void CYTHON_UNUSED_VAR( const T& ) { } -# else -# define CYTHON_UNUSED_VAR(x) (void)(x) -# endif -#endif -#ifndef CYTHON_MAYBE_UNUSED_VAR - #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) -#endif -#ifndef CYTHON_NCP_UNUSED -# if CYTHON_COMPILING_IN_CPYTHON -# 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 short uint16_t; - typedef unsigned int uint32_t; - #else - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - #endif - #endif - #if _MSC_VER < 1300 - #ifdef _WIN64 - typedef unsigned long long __pyx_uintptr_t; - #else - typedef unsigned int __pyx_uintptr_t; - #endif - #else - #ifdef _WIN64 - typedef unsigned __int64 __pyx_uintptr_t; - #else - typedef unsigned __int32 __pyx_uintptr_t; - #endif - #endif -#else - #include - typedef uintptr_t __pyx_uintptr_t; -#endif -#ifndef CYTHON_FALLTHROUGH - #if defined(__cplusplus) - /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 - * but leads to warnings with -pedantic, since it is a C++17 feature */ - #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) - #if __has_cpp_attribute(fallthrough) - #define CYTHON_FALLTHROUGH [[fallthrough]] - #endif - #endif - #ifndef CYTHON_FALLTHROUGH - #if __has_cpp_attribute(clang::fallthrough) - #define CYTHON_FALLTHROUGH [[clang::fallthrough]] - #elif __has_cpp_attribute(gnu::fallthrough) - #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] - #endif - #endif - #endif - #ifndef CYTHON_FALLTHROUGH - #if __has_attribute(fallthrough) - #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) - #else - #define CYTHON_FALLTHROUGH - #endif - #endif - #if defined(__clang__) && defined(__apple_build_version__) - #if __apple_build_version__ < 7000000 - #undef CYTHON_FALLTHROUGH - #define CYTHON_FALLTHROUGH - #endif - #endif -#endif -#ifdef __cplusplus - template - struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; - #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) -#else - #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) -#endif -#if CYTHON_COMPILING_IN_PYPY == 1 - #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) -#else - #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) -#endif -#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) - -#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 -void __Pyx_call_destructor(T& x) { - x.~T(); -} -template -class __Pyx_FakeReference { - public: - __Pyx_FakeReference() : ptr(NULL) { } - __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } - T *operator->() { return ptr; } - T *operator&() { return ptr; } - operator T&() { return *ptr; } - template bool operator ==(const U& other) const { return *ptr == other; } - template bool operator !=(const U& other) const { return *ptr != other; } - template bool operator==(const __Pyx_FakeReference& other) const { return *ptr == *other.ptr; } - template bool operator!=(const __Pyx_FakeReference& other) const { return *ptr != *other.ptr; } - private: - T *ptr; -}; - -#define __PYX_BUILD_PY_SSIZE_T "n" -#define CYTHON_FORMAT_SSIZE_T "z" -#if PY_MAJOR_VERSION < 3 - #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" - #define __Pyx_DefaultClassType PyClass_Type - #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#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 p, int k, int l, int s, int f, - PyObject *code, PyObject *c, PyObject* n, PyObject *v, - PyObject *fv, PyObject *cell, PyObject* fn, - PyObject *name, int fline, PyObject *lnos) { - PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; - PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *empty=NULL; - const char *fn_cstr=NULL; - const char *name_cstr=NULL; - PyCodeObject *co=NULL, *result=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(p))) 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 end; - if (!(empty = PyTuple_New(0))) goto end; - result = (PyCodeObject*) PyObject_Call(replace, empty, kwds); - end: - Py_XDECREF((PyObject*) co); - Py_XDECREF(kwds); - Py_XDECREF(argcount); - Py_XDECREF(posonlyargcount); - Py_XDECREF(kwonlyargcount); - Py_XDECREF(nlocals); - Py_XDECREF(stacksize); - Py_XDECREF(replace); - Py_XDECREF(empty); - if (type) { - PyErr_Restore(type, value, traceback); - } - return result; - } -#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#else - #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#endif -#endif -#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) - #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) -#else - #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) -#endif -#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) - #define __Pyx_Py_Is(x, y) Py_Is(x, y) -#else - #define __Pyx_Py_Is(x, y) ((x) == (y)) -#endif -#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) - #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) -#else - #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) -#endif -#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) - #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) -#else - #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) -#endif -#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) - #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) -#else - #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) -#endif -#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) -#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) -#else - #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) -#endif -#ifndef CO_COROUTINE - #define CO_COROUTINE 0x80 -#endif -#ifndef CO_ASYNC_GENERATOR - #define CO_ASYNC_GENERATOR 0x200 -#endif -#ifndef Py_TPFLAGS_CHECKTYPES - #define Py_TPFLAGS_CHECKTYPES 0 -#endif -#ifndef Py_TPFLAGS_HAVE_INDEX - #define Py_TPFLAGS_HAVE_INDEX 0 -#endif -#ifndef Py_TPFLAGS_HAVE_NEWBUFFER - #define Py_TPFLAGS_HAVE_NEWBUFFER 0 -#endif -#ifndef Py_TPFLAGS_HAVE_FINALIZE - #define Py_TPFLAGS_HAVE_FINALIZE 0 -#endif -#ifndef Py_TPFLAGS_SEQUENCE - #define Py_TPFLAGS_SEQUENCE 0 -#endif -#ifndef Py_TPFLAGS_MAPPING - #define Py_TPFLAGS_MAPPING 0 -#endif -#ifndef 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_METH_FASTCALL - #define __Pyx_METH_FASTCALL METH_FASTCALL - #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast - #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords -#else - #define __Pyx_METH_FASTCALL METH_VARARGS - #define __Pyx_PyCFunction_FastCall PyCFunction - #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords -#endif -#if CYTHON_VECTORCALL - #define __pyx_vectorcallfunc vectorcallfunc - #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET - #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) -#elif CYTHON_BACKPORT_VECTORCALL - typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, - size_t nargsf, PyObject *kwnames); - #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) - #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) -#else - #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 - #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) -#endif -#if PY_VERSION_HEX < 0x030900B1 - #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) - typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); -#else - #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) - #define __Pyx_PyCMethod PyCMethod -#endif -#ifndef METH_METHOD - #define METH_METHOD 0x200 -#endif -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) - #define PyObject_Malloc(s) PyMem_Malloc(s) - #define PyObject_Free(p) PyMem_Free(p) - #define PyObject_Realloc(p) PyMem_Realloc(p) -#endif -#if CYTHON_COMPILING_IN_LIMITED_API - #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) - #define __Pyx_PyFrame_SetLineNumber(frame, lineno) -#else - #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) - #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) -#endif -#if CYTHON_COMPILING_IN_LIMITED_API - #define __Pyx_PyThreadState_Current PyThreadState_Get() -#elif !CYTHON_FAST_THREAD_STATE - #define __Pyx_PyThreadState_Current PyThreadState_GET() -#elif PY_VERSION_HEX >= 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 CYTHON_COMPILING_IN_LIMITED_API -static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op) -{ - void *result; - result = PyModule_GetState(op); - if (!result) - Py_FatalError("Couldn't find the module state"); - return result; -} -#endif -#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype) -#if CYTHON_COMPILING_IN_LIMITED_API - #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) -#else - #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) -#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 PY_MAJOR_VERSION < 3 - #if CYTHON_COMPILING_IN_PYPY - #if PYPY_VERSION_NUM < 0x07030600 - #if defined(__cplusplus) && __cplusplus >= 201402L - [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]] - #elif defined(__GNUC__) || defined(__clang__) - __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))) - #elif defined(_MSC_VER) - __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")) - #endif - static CYTHON_INLINE int PyGILState_Check(void) { - return 0; - } - #else // PYPY_VERSION_NUM < 0x07030600 - #endif // PYPY_VERSION_NUM < 0x07030600 - #else - static CYTHON_INLINE int PyGILState_Check(void) { - PyThreadState * tstate = _PyThreadState_Current; - return tstate && (tstate == PyGILState_GetThisThreadState()); - } - #endif -#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 > 0x030600B4 && CYTHON_USE_UNICODE_INTERNALS -#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) -static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { - PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); - if (res == NULL) PyErr_Clear(); - return res; -} -#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) -#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError -#define __Pyx_PyDict_GetItemStr PyDict_GetItem -#else -static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { -#if CYTHON_COMPILING_IN_PYPY - return PyDict_GetItem(dict, name); -#else - PyDictEntry *ep; - PyDictObject *mp = (PyDictObject*) dict; - long hash = ((PyStringObject *) name)->ob_shash; - assert(hash != -1); - ep = (mp->ma_lookup)(mp, name, hash); - if (ep == NULL) { - return NULL; - } - return ep->me_value; -#endif -} -#define __Pyx_PyDict_GetItemStr PyDict_GetItem -#endif -#if CYTHON_USE_TYPE_SLOTS - #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) - #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) - #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext) -#else - #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) - #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) - #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next -#endif -#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 -#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ - PyTypeObject *type = Py_TYPE(obj);\ - assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ - PyObject_GC_Del(obj);\ - Py_DECREF(type);\ -} -#else -#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) -#endif -#if CYTHON_COMPILING_IN_LIMITED_API - #define CYTHON_PEP393_ENABLED 1 - #define __Pyx_PyUnicode_READY(op) (0) - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) - #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) - #define __Pyx_PyUnicode_DATA(u) ((void*)u) - #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) -#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 - #if PY_VERSION_HEX >= 0x030C0000 - #define __Pyx_PyUnicode_READY(op) (0) - #else - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) - #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) - #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) - #if PY_VERSION_HEX >= 0x030C0000 - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #else - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) - #endif - #endif -#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) ? 65535U : 1114111U) - #define __Pyx_PyUnicode_KIND(u) ((int)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] = (Py_UNICODE) 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 - #if !defined(PyUnicode_DecodeUnicodeEscape) - #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) - #endif - #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500) - #undef PyUnicode_Contains - #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) - #endif - #if !defined(PyByteArray_Check) - #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) - #endif - #if !defined(PyObject_Format) - #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) - #endif -#endif -#define __Pyx_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 -#if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_PySequence_ListKeepNew(obj)\ - (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) -#else - #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) -#endif -#ifndef PySet_CheckExact - #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) -#endif -#if PY_VERSION_HEX >= 0x030900A4 - #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -#else - #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -#endif -#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 __Pyx_Py3Int_Check(op) PyLong_Check(op) - #define __Pyx_Py3Int_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 -#else - #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op)) - #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op)) -#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 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 -#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; } - -#ifdef CYTHON_EXTERN_C - #undef __PYX_EXTERN_C - #define __PYX_EXTERN_C CYTHON_EXTERN_C -#elif defined(__PYX_EXTERN_C) - #ifdef _MSC_VER - #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") - #else - #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. - #endif -#else - #define __PYX_EXTERN_C extern "C++" -#endif - -#define __PYX_HAVE__pyrfc___cyrfc -#define __PYX_HAVE_API__pyrfc___cyrfc -/* Early includes */ -#include -#include -#include -#include "sapnwrfc.h" -#ifdef _OPENMP -#include -#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 - #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_uintptr_t) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) -#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) -#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) -#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) -#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) -#if CYTHON_COMPILING_IN_LIMITED_API -static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const wchar_t *u) -{ - const wchar_t *u_end = u; - while (*u_end++) ; - return (size_t)(u_end - u - 1); -} -#else -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); -} -#endif -#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) -#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 -#if CYTHON_USE_PYLONG_INTERNALS - #if PY_VERSION_HEX >= 0x030C00A7 - #ifndef _PyLong_SIGN_MASK - #define _PyLong_SIGN_MASK 3 - #endif - #ifndef _PyLong_NON_SIZE_BITS - #define _PyLong_NON_SIZE_BITS 3 - #endif - #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) - #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) - #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) - #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) - #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) - #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) - #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) - #define __Pyx_PyLong_SignedDigitCount(x)\ - ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) - #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) - #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) - #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) - #else - #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) - #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) - #endif - typedef Py_ssize_t __Pyx_compact_pylong; - typedef size_t __Pyx_compact_upylong; - #else // Py < 3.12 - #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) - #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) - #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) - #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) - #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) - #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) - #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) - #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) - #define __Pyx_PyLong_CompactValue(x)\ - ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) - typedef sdigit __Pyx_compact_pylong; - typedef digit __Pyx_compact_upylong; - #endif - #if PY_VERSION_HEX >= 0x030C00A5 - #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) - #else - #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) - #endif -#endif -#if 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] = (char) 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; } - -#if !CYTHON_USE_MODULE_STATE -static PyObject *__pyx_m = NULL; -#endif -static int __pyx_lineno; -static int __pyx_clineno = 0; -static const char * __pyx_cfilenm = __FILE__; -static const char *__pyx_filename; - -/* #### Code section: filename_table ### */ - -static const char *__pyx_f[] = { - "src/pyrfc/_cyrfc.pyx", - "", -}; -/* #### Code section: utility_code_proto_before_types ### */ -/* NoFastGil.proto */ -#define __Pyx_PyGILState_Ensure PyGILState_Ensure -#define __Pyx_PyGILState_Release PyGILState_Release -#define __Pyx_FastGIL_Remember() -#define __Pyx_FastGIL_Forget() -#define __Pyx_FastGilFuncInit() - -/* ForceInitThreads.proto */ -#ifndef __PYX_FORCE_INIT_THREADS - #define __PYX_FORCE_INIT_THREADS 0 -#endif - -/* #### Code section: numeric_typedefs ### */ -/* #### Code section: complex_type_declarations ### */ -/* #### Code section: type_declarations ### */ - -/*--- Type declarations ---*/ -struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters; -struct __pyx_obj_5pyrfc_6_cyrfc_Connection; -struct __pyx_obj_5pyrfc_6_cyrfc_Server; -struct __pyx_obj_5pyrfc_6_cyrfc_Throughput; -struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection; -struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers; -struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString; - -/* "pyrfc/_cyrfc.pyx":1897 - * return self.install_bgrfc_handlers(sysId) - * - * cdef install_bgrfc_handlers(self, sysId=None): # <<<<<<<<<<<<<< - * ucSysId = fillString(sysId) if sysId is not None else NULL - * cdef RFC_ERROR_INFO errorInfo - */ -struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers { - int __pyx_n; - PyObject *sysId; -}; - -/* "pyrfc/_cyrfc.pyx":3088 - * ) - * - * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ -struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString { - int __pyx_n; - PyObject *uclen; - PyObject *rstrip; -}; - -/* "pyrfc/_cyrfc.pyx":276 - * - * - * cdef class ConnectionParameters: # <<<<<<<<<<<<<< - * """Connection parameters instance in SAP unicode format - * - */ -struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters { - PyObject_HEAD - unsigned int _params_count; - RFC_CONNECTION_PARAMETER *_params; -}; - - -/* "pyrfc/_cyrfc.pyx":503 - * - * - * cdef class Connection: # <<<<<<<<<<<<<< - * """ A connection to an SAP backend system - * - */ -struct __pyx_obj_5pyrfc_6_cyrfc_Connection { - PyObject_HEAD - struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *__pyx_vtab; - unsigned int _Connection__bconfig; - PyObject *_Connection__config; - int active_transaction; - int active_unit; - RFC_CONNECTION_HANDLE _handle; - RFC_TRANSACTION_HANDLE _tHandle; - RFC_UNIT_HANDLE _uHandle; - struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *_connection; -}; - - -/* "pyrfc/_cyrfc.pyx":1669 - * - * - * cdef class Server: # <<<<<<<<<<<<<< - * """ An ABAP server - * - */ -struct __pyx_obj_5pyrfc_6_cyrfc_Server { - PyObject_HEAD - struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server *__pyx_vtab; - int debug; - int rstrip; - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *_client_connection; - struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *_server_handle_params; - RFC_SERVER_HANDLE _server_handle; - PyObject *_server_thread; -}; - - -/* "pyrfc/_cyrfc.pyx":2187 - * ################################################################################ - * - * cdef class Throughput: # <<<<<<<<<<<<<< - * _registry = [] - * - */ -struct __pyx_obj_5pyrfc_6_cyrfc_Throughput { - PyObject_HEAD - struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput *__pyx_vtab; - RFC_THROUGHPUT_HANDLE _throughput_handle; - PyObject *_connections; -}; - - -/* "cfunc.to_py":66 - * - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): # <<<<<<<<<<<<<< - * def wrap(object client_connection): - * """wrap(client_connection)""" - */ -struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection { - PyObject_HEAD - PyObject *(*__pyx_v_f)(PyObject *); -}; - - - -/* "pyrfc/_cyrfc.pyx":503 - * - * - * cdef class Connection: # <<<<<<<<<<<<<< - * """ A connection to an SAP backend system - * - */ - -struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection { - PyObject *(*_reopen)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *); - PyObject *(*_open)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *); - PyObject *(*_error)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *, RFC_ERROR_INFO *); -}; -static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *__pyx_vtabptr_5pyrfc_6_cyrfc_Connection; - - -/* "pyrfc/_cyrfc.pyx":1669 - * - * - * cdef class Server: # <<<<<<<<<<<<<< - * """ An ABAP server - * - */ - -struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server { - RFC_RC (*_Server__onCheckFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *); - RFC_RC (*_Server__onCommitFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *); - RFC_RC (*_Server__onRollbackFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *); - RFC_RC (*_Server__onConfirmFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *); - RFC_RC (*_Server__onGetStateFunction)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *, RFC_UNIT_STATE *); - PyObject *(*install_bgrfc_handlers)(struct __pyx_obj_5pyrfc_6_cyrfc_Server *, struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers *__pyx_optional_args); - PyObject *(*_error)(struct __pyx_obj_5pyrfc_6_cyrfc_Server *, RFC_ERROR_INFO *); -}; -static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server *__pyx_vtabptr_5pyrfc_6_cyrfc_Server; - - -/* "pyrfc/_cyrfc.pyx":2187 - * ################################################################################ - * - * cdef class Throughput: # <<<<<<<<<<<<<< - * _registry = [] - * - */ - -struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput { - PyObject *(*_destroy)(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *); -}; -static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput *__pyx_vtabptr_5pyrfc_6_cyrfc_Throughput; -/* #### Code section: utility_code_proto ### */ - -/* --- Runtime support code (head) --- */ -/* Refnanny.proto */ -#ifndef CYTHON_REFNANNY - #define CYTHON_REFNANNY 0 -#endif -#if CYTHON_REFNANNY - typedef struct { - void (*INCREF)(void*, PyObject*, Py_ssize_t); - void (*DECREF)(void*, PyObject*, Py_ssize_t); - void (*GOTREF)(void*, PyObject*, Py_ssize_t); - void (*GIVEREF)(void*, PyObject*, Py_ssize_t); - void* (*SetupContext)(const char*, Py_ssize_t, const char*); - void (*FinishContext)(void**); - } __Pyx_RefNannyAPIStruct; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); - #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; -#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__));\ - } - #define __Pyx_RefNannyFinishContextNogil() {\ - PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ - __Pyx_RefNannyFinishContext();\ - PyGILState_Release(__pyx_gilstate_save);\ - } -#else - #define __Pyx_RefNannySetupContext(name, acquire_gil)\ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__)) - #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext() -#endif - #define __Pyx_RefNannyFinishContextNogil() {\ - PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ - __Pyx_RefNannyFinishContext();\ - PyGILState_Release(__pyx_gilstate_save);\ - } - #define __Pyx_RefNannyFinishContext()\ - __Pyx_RefNanny->FinishContext(&__pyx_refnanny) - #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) - #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) - #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) - #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) - #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) - #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) - #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) - #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) -#else - #define __Pyx_RefNannyDeclarations - #define __Pyx_RefNannySetupContext(name, acquire_gil) - #define __Pyx_RefNannyFinishContextNogil() - #define __Pyx_RefNannyFinishContext() - #define __Pyx_INCREF(r) Py_INCREF(r) - #define __Pyx_DECREF(r) Py_DECREF(r) - #define __Pyx_GOTREF(r) - #define __Pyx_GIVEREF(r) - #define __Pyx_XINCREF(r) Py_XINCREF(r) - #define __Pyx_XDECREF(r) Py_XDECREF(r) - #define __Pyx_XGOTREF(r) - #define __Pyx_XGIVEREF(r) -#endif -#define __Pyx_Py_XDECREF_SET(r, v) do {\ - PyObject *tmp = (PyObject *) r;\ - r = v; Py_XDECREF(tmp);\ - } while (0) -#define __Pyx_XDECREF_SET(r, v) do {\ - PyObject *tmp = (PyObject *) r;\ - r = v; __Pyx_XDECREF(tmp);\ - } while (0) -#define __Pyx_DECREF_SET(r, v) do {\ - PyObject *tmp = (PyObject *) r;\ - r = v; __Pyx_DECREF(tmp);\ - } while (0) -#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) -#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) - -/* 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 - -/* PyThreadStateGet.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; -#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; -#if PY_VERSION_HEX >= 0x030C00A6 -#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) -#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) -#else -#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) -#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) -#endif -#else -#define __Pyx_PyThreadState_declare -#define __Pyx_PyThreadState_assign -#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) -#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() -#endif - -/* PyErrFetchRestore.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) -#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 -#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) -#else -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#endif -#else -#define __Pyx_PyErr_Clear() PyErr_Clear() -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) -#endif - -/* 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 - -/* PyObjectGetAttrStrNoError.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); - -/* GetBuiltinName.proto */ -static PyObject *__Pyx_GetBuiltinName(PyObject *name); - -/* TupleAndListFromArray.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); -static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); -#endif - -/* IncludeStringH.proto */ -#include - -/* 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); - -/* fastcall.proto */ -#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) -#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) -#define __Pyx_KwValues_VARARGS(args, nargs) NULL -#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) -#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) -#if CYTHON_METH_FASTCALL - #define __Pyx_Arg_FASTCALL(args, i) args[i] - #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds) - #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) - static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); - #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) -#else - #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS - #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS - #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS - #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS - #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS -#endif -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) -#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) -#else -#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) -#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) -#endif - -/* RaiseDoubleKeywords.proto */ -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); - -/* ParseKeywords.proto */ -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, - PyObject **argnames[], - PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, - const char* function_name); - -/* RaiseArgTupleInvalid.proto */ -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); - -/* IncludeStructmemberH.proto */ -#include - -/* FixUpExtensionType.proto */ -#if CYTHON_USE_TYPE_SPECS -static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); -#endif - -/* FetchSharedCythonModule.proto */ -static PyObject *__Pyx_FetchSharedCythonABIModule(void); - -/* FetchCommonType.proto */ -#if !CYTHON_USE_TYPE_SPECS -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); -#else -static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); -#endif - -/* PyMethodNew.proto */ -#if PY_MAJOR_VERSION >= 3 -static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { - CYTHON_UNUSED_VAR(typ); - if (!self) - return __Pyx_NewRef(func); - return PyMethod_New(func, self); -} -#else - #define __Pyx_PyMethod_New PyMethod_New -#endif - -/* PyVectorcallFastCallDict.proto */ -#if CYTHON_METH_FASTCALL -static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); -#endif - -/* CythonFunctionShared.proto */ -#define __Pyx_CyFunction_USED -#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 -#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 -#define __Pyx_CYFUNCTION_CCLASS 0x04 -#define __Pyx_CYFUNCTION_COROUTINE 0x08 -#define __Pyx_CyFunction_GetClosure(f)\ - (((__pyx_CyFunctionObject *) (f))->func_closure) -#if PY_VERSION_HEX < 0x030900B1 - #define __Pyx_CyFunction_GetClassObj(f)\ - (((__pyx_CyFunctionObject *) (f))->func_classobj) -#else - #define __Pyx_CyFunction_GetClassObj(f)\ - ((PyObject*) ((PyCMethodObject *) (f))->mm_class) -#endif -#define __Pyx_CyFunction_SetClassObj(f, classobj)\ - __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) -#define __Pyx_CyFunction_Defaults(type, f)\ - ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) -#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ - ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) -typedef struct { -#if PY_VERSION_HEX < 0x030900B1 - PyCFunctionObject func; -#else - PyCMethodObject func; -#endif -#if CYTHON_BACKPORT_VECTORCALL - __pyx_vectorcallfunc func_vectorcall; -#endif -#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; -#if PY_VERSION_HEX < 0x030900B1 - PyObject *func_classobj; -#endif - 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; - PyObject *func_is_coroutine; -} __pyx_CyFunctionObject; -#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType) -#define __Pyx_IsCyOrPyCFunction(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type) -#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType) -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *closure, - PyObject *module, PyObject *globals, - PyObject* code); -static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); -static CYTHON_INLINE 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(PyObject *module); -#if CYTHON_METH_FASTCALL -static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); -static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); -static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); -static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); -#if CYTHON_BACKPORT_VECTORCALL -#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) -#else -#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) -#endif -#endif - -/* CythonFunction.proto */ -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *closure, - PyObject *module, PyObject *globals, - PyObject* code); - -/* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) -#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ - (version_var) = __PYX_GET_DICT_VERSION(dict);\ - (cache_var) = (value); -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ - static PY_UINT64_T __pyx_dict_version = 0;\ - static PyObject *__pyx_dict_cached_value = NULL;\ - if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ - (VAR) = __pyx_dict_cached_value;\ - } else {\ - (VAR) = __pyx_dict_cached_value = (LOOKUP);\ - __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ - }\ -} -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); -static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); -static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); -#else -#define __PYX_GET_DICT_VERSION(dict) (0) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); -#endif - -/* GetModuleGlobalName.proto */ -#if CYTHON_USE_DICT_VERSIONS -#define __Pyx_GetModuleGlobalName(var, name) do {\ - static PY_UINT64_T __pyx_dict_version = 0;\ - static PyObject *__pyx_dict_cached_value = NULL;\ - (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ - (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ - __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ -} while(0) -#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ - PY_UINT64_T __pyx_dict_version;\ - PyObject *__pyx_dict_cached_value;\ - (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ -} while(0) -static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); -#else -#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) -#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) -static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); -#endif - -/* PyObjectCall.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - -/* RaiseException.proto */ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - -/* PyFunctionFastCall.proto */ -#if CYTHON_FAST_PYCALL -#if !CYTHON_VECTORCALL -#define __Pyx_PyFunction_FastCall(func, args, nargs)\ - __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *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_VECTORCALL -#if PY_VERSION_HEX >= 0x03080000 - #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() - #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) -#else - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #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 -#endif -#endif - -/* PyObjectCallMethO.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); -#endif - -/* PyObjectFastCall.proto */ -#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) -static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); - -/* DictGetItem.proto */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); -#define __Pyx_PyObject_Dict_GetItem(obj, name)\ - (likely(PyDict_CheckExact(obj)) ?\ - __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) -#else -#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) -#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) -#endif - -/* KeywordStringCheck.proto */ -static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed); - -/* IterFinish.proto */ -static CYTHON_INLINE int __Pyx_IterFinish(void); - -/* PyObjectCallNoArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); - -/* PyObjectCallOneArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); - -/* 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); - -/* WriteUnraisableException.proto */ -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback, int nogil); - -/* PyObjectSetAttrStr.proto */ -#if CYTHON_USE_TYPE_SLOTS -#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value); -#else -#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) -#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) -#endif - -/* PyObjectFormatSimple.proto */ -#if CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyObject_FormatSimple(s, f) (\ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ - PyObject_Format(s, f)) -#elif PY_MAJOR_VERSION < 3 - #define __Pyx_PyObject_FormatSimple(s, f) (\ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ - likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\ - PyObject_Format(s, f)) -#elif CYTHON_USE_TYPE_SLOTS - #define __Pyx_PyObject_FormatSimple(s, f) (\ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ - likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ - likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ - PyObject_Format(s, f)) -#else - #define __Pyx_PyObject_FormatSimple(s, f) (\ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ - PyObject_Format(s, f)) -#endif - -/* JoinPyUnicode.proto */ -static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, - Py_UCS4 max_char); - -/* PySequenceContains.proto */ -static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { - int result = PySequence_Contains(seq, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/* ListAppend.proto */ -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { - PyListObject* L = (PyListObject*) list; - Py_ssize_t len = Py_SIZE(list); - if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { - Py_INCREF(x); - PyList_SET_ITEM(list, len, x); - __Pyx_SET_SIZE(list, len + 1); - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) -#endif - -/* PyObjectCall2Args.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); - -/* PyObjectCallMethod1.proto */ -static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); - -/* append.proto */ -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); - -/* GCCDiagnostics.proto */ -#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -#define __Pyx_HAS_GCC_DIAGNOSTIC -#endif - -/* BuildPyUnicode.proto */ -static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, - int prepend_sign, char padding_char); - -/* CIntToPyUnicode.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); - -/* UnicodeConcatInPlace.proto */ -# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_REFNANNY - #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny) - #else - #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right) - #endif - static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right - #if CYTHON_REFNANNY - , void* __pyx_refnanny - #endif - ); -#else -#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat -#endif -#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\ - PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right)) - -/* 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 && CYTHON_FAST_THREAD_STATE -static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -#endif - -/* SaveResetException.proto */ -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -#else -#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) -#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) -#endif - -/* FastTypeChecks.proto */ -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) -static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); -static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); -static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); -static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); -#else -#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) -#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) -#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) -#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) -#endif -#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) -#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) - -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); -#else -#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\ - (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) -#endif - -/* SliceObject.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( - PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, - PyObject** py_start, PyObject** py_stop, PyObject** py_slice, - int has_cstart, int has_cstop, int wraparound); - -/* CIntToPyUnicode.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_UNIT_STATE(RFC_UNIT_STATE value, Py_ssize_t width, char padding_char, char format_char); - -/* CIntToPyUnicode.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); - -/* GetItemInt.proto */ -#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ - __Pyx_GetItemInt_Generic(o, to_py_func(i)))) -#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ - (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ - __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ - (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck); - -/* RaiseUnexpectedTypeError.proto */ -static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); - -/* 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 - -/* CIntToPyUnicode.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_RC(RFC_RC value, Py_ssize_t width, char padding_char, char format_char); - -/* MergeKeywords.proto */ -static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); - -/* RaiseUnboundLocalError.proto */ -static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); - -/* CallableCheck.proto */ -#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyCallable_Check(obj) (Py_TYPE(obj)->tp_call != NULL) -#else -#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) -#endif - -/* ListCompAppend.proto */ -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { - PyListObject* L = (PyListObject*) list; - Py_ssize_t len = Py_SIZE(list); - if (likely(L->allocated > len)) { - Py_INCREF(x); - PyList_SET_ITEM(list, len, x); - __Pyx_SET_SIZE(list, len + 1); - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) -#endif - -/* 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); - -/* ArgTypeTest.proto */ -#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ - ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ - __Pyx__ArgTypeTest(obj, type, name, exact)) -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); - -/* PyObject_Str.proto */ -#define __Pyx_PyObject_Str(obj)\ - (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) - -/* ReRaiseException.proto */ -static CYTHON_INLINE void __Pyx_ReraiseException(void); - -/* PyObjectFormat.proto */ -#if CYTHON_USE_UNICODE_WRITER -static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); -#else -#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) -#endif - -/* CIntToPyUnicode.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFCTYPE(RFCTYPE value, Py_ssize_t width, char padding_char, char format_char); - -/* PyObjectFormatAndDecref.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); -static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); - -/* PyDictContains.proto */ -static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { - int result = PyDict_Contains(dict, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/* dict_getitem_default.proto */ -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); - -/* UnpackUnboundCMethod.proto */ -typedef struct { - PyObject *type; - PyObject **method_name; - PyCFunction func; - PyObject *method; - int flag; -} __Pyx_CachedCFunction; - -/* CallUnboundCMethod1.proto */ -static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg); -#else -#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) -#endif - -/* CallUnboundCMethod2.proto */ -static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 -static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); -#else -#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) -#endif - -/* PyIntCompare.proto */ -static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); - -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); -#else -#define __Pyx_PyInt_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\ - (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2)) -#endif - -/* 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)); - -/* ValidateBasesTuple.proto */ -#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS -static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); -#endif - -/* PyType_Ready.proto */ -CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); - -/* 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 - -/* SetupReduce.proto */ -#if !CYTHON_COMPILING_IN_LIMITED_API -static int __Pyx_setup_reduce(PyObject* type_obj); -#endif - -/* SetVTable.proto */ -static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); - -/* GetVTable.proto */ -static void* __Pyx_GetVtable(PyTypeObject *type); - -/* MergeVTables.proto */ -#if !CYTHON_COMPILING_IN_LIMITED_API -static int __Pyx_MergeVtables(PyTypeObject *type); -#endif - -/* Import.proto */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); - -/* ImportDottedModule.proto */ -static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple); -#if PY_MAJOR_VERSION >= 3 -static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple); -#endif - -/* ImportFrom.proto */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); - -/* Py3UpdateBases.proto */ -static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); - -/* CalculateMetaclass.proto */ -static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); - -/* SetNameInClass.proto */ -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 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 - -/* PyObjectLookupSpecial.proto */ -#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS -#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) -#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) -static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); -#else -#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) -#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) -#endif - -/* Py3ClassCreate.proto */ -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, - PyObject *mkw, PyObject *modname, PyObject *doc); -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, - PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); - -/* 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 */ -#if !CYTHON_COMPILING_IN_LIMITED_API -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); -#endif - -/* AddTraceback.proto */ -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_DIRECTION(RFC_DIRECTION value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFCTYPE(RFCTYPE value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_STATE value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_RC(RFC_RC value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_CALL_TYPE value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); - -/* CIntFromPy.proto */ -static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - -/* CIntFromPy.proto */ -static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -/* CIntFromPy.proto */ -static CYTHON_INLINE RFC_RC __Pyx_PyInt_As_RFC_RC(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE RFCTYPE __Pyx_PyInt_As_RFCTYPE(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE RFC_DIRECTION __Pyx_PyInt_As_RFC_DIRECTION(PyObject *); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_ULLONG(SAP_ULLONG value); - -/* CIntFromPy.proto */ -static CYTHON_INLINE RFC_INT __Pyx_PyInt_As_RFC_INT(PyObject *); - -/* CIntFromPy.proto */ -static CYTHON_INLINE RFC_INT8 __Pyx_PyInt_As_RFC_INT8(PyObject *); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_ERROR_GROUP(RFC_ERROR_GROUP value); - -/* CIntFromPy.proto */ -static CYTHON_INLINE RFC_ERROR_GROUP __Pyx_PyInt_As_RFC_ERROR_GROUP(PyObject *); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_RAW(SAP_RAW value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT(RFC_INT value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT2(RFC_INT2 value); - -/* CIntToPy.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT8(RFC_INT8 value); - -/* FormatTypeName.proto */ -#if CYTHON_COMPILING_IN_LIMITED_API -typedef PyObject *__Pyx_TypeName; -#define __Pyx_FMT_TYPENAME "%U" -static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); -#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) -#else -typedef const char *__Pyx_TypeName; -#define __Pyx_FMT_TYPENAME "%.200s" -#define __Pyx_PyType_GetName(tp) ((tp)->tp_name) -#define __Pyx_DECREF_TypeName(obj) -#endif - -/* CIntFromPy.proto */ -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -/* CStringEquals.proto */ -static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *); - -/* CheckBinaryVersion.proto */ -static int __Pyx_check_binary_version(void); - -/* InitStrings.proto */ -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); - -/* #### Code section: module_declarations ### */ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__reopen(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__open(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self); /* proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo); /* proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCheckFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCommitFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onRollbackFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onConfirmFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier); /* proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onGetStateFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier, RFC_UNIT_STATE *__pyx_v_unitState); /* proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers *__pyx_optional_args); /* proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_6Server__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo); /* proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Throughput__destroy(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self); /* proto*/ - -/* Module declarations from "libc.stdint" */ - -/* Module declarations from "libc.string" */ - -/* Module declarations from "libc.stdlib" */ - -/* Module declarations from "pyrfc.csapnwrfc" */ - -/* Module declarations from "pyrfc._cyrfc" */ -static PyObject *__pyx_f_5pyrfc_6_cyrfc__cancel_connection(PyObject *); /*proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_metadataLookup(SAP_UC const *, RFC_ATTRIBUTES, RFC_FUNCTION_DESC_HANDLE *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_get_server_context(RFC_CONNECTION_HANDLE, RFC_ERROR_INFO *); /*proto*/ -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_genericHandler(RFC_CONNECTION_HANDLE, RFC_FUNCTION_HANDLE, RFC_ERROR_INFO *); /*proto*/ -static RFC_TYPE_DESC_HANDLE __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(PyObject *); /*proto*/ -static RFC_UNIT_IDENTIFIER __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE, RFC_FUNCTION_HANDLE, PyObject *, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillStructureField(RFC_TYPE_DESC_HANDLE, RFC_STRUCTURE_HANDLE, PyObject *, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillTable(RFC_TYPE_DESC_HANDLE, RFC_TABLE_HANDLE, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillVariable(RFCTYPE, RFC_FUNCTION_HANDLE, SAP_UC *, PyObject *, RFC_TYPE_DESC_HANDLE); /*proto*/ -static SAP_RAW *__pyx_f_5pyrfc_6_cyrfc_fillBytes(PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillError(PyObject *, RFC_ERROR_INFO *); /*proto*/ -static SAP_UC *__pyx_f_5pyrfc_6_cyrfc_fillString(PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(RFC_ATTRIBUTES); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(RFC_TYPE_DESC_HANDLE); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapResult(RFC_FUNCTION_DESC_HANDLE, RFC_FUNCTION_HANDLE, RFC_DIRECTION, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier(RFC_UNIT_IDENTIFIER); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapStructure(RFC_TYPE_DESC_HANDLE, RFC_STRUCTURE_HANDLE, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTable(RFC_TYPE_DESC_HANDLE, RFC_TABLE_HANDLE, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapVariable(RFCTYPE, RFC_FUNCTION_HANDLE, SAP_UC *, unsigned int, RFC_TYPE_DESC_HANDLE, PyObject *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapError(RFC_ERROR_INFO *); /*proto*/ -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapString(SAP_UC const *, struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString *__pyx_optional_args); /*proto*/ -static PyObject *__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(PyObject *(*)(PyObject *)); /*proto*/ -/* #### Code section: typeinfo ### */ -/* #### Code section: before_global_var ### */ -#define __Pyx_MODULE_NAME "pyrfc._cyrfc" -extern int __pyx_module_is_main_pyrfc___cyrfc; -int __pyx_module_is_main_pyrfc___cyrfc = 0; - -/* Implementation of "pyrfc._cyrfc" */ -/* #### Code section: global_var ### */ -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; -/* #### Code section: string_decls ### */ -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_e[] = "e"; -static const char __pyx_k_i[] = "i"; -static const char __pyx_k_t[] = "t"; -static const char __pyx_k_02[] = "02"; -static const char __pyx_k_04[] = "04"; -static const char __pyx_k_OK[] = "OK"; -static const char __pyx_k__3[] = "/"; -static const char __pyx_k__4[] = ")>"; -static const char __pyx_k__5[] = ""; -static const char __pyx_k__6[] = "'"; -static const char __pyx_k_bg[] = "bg"; -static const char __pyx_k_gc[] = "gc"; -static const char __pyx_k_id[] = "id"; -static const char __pyx_k_rc[] = "rc"; -static const char __pyx_k_TID[] = "TID "; -static const char __pyx_k_UTC[] = " UTC] "; -static const char __pyx_k__21[] = "."; -static const char __pyx_k__22[] = "["; -static const char __pyx_k__23[] = " '"; -static const char __pyx_k__24[] = "'."; -static const char __pyx_k__25[] = ")."; -static const char __pyx_k__38[] = "\000"; -static const char __pyx_k__41[] = "*"; -static const char __pyx_k_add[] = "add"; -static const char __pyx_k_day[] = "day"; -static const char __pyx_k_doc[] = "__doc__"; -static const char __pyx_k_get[] = "get"; -static const char __pyx_k_key[] = "key"; -static const char __pyx_k_rel[] = "rel"; -static const char __pyx_k_sys[] = "sys"; -static const char __pyx_k_tid[] = "tid"; -static const char __pyx_k_uid[] = "uid"; -static const char __pyx_k_Enum[] = "Enum"; -static const char __pyx_k_Unit[] = "Unit "; -static const char __pyx_k__164[] = "?"; -static const char __pyx_k_args[] = "args"; -static const char __pyx_k_auto[] = "auto"; -static const char __pyx_k_call[] = "call"; -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_enum[] = "enum"; -static const char __pyx_k_exit[] = "__exit__"; -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_ping[] = "ping"; -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_spec[] = "__spec__"; -static const char __pyx_k_stop[] = "stop"; -static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_time[] = "time"; -static const char __pyx_k_type[] = "type"; -static const char __pyx_k_unit[] = "unit"; -static const char __pyx_k_user[] = "user"; -static const char __pyx_k_with[] = "' with "; -static const char __pyx_k_wrap[] = "wrap"; -static const char __pyx_k_year[] = "year"; -static const char __pyx_k_H_M_S[] = "%H%M%S"; -static const char __pyx_k_Timer[] = "Timer"; -static const char __pyx_k_Y_m_d[] = "%Y%m%d"; -static const char __pyx_k_alive[] = "alive"; -static const char __pyx_k_bgRFC[] = "bgRFC"; -static const char __pyx_k_cName[] = "cName"; -static const char __pyx_k_calls[] = "calls"; -static const char __pyx_k_check[] = "check"; -static const char __pyx_k_clear[] = "clear"; -static const char __pyx_k_close[] = "_close"; -static const char __pyx_k_debug[] = "debug"; -static const char __pyx_k_dtime[] = "dtime"; -static const char __pyx_k_enter[] = "__enter__"; -static const char __pyx_k_field[] = "field '"; -static const char __pyx_k_items[] = "items"; -static const char __pyx_k_major[] = "major"; -static const char __pyx_k_minor[] = "minor"; -static const char __pyx_k_month[] = "month"; -static const char __pyx_k_print[] = "print"; -static const char __pyx_k_range[] = "range"; -static const char __pyx_k_reset[] = "reset"; -static const char __pyx_k_sapuc[] = "sapuc"; -static const char __pyx_k_serve[] = "serve"; -static const char __pyx_k_start[] = "start"; -static const char __pyx_k_state[] = "state"; -static const char __pyx_k_super[] = "super"; -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_value[] = "value"; -static const char __pyx_k_Server[] = "Server"; -static const char __pyx_k_Thread[] = "Thread"; -static const char __pyx_k_Values[] = "\n Values: "; -static const char __pyx_k_append[] = "append"; -static const char __pyx_k_cancel[] = "cancel"; -static const char __pyx_k_client[] = "client"; -static const char __pyx_k_closed[] = " closed"; -static const char __pyx_k_commit[] = "commit"; -static const char __pyx_k_config[] = "config"; -static const char __pyx_k_decode[] = "decode"; -static const char __pyx_k_enable[] = "enable"; -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_free_2[] = " free"; -static const char __pyx_k_free_3[] = "free"; -static const char __pyx_k_handle[] = "handle"; -static const char __pyx_k_import[] = "__import__"; -static const char __pyx_k_isfile[] = "isfile"; -static const char __pyx_k_length[] = "' length '"; -static const char __pyx_k_locale[] = "locale"; -static const char __pyx_k_minute[] = "minute"; -static const char __pyx_k_module[] = "__module__"; -static const char __pyx_k_msg_v1[] = "msg_v1"; -static const char __pyx_k_msg_v2[] = "msg_v2"; -static const char __pyx_k_msg_v3[] = "msg_v3"; -static const char __pyx_k_msg_v4[] = "msg_v4"; -static const char __pyx_k_name_2[] = "__name__"; -static const char __pyx_k_object[] = "object"; -static const char __pyx_k_origin[] = "origin"; -static const char __pyx_k_params[] = " params>"; -static const char __pyx_k_queued[] = "queued"; -static const char __pyx_k_reduce[] = "__reduce__"; -static const char __pyx_k_remove[] = "remove"; -static const char __pyx_k_reopen[] = "reopen"; -static const char __pyx_k_result[] = "result"; -static const char __pyx_k_rsplit[] = "rsplit"; -static const char __pyx_k_rstrip[] = "rstrip"; -static const char __pyx_k_second[] = "second"; -static const char __pyx_k_server[] = "server"; -static const char __pyx_k_socket[] = "socket"; -static const char __pyx_k_t_code[] = "t_code"; -static const char __pyx_k_target[] = "target"; -static const char __pyx_k_update[] = "update"; -static const char __pyx_k_utcnow[] = "utcnow"; -static const char __pyx_k_values[] = "values"; -static const char __pyx_k_Decimal[] = "Decimal"; -static const char __pyx_k_close_2[] = "close"; -static const char __pyx_k_confirm[] = "confirm"; -static const char __pyx_k_created[] = " created"; -static const char __pyx_k_decimal[] = "decimal"; -static const char __pyx_k_destroy[] = "destroy"; -static const char __pyx_k_disable[] = "disable"; -static const char __pyx_k_isValid[] = "isValid"; -static const char __pyx_k_isdigit[] = "isdigit"; -static const char __pyx_k_message[] = "message"; -static const char __pyx_k_of_type[] = "of type"; -static const char __pyx_k_options[] = "options"; -static const char __pyx_k_os_path[] = "os.path"; -static const char __pyx_k_prepare[] = "__prepare__"; -static const char __pyx_k_program[] = "program"; -static const char __pyx_k_rfcRole[] = "rfcRole"; -static const char __pyx_k_started[] = " started"; -static const char __pyx_k_stopped[] = " stopped"; -static const char __pyx_k_timeout[] = "timeout"; -static const char __pyx_k_unit_id[] = "unit_id"; -static const char __pyx_k_00000000[] = "00000000"; -static const char __pyx_k_Function[] = "Function '"; -static const char __pyx_k_Iterable[] = "Iterable"; -static const char __pyx_k_RCStatus[] = "RCStatus"; -static const char __pyx_k_RFCError[] = "RFCError"; -static const char __pyx_k_Server_2[] = "Server "; -static const char __pyx_k_callback[] = "callback"; -static const char __pyx_k_codepage[] = "codepage"; -static const char __pyx_k_datetime[] = "datetime"; -static const char __pyx_k_decimals[] = "decimals"; -static const char __pyx_k_exc_info[] = "exc_info"; -static const char __pyx_k_executed[] = "executed"; -static const char __pyx_k_funcCont[] = "funcCont"; -static const char __pyx_k_funcDesc[] = "funcDesc"; -static const char __pyx_k_funcName[] = "funcName"; -static const char __pyx_k_getState[] = "getState"; -static const char __pyx_k_getstate[] = "__getstate__"; -static const char __pyx_k_handle_2[] = "' handle "; -static const char __pyx_k_handle_3[] = "_handle"; -static const char __pyx_k_hostname[] = "hostname"; -static const char __pyx_k_isActive[] = "isActive"; -static const char __pyx_k_is_alive[] = "is_alive"; -static const char __pyx_k_is_valid[] = "is_valid"; -static const char __pyx_k_lang_iso[] = "lang_iso"; -static const char __pyx_k_lang_sap[] = "lang_sap"; -static const char __pyx_k_language[] = "language"; -static const char __pyx_k_launched[] = " launched"; -static const char __pyx_k_msg_type[] = "msg_type"; -static const char __pyx_k_optional[] = "optional"; -static const char __pyx_k_params_2[] = "params"; -static const char __pyx_k_pathName[] = "pathName"; -static const char __pyx_k_platform[] = "platform"; -static const char __pyx_k_progName[] = "progName"; -static const char __pyx_k_qualname[] = "__qualname__"; -static const char __pyx_k_registry[] = "_registry"; -static const char __pyx_k_reserved[] = "reserved"; -static const char __pyx_k_rollback[] = "rollback"; -static const char __pyx_k_set_name[] = "__set_name__"; -static const char __pyx_k_setstate[] = "__setstate__"; -static const char __pyx_k_strptime[] = "strptime"; -static const char __pyx_k_typeDesc[] = "typeDesc"; -static const char __pyx_k_typeName[] = "typeName"; -static const char __pyx_k_unitAttr[] = "unitAttr"; -static const char __pyx_k_TypeError[] = "TypeError"; -static const char __pyx_k_UnitState[] = "UnitState"; -static const char __pyx_k_add_field[] = "add_field"; -static const char __pyx_k_but_found[] = ", but found "; -static const char __pyx_k_call_type[] = "call_type"; -static const char __pyx_k_committed[] = "committed"; -static const char __pyx_k_confirmed[] = "confirmed"; -static const char __pyx_k_created_2[] = "created"; -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_func_data[] = "func_data"; -static const char __pyx_k_func_name[] = "func_name"; -static const char __pyx_k_installed[] = "installed"; -static const char __pyx_k_int_field[] = "int_field"; -static const char __pyx_k_isenabled[] = "isenabled"; -static const char __pyx_k_iteritems[] = "iteritems"; -static const char __pyx_k_kernelRel[] = "kernelRel"; -static const char __pyx_k_metaclass[] = "__metaclass__"; -static const char __pyx_k_msg_class[] = "msg_class"; -static const char __pyx_k_not_found[] = "not_found"; -static const char __pyx_k_partnerIP[] = "partnerIP"; -static const char __pyx_k_path_name[] = "path_name"; -static const char __pyx_k_pyx_state[] = "__pyx_state"; -static const char __pyx_k_queueName[] = "queueName"; -static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; -static const char __pyx_k_sat_trace[] = "sat_trace"; -static const char __pyx_k_sentBytes[] = "sentBytes"; -static const char __pyx_k_sysNumber[] = "sysNumber"; -static const char __pyx_k_threading[] = "threading"; -static const char __pyx_k_totalTime[] = "totalTime"; -static const char __pyx_k_traceback[] = "traceback"; -static const char __pyx_k_type_name[] = "type_name"; -static const char __pyx_k_uc_length[] = "uc_length"; -static const char __pyx_k_uc_offset[] = "uc_offset"; -static const char __pyx_k_Connection[] = "Connection"; -static const char __pyx_k_Error_code[] = "Error code "; -static const char __pyx_k_LogonError[] = "LogonError"; -static const char __pyx_k_MASK_DTIME[] = "_MASK_DTIME"; -static const char __pyx_k_New_handle[] = ". New handle: "; -static const char __pyx_k_RFC_EXPORT[] = "RFC_EXPORT"; -static const char __pyx_k_RFC_IMPORT[] = "RFC_IMPORT"; -static const char __pyx_k_RFC_TABLES[] = "RFC_TABLES"; -static const char __pyx_k_Throughput[] = "Throughput"; -static const char __pyx_k_attributes[] = "attributes"; -static const char __pyx_k_auth_check[] = "auth_check"; -static const char __pyx_k_background[] = "background"; -static const char __pyx_k_bgrfc_init[] = "bgrfc_init"; -static const char __pyx_k_connection[] = "connection"; -static const char __pyx_k_cpicConvId[] = "cpicConvId"; -static const char __pyx_k_enum_names[] = "enum_names"; -static const char __pyx_k_field_type[] = "field_type"; -static const char __pyx_k_in_process[] = "in_process"; -static const char __pyx_k_localeconv[] = "localeconv"; -static const char __pyx_k_msg_number[] = "msg_number"; -static const char __pyx_k_must_be_in[] = "' must be in "; -static const char __pyx_k_nuc_length[] = "nuc_length"; -static const char __pyx_k_nuc_offset[] = "nuc_offset"; -static const char __pyx_k_parameters[] = "parameters"; -static const char __pyx_k_partnerRel[] = "partnerRel"; -static const char __pyx_k_patchLevel[] = "patchLevel"; -static const char __pyx_k_patchlevel[] = "patchlevel"; -static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; -static const char __pyx_k_queueNames[] = "queueNames"; -static const char __pyx_k_queue_name[] = "queue_name"; -static const char __pyx_k_serverName[] = "serverName"; -static const char __pyx_k_server_log[] = "_server_log"; -static const char __pyx_k_throughput[] = "throughput"; -static const char __pyx_k_uclang_iso[] = "uclang_iso"; -static const char __pyx_k_uclang_sap[] = "uclang_sap"; -static const char __pyx_k_MASK_RSTRIP[] = "_MASK_RSTRIP"; -static const char __pyx_k_RFCTYPE_BCD[] = "RFCTYPE_BCD"; -static const char __pyx_k_RFCTYPE_INT[] = "RFCTYPE_INT"; -static const char __pyx_k_RFCTYPE_NUM[] = "RFCTYPE_NUM"; -static const char __pyx_k_Request_for[] = "Request for '"; -static const char __pyx_k_Server_stop[] = "Server.stop"; -static const char __pyx_k_active_unit[] = "active_unit"; -static const char __pyx_k_cfunc_to_py[] = "cfunc.to_py"; -static const char __pyx_k_chars_found[] = " chars, found "; -static const char __pyx_k_connections[] = "connections"; -static const char __pyx_k_enum_values[] = "enum_values"; -static const char __pyx_k_get_unit_id[] = "_get_unit_id"; -static const char __pyx_k_gethostname[] = "gethostname"; -static const char __pyx_k_is_stateful[] = "is_stateful"; -static const char __pyx_k_isoLanguage[] = "isoLanguage"; -static const char __pyx_k_log_message[] = "log_message"; -static const char __pyx_k_mro_entries[] = "__mro_entries__"; -static const char __pyx_k_multi_count[] = "multi count"; -static const char __pyx_k_partnerHost[] = "partnerHost"; -static const char __pyx_k_partnerIPv6[] = "partnerIPv6"; -static const char __pyx_k_partnerType[] = "partnerType"; -static const char __pyx_k_queue_names[] = "queue_names"; -static const char __pyx_k_rolled_back[] = "rolled_back"; -static const char __pyx_k_synchronous[] = "synchronous"; -static const char __pyx_k_uIdentifier[] = "uIdentifier"; -static const char __pyx_k_LOCALE_RADIX[] = "_LOCALE_RADIX"; -static const char __pyx_k_RFCTYPE_BYTE[] = "RFCTYPE_BYTE"; -static const char __pyx_k_RFCTYPE_CDAY[] = "RFCTYPE_CDAY"; -static const char __pyx_k_RFCTYPE_CHAR[] = "RFCTYPE_CHAR"; -static const char __pyx_k_RFCTYPE_DATE[] = "RFCTYPE_DATE"; -static const char __pyx_k_RFCTYPE_INT1[] = "RFCTYPE_INT1"; -static const char __pyx_k_RFCTYPE_INT2[] = "RFCTYPE_INT2"; -static const char __pyx_k_RFCTYPE_INT8[] = "RFCTYPE_INT8"; -static const char __pyx_k_RFCTYPE_NULL[] = "RFCTYPE_NULL"; -static const char __pyx_k_RFCTYPE_TIME[] = "RFCTYPE_TIME"; -static const char __pyx_k_RFC_CHANGING[] = "RFC_CHANGING"; -static const char __pyx_k_RFC_EXECUTED[] = "RFC_EXECUTED"; -static const char __pyx_k_RfcFieldType[] = "RfcFieldType"; -static const char __pyx_k_Server_close[] = "Server.close"; -static const char __pyx_k_Server_serve[] = "Server.serve"; -static const char __pyx_k_Server_start[] = "Server.start"; -static const char __pyx_k_UnitCallType[] = "UnitCallType"; -static const char __pyx_k_add_function[] = "add_function"; -static const char __pyx_k_after_remove[] = "after_remove"; -static const char __pyx_k_cancel_timer[] = "cancel_timer"; -static const char __pyx_k_confirm_unit[] = "_confirm_unit"; -static const char __pyx_k_destroy_unit[] = "_destroy_unit"; -static const char __pyx_k_initializing[] = "_initializing"; -static const char __pyx_k_is_coroutine[] = "_is_coroutine"; -static const char __pyx_k_kernel_trace[] = "kernel_trace"; -static const char __pyx_k_must_be_in_2[] = "' must be in '"; -static const char __pyx_k_protocolType[] = "protocolType"; -static const char __pyx_k_pyrfc__cyrfc[] = "pyrfc._cyrfc"; -static const char __pyx_k_pyrfc__utils[] = "pyrfc._utils"; -static const char __pyx_k_sapnwrfc_ini[] = "sapnwrfc.ini"; -static const char __pyx_k_sending_date[] = "sending_date"; -static const char __pyx_k_sending_time[] = "sending_time"; -static const char __pyx_k_server_log_2[] = "server_log"; -static const char __pyx_k_staticmethod[] = "staticmethod"; -static const char __pyx_k_stringsource[] = ""; -static const char __pyx_k_unit_history[] = "unit_history"; -static const char __pyx_k_when_filling[] = " when filling "; -static const char __pyx_k_RFCTYPE_DTDAY[] = "RFCTYPE_DTDAY"; -static const char __pyx_k_RFCTYPE_FLOAT[] = "RFCTYPE_FLOAT"; -static const char __pyx_k_RFCTYPE_TABLE[] = "RFCTYPE_TABLE"; -static const char __pyx_k_RFC_NOT_FOUND[] = "RFC_NOT_FOUND"; -static const char __pyx_k_add_parameter[] = "add_parameter"; -static const char __pyx_k_bgRFC_handler[] = "bgRFC handler "; -static const char __pyx_k_bgRfcFunction[] = "bgRfcFunction"; -static const char __pyx_k_class_getitem[] = "__class_getitem__"; -static const char __pyx_k_client_params[] = "client_params"; -static const char __pyx_k_closed_handle[] = "closed_handle"; -static const char __pyx_k_decimal_point[] = "decimal_point"; -static const char __pyx_k_default_value[] = "default_value"; -static const char __pyx_k_function_name[] = "function_name"; -static const char __pyx_k_init_subclass[] = "__init_subclass__"; -static const char __pyx_k_invalid_state[] = " invalid state '"; -static const char __pyx_k_not_requested[] = "not_requested"; -static const char __pyx_k_numberOfCalls[] = "numberOfCalls"; -static const char __pyx_k_openErrorInfo[] = "openErrorInfo"; -static const char __pyx_k_peakBusyCount[] = "peakBusyCount"; -static const char __pyx_k_protocol_type[] = "protocol_type"; -static const char __pyx_k_receivedBytes[] = "receivedBytes"; -static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; -static const char __pyx_k_server_handle[] = "server_handle"; -static const char __pyx_k_server_params[] = "server_params"; -static const char __pyx_k_transactional[] = "transactional"; -static const char __pyx_k_type_desc_get[] = "type_desc_get"; -static const char __pyx_k_when_wrapping[] = " when wrapping "; -static const char __pyx_k_RFCTYPE_DECF16[] = "RFCTYPE_DECF16"; -static const char __pyx_k_RFCTYPE_DECF34[] = "RFCTYPE_DECF34"; -static const char __pyx_k_RFCTYPE_DTWEEK[] = "RFCTYPE_DTWEEK"; -static const char __pyx_k_RFCTYPE_STRING[] = "RFCTYPE_STRING"; -static const char __pyx_k_confirm_unit_2[] = "confirm_unit"; -static const char __pyx_k_destroy_unit_2[] = "destroy_unit"; -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_queueNameCount[] = "queueNameCount"; -static const char __pyx_k_rfcServerState[] = "rfcServerState"; -static const char __pyx_k_server_context[] = "server_context"; -static const char __pyx_k_transaction_id[] = "transaction_id"; -static const char __pyx_k_Connection_call[] = "Connection.call"; -static const char __pyx_k_Connection_free[] = "Connection.free"; -static const char __pyx_k_Connection_open[] = "Connection.open"; -static const char __pyx_k_Connection_ping[] = "Connection.ping"; -static const char __pyx_k_RFCTYPE_DTMONTH[] = "RFCTYPE_DTMONTH"; -static const char __pyx_k_RFCTYPE_TMINUTE[] = "RFCTYPE_TMINUTE"; -static const char __pyx_k_RFCTYPE_TSECOND[] = "RFCTYPE_TSECOND"; -static const char __pyx_k_RFCTYPE_UTCLONG[] = "RFCTYPE_UTCLONG"; -static const char __pyx_k_RFCTYPE_XMLDATA[] = "RFCTYPE_XMLDATA"; -static const char __pyx_k_RFCTYPE_XSTRING[] = "RFCTYPE_XSTRING"; -static const char __pyx_k_Server_function[] = "Server function '"; -static const char __pyx_k_TypeDescription[] = "__pyx_d); - Py_CLEAR(clear_module_state->__pyx_b); - Py_CLEAR(clear_module_state->__pyx_cython_runtime); - Py_CLEAR(clear_module_state->__pyx_empty_tuple); - Py_CLEAR(clear_module_state->__pyx_empty_bytes); - Py_CLEAR(clear_module_state->__pyx_empty_unicode); - #ifdef __Pyx_CyFunction_USED - Py_CLEAR(clear_module_state->__pyx_CyFunctionType); - #endif - #ifdef __Pyx_FusedFunction_USED - Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); - #endif - Py_CLEAR(clear_module_state->__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters); - Py_CLEAR(clear_module_state->__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters); - Py_CLEAR(clear_module_state->__pyx_ptype_5pyrfc_6_cyrfc_Connection); - Py_CLEAR(clear_module_state->__pyx_type_5pyrfc_6_cyrfc_Connection); - Py_CLEAR(clear_module_state->__pyx_ptype_5pyrfc_6_cyrfc_Server); - Py_CLEAR(clear_module_state->__pyx_type_5pyrfc_6_cyrfc_Server); - Py_CLEAR(clear_module_state->__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - Py_CLEAR(clear_module_state->__pyx_type_5pyrfc_6_cyrfc_Throughput); - Py_CLEAR(clear_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection); - Py_CLEAR(clear_module_state->__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection); - Py_CLEAR(clear_module_state->__pyx_kp_u_00000000); - Py_CLEAR(clear_module_state->__pyx_kp_u_02); - Py_CLEAR(clear_module_state->__pyx_kp_u_04); - Py_CLEAR(clear_module_state->__pyx_n_s_ABAPApplicationError); - Py_CLEAR(clear_module_state->__pyx_n_s_ABAPRuntimeError); - Py_CLEAR(clear_module_state->__pyx_kp_s_A_function_description_This_cla); - Py_CLEAR(clear_module_state->__pyx_kp_s_A_type_description_This_class_w); - Py_CLEAR(clear_module_state->__pyx_kp_u_Argument_attributes_not_valid_t); - Py_CLEAR(clear_module_state->__pyx_kp_u_Argument_background_must_be_a_bo); - Py_CLEAR(clear_module_state->__pyx_kp_u_Argument_queue_names_not_valid_t); - Py_CLEAR(clear_module_state->__pyx_kp_u_Argument_unit_not_valid_Is_unit); - Py_CLEAR(clear_module_state->__pyx_kp_u_Authentication_exception_raised); - Py_CLEAR(clear_module_state->__pyx_kp_u_BgRfc_callback_function_key_not); - Py_CLEAR(clear_module_state->__pyx_kp_u_BgRfc_callback_function_referenc); - Py_CLEAR(clear_module_state->__pyx_kp_u_Callback_functions_may_only_rai); - Py_CLEAR(clear_module_state->__pyx_n_s_CommunicationError); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection); - Py_CLEAR(clear_module_state->__pyx_n_u_Connection); - Py_CLEAR(clear_module_state->__pyx_n_s_ConnectionParameters); - Py_CLEAR(clear_module_state->__pyx_n_s_ConnectionParameters___reduce_cy); - Py_CLEAR(clear_module_state->__pyx_n_s_ConnectionParameters___setstate); - Py_CLEAR(clear_module_state->__pyx_n_s_ConnectionParameters__free); - Py_CLEAR(clear_module_state->__pyx_n_s_ConnectionParameters_free); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection___enter); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection___exit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection___reduce_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection___setstate_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__close); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__confirm_transaction); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__confirm_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__create_and_submit_tr); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__create_and_submit_un); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__destroy_transaction); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__destroy_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__get_transaction_id); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__get_unit_id); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection__get_unit_state); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_call); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_cancel); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_close); - Py_CLEAR(clear_module_state->__pyx_kp_u_Connection_configuration_option); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_confirm_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_destroy_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_fill_and_submit_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_free); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_func_desc_remove); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_get_connection_attrib); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_get_function_descript); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_get_unit_state); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_initialize_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_is_valid); - Py_CLEAR(clear_module_state->__pyx_kp_u_Connection_object_required_recei); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_open); - Py_CLEAR(clear_module_state->__pyx_kp_u_Connection_parameters_missing); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_ping); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_reopen); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_reset_server_context); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_type_desc_get); - Py_CLEAR(clear_module_state->__pyx_n_s_Connection_type_desc_remove); - Py_CLEAR(clear_module_state->__pyx_kp_u_Connection_was_canceled); - Py_CLEAR(clear_module_state->__pyx_kp_u_Crypto_library_not_found); - Py_CLEAR(clear_module_state->__pyx_n_s_Decimal); - Py_CLEAR(clear_module_state->__pyx_n_s_Enum); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_code); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onCheck); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onCommit); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onConfirm); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onGetStat); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onRollbac); - Py_CLEAR(clear_module_state->__pyx_kp_u_Error_while_retrieving_connecti); - Py_CLEAR(clear_module_state->__pyx_n_s_ExternalApplicationError); - Py_CLEAR(clear_module_state->__pyx_n_s_ExternalAuthorizationError); - Py_CLEAR(clear_module_state->__pyx_n_s_ExternalRuntimeError); - Py_CLEAR(clear_module_state->__pyx_kp_u_Function); - Py_CLEAR(clear_module_state->__pyx_kp_u_FunctionDescription); - Py_CLEAR(clear_module_state->__pyx_n_s_FunctionDescription_2); - Py_CLEAR(clear_module_state->__pyx_n_s_FunctionDescription___init); - Py_CLEAR(clear_module_state->__pyx_n_s_FunctionDescription___repr); - Py_CLEAR(clear_module_state->__pyx_n_s_FunctionDescription_add_paramete); - Py_CLEAR(clear_module_state->__pyx_kp_u_H_M_S); - Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_connection_handle); - Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_exception_raised_by_call); - Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_length_of_unit_id_should); - Py_CLEAR(clear_module_state->__pyx_kp_u_Invocation_finished_submitting_u); - Py_CLEAR(clear_module_state->__pyx_n_s_Iterable); - Py_CLEAR(clear_module_state->__pyx_n_s_LOCALE_RADIX); - Py_CLEAR(clear_module_state->__pyx_kp_u_Length_of_parameter_unit_id_must); - Py_CLEAR(clear_module_state->__pyx_n_s_LogonError); - Py_CLEAR(clear_module_state->__pyx_n_s_MASK_DTIME); - Py_CLEAR(clear_module_state->__pyx_n_s_MASK_RETURN_IMPORT_PARAMS); - Py_CLEAR(clear_module_state->__pyx_n_s_MASK_RSTRIP); - Py_CLEAR(clear_module_state->__pyx_kp_u_New_handle); - Py_CLEAR(clear_module_state->__pyx_kp_u_No_connections_assigned); - Py_CLEAR(clear_module_state->__pyx_kp_u_No_metadata_found_for_function); - Py_CLEAR(clear_module_state->__pyx_kp_u_No_state_check_possible_of_non_b); - Py_CLEAR(clear_module_state->__pyx_kp_u_No_transaction_handle_for_this_c); - Py_CLEAR(clear_module_state->__pyx_kp_u_No_unit_handle_for_this_connecti); - Py_CLEAR(clear_module_state->__pyx_kp_u_Not_a_valid_error_group); - Py_CLEAR(clear_module_state->__pyx_n_s_OK); - Py_CLEAR(clear_module_state->__pyx_kp_u_Parameter_calls_must_be_iterable); - Py_CLEAR(clear_module_state->__pyx_kp_u_Parameter_calls_must_contain_at); - Py_CLEAR(clear_module_state->__pyx_kp_u_Parameter_calls_must_contain_val); - Py_CLEAR(clear_module_state->__pyx_kp_u_Parameter_unit_not_valid_Please); - Py_CLEAR(clear_module_state->__pyx_n_s_Pyx_CFunc_object__lParenobject); - Py_CLEAR(clear_module_state->__pyx_n_u_Q); - Py_CLEAR(clear_module_state->__pyx_n_s_RCStatus); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCError); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_ABAPOBJECT); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_BCD); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_BYTE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_CDAY); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_CHAR); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_DATE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_DECF16); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_DECF34); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_DTDAY); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_DTMONTH); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_DTWEEK); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_FLOAT); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_INT); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_INT1); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_INT2); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_INT8); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_NULL); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_NUM); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_STRING); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_STRUCTURE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_TABLE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_TIME); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_TMINUTE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_TSECOND); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_UTCLONG); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_UTCMINUTE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_UTCSECOND); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_XMLDATA); - Py_CLEAR(clear_module_state->__pyx_n_s_RFCTYPE_XSTRING); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_CHANGING); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_EXECUTED); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_EXPORT); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_EXTERNAL_FAILURE); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_IMPORT); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_NOT_FOUND); - Py_CLEAR(clear_module_state->__pyx_n_s_RFC_TABLES); - Py_CLEAR(clear_module_state->__pyx_kp_u_Remote_function_module); - Py_CLEAR(clear_module_state->__pyx_kp_u_Remote_function_module_name_must); - Py_CLEAR(clear_module_state->__pyx_kp_u_Request_for); - Py_CLEAR(clear_module_state->__pyx_n_s_RfcFieldType); - Py_CLEAR(clear_module_state->__pyx_n_s_RfcParameterDirection); - Py_CLEAR(clear_module_state->__pyx_n_s_Server); - Py_CLEAR(clear_module_state->__pyx_n_u_Server); - Py_CLEAR(clear_module_state->__pyx_kp_u_Server_2); - Py_CLEAR(clear_module_state->__pyx_n_s_Server___reduce_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_Server___setstate_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_Server__bgRfcFunction); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_add_function); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_bgrfc_init); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_close); - Py_CLEAR(clear_module_state->__pyx_kp_u_Server_function); - Py_CLEAR(clear_module_state->__pyx_kp_u_Server_function_2); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_get_server_attributes); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_serve); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_start); - Py_CLEAR(clear_module_state->__pyx_n_s_Server_stop); - Py_CLEAR(clear_module_state->__pyx_n_u_T); - Py_CLEAR(clear_module_state->__pyx_kp_u_TID); - Py_CLEAR(clear_module_state->__pyx_kp_u_There_is_an_active_unit_for_this); - Py_CLEAR(clear_module_state->__pyx_n_s_Thread); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput___enter); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput___exit); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput___reduce_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput___setstate_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput_getFromConnection); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput_removeFromConnection); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput_reset); - Py_CLEAR(clear_module_state->__pyx_n_s_Throughput_setOnConnection); - Py_CLEAR(clear_module_state->__pyx_n_s_Timer); - Py_CLEAR(clear_module_state->__pyx_kp_u_TypeDescription); - Py_CLEAR(clear_module_state->__pyx_n_s_TypeDescription_2); - Py_CLEAR(clear_module_state->__pyx_n_s_TypeDescription___init); - Py_CLEAR(clear_module_state->__pyx_n_s_TypeDescription___repr); - Py_CLEAR(clear_module_state->__pyx_n_s_TypeDescription_add_field); - Py_CLEAR(clear_module_state->__pyx_n_s_TypeError); - Py_CLEAR(clear_module_state->__pyx_kp_u_UTC); - Py_CLEAR(clear_module_state->__pyx_kp_u_Unit); - Py_CLEAR(clear_module_state->__pyx_n_s_UnitCallType); - Py_CLEAR(clear_module_state->__pyx_n_s_UnitState); - Py_CLEAR(clear_module_state->__pyx_kp_u_Unknown_RFC_type); - Py_CLEAR(clear_module_state->__pyx_kp_u_User_user_from_system_sysId_clie); - Py_CLEAR(clear_module_state->__pyx_kp_u_Values); - Py_CLEAR(clear_module_state->__pyx_kp_u_Y_m_d); - Py_CLEAR(clear_module_state->__pyx_n_s__164); - Py_CLEAR(clear_module_state->__pyx_kp_u__21); - Py_CLEAR(clear_module_state->__pyx_kp_u__22); - Py_CLEAR(clear_module_state->__pyx_kp_u__23); - Py_CLEAR(clear_module_state->__pyx_kp_u__24); - Py_CLEAR(clear_module_state->__pyx_kp_u__25); - Py_CLEAR(clear_module_state->__pyx_kp_u__3); - Py_CLEAR(clear_module_state->__pyx_kp_u__38); - Py_CLEAR(clear_module_state->__pyx_kp_u__4); - Py_CLEAR(clear_module_state->__pyx_n_s__41); - Py_CLEAR(clear_module_state->__pyx_kp_u__5); - Py_CLEAR(clear_module_state->__pyx_kp_u__6); - Py_CLEAR(clear_module_state->__pyx_kp_u_a_decimal_value_required_receive); - Py_CLEAR(clear_module_state->__pyx_kp_u_a_numeric_string_is_required_rec); - Py_CLEAR(clear_module_state->__pyx_n_u_active_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_add); - Py_CLEAR(clear_module_state->__pyx_n_s_add_field); - Py_CLEAR(clear_module_state->__pyx_n_s_add_function); - Py_CLEAR(clear_module_state->__pyx_n_s_add_parameter); - Py_CLEAR(clear_module_state->__pyx_n_s_after_remove); - Py_CLEAR(clear_module_state->__pyx_n_s_alive); - Py_CLEAR(clear_module_state->__pyx_kp_u_already_installed); - Py_CLEAR(clear_module_state->__pyx_kp_u_an_integer_required_received); - Py_CLEAR(clear_module_state->__pyx_kp_u_an_string_is_required_received); - Py_CLEAR(clear_module_state->__pyx_n_s_append); - Py_CLEAR(clear_module_state->__pyx_n_u_applicationTime); - Py_CLEAR(clear_module_state->__pyx_n_s_args); - Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines); - Py_CLEAR(clear_module_state->__pyx_n_s_attributes); - Py_CLEAR(clear_module_state->__pyx_n_u_auth_check); - Py_CLEAR(clear_module_state->__pyx_kp_u_authorization_check_for); - Py_CLEAR(clear_module_state->__pyx_n_s_auto); - Py_CLEAR(clear_module_state->__pyx_n_s_background); - Py_CLEAR(clear_module_state->__pyx_n_u_background); - Py_CLEAR(clear_module_state->__pyx_n_s_background_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_bg); - Py_CLEAR(clear_module_state->__pyx_n_u_bgRFC); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handler); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handler_onCheck_is_not_reg); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handler_onCommit_is_not_re); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handler_onConfirm_is_not_r); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handler_onGetState_is_not); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handler_onRollback_is_not); - Py_CLEAR(clear_module_state->__pyx_kp_u_bgRFC_handlers_installed); - Py_CLEAR(clear_module_state->__pyx_n_s_bgRfcFunction); - Py_CLEAR(clear_module_state->__pyx_n_s_bgrfc_handlers_count); - Py_CLEAR(clear_module_state->__pyx_n_s_bgrfc_init); - Py_CLEAR(clear_module_state->__pyx_kp_u_but_found); - Py_CLEAR(clear_module_state->__pyx_n_s_cName); - Py_CLEAR(clear_module_state->__pyx_n_s_call); - Py_CLEAR(clear_module_state->__pyx_n_u_call_type); - Py_CLEAR(clear_module_state->__pyx_n_s_callback); - Py_CLEAR(clear_module_state->__pyx_n_u_callback); - Py_CLEAR(clear_module_state->__pyx_n_s_calls); - Py_CLEAR(clear_module_state->__pyx_n_s_cancel); - Py_CLEAR(clear_module_state->__pyx_n_s_cancel_connection); - Py_CLEAR(clear_module_state->__pyx_n_s_cancel_timer); - Py_CLEAR(clear_module_state->__pyx_n_s_cfunc_to_py); - Py_CLEAR(clear_module_state->__pyx_kp_u_chars_found); - Py_CLEAR(clear_module_state->__pyx_n_u_check); - Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem); - Py_CLEAR(clear_module_state->__pyx_n_s_clear); - Py_CLEAR(clear_module_state->__pyx_n_u_client); - Py_CLEAR(clear_module_state->__pyx_n_s_client_connection); - Py_CLEAR(clear_module_state->__pyx_n_s_client_params); - Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback); - Py_CLEAR(clear_module_state->__pyx_n_s_close); - Py_CLEAR(clear_module_state->__pyx_n_s_close_2); - Py_CLEAR(clear_module_state->__pyx_kp_u_closed); - Py_CLEAR(clear_module_state->__pyx_n_s_closed_handle); - Py_CLEAR(clear_module_state->__pyx_n_s_code); - Py_CLEAR(clear_module_state->__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION); - Py_CLEAR(clear_module_state->__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE); - Py_CLEAR(clear_module_state->__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR); - Py_CLEAR(clear_module_state->__pyx_n_u_codepage); - Py_CLEAR(clear_module_state->__pyx_n_s_collections_abc); - Py_CLEAR(clear_module_state->__pyx_n_u_commit); - Py_CLEAR(clear_module_state->__pyx_n_s_committed); - Py_CLEAR(clear_module_state->__pyx_n_s_config); - Py_CLEAR(clear_module_state->__pyx_n_u_confirm); - Py_CLEAR(clear_module_state->__pyx_n_s_confirm_transaction); - Py_CLEAR(clear_module_state->__pyx_n_s_confirm_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_confirm_unit_2); - Py_CLEAR(clear_module_state->__pyx_n_s_confirmed); - Py_CLEAR(clear_module_state->__pyx_n_s_connection); - Py_CLEAR(clear_module_state->__pyx_n_u_connection_attributes); - Py_CLEAR(clear_module_state->__pyx_n_s_connections); - Py_CLEAR(clear_module_state->__pyx_n_u_cpicConvId); - Py_CLEAR(clear_module_state->__pyx_n_s_create_and_submit_transaction); - Py_CLEAR(clear_module_state->__pyx_n_s_create_and_submit_unit); - Py_CLEAR(clear_module_state->__pyx_kp_u_created); - Py_CLEAR(clear_module_state->__pyx_n_s_created_2); - Py_CLEAR(clear_module_state->__pyx_n_u_currentBusyCount); - Py_CLEAR(clear_module_state->__pyx_n_u_d); - Py_CLEAR(clear_module_state->__pyx_n_s_date); - Py_CLEAR(clear_module_state->__pyx_kp_u_date_value_required_received); - Py_CLEAR(clear_module_state->__pyx_n_s_datetime); - Py_CLEAR(clear_module_state->__pyx_n_s_day); - Py_CLEAR(clear_module_state->__pyx_n_s_debug); - Py_CLEAR(clear_module_state->__pyx_n_u_debug); - Py_CLEAR(clear_module_state->__pyx_n_s_decimal); - Py_CLEAR(clear_module_state->__pyx_n_u_decimal_point); - Py_CLEAR(clear_module_state->__pyx_n_s_decimals); - Py_CLEAR(clear_module_state->__pyx_n_u_decimals); - Py_CLEAR(clear_module_state->__pyx_n_s_decode); - Py_CLEAR(clear_module_state->__pyx_n_s_default_auth_check); - Py_CLEAR(clear_module_state->__pyx_n_s_default_value); - Py_CLEAR(clear_module_state->__pyx_n_u_default_value); - Py_CLEAR(clear_module_state->__pyx_kp_u_default_value_string); - Py_CLEAR(clear_module_state->__pyx_n_u_deserializationTime); - Py_CLEAR(clear_module_state->__pyx_n_u_dest); - Py_CLEAR(clear_module_state->__pyx_n_s_destroy); - Py_CLEAR(clear_module_state->__pyx_n_s_destroy_transaction); - Py_CLEAR(clear_module_state->__pyx_n_s_destroy_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_destroy_unit_2); - Py_CLEAR(clear_module_state->__pyx_n_s_dict); - Py_CLEAR(clear_module_state->__pyx_kp_u_dictionary_required_for_structur); - Py_CLEAR(clear_module_state->__pyx_n_s_direction); - Py_CLEAR(clear_module_state->__pyx_n_u_direction); - Py_CLEAR(clear_module_state->__pyx_kp_u_direction_string); - Py_CLEAR(clear_module_state->__pyx_kp_u_disable); - Py_CLEAR(clear_module_state->__pyx_n_s_doc); - Py_CLEAR(clear_module_state->__pyx_n_u_dtime); - Py_CLEAR(clear_module_state->__pyx_n_s_e); - Py_CLEAR(clear_module_state->__pyx_kp_u_enable); - Py_CLEAR(clear_module_state->__pyx_n_s_encode); - Py_CLEAR(clear_module_state->__pyx_n_s_enter); - Py_CLEAR(clear_module_state->__pyx_n_s_enum); - Py_CLEAR(clear_module_state->__pyx_n_s_enum_names); - Py_CLEAR(clear_module_state->__pyx_n_s_enum_values); - Py_CLEAR(clear_module_state->__pyx_n_s_enumerate); - Py_CLEAR(clear_module_state->__pyx_n_s_errorInfo); - Py_CLEAR(clear_module_state->__pyx_n_s_exc_info); - Py_CLEAR(clear_module_state->__pyx_n_s_executed); - Py_CLEAR(clear_module_state->__pyx_n_s_exit); - Py_CLEAR(clear_module_state->__pyx_kp_u_field); - Py_CLEAR(clear_module_state->__pyx_kp_u_field_name_string); - Py_CLEAR(clear_module_state->__pyx_kp_u_field_name_string_2); - Py_CLEAR(clear_module_state->__pyx_n_s_field_type); - Py_CLEAR(clear_module_state->__pyx_n_u_field_type); - Py_CLEAR(clear_module_state->__pyx_kp_u_field_type_string); - Py_CLEAR(clear_module_state->__pyx_n_s_fields); - Py_CLEAR(clear_module_state->__pyx_kp_u_fields_n_uclength); - Py_CLEAR(clear_module_state->__pyx_n_s_fill_and_submit_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_format); - Py_CLEAR(clear_module_state->__pyx_n_s_free); - Py_CLEAR(clear_module_state->__pyx_kp_u_free_2); - Py_CLEAR(clear_module_state->__pyx_n_s_free_3); - Py_CLEAR(clear_module_state->__pyx_n_s_funcCont); - Py_CLEAR(clear_module_state->__pyx_n_s_funcDesc); - Py_CLEAR(clear_module_state->__pyx_n_s_funcName); - Py_CLEAR(clear_module_state->__pyx_n_s_func_data); - Py_CLEAR(clear_module_state->__pyx_n_s_func_desc_handle); - Py_CLEAR(clear_module_state->__pyx_n_u_func_desc_handle); - Py_CLEAR(clear_module_state->__pyx_n_s_func_desc_remove); - Py_CLEAR(clear_module_state->__pyx_n_s_func_name); - Py_CLEAR(clear_module_state->__pyx_n_s_function_name); - Py_CLEAR(clear_module_state->__pyx_kp_u_gc); - Py_CLEAR(clear_module_state->__pyx_n_u_genericHandler); - Py_CLEAR(clear_module_state->__pyx_n_s_get); - Py_CLEAR(clear_module_state->__pyx_n_s_getFromConnection); - Py_CLEAR(clear_module_state->__pyx_n_u_getState); - Py_CLEAR(clear_module_state->__pyx_n_s_get_connection_attributes); - Py_CLEAR(clear_module_state->__pyx_n_s_get_function_description); - Py_CLEAR(clear_module_state->__pyx_n_s_get_nwrfclib_version); - Py_CLEAR(clear_module_state->__pyx_n_s_get_server_attributes); - Py_CLEAR(clear_module_state->__pyx_n_s_get_transaction_id); - Py_CLEAR(clear_module_state->__pyx_n_s_get_unit_id); - Py_CLEAR(clear_module_state->__pyx_n_s_get_unit_state); - Py_CLEAR(clear_module_state->__pyx_n_s_get_unit_state_2); - Py_CLEAR(clear_module_state->__pyx_n_s_gethostname); - Py_CLEAR(clear_module_state->__pyx_n_s_getstate); - Py_CLEAR(clear_module_state->__pyx_n_s_handle); - Py_CLEAR(clear_module_state->__pyx_kp_u_handle_2); - Py_CLEAR(clear_module_state->__pyx_n_s_handle_3); - Py_CLEAR(clear_module_state->__pyx_kp_u_has_invalid_state); - Py_CLEAR(clear_module_state->__pyx_n_u_host); - Py_CLEAR(clear_module_state->__pyx_n_u_hostname); - Py_CLEAR(clear_module_state->__pyx_n_s_hour); - Py_CLEAR(clear_module_state->__pyx_n_s_i); - Py_CLEAR(clear_module_state->__pyx_n_s_id); - Py_CLEAR(clear_module_state->__pyx_n_u_id); - Py_CLEAR(clear_module_state->__pyx_n_s_idunitStateentifier); - Py_CLEAR(clear_module_state->__pyx_n_s_import); - Py_CLEAR(clear_module_state->__pyx_n_s_in_process); - Py_CLEAR(clear_module_state->__pyx_n_s_init); - Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass); - Py_CLEAR(clear_module_state->__pyx_n_s_initialize_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_initializing); - Py_CLEAR(clear_module_state->__pyx_n_u_installed); - Py_CLEAR(clear_module_state->__pyx_n_s_int_field); - Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_state); - Py_CLEAR(clear_module_state->__pyx_kp_u_invocation_rejected_because_the); - Py_CLEAR(clear_module_state->__pyx_n_s_isActive); - Py_CLEAR(clear_module_state->__pyx_n_s_isValid); - Py_CLEAR(clear_module_state->__pyx_n_s_is_alive); - Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine); - Py_CLEAR(clear_module_state->__pyx_kp_u_is_not_callable); - Py_CLEAR(clear_module_state->__pyx_kp_u_is_not_supported); - Py_CLEAR(clear_module_state->__pyx_n_u_is_stateful); - Py_CLEAR(clear_module_state->__pyx_n_s_is_valid); - Py_CLEAR(clear_module_state->__pyx_n_s_isdigit); - Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled); - Py_CLEAR(clear_module_state->__pyx_n_s_isfile); - Py_CLEAR(clear_module_state->__pyx_n_u_isoLanguage); - Py_CLEAR(clear_module_state->__pyx_n_s_items); - Py_CLEAR(clear_module_state->__pyx_n_s_iteritems); - Py_CLEAR(clear_module_state->__pyx_n_s_join); - Py_CLEAR(clear_module_state->__pyx_n_u_kernelRel); - Py_CLEAR(clear_module_state->__pyx_n_u_kernel_trace); - Py_CLEAR(clear_module_state->__pyx_n_s_key); - Py_CLEAR(clear_module_state->__pyx_n_s_lang_iso); - Py_CLEAR(clear_module_state->__pyx_n_s_lang_sap); - Py_CLEAR(clear_module_state->__pyx_n_u_language); - Py_CLEAR(clear_module_state->__pyx_n_s_language_iso_to_sap); - Py_CLEAR(clear_module_state->__pyx_n_s_language_sap_to_iso); - Py_CLEAR(clear_module_state->__pyx_kp_u_launched); - Py_CLEAR(clear_module_state->__pyx_kp_u_length); - Py_CLEAR(clear_module_state->__pyx_kp_u_list_required_for_table_paramete); - Py_CLEAR(clear_module_state->__pyx_n_s_locale); - Py_CLEAR(clear_module_state->__pyx_n_s_localeconv); - Py_CLEAR(clear_module_state->__pyx_n_u_lock); - Py_CLEAR(clear_module_state->__pyx_n_s_log_message); - Py_CLEAR(clear_module_state->__pyx_n_s_main); - Py_CLEAR(clear_module_state->__pyx_n_s_major); - Py_CLEAR(clear_module_state->__pyx_n_u_major); - Py_CLEAR(clear_module_state->__pyx_n_s_message); - Py_CLEAR(clear_module_state->__pyx_n_s_metaclass); - Py_CLEAR(clear_module_state->__pyx_n_u_metadataLookup); - Py_CLEAR(clear_module_state->__pyx_n_s_minor); - Py_CLEAR(clear_module_state->__pyx_n_u_minor); - Py_CLEAR(clear_module_state->__pyx_n_s_minute); - Py_CLEAR(clear_module_state->__pyx_n_s_module); - Py_CLEAR(clear_module_state->__pyx_n_s_month); - Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_class); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_number); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_type); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_v1); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_v2); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_v3); - Py_CLEAR(clear_module_state->__pyx_n_s_msg_v4); - Py_CLEAR(clear_module_state->__pyx_kp_u_multi_count); - Py_CLEAR(clear_module_state->__pyx_kp_u_must_be_in); - Py_CLEAR(clear_module_state->__pyx_kp_u_must_be_in_2); - Py_CLEAR(clear_module_state->__pyx_kp_u_must_be_of_type_integer); - Py_CLEAR(clear_module_state->__pyx_kp_u_must_not_exceed_30_chars); - Py_CLEAR(clear_module_state->__pyx_n_s_name); - Py_CLEAR(clear_module_state->__pyx_n_u_name); - Py_CLEAR(clear_module_state->__pyx_n_s_name_2); - Py_CLEAR(clear_module_state->__pyx_n_u_no_commit_check); - Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non); - Py_CLEAR(clear_module_state->__pyx_n_s_not_found); - Py_CLEAR(clear_module_state->__pyx_n_u_not_requested); - Py_CLEAR(clear_module_state->__pyx_n_s_nuc_length); - Py_CLEAR(clear_module_state->__pyx_n_u_nuc_length); - Py_CLEAR(clear_module_state->__pyx_n_s_nuc_offset); - Py_CLEAR(clear_module_state->__pyx_n_u_nuc_offset); - Py_CLEAR(clear_module_state->__pyx_n_u_numberOfCalls); - Py_CLEAR(clear_module_state->__pyx_n_s_object); - Py_CLEAR(clear_module_state->__pyx_kp_u_of_type); - Py_CLEAR(clear_module_state->__pyx_n_s_open); - Py_CLEAR(clear_module_state->__pyx_n_s_openErrorInfo); - Py_CLEAR(clear_module_state->__pyx_n_s_optional); - Py_CLEAR(clear_module_state->__pyx_n_u_optional); - Py_CLEAR(clear_module_state->__pyx_n_s_options); - Py_CLEAR(clear_module_state->__pyx_n_s_origin); - Py_CLEAR(clear_module_state->__pyx_n_s_os_path); - Py_CLEAR(clear_module_state->__pyx_n_s_parameter_text); - Py_CLEAR(clear_module_state->__pyx_n_u_parameter_text); - Py_CLEAR(clear_module_state->__pyx_kp_u_parameter_text_string_parameter); - Py_CLEAR(clear_module_state->__pyx_n_s_parameter_type); - Py_CLEAR(clear_module_state->__pyx_n_u_parameter_type); - Py_CLEAR(clear_module_state->__pyx_kp_u_parameter_type_string); - Py_CLEAR(clear_module_state->__pyx_n_s_parameters); - Py_CLEAR(clear_module_state->__pyx_kp_u_params); - Py_CLEAR(clear_module_state->__pyx_n_s_params_2); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerBytesPerChar); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerCodepage); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerHost); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerIP); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerIPv6); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerRel); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerSystemCodepage); - Py_CLEAR(clear_module_state->__pyx_n_u_partnerType); - Py_CLEAR(clear_module_state->__pyx_n_u_patchLevel); - Py_CLEAR(clear_module_state->__pyx_n_s_patchlevel); - Py_CLEAR(clear_module_state->__pyx_n_s_pathName); - Py_CLEAR(clear_module_state->__pyx_n_s_path_name); - Py_CLEAR(clear_module_state->__pyx_n_u_peakBusyCount); - Py_CLEAR(clear_module_state->__pyx_n_s_ping); - Py_CLEAR(clear_module_state->__pyx_n_s_platform); - Py_CLEAR(clear_module_state->__pyx_n_u_platform); - Py_CLEAR(clear_module_state->__pyx_n_u_port); - Py_CLEAR(clear_module_state->__pyx_n_s_prepare); - Py_CLEAR(clear_module_state->__pyx_n_s_print); - Py_CLEAR(clear_module_state->__pyx_n_u_progName); - Py_CLEAR(clear_module_state->__pyx_n_u_program); - Py_CLEAR(clear_module_state->__pyx_n_u_protocolType); - Py_CLEAR(clear_module_state->__pyx_n_s_protocol_type); - Py_CLEAR(clear_module_state->__pyx_n_s_pyrfc__cyrfc); - Py_CLEAR(clear_module_state->__pyx_n_s_pyrfc__exception); - Py_CLEAR(clear_module_state->__pyx_n_s_pyrfc__utils); - Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state); - Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable); - Py_CLEAR(clear_module_state->__pyx_n_s_qualname); - Py_CLEAR(clear_module_state->__pyx_n_s_queueName); - Py_CLEAR(clear_module_state->__pyx_n_s_queueNameCount); - Py_CLEAR(clear_module_state->__pyx_n_s_queueNames); - Py_CLEAR(clear_module_state->__pyx_n_s_queue_name); - Py_CLEAR(clear_module_state->__pyx_n_s_queue_names); - Py_CLEAR(clear_module_state->__pyx_n_s_queued); - Py_CLEAR(clear_module_state->__pyx_n_u_queued); - Py_CLEAR(clear_module_state->__pyx_kp_u_raises_ABAPApplicationError); - Py_CLEAR(clear_module_state->__pyx_kp_u_raises_ABAPRuntimeError); - Py_CLEAR(clear_module_state->__pyx_kp_u_raises_ExternalRuntimeError); - Py_CLEAR(clear_module_state->__pyx_kp_u_raises_an_invalid_exception_Exc); - Py_CLEAR(clear_module_state->__pyx_n_s_range); - Py_CLEAR(clear_module_state->__pyx_n_s_rc); - Py_CLEAR(clear_module_state->__pyx_n_u_receivedBytes); - Py_CLEAR(clear_module_state->__pyx_n_s_reduce); - Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython); - Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex); - Py_CLEAR(clear_module_state->__pyx_n_u_registrationCount); - Py_CLEAR(clear_module_state->__pyx_n_s_registry); - Py_CLEAR(clear_module_state->__pyx_n_u_rel); - Py_CLEAR(clear_module_state->__pyx_n_s_reload_ini_file); - Py_CLEAR(clear_module_state->__pyx_n_s_remove); - Py_CLEAR(clear_module_state->__pyx_n_s_removeFromConnection); - Py_CLEAR(clear_module_state->__pyx_n_s_reopen); - Py_CLEAR(clear_module_state->__pyx_n_s_repr); - Py_CLEAR(clear_module_state->__pyx_n_s_request_context); - Py_CLEAR(clear_module_state->__pyx_kp_u_request_context_2); - Py_CLEAR(clear_module_state->__pyx_n_u_reserved); - Py_CLEAR(clear_module_state->__pyx_n_s_reset); - Py_CLEAR(clear_module_state->__pyx_n_s_reset_server_context); - Py_CLEAR(clear_module_state->__pyx_n_s_result); - Py_CLEAR(clear_module_state->__pyx_n_u_return_import_params); - Py_CLEAR(clear_module_state->__pyx_n_u_rfcRole); - Py_CLEAR(clear_module_state->__pyx_n_s_rfcServerState); - Py_CLEAR(clear_module_state->__pyx_n_u_rollback); - Py_CLEAR(clear_module_state->__pyx_n_s_rolled_back); - Py_CLEAR(clear_module_state->__pyx_n_s_rsplit); - Py_CLEAR(clear_module_state->__pyx_n_s_rstrip); - Py_CLEAR(clear_module_state->__pyx_n_u_rstrip); - Py_CLEAR(clear_module_state->__pyx_kp_u_sapnwrfc_ini); - Py_CLEAR(clear_module_state->__pyx_kp_u_sapnwrfc_ini_not_found_in); - Py_CLEAR(clear_module_state->__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin); - Py_CLEAR(clear_module_state->__pyx_n_s_sapuc); - Py_CLEAR(clear_module_state->__pyx_n_u_sat_trace); - Py_CLEAR(clear_module_state->__pyx_n_s_second); - Py_CLEAR(clear_module_state->__pyx_n_s_self); - Py_CLEAR(clear_module_state->__pyx_kp_s_self__handle_self__tHandle_self); - Py_CLEAR(clear_module_state->__pyx_kp_s_self__throughput_handle_cannot_b); - Py_CLEAR(clear_module_state->__pyx_n_u_sending_date); - Py_CLEAR(clear_module_state->__pyx_n_u_sending_time); - Py_CLEAR(clear_module_state->__pyx_n_u_sentBytes); - Py_CLEAR(clear_module_state->__pyx_n_u_serializationTime); - Py_CLEAR(clear_module_state->__pyx_n_s_serve); - Py_CLEAR(clear_module_state->__pyx_n_u_server); - Py_CLEAR(clear_module_state->__pyx_n_u_serverName); - Py_CLEAR(clear_module_state->__pyx_n_s_server_context); - Py_CLEAR(clear_module_state->__pyx_n_u_server_context); - Py_CLEAR(clear_module_state->__pyx_n_s_server_functions); - Py_CLEAR(clear_module_state->__pyx_n_s_server_handle); - Py_CLEAR(clear_module_state->__pyx_n_s_server_log); - Py_CLEAR(clear_module_state->__pyx_n_u_server_log_2); - Py_CLEAR(clear_module_state->__pyx_n_s_server_params); - Py_CLEAR(clear_module_state->__pyx_n_s_setOnConnection); - Py_CLEAR(clear_module_state->__pyx_n_s_set_cryptolib_path); - Py_CLEAR(clear_module_state->__pyx_n_s_set_ini_file_directory); - Py_CLEAR(clear_module_state->__pyx_n_s_set_locale_radix); - Py_CLEAR(clear_module_state->__pyx_n_s_set_name); - Py_CLEAR(clear_module_state->__pyx_n_s_setstate); - Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython); - Py_CLEAR(clear_module_state->__pyx_kp_u_should_be_from_1_30_chars); - Py_CLEAR(clear_module_state->__pyx_kp_u_should_be_from_1_30_chars_2); - Py_CLEAR(clear_module_state->__pyx_n_s_skip_parameters); - Py_CLEAR(clear_module_state->__pyx_n_s_socket); - Py_CLEAR(clear_module_state->__pyx_n_s_spec); - Py_CLEAR(clear_module_state->__pyx_kp_s_src_pyrfc__cyrfc_pyx); - Py_CLEAR(clear_module_state->__pyx_n_s_start); - Py_CLEAR(clear_module_state->__pyx_kp_u_started); - Py_CLEAR(clear_module_state->__pyx_n_s_state); - Py_CLEAR(clear_module_state->__pyx_n_u_state); - Py_CLEAR(clear_module_state->__pyx_n_s_staticmethod); - Py_CLEAR(clear_module_state->__pyx_n_s_stop); - Py_CLEAR(clear_module_state->__pyx_kp_u_stopped); - Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource); - Py_CLEAR(clear_module_state->__pyx_n_s_strptime); - Py_CLEAR(clear_module_state->__pyx_n_s_super); - Py_CLEAR(clear_module_state->__pyx_n_s_synchronous); - Py_CLEAR(clear_module_state->__pyx_n_s_sys); - Py_CLEAR(clear_module_state->__pyx_n_s_sysId); - Py_CLEAR(clear_module_state->__pyx_n_u_sysId); - Py_CLEAR(clear_module_state->__pyx_n_u_sysNumber); - Py_CLEAR(clear_module_state->__pyx_n_s_sysid); - Py_CLEAR(clear_module_state->__pyx_n_s_t); - Py_CLEAR(clear_module_state->__pyx_n_u_t_code); - Py_CLEAR(clear_module_state->__pyx_n_s_target); - Py_CLEAR(clear_module_state->__pyx_n_s_test); - Py_CLEAR(clear_module_state->__pyx_n_s_threading); - Py_CLEAR(clear_module_state->__pyx_n_s_throughput); - Py_CLEAR(clear_module_state->__pyx_n_s_tid); - Py_CLEAR(clear_module_state->__pyx_n_s_time); - Py_CLEAR(clear_module_state->__pyx_kp_u_time_value_required_received); - Py_CLEAR(clear_module_state->__pyx_n_s_timeout); - Py_CLEAR(clear_module_state->__pyx_n_u_timeout); - Py_CLEAR(clear_module_state->__pyx_n_u_totalTime); - Py_CLEAR(clear_module_state->__pyx_n_u_trace); - Py_CLEAR(clear_module_state->__pyx_n_s_traceback); - Py_CLEAR(clear_module_state->__pyx_n_s_transaction_id); - Py_CLEAR(clear_module_state->__pyx_n_s_transactional); - Py_CLEAR(clear_module_state->__pyx_n_s_type); - Py_CLEAR(clear_module_state->__pyx_n_u_type); - Py_CLEAR(clear_module_state->__pyx_n_s_typeDesc); - Py_CLEAR(clear_module_state->__pyx_n_s_typeName); - Py_CLEAR(clear_module_state->__pyx_n_s_type_desc_get); - Py_CLEAR(clear_module_state->__pyx_n_s_type_desc_remove); - Py_CLEAR(clear_module_state->__pyx_n_s_type_description); - Py_CLEAR(clear_module_state->__pyx_n_u_type_description); - Py_CLEAR(clear_module_state->__pyx_n_s_type_name); - Py_CLEAR(clear_module_state->__pyx_n_s_uIdentifier); - Py_CLEAR(clear_module_state->__pyx_n_s_uc_length); - Py_CLEAR(clear_module_state->__pyx_n_u_uc_length); - Py_CLEAR(clear_module_state->__pyx_n_s_uc_offset); - Py_CLEAR(clear_module_state->__pyx_n_u_uc_offset); - Py_CLEAR(clear_module_state->__pyx_n_s_uclang_iso); - Py_CLEAR(clear_module_state->__pyx_n_s_uclang_sap); - Py_CLEAR(clear_module_state->__pyx_n_s_uid); - Py_CLEAR(clear_module_state->__pyx_n_s_unit); - Py_CLEAR(clear_module_state->__pyx_n_s_unitAttr); - Py_CLEAR(clear_module_state->__pyx_n_u_unit_attributes); - Py_CLEAR(clear_module_state->__pyx_n_u_unit_history); - Py_CLEAR(clear_module_state->__pyx_n_s_unit_id); - Py_CLEAR(clear_module_state->__pyx_n_s_unit_identifier); - Py_CLEAR(clear_module_state->__pyx_n_u_unit_identifier); - Py_CLEAR(clear_module_state->__pyx_n_s_update); - Py_CLEAR(clear_module_state->__pyx_n_s_upper); - Py_CLEAR(clear_module_state->__pyx_n_u_user); - Py_CLEAR(clear_module_state->__pyx_n_s_utcnow); - Py_CLEAR(clear_module_state->__pyx_n_s_value); - Py_CLEAR(clear_module_state->__pyx_n_s_values); - Py_CLEAR(clear_module_state->__pyx_kp_u_when_filling); - Py_CLEAR(clear_module_state->__pyx_kp_u_when_getting_server_context_for); - Py_CLEAR(clear_module_state->__pyx_kp_u_when_wrapping); - Py_CLEAR(clear_module_state->__pyx_kp_u_with); - Py_CLEAR(clear_module_state->__pyx_n_s_wrap); - Py_CLEAR(clear_module_state->__pyx_kp_u_wrapString_uclen_u_utf8_size_u); - Py_CLEAR(clear_module_state->__pyx_n_s_year); - Py_CLEAR(clear_module_state->__pyx_int_0); - Py_CLEAR(clear_module_state->__pyx_int_1); - Py_CLEAR(clear_module_state->__pyx_int_2); - Py_CLEAR(clear_module_state->__pyx_int_3); - Py_CLEAR(clear_module_state->__pyx_int_4); - Py_CLEAR(clear_module_state->__pyx_int_5); - Py_CLEAR(clear_module_state->__pyx_int_6); - Py_CLEAR(clear_module_state->__pyx_int_8); - Py_CLEAR(clear_module_state->__pyx_int_12); - Py_CLEAR(clear_module_state->__pyx_int_15); - Py_CLEAR(clear_module_state->__pyx_int_17); - Py_CLEAR(clear_module_state->__pyx_int_19); - Py_CLEAR(clear_module_state->__pyx_int_20); - Py_CLEAR(clear_module_state->__pyx_int_40); - Py_CLEAR(clear_module_state->__pyx_int_45); - Py_CLEAR(clear_module_state->__pyx_int_50); - Py_CLEAR(clear_module_state->__pyx_int_64); - Py_CLEAR(clear_module_state->__pyx_int_100); - Py_CLEAR(clear_module_state->__pyx_int_128); - Py_CLEAR(clear_module_state->__pyx_int_512); - Py_CLEAR(clear_module_state->__pyx_int_8080); - Py_CLEAR(clear_module_state->__pyx_int_neg_1); - Py_CLEAR(clear_module_state->__pyx_tuple_); - Py_CLEAR(clear_module_state->__pyx_tuple__7); - Py_CLEAR(clear_module_state->__pyx_tuple__8); - Py_CLEAR(clear_module_state->__pyx_tuple__9); - Py_CLEAR(clear_module_state->__pyx_slice__12); - Py_CLEAR(clear_module_state->__pyx_slice__13); - Py_CLEAR(clear_module_state->__pyx_slice__14); - Py_CLEAR(clear_module_state->__pyx_slice__15); - Py_CLEAR(clear_module_state->__pyx_slice__26); - Py_CLEAR(clear_module_state->__pyx_slice__30); - Py_CLEAR(clear_module_state->__pyx_slice__31); - Py_CLEAR(clear_module_state->__pyx_slice__32); - Py_CLEAR(clear_module_state->__pyx_slice__33); - Py_CLEAR(clear_module_state->__pyx_slice__34); - Py_CLEAR(clear_module_state->__pyx_slice__35); - Py_CLEAR(clear_module_state->__pyx_slice__36); - Py_CLEAR(clear_module_state->__pyx_slice__37); - Py_CLEAR(clear_module_state->__pyx_slice__39); - Py_CLEAR(clear_module_state->__pyx_slice__40); - Py_CLEAR(clear_module_state->__pyx_tuple__10); - Py_CLEAR(clear_module_state->__pyx_tuple__11); - Py_CLEAR(clear_module_state->__pyx_tuple__16); - Py_CLEAR(clear_module_state->__pyx_tuple__17); - Py_CLEAR(clear_module_state->__pyx_tuple__18); - Py_CLEAR(clear_module_state->__pyx_tuple__19); - Py_CLEAR(clear_module_state->__pyx_tuple__20); - Py_CLEAR(clear_module_state->__pyx_tuple__27); - Py_CLEAR(clear_module_state->__pyx_tuple__28); - Py_CLEAR(clear_module_state->__pyx_tuple__29); - Py_CLEAR(clear_module_state->__pyx_tuple__42); - Py_CLEAR(clear_module_state->__pyx_tuple__44); - Py_CLEAR(clear_module_state->__pyx_tuple__46); - Py_CLEAR(clear_module_state->__pyx_tuple__48); - Py_CLEAR(clear_module_state->__pyx_tuple__50); - Py_CLEAR(clear_module_state->__pyx_tuple__53); - Py_CLEAR(clear_module_state->__pyx_tuple__55); - Py_CLEAR(clear_module_state->__pyx_tuple__57); - Py_CLEAR(clear_module_state->__pyx_tuple__59); - Py_CLEAR(clear_module_state->__pyx_tuple__62); - Py_CLEAR(clear_module_state->__pyx_tuple__64); - Py_CLEAR(clear_module_state->__pyx_tuple__65); - Py_CLEAR(clear_module_state->__pyx_tuple__66); - Py_CLEAR(clear_module_state->__pyx_tuple__68); - Py_CLEAR(clear_module_state->__pyx_tuple__70); - Py_CLEAR(clear_module_state->__pyx_tuple__72); - Py_CLEAR(clear_module_state->__pyx_tuple__73); - Py_CLEAR(clear_module_state->__pyx_tuple__74); - Py_CLEAR(clear_module_state->__pyx_tuple__76); - Py_CLEAR(clear_module_state->__pyx_tuple__78); - Py_CLEAR(clear_module_state->__pyx_tuple__82); - Py_CLEAR(clear_module_state->__pyx_tuple__88); - Py_CLEAR(clear_module_state->__pyx_tuple__90); - Py_CLEAR(clear_module_state->__pyx_tuple__93); - Py_CLEAR(clear_module_state->__pyx_tuple__95); - Py_CLEAR(clear_module_state->__pyx_tuple__97); - Py_CLEAR(clear_module_state->__pyx_tuple__99); - Py_CLEAR(clear_module_state->__pyx_codeobj__2); - Py_CLEAR(clear_module_state->__pyx_tuple__101); - Py_CLEAR(clear_module_state->__pyx_tuple__102); - Py_CLEAR(clear_module_state->__pyx_tuple__104); - Py_CLEAR(clear_module_state->__pyx_tuple__106); - Py_CLEAR(clear_module_state->__pyx_tuple__108); - Py_CLEAR(clear_module_state->__pyx_tuple__110); - Py_CLEAR(clear_module_state->__pyx_tuple__114); - Py_CLEAR(clear_module_state->__pyx_tuple__116); - Py_CLEAR(clear_module_state->__pyx_tuple__118); - Py_CLEAR(clear_module_state->__pyx_tuple__119); - Py_CLEAR(clear_module_state->__pyx_tuple__122); - Py_CLEAR(clear_module_state->__pyx_tuple__124); - Py_CLEAR(clear_module_state->__pyx_tuple__126); - Py_CLEAR(clear_module_state->__pyx_tuple__127); - Py_CLEAR(clear_module_state->__pyx_tuple__129); - Py_CLEAR(clear_module_state->__pyx_tuple__135); - Py_CLEAR(clear_module_state->__pyx_tuple__137); - Py_CLEAR(clear_module_state->__pyx_tuple__138); - Py_CLEAR(clear_module_state->__pyx_tuple__140); - Py_CLEAR(clear_module_state->__pyx_tuple__142); - Py_CLEAR(clear_module_state->__pyx_tuple__144); - Py_CLEAR(clear_module_state->__pyx_tuple__148); - Py_CLEAR(clear_module_state->__pyx_tuple__150); - Py_CLEAR(clear_module_state->__pyx_tuple__154); - Py_CLEAR(clear_module_state->__pyx_tuple__156); - Py_CLEAR(clear_module_state->__pyx_codeobj__43); - Py_CLEAR(clear_module_state->__pyx_codeobj__45); - Py_CLEAR(clear_module_state->__pyx_codeobj__47); - Py_CLEAR(clear_module_state->__pyx_codeobj__49); - Py_CLEAR(clear_module_state->__pyx_codeobj__51); - Py_CLEAR(clear_module_state->__pyx_codeobj__52); - Py_CLEAR(clear_module_state->__pyx_codeobj__54); - Py_CLEAR(clear_module_state->__pyx_codeobj__56); - Py_CLEAR(clear_module_state->__pyx_codeobj__58); - Py_CLEAR(clear_module_state->__pyx_codeobj__60); - Py_CLEAR(clear_module_state->__pyx_codeobj__61); - Py_CLEAR(clear_module_state->__pyx_codeobj__63); - Py_CLEAR(clear_module_state->__pyx_codeobj__67); - Py_CLEAR(clear_module_state->__pyx_codeobj__69); - Py_CLEAR(clear_module_state->__pyx_codeobj__71); - Py_CLEAR(clear_module_state->__pyx_codeobj__75); - Py_CLEAR(clear_module_state->__pyx_codeobj__77); - Py_CLEAR(clear_module_state->__pyx_codeobj__79); - Py_CLEAR(clear_module_state->__pyx_codeobj__80); - Py_CLEAR(clear_module_state->__pyx_codeobj__81); - Py_CLEAR(clear_module_state->__pyx_codeobj__83); - Py_CLEAR(clear_module_state->__pyx_codeobj__84); - Py_CLEAR(clear_module_state->__pyx_codeobj__85); - Py_CLEAR(clear_module_state->__pyx_codeobj__86); - Py_CLEAR(clear_module_state->__pyx_codeobj__87); - Py_CLEAR(clear_module_state->__pyx_codeobj__89); - Py_CLEAR(clear_module_state->__pyx_codeobj__91); - Py_CLEAR(clear_module_state->__pyx_codeobj__92); - Py_CLEAR(clear_module_state->__pyx_codeobj__94); - Py_CLEAR(clear_module_state->__pyx_codeobj__96); - Py_CLEAR(clear_module_state->__pyx_codeobj__98); - Py_CLEAR(clear_module_state->__pyx_codeobj__100); - Py_CLEAR(clear_module_state->__pyx_codeobj__103); - Py_CLEAR(clear_module_state->__pyx_codeobj__105); - Py_CLEAR(clear_module_state->__pyx_codeobj__107); - Py_CLEAR(clear_module_state->__pyx_codeobj__109); - Py_CLEAR(clear_module_state->__pyx_codeobj__111); - Py_CLEAR(clear_module_state->__pyx_codeobj__112); - Py_CLEAR(clear_module_state->__pyx_codeobj__113); - Py_CLEAR(clear_module_state->__pyx_codeobj__115); - Py_CLEAR(clear_module_state->__pyx_codeobj__117); - Py_CLEAR(clear_module_state->__pyx_codeobj__120); - Py_CLEAR(clear_module_state->__pyx_codeobj__121); - Py_CLEAR(clear_module_state->__pyx_codeobj__123); - Py_CLEAR(clear_module_state->__pyx_codeobj__125); - Py_CLEAR(clear_module_state->__pyx_codeobj__128); - Py_CLEAR(clear_module_state->__pyx_codeobj__130); - Py_CLEAR(clear_module_state->__pyx_codeobj__131); - Py_CLEAR(clear_module_state->__pyx_codeobj__132); - Py_CLEAR(clear_module_state->__pyx_codeobj__133); - Py_CLEAR(clear_module_state->__pyx_codeobj__134); - Py_CLEAR(clear_module_state->__pyx_codeobj__136); - Py_CLEAR(clear_module_state->__pyx_codeobj__139); - Py_CLEAR(clear_module_state->__pyx_codeobj__141); - Py_CLEAR(clear_module_state->__pyx_codeobj__143); - Py_CLEAR(clear_module_state->__pyx_codeobj__145); - Py_CLEAR(clear_module_state->__pyx_codeobj__146); - Py_CLEAR(clear_module_state->__pyx_codeobj__147); - Py_CLEAR(clear_module_state->__pyx_codeobj__149); - Py_CLEAR(clear_module_state->__pyx_codeobj__151); - Py_CLEAR(clear_module_state->__pyx_codeobj__152); - Py_CLEAR(clear_module_state->__pyx_codeobj__153); - Py_CLEAR(clear_module_state->__pyx_codeobj__155); - Py_CLEAR(clear_module_state->__pyx_codeobj__157); - Py_CLEAR(clear_module_state->__pyx_codeobj__158); - Py_CLEAR(clear_module_state->__pyx_codeobj__159); - Py_CLEAR(clear_module_state->__pyx_codeobj__160); - Py_CLEAR(clear_module_state->__pyx_codeobj__161); - Py_CLEAR(clear_module_state->__pyx_codeobj__162); - Py_CLEAR(clear_module_state->__pyx_codeobj__163); - return 0; -} -#endif -/* #### Code section: module_state_traverse ### */ -#if CYTHON_USE_MODULE_STATE -static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { - __pyx_mstate *traverse_module_state = __pyx_mstate(m); - if (!traverse_module_state) return 0; - Py_VISIT(traverse_module_state->__pyx_d); - Py_VISIT(traverse_module_state->__pyx_b); - Py_VISIT(traverse_module_state->__pyx_cython_runtime); - Py_VISIT(traverse_module_state->__pyx_empty_tuple); - Py_VISIT(traverse_module_state->__pyx_empty_bytes); - Py_VISIT(traverse_module_state->__pyx_empty_unicode); - #ifdef __Pyx_CyFunction_USED - Py_VISIT(traverse_module_state->__pyx_CyFunctionType); - #endif - #ifdef __Pyx_FusedFunction_USED - Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); - #endif - Py_VISIT(traverse_module_state->__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters); - Py_VISIT(traverse_module_state->__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters); - Py_VISIT(traverse_module_state->__pyx_ptype_5pyrfc_6_cyrfc_Connection); - Py_VISIT(traverse_module_state->__pyx_type_5pyrfc_6_cyrfc_Connection); - Py_VISIT(traverse_module_state->__pyx_ptype_5pyrfc_6_cyrfc_Server); - Py_VISIT(traverse_module_state->__pyx_type_5pyrfc_6_cyrfc_Server); - Py_VISIT(traverse_module_state->__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - Py_VISIT(traverse_module_state->__pyx_type_5pyrfc_6_cyrfc_Throughput); - Py_VISIT(traverse_module_state->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection); - Py_VISIT(traverse_module_state->__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection); - Py_VISIT(traverse_module_state->__pyx_kp_u_00000000); - Py_VISIT(traverse_module_state->__pyx_kp_u_02); - Py_VISIT(traverse_module_state->__pyx_kp_u_04); - Py_VISIT(traverse_module_state->__pyx_n_s_ABAPApplicationError); - Py_VISIT(traverse_module_state->__pyx_n_s_ABAPRuntimeError); - Py_VISIT(traverse_module_state->__pyx_kp_s_A_function_description_This_cla); - Py_VISIT(traverse_module_state->__pyx_kp_s_A_type_description_This_class_w); - Py_VISIT(traverse_module_state->__pyx_kp_u_Argument_attributes_not_valid_t); - Py_VISIT(traverse_module_state->__pyx_kp_u_Argument_background_must_be_a_bo); - Py_VISIT(traverse_module_state->__pyx_kp_u_Argument_queue_names_not_valid_t); - Py_VISIT(traverse_module_state->__pyx_kp_u_Argument_unit_not_valid_Is_unit); - Py_VISIT(traverse_module_state->__pyx_kp_u_Authentication_exception_raised); - Py_VISIT(traverse_module_state->__pyx_kp_u_BgRfc_callback_function_key_not); - Py_VISIT(traverse_module_state->__pyx_kp_u_BgRfc_callback_function_referenc); - Py_VISIT(traverse_module_state->__pyx_kp_u_Callback_functions_may_only_rai); - Py_VISIT(traverse_module_state->__pyx_n_s_CommunicationError); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection); - Py_VISIT(traverse_module_state->__pyx_n_u_Connection); - Py_VISIT(traverse_module_state->__pyx_n_s_ConnectionParameters); - Py_VISIT(traverse_module_state->__pyx_n_s_ConnectionParameters___reduce_cy); - Py_VISIT(traverse_module_state->__pyx_n_s_ConnectionParameters___setstate); - Py_VISIT(traverse_module_state->__pyx_n_s_ConnectionParameters__free); - Py_VISIT(traverse_module_state->__pyx_n_s_ConnectionParameters_free); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection___enter); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection___exit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection___reduce_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection___setstate_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__close); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__confirm_transaction); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__confirm_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__create_and_submit_tr); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__create_and_submit_un); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__destroy_transaction); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__destroy_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__get_transaction_id); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__get_unit_id); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection__get_unit_state); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_call); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_cancel); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_close); - Py_VISIT(traverse_module_state->__pyx_kp_u_Connection_configuration_option); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_confirm_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_destroy_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_fill_and_submit_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_free); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_func_desc_remove); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_get_connection_attrib); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_get_function_descript); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_get_unit_state); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_initialize_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_is_valid); - Py_VISIT(traverse_module_state->__pyx_kp_u_Connection_object_required_recei); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_open); - Py_VISIT(traverse_module_state->__pyx_kp_u_Connection_parameters_missing); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_ping); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_reopen); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_reset_server_context); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_type_desc_get); - Py_VISIT(traverse_module_state->__pyx_n_s_Connection_type_desc_remove); - Py_VISIT(traverse_module_state->__pyx_kp_u_Connection_was_canceled); - Py_VISIT(traverse_module_state->__pyx_kp_u_Crypto_library_not_found); - Py_VISIT(traverse_module_state->__pyx_n_s_Decimal); - Py_VISIT(traverse_module_state->__pyx_n_s_Enum); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_code); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onCheck); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onCommit); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onConfirm); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onGetStat); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_in_bgRFC_handler_onRollbac); - Py_VISIT(traverse_module_state->__pyx_kp_u_Error_while_retrieving_connecti); - Py_VISIT(traverse_module_state->__pyx_n_s_ExternalApplicationError); - Py_VISIT(traverse_module_state->__pyx_n_s_ExternalAuthorizationError); - Py_VISIT(traverse_module_state->__pyx_n_s_ExternalRuntimeError); - Py_VISIT(traverse_module_state->__pyx_kp_u_Function); - Py_VISIT(traverse_module_state->__pyx_kp_u_FunctionDescription); - Py_VISIT(traverse_module_state->__pyx_n_s_FunctionDescription_2); - Py_VISIT(traverse_module_state->__pyx_n_s_FunctionDescription___init); - Py_VISIT(traverse_module_state->__pyx_n_s_FunctionDescription___repr); - Py_VISIT(traverse_module_state->__pyx_n_s_FunctionDescription_add_paramete); - Py_VISIT(traverse_module_state->__pyx_kp_u_H_M_S); - Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_connection_handle); - Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_exception_raised_by_call); - Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_length_of_unit_id_should); - Py_VISIT(traverse_module_state->__pyx_kp_u_Invocation_finished_submitting_u); - Py_VISIT(traverse_module_state->__pyx_n_s_Iterable); - Py_VISIT(traverse_module_state->__pyx_n_s_LOCALE_RADIX); - Py_VISIT(traverse_module_state->__pyx_kp_u_Length_of_parameter_unit_id_must); - Py_VISIT(traverse_module_state->__pyx_n_s_LogonError); - Py_VISIT(traverse_module_state->__pyx_n_s_MASK_DTIME); - Py_VISIT(traverse_module_state->__pyx_n_s_MASK_RETURN_IMPORT_PARAMS); - Py_VISIT(traverse_module_state->__pyx_n_s_MASK_RSTRIP); - Py_VISIT(traverse_module_state->__pyx_kp_u_New_handle); - Py_VISIT(traverse_module_state->__pyx_kp_u_No_connections_assigned); - Py_VISIT(traverse_module_state->__pyx_kp_u_No_metadata_found_for_function); - Py_VISIT(traverse_module_state->__pyx_kp_u_No_state_check_possible_of_non_b); - Py_VISIT(traverse_module_state->__pyx_kp_u_No_transaction_handle_for_this_c); - Py_VISIT(traverse_module_state->__pyx_kp_u_No_unit_handle_for_this_connecti); - Py_VISIT(traverse_module_state->__pyx_kp_u_Not_a_valid_error_group); - Py_VISIT(traverse_module_state->__pyx_n_s_OK); - Py_VISIT(traverse_module_state->__pyx_kp_u_Parameter_calls_must_be_iterable); - Py_VISIT(traverse_module_state->__pyx_kp_u_Parameter_calls_must_contain_at); - Py_VISIT(traverse_module_state->__pyx_kp_u_Parameter_calls_must_contain_val); - Py_VISIT(traverse_module_state->__pyx_kp_u_Parameter_unit_not_valid_Please); - Py_VISIT(traverse_module_state->__pyx_n_s_Pyx_CFunc_object__lParenobject); - Py_VISIT(traverse_module_state->__pyx_n_u_Q); - Py_VISIT(traverse_module_state->__pyx_n_s_RCStatus); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCError); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_ABAPOBJECT); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_BCD); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_BYTE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_CDAY); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_CHAR); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_DATE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_DECF16); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_DECF34); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_DTDAY); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_DTMONTH); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_DTWEEK); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_FLOAT); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_INT); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_INT1); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_INT2); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_INT8); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_NULL); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_NUM); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_STRING); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_STRUCTURE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_TABLE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_TIME); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_TMINUTE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_TSECOND); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_UTCLONG); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_UTCMINUTE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_UTCSECOND); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_XMLDATA); - Py_VISIT(traverse_module_state->__pyx_n_s_RFCTYPE_XSTRING); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_CHANGING); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_EXECUTED); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_EXPORT); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_EXTERNAL_FAILURE); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_IMPORT); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_NOT_FOUND); - Py_VISIT(traverse_module_state->__pyx_n_s_RFC_TABLES); - Py_VISIT(traverse_module_state->__pyx_kp_u_Remote_function_module); - Py_VISIT(traverse_module_state->__pyx_kp_u_Remote_function_module_name_must); - Py_VISIT(traverse_module_state->__pyx_kp_u_Request_for); - Py_VISIT(traverse_module_state->__pyx_n_s_RfcFieldType); - Py_VISIT(traverse_module_state->__pyx_n_s_RfcParameterDirection); - Py_VISIT(traverse_module_state->__pyx_n_s_Server); - Py_VISIT(traverse_module_state->__pyx_n_u_Server); - Py_VISIT(traverse_module_state->__pyx_kp_u_Server_2); - Py_VISIT(traverse_module_state->__pyx_n_s_Server___reduce_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_Server___setstate_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_Server__bgRfcFunction); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_add_function); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_bgrfc_init); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_close); - Py_VISIT(traverse_module_state->__pyx_kp_u_Server_function); - Py_VISIT(traverse_module_state->__pyx_kp_u_Server_function_2); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_get_server_attributes); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_serve); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_start); - Py_VISIT(traverse_module_state->__pyx_n_s_Server_stop); - Py_VISIT(traverse_module_state->__pyx_n_u_T); - Py_VISIT(traverse_module_state->__pyx_kp_u_TID); - Py_VISIT(traverse_module_state->__pyx_kp_u_There_is_an_active_unit_for_this); - Py_VISIT(traverse_module_state->__pyx_n_s_Thread); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput___enter); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput___exit); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput___reduce_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput___setstate_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput_getFromConnection); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput_removeFromConnection); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput_reset); - Py_VISIT(traverse_module_state->__pyx_n_s_Throughput_setOnConnection); - Py_VISIT(traverse_module_state->__pyx_n_s_Timer); - Py_VISIT(traverse_module_state->__pyx_kp_u_TypeDescription); - Py_VISIT(traverse_module_state->__pyx_n_s_TypeDescription_2); - Py_VISIT(traverse_module_state->__pyx_n_s_TypeDescription___init); - Py_VISIT(traverse_module_state->__pyx_n_s_TypeDescription___repr); - Py_VISIT(traverse_module_state->__pyx_n_s_TypeDescription_add_field); - Py_VISIT(traverse_module_state->__pyx_n_s_TypeError); - Py_VISIT(traverse_module_state->__pyx_kp_u_UTC); - Py_VISIT(traverse_module_state->__pyx_kp_u_Unit); - Py_VISIT(traverse_module_state->__pyx_n_s_UnitCallType); - Py_VISIT(traverse_module_state->__pyx_n_s_UnitState); - Py_VISIT(traverse_module_state->__pyx_kp_u_Unknown_RFC_type); - Py_VISIT(traverse_module_state->__pyx_kp_u_User_user_from_system_sysId_clie); - Py_VISIT(traverse_module_state->__pyx_kp_u_Values); - Py_VISIT(traverse_module_state->__pyx_kp_u_Y_m_d); - Py_VISIT(traverse_module_state->__pyx_n_s__164); - Py_VISIT(traverse_module_state->__pyx_kp_u__21); - Py_VISIT(traverse_module_state->__pyx_kp_u__22); - Py_VISIT(traverse_module_state->__pyx_kp_u__23); - Py_VISIT(traverse_module_state->__pyx_kp_u__24); - Py_VISIT(traverse_module_state->__pyx_kp_u__25); - Py_VISIT(traverse_module_state->__pyx_kp_u__3); - Py_VISIT(traverse_module_state->__pyx_kp_u__38); - Py_VISIT(traverse_module_state->__pyx_kp_u__4); - Py_VISIT(traverse_module_state->__pyx_n_s__41); - Py_VISIT(traverse_module_state->__pyx_kp_u__5); - Py_VISIT(traverse_module_state->__pyx_kp_u__6); - Py_VISIT(traverse_module_state->__pyx_kp_u_a_decimal_value_required_receive); - Py_VISIT(traverse_module_state->__pyx_kp_u_a_numeric_string_is_required_rec); - Py_VISIT(traverse_module_state->__pyx_n_u_active_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_add); - Py_VISIT(traverse_module_state->__pyx_n_s_add_field); - Py_VISIT(traverse_module_state->__pyx_n_s_add_function); - Py_VISIT(traverse_module_state->__pyx_n_s_add_parameter); - Py_VISIT(traverse_module_state->__pyx_n_s_after_remove); - Py_VISIT(traverse_module_state->__pyx_n_s_alive); - Py_VISIT(traverse_module_state->__pyx_kp_u_already_installed); - Py_VISIT(traverse_module_state->__pyx_kp_u_an_integer_required_received); - Py_VISIT(traverse_module_state->__pyx_kp_u_an_string_is_required_received); - Py_VISIT(traverse_module_state->__pyx_n_s_append); - Py_VISIT(traverse_module_state->__pyx_n_u_applicationTime); - Py_VISIT(traverse_module_state->__pyx_n_s_args); - Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines); - Py_VISIT(traverse_module_state->__pyx_n_s_attributes); - Py_VISIT(traverse_module_state->__pyx_n_u_auth_check); - Py_VISIT(traverse_module_state->__pyx_kp_u_authorization_check_for); - Py_VISIT(traverse_module_state->__pyx_n_s_auto); - Py_VISIT(traverse_module_state->__pyx_n_s_background); - Py_VISIT(traverse_module_state->__pyx_n_u_background); - Py_VISIT(traverse_module_state->__pyx_n_s_background_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_bg); - Py_VISIT(traverse_module_state->__pyx_n_u_bgRFC); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handler); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handler_onCheck_is_not_reg); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handler_onCommit_is_not_re); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handler_onConfirm_is_not_r); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handler_onGetState_is_not); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handler_onRollback_is_not); - Py_VISIT(traverse_module_state->__pyx_kp_u_bgRFC_handlers_installed); - Py_VISIT(traverse_module_state->__pyx_n_s_bgRfcFunction); - Py_VISIT(traverse_module_state->__pyx_n_s_bgrfc_handlers_count); - Py_VISIT(traverse_module_state->__pyx_n_s_bgrfc_init); - Py_VISIT(traverse_module_state->__pyx_kp_u_but_found); - Py_VISIT(traverse_module_state->__pyx_n_s_cName); - Py_VISIT(traverse_module_state->__pyx_n_s_call); - Py_VISIT(traverse_module_state->__pyx_n_u_call_type); - Py_VISIT(traverse_module_state->__pyx_n_s_callback); - Py_VISIT(traverse_module_state->__pyx_n_u_callback); - Py_VISIT(traverse_module_state->__pyx_n_s_calls); - Py_VISIT(traverse_module_state->__pyx_n_s_cancel); - Py_VISIT(traverse_module_state->__pyx_n_s_cancel_connection); - Py_VISIT(traverse_module_state->__pyx_n_s_cancel_timer); - Py_VISIT(traverse_module_state->__pyx_n_s_cfunc_to_py); - Py_VISIT(traverse_module_state->__pyx_kp_u_chars_found); - Py_VISIT(traverse_module_state->__pyx_n_u_check); - Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem); - Py_VISIT(traverse_module_state->__pyx_n_s_clear); - Py_VISIT(traverse_module_state->__pyx_n_u_client); - Py_VISIT(traverse_module_state->__pyx_n_s_client_connection); - Py_VISIT(traverse_module_state->__pyx_n_s_client_params); - Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback); - Py_VISIT(traverse_module_state->__pyx_n_s_close); - Py_VISIT(traverse_module_state->__pyx_n_s_close_2); - Py_VISIT(traverse_module_state->__pyx_kp_u_closed); - Py_VISIT(traverse_module_state->__pyx_n_s_closed_handle); - Py_VISIT(traverse_module_state->__pyx_n_s_code); - Py_VISIT(traverse_module_state->__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION); - Py_VISIT(traverse_module_state->__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE); - Py_VISIT(traverse_module_state->__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR); - Py_VISIT(traverse_module_state->__pyx_n_u_codepage); - Py_VISIT(traverse_module_state->__pyx_n_s_collections_abc); - Py_VISIT(traverse_module_state->__pyx_n_u_commit); - Py_VISIT(traverse_module_state->__pyx_n_s_committed); - Py_VISIT(traverse_module_state->__pyx_n_s_config); - Py_VISIT(traverse_module_state->__pyx_n_u_confirm); - Py_VISIT(traverse_module_state->__pyx_n_s_confirm_transaction); - Py_VISIT(traverse_module_state->__pyx_n_s_confirm_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_confirm_unit_2); - Py_VISIT(traverse_module_state->__pyx_n_s_confirmed); - Py_VISIT(traverse_module_state->__pyx_n_s_connection); - Py_VISIT(traverse_module_state->__pyx_n_u_connection_attributes); - Py_VISIT(traverse_module_state->__pyx_n_s_connections); - Py_VISIT(traverse_module_state->__pyx_n_u_cpicConvId); - Py_VISIT(traverse_module_state->__pyx_n_s_create_and_submit_transaction); - Py_VISIT(traverse_module_state->__pyx_n_s_create_and_submit_unit); - Py_VISIT(traverse_module_state->__pyx_kp_u_created); - Py_VISIT(traverse_module_state->__pyx_n_s_created_2); - Py_VISIT(traverse_module_state->__pyx_n_u_currentBusyCount); - Py_VISIT(traverse_module_state->__pyx_n_u_d); - Py_VISIT(traverse_module_state->__pyx_n_s_date); - Py_VISIT(traverse_module_state->__pyx_kp_u_date_value_required_received); - Py_VISIT(traverse_module_state->__pyx_n_s_datetime); - Py_VISIT(traverse_module_state->__pyx_n_s_day); - Py_VISIT(traverse_module_state->__pyx_n_s_debug); - Py_VISIT(traverse_module_state->__pyx_n_u_debug); - Py_VISIT(traverse_module_state->__pyx_n_s_decimal); - Py_VISIT(traverse_module_state->__pyx_n_u_decimal_point); - Py_VISIT(traverse_module_state->__pyx_n_s_decimals); - Py_VISIT(traverse_module_state->__pyx_n_u_decimals); - Py_VISIT(traverse_module_state->__pyx_n_s_decode); - Py_VISIT(traverse_module_state->__pyx_n_s_default_auth_check); - Py_VISIT(traverse_module_state->__pyx_n_s_default_value); - Py_VISIT(traverse_module_state->__pyx_n_u_default_value); - Py_VISIT(traverse_module_state->__pyx_kp_u_default_value_string); - Py_VISIT(traverse_module_state->__pyx_n_u_deserializationTime); - Py_VISIT(traverse_module_state->__pyx_n_u_dest); - Py_VISIT(traverse_module_state->__pyx_n_s_destroy); - Py_VISIT(traverse_module_state->__pyx_n_s_destroy_transaction); - Py_VISIT(traverse_module_state->__pyx_n_s_destroy_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_destroy_unit_2); - Py_VISIT(traverse_module_state->__pyx_n_s_dict); - Py_VISIT(traverse_module_state->__pyx_kp_u_dictionary_required_for_structur); - Py_VISIT(traverse_module_state->__pyx_n_s_direction); - Py_VISIT(traverse_module_state->__pyx_n_u_direction); - Py_VISIT(traverse_module_state->__pyx_kp_u_direction_string); - Py_VISIT(traverse_module_state->__pyx_kp_u_disable); - Py_VISIT(traverse_module_state->__pyx_n_s_doc); - Py_VISIT(traverse_module_state->__pyx_n_u_dtime); - Py_VISIT(traverse_module_state->__pyx_n_s_e); - Py_VISIT(traverse_module_state->__pyx_kp_u_enable); - Py_VISIT(traverse_module_state->__pyx_n_s_encode); - Py_VISIT(traverse_module_state->__pyx_n_s_enter); - Py_VISIT(traverse_module_state->__pyx_n_s_enum); - Py_VISIT(traverse_module_state->__pyx_n_s_enum_names); - Py_VISIT(traverse_module_state->__pyx_n_s_enum_values); - Py_VISIT(traverse_module_state->__pyx_n_s_enumerate); - Py_VISIT(traverse_module_state->__pyx_n_s_errorInfo); - Py_VISIT(traverse_module_state->__pyx_n_s_exc_info); - Py_VISIT(traverse_module_state->__pyx_n_s_executed); - Py_VISIT(traverse_module_state->__pyx_n_s_exit); - Py_VISIT(traverse_module_state->__pyx_kp_u_field); - Py_VISIT(traverse_module_state->__pyx_kp_u_field_name_string); - Py_VISIT(traverse_module_state->__pyx_kp_u_field_name_string_2); - Py_VISIT(traverse_module_state->__pyx_n_s_field_type); - Py_VISIT(traverse_module_state->__pyx_n_u_field_type); - Py_VISIT(traverse_module_state->__pyx_kp_u_field_type_string); - Py_VISIT(traverse_module_state->__pyx_n_s_fields); - Py_VISIT(traverse_module_state->__pyx_kp_u_fields_n_uclength); - Py_VISIT(traverse_module_state->__pyx_n_s_fill_and_submit_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_format); - Py_VISIT(traverse_module_state->__pyx_n_s_free); - Py_VISIT(traverse_module_state->__pyx_kp_u_free_2); - Py_VISIT(traverse_module_state->__pyx_n_s_free_3); - Py_VISIT(traverse_module_state->__pyx_n_s_funcCont); - Py_VISIT(traverse_module_state->__pyx_n_s_funcDesc); - Py_VISIT(traverse_module_state->__pyx_n_s_funcName); - Py_VISIT(traverse_module_state->__pyx_n_s_func_data); - Py_VISIT(traverse_module_state->__pyx_n_s_func_desc_handle); - Py_VISIT(traverse_module_state->__pyx_n_u_func_desc_handle); - Py_VISIT(traverse_module_state->__pyx_n_s_func_desc_remove); - Py_VISIT(traverse_module_state->__pyx_n_s_func_name); - Py_VISIT(traverse_module_state->__pyx_n_s_function_name); - Py_VISIT(traverse_module_state->__pyx_kp_u_gc); - Py_VISIT(traverse_module_state->__pyx_n_u_genericHandler); - Py_VISIT(traverse_module_state->__pyx_n_s_get); - Py_VISIT(traverse_module_state->__pyx_n_s_getFromConnection); - Py_VISIT(traverse_module_state->__pyx_n_u_getState); - Py_VISIT(traverse_module_state->__pyx_n_s_get_connection_attributes); - Py_VISIT(traverse_module_state->__pyx_n_s_get_function_description); - Py_VISIT(traverse_module_state->__pyx_n_s_get_nwrfclib_version); - Py_VISIT(traverse_module_state->__pyx_n_s_get_server_attributes); - Py_VISIT(traverse_module_state->__pyx_n_s_get_transaction_id); - Py_VISIT(traverse_module_state->__pyx_n_s_get_unit_id); - Py_VISIT(traverse_module_state->__pyx_n_s_get_unit_state); - Py_VISIT(traverse_module_state->__pyx_n_s_get_unit_state_2); - Py_VISIT(traverse_module_state->__pyx_n_s_gethostname); - Py_VISIT(traverse_module_state->__pyx_n_s_getstate); - Py_VISIT(traverse_module_state->__pyx_n_s_handle); - Py_VISIT(traverse_module_state->__pyx_kp_u_handle_2); - Py_VISIT(traverse_module_state->__pyx_n_s_handle_3); - Py_VISIT(traverse_module_state->__pyx_kp_u_has_invalid_state); - Py_VISIT(traverse_module_state->__pyx_n_u_host); - Py_VISIT(traverse_module_state->__pyx_n_u_hostname); - Py_VISIT(traverse_module_state->__pyx_n_s_hour); - Py_VISIT(traverse_module_state->__pyx_n_s_i); - Py_VISIT(traverse_module_state->__pyx_n_s_id); - Py_VISIT(traverse_module_state->__pyx_n_u_id); - Py_VISIT(traverse_module_state->__pyx_n_s_idunitStateentifier); - Py_VISIT(traverse_module_state->__pyx_n_s_import); - Py_VISIT(traverse_module_state->__pyx_n_s_in_process); - Py_VISIT(traverse_module_state->__pyx_n_s_init); - Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass); - Py_VISIT(traverse_module_state->__pyx_n_s_initialize_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_initializing); - Py_VISIT(traverse_module_state->__pyx_n_u_installed); - Py_VISIT(traverse_module_state->__pyx_n_s_int_field); - Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_state); - Py_VISIT(traverse_module_state->__pyx_kp_u_invocation_rejected_because_the); - Py_VISIT(traverse_module_state->__pyx_n_s_isActive); - Py_VISIT(traverse_module_state->__pyx_n_s_isValid); - Py_VISIT(traverse_module_state->__pyx_n_s_is_alive); - Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine); - Py_VISIT(traverse_module_state->__pyx_kp_u_is_not_callable); - Py_VISIT(traverse_module_state->__pyx_kp_u_is_not_supported); - Py_VISIT(traverse_module_state->__pyx_n_u_is_stateful); - Py_VISIT(traverse_module_state->__pyx_n_s_is_valid); - Py_VISIT(traverse_module_state->__pyx_n_s_isdigit); - Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled); - Py_VISIT(traverse_module_state->__pyx_n_s_isfile); - Py_VISIT(traverse_module_state->__pyx_n_u_isoLanguage); - Py_VISIT(traverse_module_state->__pyx_n_s_items); - Py_VISIT(traverse_module_state->__pyx_n_s_iteritems); - Py_VISIT(traverse_module_state->__pyx_n_s_join); - Py_VISIT(traverse_module_state->__pyx_n_u_kernelRel); - Py_VISIT(traverse_module_state->__pyx_n_u_kernel_trace); - Py_VISIT(traverse_module_state->__pyx_n_s_key); - Py_VISIT(traverse_module_state->__pyx_n_s_lang_iso); - Py_VISIT(traverse_module_state->__pyx_n_s_lang_sap); - Py_VISIT(traverse_module_state->__pyx_n_u_language); - Py_VISIT(traverse_module_state->__pyx_n_s_language_iso_to_sap); - Py_VISIT(traverse_module_state->__pyx_n_s_language_sap_to_iso); - Py_VISIT(traverse_module_state->__pyx_kp_u_launched); - Py_VISIT(traverse_module_state->__pyx_kp_u_length); - Py_VISIT(traverse_module_state->__pyx_kp_u_list_required_for_table_paramete); - Py_VISIT(traverse_module_state->__pyx_n_s_locale); - Py_VISIT(traverse_module_state->__pyx_n_s_localeconv); - Py_VISIT(traverse_module_state->__pyx_n_u_lock); - Py_VISIT(traverse_module_state->__pyx_n_s_log_message); - Py_VISIT(traverse_module_state->__pyx_n_s_main); - Py_VISIT(traverse_module_state->__pyx_n_s_major); - Py_VISIT(traverse_module_state->__pyx_n_u_major); - Py_VISIT(traverse_module_state->__pyx_n_s_message); - Py_VISIT(traverse_module_state->__pyx_n_s_metaclass); - Py_VISIT(traverse_module_state->__pyx_n_u_metadataLookup); - Py_VISIT(traverse_module_state->__pyx_n_s_minor); - Py_VISIT(traverse_module_state->__pyx_n_u_minor); - Py_VISIT(traverse_module_state->__pyx_n_s_minute); - Py_VISIT(traverse_module_state->__pyx_n_s_module); - Py_VISIT(traverse_module_state->__pyx_n_s_month); - Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_class); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_number); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_type); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_v1); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_v2); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_v3); - Py_VISIT(traverse_module_state->__pyx_n_s_msg_v4); - Py_VISIT(traverse_module_state->__pyx_kp_u_multi_count); - Py_VISIT(traverse_module_state->__pyx_kp_u_must_be_in); - Py_VISIT(traverse_module_state->__pyx_kp_u_must_be_in_2); - Py_VISIT(traverse_module_state->__pyx_kp_u_must_be_of_type_integer); - Py_VISIT(traverse_module_state->__pyx_kp_u_must_not_exceed_30_chars); - Py_VISIT(traverse_module_state->__pyx_n_s_name); - Py_VISIT(traverse_module_state->__pyx_n_u_name); - Py_VISIT(traverse_module_state->__pyx_n_s_name_2); - Py_VISIT(traverse_module_state->__pyx_n_u_no_commit_check); - Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non); - Py_VISIT(traverse_module_state->__pyx_n_s_not_found); - Py_VISIT(traverse_module_state->__pyx_n_u_not_requested); - Py_VISIT(traverse_module_state->__pyx_n_s_nuc_length); - Py_VISIT(traverse_module_state->__pyx_n_u_nuc_length); - Py_VISIT(traverse_module_state->__pyx_n_s_nuc_offset); - Py_VISIT(traverse_module_state->__pyx_n_u_nuc_offset); - Py_VISIT(traverse_module_state->__pyx_n_u_numberOfCalls); - Py_VISIT(traverse_module_state->__pyx_n_s_object); - Py_VISIT(traverse_module_state->__pyx_kp_u_of_type); - Py_VISIT(traverse_module_state->__pyx_n_s_open); - Py_VISIT(traverse_module_state->__pyx_n_s_openErrorInfo); - Py_VISIT(traverse_module_state->__pyx_n_s_optional); - Py_VISIT(traverse_module_state->__pyx_n_u_optional); - Py_VISIT(traverse_module_state->__pyx_n_s_options); - Py_VISIT(traverse_module_state->__pyx_n_s_origin); - Py_VISIT(traverse_module_state->__pyx_n_s_os_path); - Py_VISIT(traverse_module_state->__pyx_n_s_parameter_text); - Py_VISIT(traverse_module_state->__pyx_n_u_parameter_text); - Py_VISIT(traverse_module_state->__pyx_kp_u_parameter_text_string_parameter); - Py_VISIT(traverse_module_state->__pyx_n_s_parameter_type); - Py_VISIT(traverse_module_state->__pyx_n_u_parameter_type); - Py_VISIT(traverse_module_state->__pyx_kp_u_parameter_type_string); - Py_VISIT(traverse_module_state->__pyx_n_s_parameters); - Py_VISIT(traverse_module_state->__pyx_kp_u_params); - Py_VISIT(traverse_module_state->__pyx_n_s_params_2); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerBytesPerChar); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerCodepage); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerHost); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerIP); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerIPv6); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerRel); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerSystemCodepage); - Py_VISIT(traverse_module_state->__pyx_n_u_partnerType); - Py_VISIT(traverse_module_state->__pyx_n_u_patchLevel); - Py_VISIT(traverse_module_state->__pyx_n_s_patchlevel); - Py_VISIT(traverse_module_state->__pyx_n_s_pathName); - Py_VISIT(traverse_module_state->__pyx_n_s_path_name); - Py_VISIT(traverse_module_state->__pyx_n_u_peakBusyCount); - Py_VISIT(traverse_module_state->__pyx_n_s_ping); - Py_VISIT(traverse_module_state->__pyx_n_s_platform); - Py_VISIT(traverse_module_state->__pyx_n_u_platform); - Py_VISIT(traverse_module_state->__pyx_n_u_port); - Py_VISIT(traverse_module_state->__pyx_n_s_prepare); - Py_VISIT(traverse_module_state->__pyx_n_s_print); - Py_VISIT(traverse_module_state->__pyx_n_u_progName); - Py_VISIT(traverse_module_state->__pyx_n_u_program); - Py_VISIT(traverse_module_state->__pyx_n_u_protocolType); - Py_VISIT(traverse_module_state->__pyx_n_s_protocol_type); - Py_VISIT(traverse_module_state->__pyx_n_s_pyrfc__cyrfc); - Py_VISIT(traverse_module_state->__pyx_n_s_pyrfc__exception); - Py_VISIT(traverse_module_state->__pyx_n_s_pyrfc__utils); - Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state); - Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable); - Py_VISIT(traverse_module_state->__pyx_n_s_qualname); - Py_VISIT(traverse_module_state->__pyx_n_s_queueName); - Py_VISIT(traverse_module_state->__pyx_n_s_queueNameCount); - Py_VISIT(traverse_module_state->__pyx_n_s_queueNames); - Py_VISIT(traverse_module_state->__pyx_n_s_queue_name); - Py_VISIT(traverse_module_state->__pyx_n_s_queue_names); - Py_VISIT(traverse_module_state->__pyx_n_s_queued); - Py_VISIT(traverse_module_state->__pyx_n_u_queued); - Py_VISIT(traverse_module_state->__pyx_kp_u_raises_ABAPApplicationError); - Py_VISIT(traverse_module_state->__pyx_kp_u_raises_ABAPRuntimeError); - Py_VISIT(traverse_module_state->__pyx_kp_u_raises_ExternalRuntimeError); - Py_VISIT(traverse_module_state->__pyx_kp_u_raises_an_invalid_exception_Exc); - Py_VISIT(traverse_module_state->__pyx_n_s_range); - Py_VISIT(traverse_module_state->__pyx_n_s_rc); - Py_VISIT(traverse_module_state->__pyx_n_u_receivedBytes); - Py_VISIT(traverse_module_state->__pyx_n_s_reduce); - Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython); - Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex); - Py_VISIT(traverse_module_state->__pyx_n_u_registrationCount); - Py_VISIT(traverse_module_state->__pyx_n_s_registry); - Py_VISIT(traverse_module_state->__pyx_n_u_rel); - Py_VISIT(traverse_module_state->__pyx_n_s_reload_ini_file); - Py_VISIT(traverse_module_state->__pyx_n_s_remove); - Py_VISIT(traverse_module_state->__pyx_n_s_removeFromConnection); - Py_VISIT(traverse_module_state->__pyx_n_s_reopen); - Py_VISIT(traverse_module_state->__pyx_n_s_repr); - Py_VISIT(traverse_module_state->__pyx_n_s_request_context); - Py_VISIT(traverse_module_state->__pyx_kp_u_request_context_2); - Py_VISIT(traverse_module_state->__pyx_n_u_reserved); - Py_VISIT(traverse_module_state->__pyx_n_s_reset); - Py_VISIT(traverse_module_state->__pyx_n_s_reset_server_context); - Py_VISIT(traverse_module_state->__pyx_n_s_result); - Py_VISIT(traverse_module_state->__pyx_n_u_return_import_params); - Py_VISIT(traverse_module_state->__pyx_n_u_rfcRole); - Py_VISIT(traverse_module_state->__pyx_n_s_rfcServerState); - Py_VISIT(traverse_module_state->__pyx_n_u_rollback); - Py_VISIT(traverse_module_state->__pyx_n_s_rolled_back); - Py_VISIT(traverse_module_state->__pyx_n_s_rsplit); - Py_VISIT(traverse_module_state->__pyx_n_s_rstrip); - Py_VISIT(traverse_module_state->__pyx_n_u_rstrip); - Py_VISIT(traverse_module_state->__pyx_kp_u_sapnwrfc_ini); - Py_VISIT(traverse_module_state->__pyx_kp_u_sapnwrfc_ini_not_found_in); - Py_VISIT(traverse_module_state->__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin); - Py_VISIT(traverse_module_state->__pyx_n_s_sapuc); - Py_VISIT(traverse_module_state->__pyx_n_u_sat_trace); - Py_VISIT(traverse_module_state->__pyx_n_s_second); - Py_VISIT(traverse_module_state->__pyx_n_s_self); - Py_VISIT(traverse_module_state->__pyx_kp_s_self__handle_self__tHandle_self); - Py_VISIT(traverse_module_state->__pyx_kp_s_self__throughput_handle_cannot_b); - Py_VISIT(traverse_module_state->__pyx_n_u_sending_date); - Py_VISIT(traverse_module_state->__pyx_n_u_sending_time); - Py_VISIT(traverse_module_state->__pyx_n_u_sentBytes); - Py_VISIT(traverse_module_state->__pyx_n_u_serializationTime); - Py_VISIT(traverse_module_state->__pyx_n_s_serve); - Py_VISIT(traverse_module_state->__pyx_n_u_server); - Py_VISIT(traverse_module_state->__pyx_n_u_serverName); - Py_VISIT(traverse_module_state->__pyx_n_s_server_context); - Py_VISIT(traverse_module_state->__pyx_n_u_server_context); - Py_VISIT(traverse_module_state->__pyx_n_s_server_functions); - Py_VISIT(traverse_module_state->__pyx_n_s_server_handle); - Py_VISIT(traverse_module_state->__pyx_n_s_server_log); - Py_VISIT(traverse_module_state->__pyx_n_u_server_log_2); - Py_VISIT(traverse_module_state->__pyx_n_s_server_params); - Py_VISIT(traverse_module_state->__pyx_n_s_setOnConnection); - Py_VISIT(traverse_module_state->__pyx_n_s_set_cryptolib_path); - Py_VISIT(traverse_module_state->__pyx_n_s_set_ini_file_directory); - Py_VISIT(traverse_module_state->__pyx_n_s_set_locale_radix); - Py_VISIT(traverse_module_state->__pyx_n_s_set_name); - Py_VISIT(traverse_module_state->__pyx_n_s_setstate); - Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython); - Py_VISIT(traverse_module_state->__pyx_kp_u_should_be_from_1_30_chars); - Py_VISIT(traverse_module_state->__pyx_kp_u_should_be_from_1_30_chars_2); - Py_VISIT(traverse_module_state->__pyx_n_s_skip_parameters); - Py_VISIT(traverse_module_state->__pyx_n_s_socket); - Py_VISIT(traverse_module_state->__pyx_n_s_spec); - Py_VISIT(traverse_module_state->__pyx_kp_s_src_pyrfc__cyrfc_pyx); - Py_VISIT(traverse_module_state->__pyx_n_s_start); - Py_VISIT(traverse_module_state->__pyx_kp_u_started); - Py_VISIT(traverse_module_state->__pyx_n_s_state); - Py_VISIT(traverse_module_state->__pyx_n_u_state); - Py_VISIT(traverse_module_state->__pyx_n_s_staticmethod); - Py_VISIT(traverse_module_state->__pyx_n_s_stop); - Py_VISIT(traverse_module_state->__pyx_kp_u_stopped); - Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource); - Py_VISIT(traverse_module_state->__pyx_n_s_strptime); - Py_VISIT(traverse_module_state->__pyx_n_s_super); - Py_VISIT(traverse_module_state->__pyx_n_s_synchronous); - Py_VISIT(traverse_module_state->__pyx_n_s_sys); - Py_VISIT(traverse_module_state->__pyx_n_s_sysId); - Py_VISIT(traverse_module_state->__pyx_n_u_sysId); - Py_VISIT(traverse_module_state->__pyx_n_u_sysNumber); - Py_VISIT(traverse_module_state->__pyx_n_s_sysid); - Py_VISIT(traverse_module_state->__pyx_n_s_t); - Py_VISIT(traverse_module_state->__pyx_n_u_t_code); - Py_VISIT(traverse_module_state->__pyx_n_s_target); - Py_VISIT(traverse_module_state->__pyx_n_s_test); - Py_VISIT(traverse_module_state->__pyx_n_s_threading); - Py_VISIT(traverse_module_state->__pyx_n_s_throughput); - Py_VISIT(traverse_module_state->__pyx_n_s_tid); - Py_VISIT(traverse_module_state->__pyx_n_s_time); - Py_VISIT(traverse_module_state->__pyx_kp_u_time_value_required_received); - Py_VISIT(traverse_module_state->__pyx_n_s_timeout); - Py_VISIT(traverse_module_state->__pyx_n_u_timeout); - Py_VISIT(traverse_module_state->__pyx_n_u_totalTime); - Py_VISIT(traverse_module_state->__pyx_n_u_trace); - Py_VISIT(traverse_module_state->__pyx_n_s_traceback); - Py_VISIT(traverse_module_state->__pyx_n_s_transaction_id); - Py_VISIT(traverse_module_state->__pyx_n_s_transactional); - Py_VISIT(traverse_module_state->__pyx_n_s_type); - Py_VISIT(traverse_module_state->__pyx_n_u_type); - Py_VISIT(traverse_module_state->__pyx_n_s_typeDesc); - Py_VISIT(traverse_module_state->__pyx_n_s_typeName); - Py_VISIT(traverse_module_state->__pyx_n_s_type_desc_get); - Py_VISIT(traverse_module_state->__pyx_n_s_type_desc_remove); - Py_VISIT(traverse_module_state->__pyx_n_s_type_description); - Py_VISIT(traverse_module_state->__pyx_n_u_type_description); - Py_VISIT(traverse_module_state->__pyx_n_s_type_name); - Py_VISIT(traverse_module_state->__pyx_n_s_uIdentifier); - Py_VISIT(traverse_module_state->__pyx_n_s_uc_length); - Py_VISIT(traverse_module_state->__pyx_n_u_uc_length); - Py_VISIT(traverse_module_state->__pyx_n_s_uc_offset); - Py_VISIT(traverse_module_state->__pyx_n_u_uc_offset); - Py_VISIT(traverse_module_state->__pyx_n_s_uclang_iso); - Py_VISIT(traverse_module_state->__pyx_n_s_uclang_sap); - Py_VISIT(traverse_module_state->__pyx_n_s_uid); - Py_VISIT(traverse_module_state->__pyx_n_s_unit); - Py_VISIT(traverse_module_state->__pyx_n_s_unitAttr); - Py_VISIT(traverse_module_state->__pyx_n_u_unit_attributes); - Py_VISIT(traverse_module_state->__pyx_n_u_unit_history); - Py_VISIT(traverse_module_state->__pyx_n_s_unit_id); - Py_VISIT(traverse_module_state->__pyx_n_s_unit_identifier); - Py_VISIT(traverse_module_state->__pyx_n_u_unit_identifier); - Py_VISIT(traverse_module_state->__pyx_n_s_update); - Py_VISIT(traverse_module_state->__pyx_n_s_upper); - Py_VISIT(traverse_module_state->__pyx_n_u_user); - Py_VISIT(traverse_module_state->__pyx_n_s_utcnow); - Py_VISIT(traverse_module_state->__pyx_n_s_value); - Py_VISIT(traverse_module_state->__pyx_n_s_values); - Py_VISIT(traverse_module_state->__pyx_kp_u_when_filling); - Py_VISIT(traverse_module_state->__pyx_kp_u_when_getting_server_context_for); - Py_VISIT(traverse_module_state->__pyx_kp_u_when_wrapping); - Py_VISIT(traverse_module_state->__pyx_kp_u_with); - Py_VISIT(traverse_module_state->__pyx_n_s_wrap); - Py_VISIT(traverse_module_state->__pyx_kp_u_wrapString_uclen_u_utf8_size_u); - Py_VISIT(traverse_module_state->__pyx_n_s_year); - Py_VISIT(traverse_module_state->__pyx_int_0); - Py_VISIT(traverse_module_state->__pyx_int_1); - Py_VISIT(traverse_module_state->__pyx_int_2); - Py_VISIT(traverse_module_state->__pyx_int_3); - Py_VISIT(traverse_module_state->__pyx_int_4); - Py_VISIT(traverse_module_state->__pyx_int_5); - Py_VISIT(traverse_module_state->__pyx_int_6); - Py_VISIT(traverse_module_state->__pyx_int_8); - Py_VISIT(traverse_module_state->__pyx_int_12); - Py_VISIT(traverse_module_state->__pyx_int_15); - Py_VISIT(traverse_module_state->__pyx_int_17); - Py_VISIT(traverse_module_state->__pyx_int_19); - Py_VISIT(traverse_module_state->__pyx_int_20); - Py_VISIT(traverse_module_state->__pyx_int_40); - Py_VISIT(traverse_module_state->__pyx_int_45); - Py_VISIT(traverse_module_state->__pyx_int_50); - Py_VISIT(traverse_module_state->__pyx_int_64); - Py_VISIT(traverse_module_state->__pyx_int_100); - Py_VISIT(traverse_module_state->__pyx_int_128); - Py_VISIT(traverse_module_state->__pyx_int_512); - Py_VISIT(traverse_module_state->__pyx_int_8080); - Py_VISIT(traverse_module_state->__pyx_int_neg_1); - Py_VISIT(traverse_module_state->__pyx_tuple_); - Py_VISIT(traverse_module_state->__pyx_tuple__7); - Py_VISIT(traverse_module_state->__pyx_tuple__8); - Py_VISIT(traverse_module_state->__pyx_tuple__9); - Py_VISIT(traverse_module_state->__pyx_slice__12); - Py_VISIT(traverse_module_state->__pyx_slice__13); - Py_VISIT(traverse_module_state->__pyx_slice__14); - Py_VISIT(traverse_module_state->__pyx_slice__15); - Py_VISIT(traverse_module_state->__pyx_slice__26); - Py_VISIT(traverse_module_state->__pyx_slice__30); - Py_VISIT(traverse_module_state->__pyx_slice__31); - Py_VISIT(traverse_module_state->__pyx_slice__32); - Py_VISIT(traverse_module_state->__pyx_slice__33); - Py_VISIT(traverse_module_state->__pyx_slice__34); - Py_VISIT(traverse_module_state->__pyx_slice__35); - Py_VISIT(traverse_module_state->__pyx_slice__36); - Py_VISIT(traverse_module_state->__pyx_slice__37); - Py_VISIT(traverse_module_state->__pyx_slice__39); - Py_VISIT(traverse_module_state->__pyx_slice__40); - Py_VISIT(traverse_module_state->__pyx_tuple__10); - Py_VISIT(traverse_module_state->__pyx_tuple__11); - Py_VISIT(traverse_module_state->__pyx_tuple__16); - Py_VISIT(traverse_module_state->__pyx_tuple__17); - Py_VISIT(traverse_module_state->__pyx_tuple__18); - Py_VISIT(traverse_module_state->__pyx_tuple__19); - Py_VISIT(traverse_module_state->__pyx_tuple__20); - Py_VISIT(traverse_module_state->__pyx_tuple__27); - Py_VISIT(traverse_module_state->__pyx_tuple__28); - Py_VISIT(traverse_module_state->__pyx_tuple__29); - Py_VISIT(traverse_module_state->__pyx_tuple__42); - Py_VISIT(traverse_module_state->__pyx_tuple__44); - Py_VISIT(traverse_module_state->__pyx_tuple__46); - Py_VISIT(traverse_module_state->__pyx_tuple__48); - Py_VISIT(traverse_module_state->__pyx_tuple__50); - Py_VISIT(traverse_module_state->__pyx_tuple__53); - Py_VISIT(traverse_module_state->__pyx_tuple__55); - Py_VISIT(traverse_module_state->__pyx_tuple__57); - Py_VISIT(traverse_module_state->__pyx_tuple__59); - Py_VISIT(traverse_module_state->__pyx_tuple__62); - Py_VISIT(traverse_module_state->__pyx_tuple__64); - Py_VISIT(traverse_module_state->__pyx_tuple__65); - Py_VISIT(traverse_module_state->__pyx_tuple__66); - Py_VISIT(traverse_module_state->__pyx_tuple__68); - Py_VISIT(traverse_module_state->__pyx_tuple__70); - Py_VISIT(traverse_module_state->__pyx_tuple__72); - Py_VISIT(traverse_module_state->__pyx_tuple__73); - Py_VISIT(traverse_module_state->__pyx_tuple__74); - Py_VISIT(traverse_module_state->__pyx_tuple__76); - Py_VISIT(traverse_module_state->__pyx_tuple__78); - Py_VISIT(traverse_module_state->__pyx_tuple__82); - Py_VISIT(traverse_module_state->__pyx_tuple__88); - Py_VISIT(traverse_module_state->__pyx_tuple__90); - Py_VISIT(traverse_module_state->__pyx_tuple__93); - Py_VISIT(traverse_module_state->__pyx_tuple__95); - Py_VISIT(traverse_module_state->__pyx_tuple__97); - Py_VISIT(traverse_module_state->__pyx_tuple__99); - Py_VISIT(traverse_module_state->__pyx_codeobj__2); - Py_VISIT(traverse_module_state->__pyx_tuple__101); - Py_VISIT(traverse_module_state->__pyx_tuple__102); - Py_VISIT(traverse_module_state->__pyx_tuple__104); - Py_VISIT(traverse_module_state->__pyx_tuple__106); - Py_VISIT(traverse_module_state->__pyx_tuple__108); - Py_VISIT(traverse_module_state->__pyx_tuple__110); - Py_VISIT(traverse_module_state->__pyx_tuple__114); - Py_VISIT(traverse_module_state->__pyx_tuple__116); - Py_VISIT(traverse_module_state->__pyx_tuple__118); - Py_VISIT(traverse_module_state->__pyx_tuple__119); - Py_VISIT(traverse_module_state->__pyx_tuple__122); - Py_VISIT(traverse_module_state->__pyx_tuple__124); - Py_VISIT(traverse_module_state->__pyx_tuple__126); - Py_VISIT(traverse_module_state->__pyx_tuple__127); - Py_VISIT(traverse_module_state->__pyx_tuple__129); - Py_VISIT(traverse_module_state->__pyx_tuple__135); - Py_VISIT(traverse_module_state->__pyx_tuple__137); - Py_VISIT(traverse_module_state->__pyx_tuple__138); - Py_VISIT(traverse_module_state->__pyx_tuple__140); - Py_VISIT(traverse_module_state->__pyx_tuple__142); - Py_VISIT(traverse_module_state->__pyx_tuple__144); - Py_VISIT(traverse_module_state->__pyx_tuple__148); - Py_VISIT(traverse_module_state->__pyx_tuple__150); - Py_VISIT(traverse_module_state->__pyx_tuple__154); - Py_VISIT(traverse_module_state->__pyx_tuple__156); - Py_VISIT(traverse_module_state->__pyx_codeobj__43); - Py_VISIT(traverse_module_state->__pyx_codeobj__45); - Py_VISIT(traverse_module_state->__pyx_codeobj__47); - Py_VISIT(traverse_module_state->__pyx_codeobj__49); - Py_VISIT(traverse_module_state->__pyx_codeobj__51); - Py_VISIT(traverse_module_state->__pyx_codeobj__52); - Py_VISIT(traverse_module_state->__pyx_codeobj__54); - Py_VISIT(traverse_module_state->__pyx_codeobj__56); - Py_VISIT(traverse_module_state->__pyx_codeobj__58); - Py_VISIT(traverse_module_state->__pyx_codeobj__60); - Py_VISIT(traverse_module_state->__pyx_codeobj__61); - Py_VISIT(traverse_module_state->__pyx_codeobj__63); - Py_VISIT(traverse_module_state->__pyx_codeobj__67); - Py_VISIT(traverse_module_state->__pyx_codeobj__69); - Py_VISIT(traverse_module_state->__pyx_codeobj__71); - Py_VISIT(traverse_module_state->__pyx_codeobj__75); - Py_VISIT(traverse_module_state->__pyx_codeobj__77); - Py_VISIT(traverse_module_state->__pyx_codeobj__79); - Py_VISIT(traverse_module_state->__pyx_codeobj__80); - Py_VISIT(traverse_module_state->__pyx_codeobj__81); - Py_VISIT(traverse_module_state->__pyx_codeobj__83); - Py_VISIT(traverse_module_state->__pyx_codeobj__84); - Py_VISIT(traverse_module_state->__pyx_codeobj__85); - Py_VISIT(traverse_module_state->__pyx_codeobj__86); - Py_VISIT(traverse_module_state->__pyx_codeobj__87); - Py_VISIT(traverse_module_state->__pyx_codeobj__89); - Py_VISIT(traverse_module_state->__pyx_codeobj__91); - Py_VISIT(traverse_module_state->__pyx_codeobj__92); - Py_VISIT(traverse_module_state->__pyx_codeobj__94); - Py_VISIT(traverse_module_state->__pyx_codeobj__96); - Py_VISIT(traverse_module_state->__pyx_codeobj__98); - Py_VISIT(traverse_module_state->__pyx_codeobj__100); - Py_VISIT(traverse_module_state->__pyx_codeobj__103); - Py_VISIT(traverse_module_state->__pyx_codeobj__105); - Py_VISIT(traverse_module_state->__pyx_codeobj__107); - Py_VISIT(traverse_module_state->__pyx_codeobj__109); - Py_VISIT(traverse_module_state->__pyx_codeobj__111); - Py_VISIT(traverse_module_state->__pyx_codeobj__112); - Py_VISIT(traverse_module_state->__pyx_codeobj__113); - Py_VISIT(traverse_module_state->__pyx_codeobj__115); - Py_VISIT(traverse_module_state->__pyx_codeobj__117); - Py_VISIT(traverse_module_state->__pyx_codeobj__120); - Py_VISIT(traverse_module_state->__pyx_codeobj__121); - Py_VISIT(traverse_module_state->__pyx_codeobj__123); - Py_VISIT(traverse_module_state->__pyx_codeobj__125); - Py_VISIT(traverse_module_state->__pyx_codeobj__128); - Py_VISIT(traverse_module_state->__pyx_codeobj__130); - Py_VISIT(traverse_module_state->__pyx_codeobj__131); - Py_VISIT(traverse_module_state->__pyx_codeobj__132); - Py_VISIT(traverse_module_state->__pyx_codeobj__133); - Py_VISIT(traverse_module_state->__pyx_codeobj__134); - Py_VISIT(traverse_module_state->__pyx_codeobj__136); - Py_VISIT(traverse_module_state->__pyx_codeobj__139); - Py_VISIT(traverse_module_state->__pyx_codeobj__141); - Py_VISIT(traverse_module_state->__pyx_codeobj__143); - Py_VISIT(traverse_module_state->__pyx_codeobj__145); - Py_VISIT(traverse_module_state->__pyx_codeobj__146); - Py_VISIT(traverse_module_state->__pyx_codeobj__147); - Py_VISIT(traverse_module_state->__pyx_codeobj__149); - Py_VISIT(traverse_module_state->__pyx_codeobj__151); - Py_VISIT(traverse_module_state->__pyx_codeobj__152); - Py_VISIT(traverse_module_state->__pyx_codeobj__153); - Py_VISIT(traverse_module_state->__pyx_codeobj__155); - Py_VISIT(traverse_module_state->__pyx_codeobj__157); - Py_VISIT(traverse_module_state->__pyx_codeobj__158); - Py_VISIT(traverse_module_state->__pyx_codeobj__159); - Py_VISIT(traverse_module_state->__pyx_codeobj__160); - Py_VISIT(traverse_module_state->__pyx_codeobj__161); - Py_VISIT(traverse_module_state->__pyx_codeobj__162); - Py_VISIT(traverse_module_state->__pyx_codeobj__163); - return 0; -} -#endif -/* #### Code section: module_state_defines ### */ -#define __pyx_d __pyx_mstate_global->__pyx_d -#define __pyx_b __pyx_mstate_global->__pyx_b -#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime -#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple -#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes -#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode -#ifdef __Pyx_CyFunction_USED -#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType -#endif -#ifdef __Pyx_FusedFunction_USED -#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType -#endif -#ifdef __Pyx_Generator_USED -#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType -#endif -#ifdef __Pyx_IterableCoroutine_USED -#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType -#endif -#ifdef __Pyx_Coroutine_USED -#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType -#endif -#ifdef __Pyx_Coroutine_USED -#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType -#endif -#if CYTHON_USE_MODULE_STATE -#endif -#if CYTHON_USE_MODULE_STATE -#endif -#if CYTHON_USE_MODULE_STATE -#endif -#if CYTHON_USE_MODULE_STATE -#endif -#if CYTHON_USE_MODULE_STATE -#define __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters __pyx_mstate_global->__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters -#define __pyx_type_5pyrfc_6_cyrfc_Connection __pyx_mstate_global->__pyx_type_5pyrfc_6_cyrfc_Connection -#define __pyx_type_5pyrfc_6_cyrfc_Server __pyx_mstate_global->__pyx_type_5pyrfc_6_cyrfc_Server -#define __pyx_type_5pyrfc_6_cyrfc_Throughput __pyx_mstate_global->__pyx_type_5pyrfc_6_cyrfc_Throughput -#define __pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection __pyx_mstate_global->__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection -#endif -#define __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters __pyx_mstate_global->__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters -#define __pyx_ptype_5pyrfc_6_cyrfc_Connection __pyx_mstate_global->__pyx_ptype_5pyrfc_6_cyrfc_Connection -#define __pyx_ptype_5pyrfc_6_cyrfc_Server __pyx_mstate_global->__pyx_ptype_5pyrfc_6_cyrfc_Server -#define __pyx_ptype_5pyrfc_6_cyrfc_Throughput __pyx_mstate_global->__pyx_ptype_5pyrfc_6_cyrfc_Throughput -#define __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection __pyx_mstate_global->__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection -#define __pyx_kp_u_00000000 __pyx_mstate_global->__pyx_kp_u_00000000 -#define __pyx_kp_u_02 __pyx_mstate_global->__pyx_kp_u_02 -#define __pyx_kp_u_04 __pyx_mstate_global->__pyx_kp_u_04 -#define __pyx_n_s_ABAPApplicationError __pyx_mstate_global->__pyx_n_s_ABAPApplicationError -#define __pyx_n_s_ABAPRuntimeError __pyx_mstate_global->__pyx_n_s_ABAPRuntimeError -#define __pyx_kp_s_A_function_description_This_cla __pyx_mstate_global->__pyx_kp_s_A_function_description_This_cla -#define __pyx_kp_s_A_type_description_This_class_w __pyx_mstate_global->__pyx_kp_s_A_type_description_This_class_w -#define __pyx_kp_u_Argument_attributes_not_valid_t __pyx_mstate_global->__pyx_kp_u_Argument_attributes_not_valid_t -#define __pyx_kp_u_Argument_background_must_be_a_bo __pyx_mstate_global->__pyx_kp_u_Argument_background_must_be_a_bo -#define __pyx_kp_u_Argument_queue_names_not_valid_t __pyx_mstate_global->__pyx_kp_u_Argument_queue_names_not_valid_t -#define __pyx_kp_u_Argument_unit_not_valid_Is_unit __pyx_mstate_global->__pyx_kp_u_Argument_unit_not_valid_Is_unit -#define __pyx_kp_u_Authentication_exception_raised __pyx_mstate_global->__pyx_kp_u_Authentication_exception_raised -#define __pyx_kp_u_BgRfc_callback_function_key_not __pyx_mstate_global->__pyx_kp_u_BgRfc_callback_function_key_not -#define __pyx_kp_u_BgRfc_callback_function_referenc __pyx_mstate_global->__pyx_kp_u_BgRfc_callback_function_referenc -#define __pyx_kp_u_Callback_functions_may_only_rai __pyx_mstate_global->__pyx_kp_u_Callback_functions_may_only_rai -#define __pyx_n_s_CommunicationError __pyx_mstate_global->__pyx_n_s_CommunicationError -#define __pyx_n_s_Connection __pyx_mstate_global->__pyx_n_s_Connection -#define __pyx_n_u_Connection __pyx_mstate_global->__pyx_n_u_Connection -#define __pyx_n_s_ConnectionParameters __pyx_mstate_global->__pyx_n_s_ConnectionParameters -#define __pyx_n_s_ConnectionParameters___reduce_cy __pyx_mstate_global->__pyx_n_s_ConnectionParameters___reduce_cy -#define __pyx_n_s_ConnectionParameters___setstate __pyx_mstate_global->__pyx_n_s_ConnectionParameters___setstate -#define __pyx_n_s_ConnectionParameters__free __pyx_mstate_global->__pyx_n_s_ConnectionParameters__free -#define __pyx_n_s_ConnectionParameters_free __pyx_mstate_global->__pyx_n_s_ConnectionParameters_free -#define __pyx_n_s_Connection___enter __pyx_mstate_global->__pyx_n_s_Connection___enter -#define __pyx_n_s_Connection___exit __pyx_mstate_global->__pyx_n_s_Connection___exit -#define __pyx_n_s_Connection___reduce_cython __pyx_mstate_global->__pyx_n_s_Connection___reduce_cython -#define __pyx_n_s_Connection___setstate_cython __pyx_mstate_global->__pyx_n_s_Connection___setstate_cython -#define __pyx_n_s_Connection__close __pyx_mstate_global->__pyx_n_s_Connection__close -#define __pyx_n_s_Connection__confirm_transaction __pyx_mstate_global->__pyx_n_s_Connection__confirm_transaction -#define __pyx_n_s_Connection__confirm_unit __pyx_mstate_global->__pyx_n_s_Connection__confirm_unit -#define __pyx_n_s_Connection__create_and_submit_tr __pyx_mstate_global->__pyx_n_s_Connection__create_and_submit_tr -#define __pyx_n_s_Connection__create_and_submit_un __pyx_mstate_global->__pyx_n_s_Connection__create_and_submit_un -#define __pyx_n_s_Connection__destroy_transaction __pyx_mstate_global->__pyx_n_s_Connection__destroy_transaction -#define __pyx_n_s_Connection__destroy_unit __pyx_mstate_global->__pyx_n_s_Connection__destroy_unit -#define __pyx_n_s_Connection__get_transaction_id __pyx_mstate_global->__pyx_n_s_Connection__get_transaction_id -#define __pyx_n_s_Connection__get_unit_id __pyx_mstate_global->__pyx_n_s_Connection__get_unit_id -#define __pyx_n_s_Connection__get_unit_state __pyx_mstate_global->__pyx_n_s_Connection__get_unit_state -#define __pyx_n_s_Connection_call __pyx_mstate_global->__pyx_n_s_Connection_call -#define __pyx_n_s_Connection_cancel __pyx_mstate_global->__pyx_n_s_Connection_cancel -#define __pyx_n_s_Connection_close __pyx_mstate_global->__pyx_n_s_Connection_close -#define __pyx_kp_u_Connection_configuration_option __pyx_mstate_global->__pyx_kp_u_Connection_configuration_option -#define __pyx_n_s_Connection_confirm_unit __pyx_mstate_global->__pyx_n_s_Connection_confirm_unit -#define __pyx_n_s_Connection_destroy_unit __pyx_mstate_global->__pyx_n_s_Connection_destroy_unit -#define __pyx_n_s_Connection_fill_and_submit_unit __pyx_mstate_global->__pyx_n_s_Connection_fill_and_submit_unit -#define __pyx_n_s_Connection_free __pyx_mstate_global->__pyx_n_s_Connection_free -#define __pyx_n_s_Connection_func_desc_remove __pyx_mstate_global->__pyx_n_s_Connection_func_desc_remove -#define __pyx_n_s_Connection_get_connection_attrib __pyx_mstate_global->__pyx_n_s_Connection_get_connection_attrib -#define __pyx_n_s_Connection_get_function_descript __pyx_mstate_global->__pyx_n_s_Connection_get_function_descript -#define __pyx_n_s_Connection_get_unit_state __pyx_mstate_global->__pyx_n_s_Connection_get_unit_state -#define __pyx_n_s_Connection_initialize_unit __pyx_mstate_global->__pyx_n_s_Connection_initialize_unit -#define __pyx_n_s_Connection_is_valid __pyx_mstate_global->__pyx_n_s_Connection_is_valid -#define __pyx_kp_u_Connection_object_required_recei __pyx_mstate_global->__pyx_kp_u_Connection_object_required_recei -#define __pyx_n_s_Connection_open __pyx_mstate_global->__pyx_n_s_Connection_open -#define __pyx_kp_u_Connection_parameters_missing __pyx_mstate_global->__pyx_kp_u_Connection_parameters_missing -#define __pyx_n_s_Connection_ping __pyx_mstate_global->__pyx_n_s_Connection_ping -#define __pyx_n_s_Connection_reopen __pyx_mstate_global->__pyx_n_s_Connection_reopen -#define __pyx_n_s_Connection_reset_server_context __pyx_mstate_global->__pyx_n_s_Connection_reset_server_context -#define __pyx_n_s_Connection_type_desc_get __pyx_mstate_global->__pyx_n_s_Connection_type_desc_get -#define __pyx_n_s_Connection_type_desc_remove __pyx_mstate_global->__pyx_n_s_Connection_type_desc_remove -#define __pyx_kp_u_Connection_was_canceled __pyx_mstate_global->__pyx_kp_u_Connection_was_canceled -#define __pyx_kp_u_Crypto_library_not_found __pyx_mstate_global->__pyx_kp_u_Crypto_library_not_found -#define __pyx_n_s_Decimal __pyx_mstate_global->__pyx_n_s_Decimal -#define __pyx_n_s_Enum __pyx_mstate_global->__pyx_n_s_Enum -#define __pyx_kp_u_Error_code __pyx_mstate_global->__pyx_kp_u_Error_code -#define __pyx_kp_u_Error_in_bgRFC_handler_onCheck __pyx_mstate_global->__pyx_kp_u_Error_in_bgRFC_handler_onCheck -#define __pyx_kp_u_Error_in_bgRFC_handler_onCommit __pyx_mstate_global->__pyx_kp_u_Error_in_bgRFC_handler_onCommit -#define __pyx_kp_u_Error_in_bgRFC_handler_onConfirm __pyx_mstate_global->__pyx_kp_u_Error_in_bgRFC_handler_onConfirm -#define __pyx_kp_u_Error_in_bgRFC_handler_onGetStat __pyx_mstate_global->__pyx_kp_u_Error_in_bgRFC_handler_onGetStat -#define __pyx_kp_u_Error_in_bgRFC_handler_onRollbac __pyx_mstate_global->__pyx_kp_u_Error_in_bgRFC_handler_onRollbac -#define __pyx_kp_u_Error_while_retrieving_connecti __pyx_mstate_global->__pyx_kp_u_Error_while_retrieving_connecti -#define __pyx_n_s_ExternalApplicationError __pyx_mstate_global->__pyx_n_s_ExternalApplicationError -#define __pyx_n_s_ExternalAuthorizationError __pyx_mstate_global->__pyx_n_s_ExternalAuthorizationError -#define __pyx_n_s_ExternalRuntimeError __pyx_mstate_global->__pyx_n_s_ExternalRuntimeError -#define __pyx_kp_u_Function __pyx_mstate_global->__pyx_kp_u_Function -#define __pyx_kp_u_FunctionDescription __pyx_mstate_global->__pyx_kp_u_FunctionDescription -#define __pyx_n_s_FunctionDescription_2 __pyx_mstate_global->__pyx_n_s_FunctionDescription_2 -#define __pyx_n_s_FunctionDescription___init __pyx_mstate_global->__pyx_n_s_FunctionDescription___init -#define __pyx_n_s_FunctionDescription___repr __pyx_mstate_global->__pyx_n_s_FunctionDescription___repr -#define __pyx_n_s_FunctionDescription_add_paramete __pyx_mstate_global->__pyx_n_s_FunctionDescription_add_paramete -#define __pyx_kp_u_H_M_S __pyx_mstate_global->__pyx_kp_u_H_M_S -#define __pyx_kp_u_Invalid_connection_handle __pyx_mstate_global->__pyx_kp_u_Invalid_connection_handle -#define __pyx_kp_u_Invalid_exception_raised_by_call __pyx_mstate_global->__pyx_kp_u_Invalid_exception_raised_by_call -#define __pyx_kp_u_Invalid_length_of_unit_id_should __pyx_mstate_global->__pyx_kp_u_Invalid_length_of_unit_id_should -#define __pyx_kp_u_Invocation_finished_submitting_u __pyx_mstate_global->__pyx_kp_u_Invocation_finished_submitting_u -#define __pyx_n_s_Iterable __pyx_mstate_global->__pyx_n_s_Iterable -#define __pyx_n_s_LOCALE_RADIX __pyx_mstate_global->__pyx_n_s_LOCALE_RADIX -#define __pyx_kp_u_Length_of_parameter_unit_id_must __pyx_mstate_global->__pyx_kp_u_Length_of_parameter_unit_id_must -#define __pyx_n_s_LogonError __pyx_mstate_global->__pyx_n_s_LogonError -#define __pyx_n_s_MASK_DTIME __pyx_mstate_global->__pyx_n_s_MASK_DTIME -#define __pyx_n_s_MASK_RETURN_IMPORT_PARAMS __pyx_mstate_global->__pyx_n_s_MASK_RETURN_IMPORT_PARAMS -#define __pyx_n_s_MASK_RSTRIP __pyx_mstate_global->__pyx_n_s_MASK_RSTRIP -#define __pyx_kp_u_New_handle __pyx_mstate_global->__pyx_kp_u_New_handle -#define __pyx_kp_u_No_connections_assigned __pyx_mstate_global->__pyx_kp_u_No_connections_assigned -#define __pyx_kp_u_No_metadata_found_for_function __pyx_mstate_global->__pyx_kp_u_No_metadata_found_for_function -#define __pyx_kp_u_No_state_check_possible_of_non_b __pyx_mstate_global->__pyx_kp_u_No_state_check_possible_of_non_b -#define __pyx_kp_u_No_transaction_handle_for_this_c __pyx_mstate_global->__pyx_kp_u_No_transaction_handle_for_this_c -#define __pyx_kp_u_No_unit_handle_for_this_connecti __pyx_mstate_global->__pyx_kp_u_No_unit_handle_for_this_connecti -#define __pyx_kp_u_Not_a_valid_error_group __pyx_mstate_global->__pyx_kp_u_Not_a_valid_error_group -#define __pyx_n_s_OK __pyx_mstate_global->__pyx_n_s_OK -#define __pyx_kp_u_Parameter_calls_must_be_iterable __pyx_mstate_global->__pyx_kp_u_Parameter_calls_must_be_iterable -#define __pyx_kp_u_Parameter_calls_must_contain_at __pyx_mstate_global->__pyx_kp_u_Parameter_calls_must_contain_at -#define __pyx_kp_u_Parameter_calls_must_contain_val __pyx_mstate_global->__pyx_kp_u_Parameter_calls_must_contain_val -#define __pyx_kp_u_Parameter_unit_not_valid_Please __pyx_mstate_global->__pyx_kp_u_Parameter_unit_not_valid_Please -#define __pyx_n_s_Pyx_CFunc_object__lParenobject __pyx_mstate_global->__pyx_n_s_Pyx_CFunc_object__lParenobject -#define __pyx_n_u_Q __pyx_mstate_global->__pyx_n_u_Q -#define __pyx_n_s_RCStatus __pyx_mstate_global->__pyx_n_s_RCStatus -#define __pyx_n_s_RFCError __pyx_mstate_global->__pyx_n_s_RFCError -#define __pyx_n_s_RFCTYPE_ABAPOBJECT __pyx_mstate_global->__pyx_n_s_RFCTYPE_ABAPOBJECT -#define __pyx_n_s_RFCTYPE_BCD __pyx_mstate_global->__pyx_n_s_RFCTYPE_BCD -#define __pyx_n_s_RFCTYPE_BYTE __pyx_mstate_global->__pyx_n_s_RFCTYPE_BYTE -#define __pyx_n_s_RFCTYPE_CDAY __pyx_mstate_global->__pyx_n_s_RFCTYPE_CDAY -#define __pyx_n_s_RFCTYPE_CHAR __pyx_mstate_global->__pyx_n_s_RFCTYPE_CHAR -#define __pyx_n_s_RFCTYPE_DATE __pyx_mstate_global->__pyx_n_s_RFCTYPE_DATE -#define __pyx_n_s_RFCTYPE_DECF16 __pyx_mstate_global->__pyx_n_s_RFCTYPE_DECF16 -#define __pyx_n_s_RFCTYPE_DECF34 __pyx_mstate_global->__pyx_n_s_RFCTYPE_DECF34 -#define __pyx_n_s_RFCTYPE_DTDAY __pyx_mstate_global->__pyx_n_s_RFCTYPE_DTDAY -#define __pyx_n_s_RFCTYPE_DTMONTH __pyx_mstate_global->__pyx_n_s_RFCTYPE_DTMONTH -#define __pyx_n_s_RFCTYPE_DTWEEK __pyx_mstate_global->__pyx_n_s_RFCTYPE_DTWEEK -#define __pyx_n_s_RFCTYPE_FLOAT __pyx_mstate_global->__pyx_n_s_RFCTYPE_FLOAT -#define __pyx_n_s_RFCTYPE_INT __pyx_mstate_global->__pyx_n_s_RFCTYPE_INT -#define __pyx_n_s_RFCTYPE_INT1 __pyx_mstate_global->__pyx_n_s_RFCTYPE_INT1 -#define __pyx_n_s_RFCTYPE_INT2 __pyx_mstate_global->__pyx_n_s_RFCTYPE_INT2 -#define __pyx_n_s_RFCTYPE_INT8 __pyx_mstate_global->__pyx_n_s_RFCTYPE_INT8 -#define __pyx_n_s_RFCTYPE_NULL __pyx_mstate_global->__pyx_n_s_RFCTYPE_NULL -#define __pyx_n_s_RFCTYPE_NUM __pyx_mstate_global->__pyx_n_s_RFCTYPE_NUM -#define __pyx_n_s_RFCTYPE_STRING __pyx_mstate_global->__pyx_n_s_RFCTYPE_STRING -#define __pyx_n_s_RFCTYPE_STRUCTURE __pyx_mstate_global->__pyx_n_s_RFCTYPE_STRUCTURE -#define __pyx_n_s_RFCTYPE_TABLE __pyx_mstate_global->__pyx_n_s_RFCTYPE_TABLE -#define __pyx_n_s_RFCTYPE_TIME __pyx_mstate_global->__pyx_n_s_RFCTYPE_TIME -#define __pyx_n_s_RFCTYPE_TMINUTE __pyx_mstate_global->__pyx_n_s_RFCTYPE_TMINUTE -#define __pyx_n_s_RFCTYPE_TSECOND __pyx_mstate_global->__pyx_n_s_RFCTYPE_TSECOND -#define __pyx_n_s_RFCTYPE_UTCLONG __pyx_mstate_global->__pyx_n_s_RFCTYPE_UTCLONG -#define __pyx_n_s_RFCTYPE_UTCMINUTE __pyx_mstate_global->__pyx_n_s_RFCTYPE_UTCMINUTE -#define __pyx_n_s_RFCTYPE_UTCSECOND __pyx_mstate_global->__pyx_n_s_RFCTYPE_UTCSECOND -#define __pyx_n_s_RFCTYPE_XMLDATA __pyx_mstate_global->__pyx_n_s_RFCTYPE_XMLDATA -#define __pyx_n_s_RFCTYPE_XSTRING __pyx_mstate_global->__pyx_n_s_RFCTYPE_XSTRING -#define __pyx_n_s_RFC_CHANGING __pyx_mstate_global->__pyx_n_s_RFC_CHANGING -#define __pyx_n_s_RFC_EXECUTED __pyx_mstate_global->__pyx_n_s_RFC_EXECUTED -#define __pyx_n_s_RFC_EXPORT __pyx_mstate_global->__pyx_n_s_RFC_EXPORT -#define __pyx_n_s_RFC_EXTERNAL_FAILURE __pyx_mstate_global->__pyx_n_s_RFC_EXTERNAL_FAILURE -#define __pyx_n_s_RFC_IMPORT __pyx_mstate_global->__pyx_n_s_RFC_IMPORT -#define __pyx_n_s_RFC_NOT_FOUND __pyx_mstate_global->__pyx_n_s_RFC_NOT_FOUND -#define __pyx_n_s_RFC_TABLES __pyx_mstate_global->__pyx_n_s_RFC_TABLES -#define __pyx_kp_u_Remote_function_module __pyx_mstate_global->__pyx_kp_u_Remote_function_module -#define __pyx_kp_u_Remote_function_module_name_must __pyx_mstate_global->__pyx_kp_u_Remote_function_module_name_must -#define __pyx_kp_u_Request_for __pyx_mstate_global->__pyx_kp_u_Request_for -#define __pyx_n_s_RfcFieldType __pyx_mstate_global->__pyx_n_s_RfcFieldType -#define __pyx_n_s_RfcParameterDirection __pyx_mstate_global->__pyx_n_s_RfcParameterDirection -#define __pyx_n_s_Server __pyx_mstate_global->__pyx_n_s_Server -#define __pyx_n_u_Server __pyx_mstate_global->__pyx_n_u_Server -#define __pyx_kp_u_Server_2 __pyx_mstate_global->__pyx_kp_u_Server_2 -#define __pyx_n_s_Server___reduce_cython __pyx_mstate_global->__pyx_n_s_Server___reduce_cython -#define __pyx_n_s_Server___setstate_cython __pyx_mstate_global->__pyx_n_s_Server___setstate_cython -#define __pyx_n_s_Server__bgRfcFunction __pyx_mstate_global->__pyx_n_s_Server__bgRfcFunction -#define __pyx_n_s_Server_add_function __pyx_mstate_global->__pyx_n_s_Server_add_function -#define __pyx_n_s_Server_bgrfc_init __pyx_mstate_global->__pyx_n_s_Server_bgrfc_init -#define __pyx_n_s_Server_close __pyx_mstate_global->__pyx_n_s_Server_close -#define __pyx_kp_u_Server_function __pyx_mstate_global->__pyx_kp_u_Server_function -#define __pyx_kp_u_Server_function_2 __pyx_mstate_global->__pyx_kp_u_Server_function_2 -#define __pyx_n_s_Server_get_server_attributes __pyx_mstate_global->__pyx_n_s_Server_get_server_attributes -#define __pyx_n_s_Server_serve __pyx_mstate_global->__pyx_n_s_Server_serve -#define __pyx_n_s_Server_start __pyx_mstate_global->__pyx_n_s_Server_start -#define __pyx_n_s_Server_stop __pyx_mstate_global->__pyx_n_s_Server_stop -#define __pyx_n_u_T __pyx_mstate_global->__pyx_n_u_T -#define __pyx_kp_u_TID __pyx_mstate_global->__pyx_kp_u_TID -#define __pyx_kp_u_There_is_an_active_unit_for_this __pyx_mstate_global->__pyx_kp_u_There_is_an_active_unit_for_this -#define __pyx_n_s_Thread __pyx_mstate_global->__pyx_n_s_Thread -#define __pyx_n_s_Throughput __pyx_mstate_global->__pyx_n_s_Throughput -#define __pyx_n_s_Throughput___enter __pyx_mstate_global->__pyx_n_s_Throughput___enter -#define __pyx_n_s_Throughput___exit __pyx_mstate_global->__pyx_n_s_Throughput___exit -#define __pyx_n_s_Throughput___reduce_cython __pyx_mstate_global->__pyx_n_s_Throughput___reduce_cython -#define __pyx_n_s_Throughput___setstate_cython __pyx_mstate_global->__pyx_n_s_Throughput___setstate_cython -#define __pyx_n_s_Throughput_getFromConnection __pyx_mstate_global->__pyx_n_s_Throughput_getFromConnection -#define __pyx_n_s_Throughput_removeFromConnection __pyx_mstate_global->__pyx_n_s_Throughput_removeFromConnection -#define __pyx_n_s_Throughput_reset __pyx_mstate_global->__pyx_n_s_Throughput_reset -#define __pyx_n_s_Throughput_setOnConnection __pyx_mstate_global->__pyx_n_s_Throughput_setOnConnection -#define __pyx_n_s_Timer __pyx_mstate_global->__pyx_n_s_Timer -#define __pyx_kp_u_TypeDescription __pyx_mstate_global->__pyx_kp_u_TypeDescription -#define __pyx_n_s_TypeDescription_2 __pyx_mstate_global->__pyx_n_s_TypeDescription_2 -#define __pyx_n_s_TypeDescription___init __pyx_mstate_global->__pyx_n_s_TypeDescription___init -#define __pyx_n_s_TypeDescription___repr __pyx_mstate_global->__pyx_n_s_TypeDescription___repr -#define __pyx_n_s_TypeDescription_add_field __pyx_mstate_global->__pyx_n_s_TypeDescription_add_field -#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError -#define __pyx_kp_u_UTC __pyx_mstate_global->__pyx_kp_u_UTC -#define __pyx_kp_u_Unit __pyx_mstate_global->__pyx_kp_u_Unit -#define __pyx_n_s_UnitCallType __pyx_mstate_global->__pyx_n_s_UnitCallType -#define __pyx_n_s_UnitState __pyx_mstate_global->__pyx_n_s_UnitState -#define __pyx_kp_u_Unknown_RFC_type __pyx_mstate_global->__pyx_kp_u_Unknown_RFC_type -#define __pyx_kp_u_User_user_from_system_sysId_clie __pyx_mstate_global->__pyx_kp_u_User_user_from_system_sysId_clie -#define __pyx_kp_u_Values __pyx_mstate_global->__pyx_kp_u_Values -#define __pyx_kp_u_Y_m_d __pyx_mstate_global->__pyx_kp_u_Y_m_d -#define __pyx_n_s__164 __pyx_mstate_global->__pyx_n_s__164 -#define __pyx_kp_u__21 __pyx_mstate_global->__pyx_kp_u__21 -#define __pyx_kp_u__22 __pyx_mstate_global->__pyx_kp_u__22 -#define __pyx_kp_u__23 __pyx_mstate_global->__pyx_kp_u__23 -#define __pyx_kp_u__24 __pyx_mstate_global->__pyx_kp_u__24 -#define __pyx_kp_u__25 __pyx_mstate_global->__pyx_kp_u__25 -#define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3 -#define __pyx_kp_u__38 __pyx_mstate_global->__pyx_kp_u__38 -#define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4 -#define __pyx_n_s__41 __pyx_mstate_global->__pyx_n_s__41 -#define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5 -#define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6 -#define __pyx_kp_u_a_decimal_value_required_receive __pyx_mstate_global->__pyx_kp_u_a_decimal_value_required_receive -#define __pyx_kp_u_a_numeric_string_is_required_rec __pyx_mstate_global->__pyx_kp_u_a_numeric_string_is_required_rec -#define __pyx_n_u_active_unit __pyx_mstate_global->__pyx_n_u_active_unit -#define __pyx_n_s_add __pyx_mstate_global->__pyx_n_s_add -#define __pyx_n_s_add_field __pyx_mstate_global->__pyx_n_s_add_field -#define __pyx_n_s_add_function __pyx_mstate_global->__pyx_n_s_add_function -#define __pyx_n_s_add_parameter __pyx_mstate_global->__pyx_n_s_add_parameter -#define __pyx_n_s_after_remove __pyx_mstate_global->__pyx_n_s_after_remove -#define __pyx_n_s_alive __pyx_mstate_global->__pyx_n_s_alive -#define __pyx_kp_u_already_installed __pyx_mstate_global->__pyx_kp_u_already_installed -#define __pyx_kp_u_an_integer_required_received __pyx_mstate_global->__pyx_kp_u_an_integer_required_received -#define __pyx_kp_u_an_string_is_required_received __pyx_mstate_global->__pyx_kp_u_an_string_is_required_received -#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append -#define __pyx_n_u_applicationTime __pyx_mstate_global->__pyx_n_u_applicationTime -#define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args -#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines -#define __pyx_n_s_attributes __pyx_mstate_global->__pyx_n_s_attributes -#define __pyx_n_u_auth_check __pyx_mstate_global->__pyx_n_u_auth_check -#define __pyx_kp_u_authorization_check_for __pyx_mstate_global->__pyx_kp_u_authorization_check_for -#define __pyx_n_s_auto __pyx_mstate_global->__pyx_n_s_auto -#define __pyx_n_s_background __pyx_mstate_global->__pyx_n_s_background -#define __pyx_n_u_background __pyx_mstate_global->__pyx_n_u_background -#define __pyx_n_s_background_unit __pyx_mstate_global->__pyx_n_s_background_unit -#define __pyx_n_s_bg __pyx_mstate_global->__pyx_n_s_bg -#define __pyx_n_u_bgRFC __pyx_mstate_global->__pyx_n_u_bgRFC -#define __pyx_kp_u_bgRFC_handler __pyx_mstate_global->__pyx_kp_u_bgRFC_handler -#define __pyx_kp_u_bgRFC_handler_onCheck_is_not_reg __pyx_mstate_global->__pyx_kp_u_bgRFC_handler_onCheck_is_not_reg -#define __pyx_kp_u_bgRFC_handler_onCommit_is_not_re __pyx_mstate_global->__pyx_kp_u_bgRFC_handler_onCommit_is_not_re -#define __pyx_kp_u_bgRFC_handler_onConfirm_is_not_r __pyx_mstate_global->__pyx_kp_u_bgRFC_handler_onConfirm_is_not_r -#define __pyx_kp_u_bgRFC_handler_onGetState_is_not __pyx_mstate_global->__pyx_kp_u_bgRFC_handler_onGetState_is_not -#define __pyx_kp_u_bgRFC_handler_onRollback_is_not __pyx_mstate_global->__pyx_kp_u_bgRFC_handler_onRollback_is_not -#define __pyx_kp_u_bgRFC_handlers_installed __pyx_mstate_global->__pyx_kp_u_bgRFC_handlers_installed -#define __pyx_n_s_bgRfcFunction __pyx_mstate_global->__pyx_n_s_bgRfcFunction -#define __pyx_n_s_bgrfc_handlers_count __pyx_mstate_global->__pyx_n_s_bgrfc_handlers_count -#define __pyx_n_s_bgrfc_init __pyx_mstate_global->__pyx_n_s_bgrfc_init -#define __pyx_kp_u_but_found __pyx_mstate_global->__pyx_kp_u_but_found -#define __pyx_n_s_cName __pyx_mstate_global->__pyx_n_s_cName -#define __pyx_n_s_call __pyx_mstate_global->__pyx_n_s_call -#define __pyx_n_u_call_type __pyx_mstate_global->__pyx_n_u_call_type -#define __pyx_n_s_callback __pyx_mstate_global->__pyx_n_s_callback -#define __pyx_n_u_callback __pyx_mstate_global->__pyx_n_u_callback -#define __pyx_n_s_calls __pyx_mstate_global->__pyx_n_s_calls -#define __pyx_n_s_cancel __pyx_mstate_global->__pyx_n_s_cancel -#define __pyx_n_s_cancel_connection __pyx_mstate_global->__pyx_n_s_cancel_connection -#define __pyx_n_s_cancel_timer __pyx_mstate_global->__pyx_n_s_cancel_timer -#define __pyx_n_s_cfunc_to_py __pyx_mstate_global->__pyx_n_s_cfunc_to_py -#define __pyx_kp_u_chars_found __pyx_mstate_global->__pyx_kp_u_chars_found -#define __pyx_n_u_check __pyx_mstate_global->__pyx_n_u_check -#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem -#define __pyx_n_s_clear __pyx_mstate_global->__pyx_n_s_clear -#define __pyx_n_u_client __pyx_mstate_global->__pyx_n_u_client -#define __pyx_n_s_client_connection __pyx_mstate_global->__pyx_n_s_client_connection -#define __pyx_n_s_client_params __pyx_mstate_global->__pyx_n_s_client_params -#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback -#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close -#define __pyx_n_s_close_2 __pyx_mstate_global->__pyx_n_s_close_2 -#define __pyx_kp_u_closed __pyx_mstate_global->__pyx_kp_u_closed -#define __pyx_n_s_closed_handle __pyx_mstate_global->__pyx_n_s_closed_handle -#define __pyx_n_s_code __pyx_mstate_global->__pyx_n_s_code -#define __pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION __pyx_mstate_global->__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION -#define __pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE __pyx_mstate_global->__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE -#define __pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR __pyx_mstate_global->__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR -#define __pyx_n_u_codepage __pyx_mstate_global->__pyx_n_u_codepage -#define __pyx_n_s_collections_abc __pyx_mstate_global->__pyx_n_s_collections_abc -#define __pyx_n_u_commit __pyx_mstate_global->__pyx_n_u_commit -#define __pyx_n_s_committed __pyx_mstate_global->__pyx_n_s_committed -#define __pyx_n_s_config __pyx_mstate_global->__pyx_n_s_config -#define __pyx_n_u_confirm __pyx_mstate_global->__pyx_n_u_confirm -#define __pyx_n_s_confirm_transaction __pyx_mstate_global->__pyx_n_s_confirm_transaction -#define __pyx_n_s_confirm_unit __pyx_mstate_global->__pyx_n_s_confirm_unit -#define __pyx_n_s_confirm_unit_2 __pyx_mstate_global->__pyx_n_s_confirm_unit_2 -#define __pyx_n_s_confirmed __pyx_mstate_global->__pyx_n_s_confirmed -#define __pyx_n_s_connection __pyx_mstate_global->__pyx_n_s_connection -#define __pyx_n_u_connection_attributes __pyx_mstate_global->__pyx_n_u_connection_attributes -#define __pyx_n_s_connections __pyx_mstate_global->__pyx_n_s_connections -#define __pyx_n_u_cpicConvId __pyx_mstate_global->__pyx_n_u_cpicConvId -#define __pyx_n_s_create_and_submit_transaction __pyx_mstate_global->__pyx_n_s_create_and_submit_transaction -#define __pyx_n_s_create_and_submit_unit __pyx_mstate_global->__pyx_n_s_create_and_submit_unit -#define __pyx_kp_u_created __pyx_mstate_global->__pyx_kp_u_created -#define __pyx_n_s_created_2 __pyx_mstate_global->__pyx_n_s_created_2 -#define __pyx_n_u_currentBusyCount __pyx_mstate_global->__pyx_n_u_currentBusyCount -#define __pyx_n_u_d __pyx_mstate_global->__pyx_n_u_d -#define __pyx_n_s_date __pyx_mstate_global->__pyx_n_s_date -#define __pyx_kp_u_date_value_required_received __pyx_mstate_global->__pyx_kp_u_date_value_required_received -#define __pyx_n_s_datetime __pyx_mstate_global->__pyx_n_s_datetime -#define __pyx_n_s_day __pyx_mstate_global->__pyx_n_s_day -#define __pyx_n_s_debug __pyx_mstate_global->__pyx_n_s_debug -#define __pyx_n_u_debug __pyx_mstate_global->__pyx_n_u_debug -#define __pyx_n_s_decimal __pyx_mstate_global->__pyx_n_s_decimal -#define __pyx_n_u_decimal_point __pyx_mstate_global->__pyx_n_u_decimal_point -#define __pyx_n_s_decimals __pyx_mstate_global->__pyx_n_s_decimals -#define __pyx_n_u_decimals __pyx_mstate_global->__pyx_n_u_decimals -#define __pyx_n_s_decode __pyx_mstate_global->__pyx_n_s_decode -#define __pyx_n_s_default_auth_check __pyx_mstate_global->__pyx_n_s_default_auth_check -#define __pyx_n_s_default_value __pyx_mstate_global->__pyx_n_s_default_value -#define __pyx_n_u_default_value __pyx_mstate_global->__pyx_n_u_default_value -#define __pyx_kp_u_default_value_string __pyx_mstate_global->__pyx_kp_u_default_value_string -#define __pyx_n_u_deserializationTime __pyx_mstate_global->__pyx_n_u_deserializationTime -#define __pyx_n_u_dest __pyx_mstate_global->__pyx_n_u_dest -#define __pyx_n_s_destroy __pyx_mstate_global->__pyx_n_s_destroy -#define __pyx_n_s_destroy_transaction __pyx_mstate_global->__pyx_n_s_destroy_transaction -#define __pyx_n_s_destroy_unit __pyx_mstate_global->__pyx_n_s_destroy_unit -#define __pyx_n_s_destroy_unit_2 __pyx_mstate_global->__pyx_n_s_destroy_unit_2 -#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict -#define __pyx_kp_u_dictionary_required_for_structur __pyx_mstate_global->__pyx_kp_u_dictionary_required_for_structur -#define __pyx_n_s_direction __pyx_mstate_global->__pyx_n_s_direction -#define __pyx_n_u_direction __pyx_mstate_global->__pyx_n_u_direction -#define __pyx_kp_u_direction_string __pyx_mstate_global->__pyx_kp_u_direction_string -#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable -#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc -#define __pyx_n_u_dtime __pyx_mstate_global->__pyx_n_u_dtime -#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e -#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable -#define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode -#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter -#define __pyx_n_s_enum __pyx_mstate_global->__pyx_n_s_enum -#define __pyx_n_s_enum_names __pyx_mstate_global->__pyx_n_s_enum_names -#define __pyx_n_s_enum_values __pyx_mstate_global->__pyx_n_s_enum_values -#define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate -#define __pyx_n_s_errorInfo __pyx_mstate_global->__pyx_n_s_errorInfo -#define __pyx_n_s_exc_info __pyx_mstate_global->__pyx_n_s_exc_info -#define __pyx_n_s_executed __pyx_mstate_global->__pyx_n_s_executed -#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit -#define __pyx_kp_u_field __pyx_mstate_global->__pyx_kp_u_field -#define __pyx_kp_u_field_name_string __pyx_mstate_global->__pyx_kp_u_field_name_string -#define __pyx_kp_u_field_name_string_2 __pyx_mstate_global->__pyx_kp_u_field_name_string_2 -#define __pyx_n_s_field_type __pyx_mstate_global->__pyx_n_s_field_type -#define __pyx_n_u_field_type __pyx_mstate_global->__pyx_n_u_field_type -#define __pyx_kp_u_field_type_string __pyx_mstate_global->__pyx_kp_u_field_type_string -#define __pyx_n_s_fields __pyx_mstate_global->__pyx_n_s_fields -#define __pyx_kp_u_fields_n_uclength __pyx_mstate_global->__pyx_kp_u_fields_n_uclength -#define __pyx_n_s_fill_and_submit_unit __pyx_mstate_global->__pyx_n_s_fill_and_submit_unit -#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format -#define __pyx_n_s_free __pyx_mstate_global->__pyx_n_s_free -#define __pyx_kp_u_free_2 __pyx_mstate_global->__pyx_kp_u_free_2 -#define __pyx_n_s_free_3 __pyx_mstate_global->__pyx_n_s_free_3 -#define __pyx_n_s_funcCont __pyx_mstate_global->__pyx_n_s_funcCont -#define __pyx_n_s_funcDesc __pyx_mstate_global->__pyx_n_s_funcDesc -#define __pyx_n_s_funcName __pyx_mstate_global->__pyx_n_s_funcName -#define __pyx_n_s_func_data __pyx_mstate_global->__pyx_n_s_func_data -#define __pyx_n_s_func_desc_handle __pyx_mstate_global->__pyx_n_s_func_desc_handle -#define __pyx_n_u_func_desc_handle __pyx_mstate_global->__pyx_n_u_func_desc_handle -#define __pyx_n_s_func_desc_remove __pyx_mstate_global->__pyx_n_s_func_desc_remove -#define __pyx_n_s_func_name __pyx_mstate_global->__pyx_n_s_func_name -#define __pyx_n_s_function_name __pyx_mstate_global->__pyx_n_s_function_name -#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc -#define __pyx_n_u_genericHandler __pyx_mstate_global->__pyx_n_u_genericHandler -#define __pyx_n_s_get __pyx_mstate_global->__pyx_n_s_get -#define __pyx_n_s_getFromConnection __pyx_mstate_global->__pyx_n_s_getFromConnection -#define __pyx_n_u_getState __pyx_mstate_global->__pyx_n_u_getState -#define __pyx_n_s_get_connection_attributes __pyx_mstate_global->__pyx_n_s_get_connection_attributes -#define __pyx_n_s_get_function_description __pyx_mstate_global->__pyx_n_s_get_function_description -#define __pyx_n_s_get_nwrfclib_version __pyx_mstate_global->__pyx_n_s_get_nwrfclib_version -#define __pyx_n_s_get_server_attributes __pyx_mstate_global->__pyx_n_s_get_server_attributes -#define __pyx_n_s_get_transaction_id __pyx_mstate_global->__pyx_n_s_get_transaction_id -#define __pyx_n_s_get_unit_id __pyx_mstate_global->__pyx_n_s_get_unit_id -#define __pyx_n_s_get_unit_state __pyx_mstate_global->__pyx_n_s_get_unit_state -#define __pyx_n_s_get_unit_state_2 __pyx_mstate_global->__pyx_n_s_get_unit_state_2 -#define __pyx_n_s_gethostname __pyx_mstate_global->__pyx_n_s_gethostname -#define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate -#define __pyx_n_s_handle __pyx_mstate_global->__pyx_n_s_handle -#define __pyx_kp_u_handle_2 __pyx_mstate_global->__pyx_kp_u_handle_2 -#define __pyx_n_s_handle_3 __pyx_mstate_global->__pyx_n_s_handle_3 -#define __pyx_kp_u_has_invalid_state __pyx_mstate_global->__pyx_kp_u_has_invalid_state -#define __pyx_n_u_host __pyx_mstate_global->__pyx_n_u_host -#define __pyx_n_u_hostname __pyx_mstate_global->__pyx_n_u_hostname -#define __pyx_n_s_hour __pyx_mstate_global->__pyx_n_s_hour -#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i -#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id -#define __pyx_n_u_id __pyx_mstate_global->__pyx_n_u_id -#define __pyx_n_s_idunitStateentifier __pyx_mstate_global->__pyx_n_s_idunitStateentifier -#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import -#define __pyx_n_s_in_process __pyx_mstate_global->__pyx_n_s_in_process -#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init -#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass -#define __pyx_n_s_initialize_unit __pyx_mstate_global->__pyx_n_s_initialize_unit -#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing -#define __pyx_n_u_installed __pyx_mstate_global->__pyx_n_u_installed -#define __pyx_n_s_int_field __pyx_mstate_global->__pyx_n_s_int_field -#define __pyx_kp_u_invalid_state __pyx_mstate_global->__pyx_kp_u_invalid_state -#define __pyx_kp_u_invocation_rejected_because_the __pyx_mstate_global->__pyx_kp_u_invocation_rejected_because_the -#define __pyx_n_s_isActive __pyx_mstate_global->__pyx_n_s_isActive -#define __pyx_n_s_isValid __pyx_mstate_global->__pyx_n_s_isValid -#define __pyx_n_s_is_alive __pyx_mstate_global->__pyx_n_s_is_alive -#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine -#define __pyx_kp_u_is_not_callable __pyx_mstate_global->__pyx_kp_u_is_not_callable -#define __pyx_kp_u_is_not_supported __pyx_mstate_global->__pyx_kp_u_is_not_supported -#define __pyx_n_u_is_stateful __pyx_mstate_global->__pyx_n_u_is_stateful -#define __pyx_n_s_is_valid __pyx_mstate_global->__pyx_n_s_is_valid -#define __pyx_n_s_isdigit __pyx_mstate_global->__pyx_n_s_isdigit -#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled -#define __pyx_n_s_isfile __pyx_mstate_global->__pyx_n_s_isfile -#define __pyx_n_u_isoLanguage __pyx_mstate_global->__pyx_n_u_isoLanguage -#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items -#define __pyx_n_s_iteritems __pyx_mstate_global->__pyx_n_s_iteritems -#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join -#define __pyx_n_u_kernelRel __pyx_mstate_global->__pyx_n_u_kernelRel -#define __pyx_n_u_kernel_trace __pyx_mstate_global->__pyx_n_u_kernel_trace -#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key -#define __pyx_n_s_lang_iso __pyx_mstate_global->__pyx_n_s_lang_iso -#define __pyx_n_s_lang_sap __pyx_mstate_global->__pyx_n_s_lang_sap -#define __pyx_n_u_language __pyx_mstate_global->__pyx_n_u_language -#define __pyx_n_s_language_iso_to_sap __pyx_mstate_global->__pyx_n_s_language_iso_to_sap -#define __pyx_n_s_language_sap_to_iso __pyx_mstate_global->__pyx_n_s_language_sap_to_iso -#define __pyx_kp_u_launched __pyx_mstate_global->__pyx_kp_u_launched -#define __pyx_kp_u_length __pyx_mstate_global->__pyx_kp_u_length -#define __pyx_kp_u_list_required_for_table_paramete __pyx_mstate_global->__pyx_kp_u_list_required_for_table_paramete -#define __pyx_n_s_locale __pyx_mstate_global->__pyx_n_s_locale -#define __pyx_n_s_localeconv __pyx_mstate_global->__pyx_n_s_localeconv -#define __pyx_n_u_lock __pyx_mstate_global->__pyx_n_u_lock -#define __pyx_n_s_log_message __pyx_mstate_global->__pyx_n_s_log_message -#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main -#define __pyx_n_s_major __pyx_mstate_global->__pyx_n_s_major -#define __pyx_n_u_major __pyx_mstate_global->__pyx_n_u_major -#define __pyx_n_s_message __pyx_mstate_global->__pyx_n_s_message -#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass -#define __pyx_n_u_metadataLookup __pyx_mstate_global->__pyx_n_u_metadataLookup -#define __pyx_n_s_minor __pyx_mstate_global->__pyx_n_s_minor -#define __pyx_n_u_minor __pyx_mstate_global->__pyx_n_u_minor -#define __pyx_n_s_minute __pyx_mstate_global->__pyx_n_s_minute -#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module -#define __pyx_n_s_month __pyx_mstate_global->__pyx_n_s_month -#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries -#define __pyx_n_s_msg_class __pyx_mstate_global->__pyx_n_s_msg_class -#define __pyx_n_s_msg_number __pyx_mstate_global->__pyx_n_s_msg_number -#define __pyx_n_s_msg_type __pyx_mstate_global->__pyx_n_s_msg_type -#define __pyx_n_s_msg_v1 __pyx_mstate_global->__pyx_n_s_msg_v1 -#define __pyx_n_s_msg_v2 __pyx_mstate_global->__pyx_n_s_msg_v2 -#define __pyx_n_s_msg_v3 __pyx_mstate_global->__pyx_n_s_msg_v3 -#define __pyx_n_s_msg_v4 __pyx_mstate_global->__pyx_n_s_msg_v4 -#define __pyx_kp_u_multi_count __pyx_mstate_global->__pyx_kp_u_multi_count -#define __pyx_kp_u_must_be_in __pyx_mstate_global->__pyx_kp_u_must_be_in -#define __pyx_kp_u_must_be_in_2 __pyx_mstate_global->__pyx_kp_u_must_be_in_2 -#define __pyx_kp_u_must_be_of_type_integer __pyx_mstate_global->__pyx_kp_u_must_be_of_type_integer -#define __pyx_kp_u_must_not_exceed_30_chars __pyx_mstate_global->__pyx_kp_u_must_not_exceed_30_chars -#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name -#define __pyx_n_u_name __pyx_mstate_global->__pyx_n_u_name -#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2 -#define __pyx_n_u_no_commit_check __pyx_mstate_global->__pyx_n_u_no_commit_check -#define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non -#define __pyx_n_s_not_found __pyx_mstate_global->__pyx_n_s_not_found -#define __pyx_n_u_not_requested __pyx_mstate_global->__pyx_n_u_not_requested -#define __pyx_n_s_nuc_length __pyx_mstate_global->__pyx_n_s_nuc_length -#define __pyx_n_u_nuc_length __pyx_mstate_global->__pyx_n_u_nuc_length -#define __pyx_n_s_nuc_offset __pyx_mstate_global->__pyx_n_s_nuc_offset -#define __pyx_n_u_nuc_offset __pyx_mstate_global->__pyx_n_u_nuc_offset -#define __pyx_n_u_numberOfCalls __pyx_mstate_global->__pyx_n_u_numberOfCalls -#define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object -#define __pyx_kp_u_of_type __pyx_mstate_global->__pyx_kp_u_of_type -#define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open -#define __pyx_n_s_openErrorInfo __pyx_mstate_global->__pyx_n_s_openErrorInfo -#define __pyx_n_s_optional __pyx_mstate_global->__pyx_n_s_optional -#define __pyx_n_u_optional __pyx_mstate_global->__pyx_n_u_optional -#define __pyx_n_s_options __pyx_mstate_global->__pyx_n_s_options -#define __pyx_n_s_origin __pyx_mstate_global->__pyx_n_s_origin -#define __pyx_n_s_os_path __pyx_mstate_global->__pyx_n_s_os_path -#define __pyx_n_s_parameter_text __pyx_mstate_global->__pyx_n_s_parameter_text -#define __pyx_n_u_parameter_text __pyx_mstate_global->__pyx_n_u_parameter_text -#define __pyx_kp_u_parameter_text_string_parameter __pyx_mstate_global->__pyx_kp_u_parameter_text_string_parameter -#define __pyx_n_s_parameter_type __pyx_mstate_global->__pyx_n_s_parameter_type -#define __pyx_n_u_parameter_type __pyx_mstate_global->__pyx_n_u_parameter_type -#define __pyx_kp_u_parameter_type_string __pyx_mstate_global->__pyx_kp_u_parameter_type_string -#define __pyx_n_s_parameters __pyx_mstate_global->__pyx_n_s_parameters -#define __pyx_kp_u_params __pyx_mstate_global->__pyx_kp_u_params -#define __pyx_n_s_params_2 __pyx_mstate_global->__pyx_n_s_params_2 -#define __pyx_n_u_partnerBytesPerChar __pyx_mstate_global->__pyx_n_u_partnerBytesPerChar -#define __pyx_n_u_partnerCodepage __pyx_mstate_global->__pyx_n_u_partnerCodepage -#define __pyx_n_u_partnerHost __pyx_mstate_global->__pyx_n_u_partnerHost -#define __pyx_n_u_partnerIP __pyx_mstate_global->__pyx_n_u_partnerIP -#define __pyx_n_u_partnerIPv6 __pyx_mstate_global->__pyx_n_u_partnerIPv6 -#define __pyx_n_u_partnerRel __pyx_mstate_global->__pyx_n_u_partnerRel -#define __pyx_n_u_partnerSystemCodepage __pyx_mstate_global->__pyx_n_u_partnerSystemCodepage -#define __pyx_n_u_partnerType __pyx_mstate_global->__pyx_n_u_partnerType -#define __pyx_n_u_patchLevel __pyx_mstate_global->__pyx_n_u_patchLevel -#define __pyx_n_s_patchlevel __pyx_mstate_global->__pyx_n_s_patchlevel -#define __pyx_n_s_pathName __pyx_mstate_global->__pyx_n_s_pathName -#define __pyx_n_s_path_name __pyx_mstate_global->__pyx_n_s_path_name -#define __pyx_n_u_peakBusyCount __pyx_mstate_global->__pyx_n_u_peakBusyCount -#define __pyx_n_s_ping __pyx_mstate_global->__pyx_n_s_ping -#define __pyx_n_s_platform __pyx_mstate_global->__pyx_n_s_platform -#define __pyx_n_u_platform __pyx_mstate_global->__pyx_n_u_platform -#define __pyx_n_u_port __pyx_mstate_global->__pyx_n_u_port -#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare -#define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print -#define __pyx_n_u_progName __pyx_mstate_global->__pyx_n_u_progName -#define __pyx_n_u_program __pyx_mstate_global->__pyx_n_u_program -#define __pyx_n_u_protocolType __pyx_mstate_global->__pyx_n_u_protocolType -#define __pyx_n_s_protocol_type __pyx_mstate_global->__pyx_n_s_protocol_type -#define __pyx_n_s_pyrfc__cyrfc __pyx_mstate_global->__pyx_n_s_pyrfc__cyrfc -#define __pyx_n_s_pyrfc__exception __pyx_mstate_global->__pyx_n_s_pyrfc__exception -#define __pyx_n_s_pyrfc__utils __pyx_mstate_global->__pyx_n_s_pyrfc__utils -#define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state -#define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable -#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname -#define __pyx_n_s_queueName __pyx_mstate_global->__pyx_n_s_queueName -#define __pyx_n_s_queueNameCount __pyx_mstate_global->__pyx_n_s_queueNameCount -#define __pyx_n_s_queueNames __pyx_mstate_global->__pyx_n_s_queueNames -#define __pyx_n_s_queue_name __pyx_mstate_global->__pyx_n_s_queue_name -#define __pyx_n_s_queue_names __pyx_mstate_global->__pyx_n_s_queue_names -#define __pyx_n_s_queued __pyx_mstate_global->__pyx_n_s_queued -#define __pyx_n_u_queued __pyx_mstate_global->__pyx_n_u_queued -#define __pyx_kp_u_raises_ABAPApplicationError __pyx_mstate_global->__pyx_kp_u_raises_ABAPApplicationError -#define __pyx_kp_u_raises_ABAPRuntimeError __pyx_mstate_global->__pyx_kp_u_raises_ABAPRuntimeError -#define __pyx_kp_u_raises_ExternalRuntimeError __pyx_mstate_global->__pyx_kp_u_raises_ExternalRuntimeError -#define __pyx_kp_u_raises_an_invalid_exception_Exc __pyx_mstate_global->__pyx_kp_u_raises_an_invalid_exception_Exc -#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range -#define __pyx_n_s_rc __pyx_mstate_global->__pyx_n_s_rc -#define __pyx_n_u_receivedBytes __pyx_mstate_global->__pyx_n_u_receivedBytes -#define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce -#define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython -#define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex -#define __pyx_n_u_registrationCount __pyx_mstate_global->__pyx_n_u_registrationCount -#define __pyx_n_s_registry __pyx_mstate_global->__pyx_n_s_registry -#define __pyx_n_u_rel __pyx_mstate_global->__pyx_n_u_rel -#define __pyx_n_s_reload_ini_file __pyx_mstate_global->__pyx_n_s_reload_ini_file -#define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove -#define __pyx_n_s_removeFromConnection __pyx_mstate_global->__pyx_n_s_removeFromConnection -#define __pyx_n_s_reopen __pyx_mstate_global->__pyx_n_s_reopen -#define __pyx_n_s_repr __pyx_mstate_global->__pyx_n_s_repr -#define __pyx_n_s_request_context __pyx_mstate_global->__pyx_n_s_request_context -#define __pyx_kp_u_request_context_2 __pyx_mstate_global->__pyx_kp_u_request_context_2 -#define __pyx_n_u_reserved __pyx_mstate_global->__pyx_n_u_reserved -#define __pyx_n_s_reset __pyx_mstate_global->__pyx_n_s_reset -#define __pyx_n_s_reset_server_context __pyx_mstate_global->__pyx_n_s_reset_server_context -#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result -#define __pyx_n_u_return_import_params __pyx_mstate_global->__pyx_n_u_return_import_params -#define __pyx_n_u_rfcRole __pyx_mstate_global->__pyx_n_u_rfcRole -#define __pyx_n_s_rfcServerState __pyx_mstate_global->__pyx_n_s_rfcServerState -#define __pyx_n_u_rollback __pyx_mstate_global->__pyx_n_u_rollback -#define __pyx_n_s_rolled_back __pyx_mstate_global->__pyx_n_s_rolled_back -#define __pyx_n_s_rsplit __pyx_mstate_global->__pyx_n_s_rsplit -#define __pyx_n_s_rstrip __pyx_mstate_global->__pyx_n_s_rstrip -#define __pyx_n_u_rstrip __pyx_mstate_global->__pyx_n_u_rstrip -#define __pyx_kp_u_sapnwrfc_ini __pyx_mstate_global->__pyx_kp_u_sapnwrfc_ini -#define __pyx_kp_u_sapnwrfc_ini_not_found_in __pyx_mstate_global->__pyx_kp_u_sapnwrfc_ini_not_found_in -#define __pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin __pyx_mstate_global->__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin -#define __pyx_n_s_sapuc __pyx_mstate_global->__pyx_n_s_sapuc -#define __pyx_n_u_sat_trace __pyx_mstate_global->__pyx_n_u_sat_trace -#define __pyx_n_s_second __pyx_mstate_global->__pyx_n_s_second -#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self -#define __pyx_kp_s_self__handle_self__tHandle_self __pyx_mstate_global->__pyx_kp_s_self__handle_self__tHandle_self -#define __pyx_kp_s_self__throughput_handle_cannot_b __pyx_mstate_global->__pyx_kp_s_self__throughput_handle_cannot_b -#define __pyx_n_u_sending_date __pyx_mstate_global->__pyx_n_u_sending_date -#define __pyx_n_u_sending_time __pyx_mstate_global->__pyx_n_u_sending_time -#define __pyx_n_u_sentBytes __pyx_mstate_global->__pyx_n_u_sentBytes -#define __pyx_n_u_serializationTime __pyx_mstate_global->__pyx_n_u_serializationTime -#define __pyx_n_s_serve __pyx_mstate_global->__pyx_n_s_serve -#define __pyx_n_u_server __pyx_mstate_global->__pyx_n_u_server -#define __pyx_n_u_serverName __pyx_mstate_global->__pyx_n_u_serverName -#define __pyx_n_s_server_context __pyx_mstate_global->__pyx_n_s_server_context -#define __pyx_n_u_server_context __pyx_mstate_global->__pyx_n_u_server_context -#define __pyx_n_s_server_functions __pyx_mstate_global->__pyx_n_s_server_functions -#define __pyx_n_s_server_handle __pyx_mstate_global->__pyx_n_s_server_handle -#define __pyx_n_s_server_log __pyx_mstate_global->__pyx_n_s_server_log -#define __pyx_n_u_server_log_2 __pyx_mstate_global->__pyx_n_u_server_log_2 -#define __pyx_n_s_server_params __pyx_mstate_global->__pyx_n_s_server_params -#define __pyx_n_s_setOnConnection __pyx_mstate_global->__pyx_n_s_setOnConnection -#define __pyx_n_s_set_cryptolib_path __pyx_mstate_global->__pyx_n_s_set_cryptolib_path -#define __pyx_n_s_set_ini_file_directory __pyx_mstate_global->__pyx_n_s_set_ini_file_directory -#define __pyx_n_s_set_locale_radix __pyx_mstate_global->__pyx_n_s_set_locale_radix -#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name -#define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate -#define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython -#define __pyx_kp_u_should_be_from_1_30_chars __pyx_mstate_global->__pyx_kp_u_should_be_from_1_30_chars -#define __pyx_kp_u_should_be_from_1_30_chars_2 __pyx_mstate_global->__pyx_kp_u_should_be_from_1_30_chars_2 -#define __pyx_n_s_skip_parameters __pyx_mstate_global->__pyx_n_s_skip_parameters -#define __pyx_n_s_socket __pyx_mstate_global->__pyx_n_s_socket -#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec -#define __pyx_kp_s_src_pyrfc__cyrfc_pyx __pyx_mstate_global->__pyx_kp_s_src_pyrfc__cyrfc_pyx -#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start -#define __pyx_kp_u_started __pyx_mstate_global->__pyx_kp_u_started -#define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state -#define __pyx_n_u_state __pyx_mstate_global->__pyx_n_u_state -#define __pyx_n_s_staticmethod __pyx_mstate_global->__pyx_n_s_staticmethod -#define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop -#define __pyx_kp_u_stopped __pyx_mstate_global->__pyx_kp_u_stopped -#define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource -#define __pyx_n_s_strptime __pyx_mstate_global->__pyx_n_s_strptime -#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super -#define __pyx_n_s_synchronous __pyx_mstate_global->__pyx_n_s_synchronous -#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys -#define __pyx_n_s_sysId __pyx_mstate_global->__pyx_n_s_sysId -#define __pyx_n_u_sysId __pyx_mstate_global->__pyx_n_u_sysId -#define __pyx_n_u_sysNumber __pyx_mstate_global->__pyx_n_u_sysNumber -#define __pyx_n_s_sysid __pyx_mstate_global->__pyx_n_s_sysid -#define __pyx_n_s_t __pyx_mstate_global->__pyx_n_s_t -#define __pyx_n_u_t_code __pyx_mstate_global->__pyx_n_u_t_code -#define __pyx_n_s_target __pyx_mstate_global->__pyx_n_s_target -#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test -#define __pyx_n_s_threading __pyx_mstate_global->__pyx_n_s_threading -#define __pyx_n_s_throughput __pyx_mstate_global->__pyx_n_s_throughput -#define __pyx_n_s_tid __pyx_mstate_global->__pyx_n_s_tid -#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time -#define __pyx_kp_u_time_value_required_received __pyx_mstate_global->__pyx_kp_u_time_value_required_received -#define __pyx_n_s_timeout __pyx_mstate_global->__pyx_n_s_timeout -#define __pyx_n_u_timeout __pyx_mstate_global->__pyx_n_u_timeout -#define __pyx_n_u_totalTime __pyx_mstate_global->__pyx_n_u_totalTime -#define __pyx_n_u_trace __pyx_mstate_global->__pyx_n_u_trace -#define __pyx_n_s_traceback __pyx_mstate_global->__pyx_n_s_traceback -#define __pyx_n_s_transaction_id __pyx_mstate_global->__pyx_n_s_transaction_id -#define __pyx_n_s_transactional __pyx_mstate_global->__pyx_n_s_transactional -#define __pyx_n_s_type __pyx_mstate_global->__pyx_n_s_type -#define __pyx_n_u_type __pyx_mstate_global->__pyx_n_u_type -#define __pyx_n_s_typeDesc __pyx_mstate_global->__pyx_n_s_typeDesc -#define __pyx_n_s_typeName __pyx_mstate_global->__pyx_n_s_typeName -#define __pyx_n_s_type_desc_get __pyx_mstate_global->__pyx_n_s_type_desc_get -#define __pyx_n_s_type_desc_remove __pyx_mstate_global->__pyx_n_s_type_desc_remove -#define __pyx_n_s_type_description __pyx_mstate_global->__pyx_n_s_type_description -#define __pyx_n_u_type_description __pyx_mstate_global->__pyx_n_u_type_description -#define __pyx_n_s_type_name __pyx_mstate_global->__pyx_n_s_type_name -#define __pyx_n_s_uIdentifier __pyx_mstate_global->__pyx_n_s_uIdentifier -#define __pyx_n_s_uc_length __pyx_mstate_global->__pyx_n_s_uc_length -#define __pyx_n_u_uc_length __pyx_mstate_global->__pyx_n_u_uc_length -#define __pyx_n_s_uc_offset __pyx_mstate_global->__pyx_n_s_uc_offset -#define __pyx_n_u_uc_offset __pyx_mstate_global->__pyx_n_u_uc_offset -#define __pyx_n_s_uclang_iso __pyx_mstate_global->__pyx_n_s_uclang_iso -#define __pyx_n_s_uclang_sap __pyx_mstate_global->__pyx_n_s_uclang_sap -#define __pyx_n_s_uid __pyx_mstate_global->__pyx_n_s_uid -#define __pyx_n_s_unit __pyx_mstate_global->__pyx_n_s_unit -#define __pyx_n_s_unitAttr __pyx_mstate_global->__pyx_n_s_unitAttr -#define __pyx_n_u_unit_attributes __pyx_mstate_global->__pyx_n_u_unit_attributes -#define __pyx_n_u_unit_history __pyx_mstate_global->__pyx_n_u_unit_history -#define __pyx_n_s_unit_id __pyx_mstate_global->__pyx_n_s_unit_id -#define __pyx_n_s_unit_identifier __pyx_mstate_global->__pyx_n_s_unit_identifier -#define __pyx_n_u_unit_identifier __pyx_mstate_global->__pyx_n_u_unit_identifier -#define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update -#define __pyx_n_s_upper __pyx_mstate_global->__pyx_n_s_upper -#define __pyx_n_u_user __pyx_mstate_global->__pyx_n_u_user -#define __pyx_n_s_utcnow __pyx_mstate_global->__pyx_n_s_utcnow -#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value -#define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values -#define __pyx_kp_u_when_filling __pyx_mstate_global->__pyx_kp_u_when_filling -#define __pyx_kp_u_when_getting_server_context_for __pyx_mstate_global->__pyx_kp_u_when_getting_server_context_for -#define __pyx_kp_u_when_wrapping __pyx_mstate_global->__pyx_kp_u_when_wrapping -#define __pyx_kp_u_with __pyx_mstate_global->__pyx_kp_u_with -#define __pyx_n_s_wrap __pyx_mstate_global->__pyx_n_s_wrap -#define __pyx_kp_u_wrapString_uclen_u_utf8_size_u __pyx_mstate_global->__pyx_kp_u_wrapString_uclen_u_utf8_size_u -#define __pyx_n_s_year __pyx_mstate_global->__pyx_n_s_year -#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 -#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 -#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2 -#define __pyx_int_3 __pyx_mstate_global->__pyx_int_3 -#define __pyx_int_4 __pyx_mstate_global->__pyx_int_4 -#define __pyx_int_5 __pyx_mstate_global->__pyx_int_5 -#define __pyx_int_6 __pyx_mstate_global->__pyx_int_6 -#define __pyx_int_8 __pyx_mstate_global->__pyx_int_8 -#define __pyx_int_12 __pyx_mstate_global->__pyx_int_12 -#define __pyx_int_15 __pyx_mstate_global->__pyx_int_15 -#define __pyx_int_17 __pyx_mstate_global->__pyx_int_17 -#define __pyx_int_19 __pyx_mstate_global->__pyx_int_19 -#define __pyx_int_20 __pyx_mstate_global->__pyx_int_20 -#define __pyx_int_40 __pyx_mstate_global->__pyx_int_40 -#define __pyx_int_45 __pyx_mstate_global->__pyx_int_45 -#define __pyx_int_50 __pyx_mstate_global->__pyx_int_50 -#define __pyx_int_64 __pyx_mstate_global->__pyx_int_64 -#define __pyx_int_100 __pyx_mstate_global->__pyx_int_100 -#define __pyx_int_128 __pyx_mstate_global->__pyx_int_128 -#define __pyx_int_512 __pyx_mstate_global->__pyx_int_512 -#define __pyx_int_8080 __pyx_mstate_global->__pyx_int_8080 -#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1 -#define __pyx_tuple_ __pyx_mstate_global->__pyx_tuple_ -#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7 -#define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8 -#define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9 -#define __pyx_slice__12 __pyx_mstate_global->__pyx_slice__12 -#define __pyx_slice__13 __pyx_mstate_global->__pyx_slice__13 -#define __pyx_slice__14 __pyx_mstate_global->__pyx_slice__14 -#define __pyx_slice__15 __pyx_mstate_global->__pyx_slice__15 -#define __pyx_slice__26 __pyx_mstate_global->__pyx_slice__26 -#define __pyx_slice__30 __pyx_mstate_global->__pyx_slice__30 -#define __pyx_slice__31 __pyx_mstate_global->__pyx_slice__31 -#define __pyx_slice__32 __pyx_mstate_global->__pyx_slice__32 -#define __pyx_slice__33 __pyx_mstate_global->__pyx_slice__33 -#define __pyx_slice__34 __pyx_mstate_global->__pyx_slice__34 -#define __pyx_slice__35 __pyx_mstate_global->__pyx_slice__35 -#define __pyx_slice__36 __pyx_mstate_global->__pyx_slice__36 -#define __pyx_slice__37 __pyx_mstate_global->__pyx_slice__37 -#define __pyx_slice__39 __pyx_mstate_global->__pyx_slice__39 -#define __pyx_slice__40 __pyx_mstate_global->__pyx_slice__40 -#define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10 -#define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11 -#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16 -#define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17 -#define __pyx_tuple__18 __pyx_mstate_global->__pyx_tuple__18 -#define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19 -#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20 -#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27 -#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28 -#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29 -#define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42 -#define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44 -#define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46 -#define __pyx_tuple__48 __pyx_mstate_global->__pyx_tuple__48 -#define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50 -#define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53 -#define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55 -#define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57 -#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59 -#define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62 -#define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64 -#define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65 -#define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66 -#define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68 -#define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70 -#define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72 -#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73 -#define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74 -#define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76 -#define __pyx_tuple__78 __pyx_mstate_global->__pyx_tuple__78 -#define __pyx_tuple__82 __pyx_mstate_global->__pyx_tuple__82 -#define __pyx_tuple__88 __pyx_mstate_global->__pyx_tuple__88 -#define __pyx_tuple__90 __pyx_mstate_global->__pyx_tuple__90 -#define __pyx_tuple__93 __pyx_mstate_global->__pyx_tuple__93 -#define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95 -#define __pyx_tuple__97 __pyx_mstate_global->__pyx_tuple__97 -#define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99 -#define __pyx_codeobj__2 __pyx_mstate_global->__pyx_codeobj__2 -#define __pyx_tuple__101 __pyx_mstate_global->__pyx_tuple__101 -#define __pyx_tuple__102 __pyx_mstate_global->__pyx_tuple__102 -#define __pyx_tuple__104 __pyx_mstate_global->__pyx_tuple__104 -#define __pyx_tuple__106 __pyx_mstate_global->__pyx_tuple__106 -#define __pyx_tuple__108 __pyx_mstate_global->__pyx_tuple__108 -#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110 -#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114 -#define __pyx_tuple__116 __pyx_mstate_global->__pyx_tuple__116 -#define __pyx_tuple__118 __pyx_mstate_global->__pyx_tuple__118 -#define __pyx_tuple__119 __pyx_mstate_global->__pyx_tuple__119 -#define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122 -#define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124 -#define __pyx_tuple__126 __pyx_mstate_global->__pyx_tuple__126 -#define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127 -#define __pyx_tuple__129 __pyx_mstate_global->__pyx_tuple__129 -#define __pyx_tuple__135 __pyx_mstate_global->__pyx_tuple__135 -#define __pyx_tuple__137 __pyx_mstate_global->__pyx_tuple__137 -#define __pyx_tuple__138 __pyx_mstate_global->__pyx_tuple__138 -#define __pyx_tuple__140 __pyx_mstate_global->__pyx_tuple__140 -#define __pyx_tuple__142 __pyx_mstate_global->__pyx_tuple__142 -#define __pyx_tuple__144 __pyx_mstate_global->__pyx_tuple__144 -#define __pyx_tuple__148 __pyx_mstate_global->__pyx_tuple__148 -#define __pyx_tuple__150 __pyx_mstate_global->__pyx_tuple__150 -#define __pyx_tuple__154 __pyx_mstate_global->__pyx_tuple__154 -#define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156 -#define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43 -#define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45 -#define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47 -#define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49 -#define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51 -#define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52 -#define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54 -#define __pyx_codeobj__56 __pyx_mstate_global->__pyx_codeobj__56 -#define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58 -#define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60 -#define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61 -#define __pyx_codeobj__63 __pyx_mstate_global->__pyx_codeobj__63 -#define __pyx_codeobj__67 __pyx_mstate_global->__pyx_codeobj__67 -#define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69 -#define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71 -#define __pyx_codeobj__75 __pyx_mstate_global->__pyx_codeobj__75 -#define __pyx_codeobj__77 __pyx_mstate_global->__pyx_codeobj__77 -#define __pyx_codeobj__79 __pyx_mstate_global->__pyx_codeobj__79 -#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80 -#define __pyx_codeobj__81 __pyx_mstate_global->__pyx_codeobj__81 -#define __pyx_codeobj__83 __pyx_mstate_global->__pyx_codeobj__83 -#define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84 -#define __pyx_codeobj__85 __pyx_mstate_global->__pyx_codeobj__85 -#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86 -#define __pyx_codeobj__87 __pyx_mstate_global->__pyx_codeobj__87 -#define __pyx_codeobj__89 __pyx_mstate_global->__pyx_codeobj__89 -#define __pyx_codeobj__91 __pyx_mstate_global->__pyx_codeobj__91 -#define __pyx_codeobj__92 __pyx_mstate_global->__pyx_codeobj__92 -#define __pyx_codeobj__94 __pyx_mstate_global->__pyx_codeobj__94 -#define __pyx_codeobj__96 __pyx_mstate_global->__pyx_codeobj__96 -#define __pyx_codeobj__98 __pyx_mstate_global->__pyx_codeobj__98 -#define __pyx_codeobj__100 __pyx_mstate_global->__pyx_codeobj__100 -#define __pyx_codeobj__103 __pyx_mstate_global->__pyx_codeobj__103 -#define __pyx_codeobj__105 __pyx_mstate_global->__pyx_codeobj__105 -#define __pyx_codeobj__107 __pyx_mstate_global->__pyx_codeobj__107 -#define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109 -#define __pyx_codeobj__111 __pyx_mstate_global->__pyx_codeobj__111 -#define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112 -#define __pyx_codeobj__113 __pyx_mstate_global->__pyx_codeobj__113 -#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115 -#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117 -#define __pyx_codeobj__120 __pyx_mstate_global->__pyx_codeobj__120 -#define __pyx_codeobj__121 __pyx_mstate_global->__pyx_codeobj__121 -#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123 -#define __pyx_codeobj__125 __pyx_mstate_global->__pyx_codeobj__125 -#define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128 -#define __pyx_codeobj__130 __pyx_mstate_global->__pyx_codeobj__130 -#define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131 -#define __pyx_codeobj__132 __pyx_mstate_global->__pyx_codeobj__132 -#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133 -#define __pyx_codeobj__134 __pyx_mstate_global->__pyx_codeobj__134 -#define __pyx_codeobj__136 __pyx_mstate_global->__pyx_codeobj__136 -#define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139 -#define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141 -#define __pyx_codeobj__143 __pyx_mstate_global->__pyx_codeobj__143 -#define __pyx_codeobj__145 __pyx_mstate_global->__pyx_codeobj__145 -#define __pyx_codeobj__146 __pyx_mstate_global->__pyx_codeobj__146 -#define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147 -#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149 -#define __pyx_codeobj__151 __pyx_mstate_global->__pyx_codeobj__151 -#define __pyx_codeobj__152 __pyx_mstate_global->__pyx_codeobj__152 -#define __pyx_codeobj__153 __pyx_mstate_global->__pyx_codeobj__153 -#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155 -#define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157 -#define __pyx_codeobj__158 __pyx_mstate_global->__pyx_codeobj__158 -#define __pyx_codeobj__159 __pyx_mstate_global->__pyx_codeobj__159 -#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160 -#define __pyx_codeobj__161 __pyx_mstate_global->__pyx_codeobj__161 -#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162 -#define __pyx_codeobj__163 __pyx_mstate_global->__pyx_codeobj__163 -/* #### Code section: module_code ### */ - -/* "cfunc.to_py":67 - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): - * def wrap(object client_connection): # <<<<<<<<<<<<<< - * """wrap(client_connection)""" - * return f(client_connection) - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_1wrap(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_wrap, "wrap(client_connection)"); -static PyMethodDef __pyx_mdef_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_1wrap = {"wrap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_1wrap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_wrap}; -static PyObject *__pyx_pw_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_1wrap(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_client_connection = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("wrap (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_client_connection,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_client_connection)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 67, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "wrap") < 0)) __PYX_ERR(1, 67, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_client_connection = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("wrap", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 67, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_wrap(__pyx_self, __pyx_v_client_connection); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_wrap(PyObject *__pyx_self, PyObject *__pyx_v_client_connection) { - struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *__pyx_cur_scope; - struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *__pyx_outer_scope; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrap", 0); - __pyx_outer_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *) __Pyx_CyFunction_GetClosure(__pyx_self); - __pyx_cur_scope = __pyx_outer_scope; - - /* "cfunc.to_py":69 - * def wrap(object client_connection): - * """wrap(client_connection)""" - * return f(client_connection) # <<<<<<<<<<<<<< - * return wrap - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_cur_scope->__pyx_v_f(__pyx_v_client_connection); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 69, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "cfunc.to_py":67 - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): - * def wrap(object client_connection): # <<<<<<<<<<<<<< - * """wrap(client_connection)""" - * return f(client_connection) - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection.wrap", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "cfunc.to_py":66 - * - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): # <<<<<<<<<<<<<< - * def wrap(object client_connection): - * """wrap(client_connection)""" - */ - -static PyObject *__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(PyObject *(*__pyx_v_f)(PyObject *)) { - struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *__pyx_cur_scope; - PyObject *__pyx_v_wrap = 0; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection", 0); - __pyx_cur_scope = (struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection, __pyx_empty_tuple, NULL); - if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *)Py_None); - __Pyx_INCREF(Py_None); - __PYX_ERR(1, 66, __pyx_L1_error) - } else { - __Pyx_GOTREF((PyObject *)__pyx_cur_scope); - } - __pyx_cur_scope->__pyx_v_f = __pyx_v_f; - - /* "cfunc.to_py":67 - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): - * def wrap(object client_connection): # <<<<<<<<<<<<<< - * """wrap(client_connection)""" - * return f(client_connection) - */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_11cfunc_dot_to_py_66__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_1wrap, 0, __pyx_n_s_Pyx_CFunc_object__lParenobject, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cfunc_to_py, __pyx_d, ((PyObject *)__pyx_codeobj__2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_wrap = __pyx_t_1; - __pyx_t_1 = 0; - - /* "cfunc.to_py":70 - * """wrap(client_connection)""" - * return f(client_connection) - * return wrap # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_wrap); - __pyx_r = __pyx_v_wrap; - goto __pyx_L0; - - /* "cfunc.to_py":66 - * - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): # <<<<<<<<<<<<<< - * def wrap(object client_connection): - * """wrap(client_connection)""" - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("cfunc.to_py.__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_wrap); - __Pyx_DECREF((PyObject *)__pyx_cur_scope); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":114 - * - * - * def get_nwrfclib_version(): # <<<<<<<<<<<<<< - * """Get SAP NW RFC Lib version - * :returns: tuple of major, minor and patch level and OS platform - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_1get_nwrfclib_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_get_nwrfclib_version, "Get SAP NW RFC Lib version\n :returns: tuple of major, minor and patch level and OS platform\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_1get_nwrfclib_version = {"get_nwrfclib_version", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_1get_nwrfclib_version, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_get_nwrfclib_version}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_1get_nwrfclib_version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("get_nwrfclib_version (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_get_nwrfclib_version(__pyx_self); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_get_nwrfclib_version(CYTHON_UNUSED PyObject *__pyx_self) { - unsigned int __pyx_v_major; - unsigned int __pyx_v_minor; - unsigned int __pyx_v_patchlevel; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_nwrfclib_version", 0); - - /* "pyrfc/_cyrfc.pyx":118 - * :returns: tuple of major, minor and patch level and OS platform - * """ - * cdef unsigned major = 0 # <<<<<<<<<<<<<< - * cdef unsigned minor = 0 - * cdef unsigned patchlevel = 0 - */ - __pyx_v_major = 0; - - /* "pyrfc/_cyrfc.pyx":119 - * """ - * cdef unsigned major = 0 - * cdef unsigned minor = 0 # <<<<<<<<<<<<<< - * cdef unsigned patchlevel = 0 - * RfcGetVersion(&major, &minor, &patchlevel) - */ - __pyx_v_minor = 0; - - /* "pyrfc/_cyrfc.pyx":120 - * cdef unsigned major = 0 - * cdef unsigned minor = 0 - * cdef unsigned patchlevel = 0 # <<<<<<<<<<<<<< - * RfcGetVersion(&major, &minor, &patchlevel) - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} - */ - __pyx_v_patchlevel = 0; - - /* "pyrfc/_cyrfc.pyx":121 - * cdef unsigned minor = 0 - * cdef unsigned patchlevel = 0 - * RfcGetVersion(&major, &minor, &patchlevel) # <<<<<<<<<<<<<< - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} - * - */ - (void)(RfcGetVersion((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_patchlevel))); - - /* "pyrfc/_cyrfc.pyx":122 - * cdef unsigned patchlevel = 0 - * RfcGetVersion(&major, &minor, &patchlevel) - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __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, 122, __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, 122, __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, 122, __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, 122, __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, 122, __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, 122, __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, 122, __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, 122, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":114 - * - * - * def get_nwrfclib_version(): # <<<<<<<<<<<<<< - * """Get SAP NW RFC Lib version - * :returns: tuple of major, minor and patch level and OS platform - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.get_nwrfclib_version", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":125 - * - * - * def set_ini_file_directory(path_name): # <<<<<<<<<<<<<< - * """Sets the directory in which to search for the sapnwrfc.ini file - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_3set_ini_file_directory(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_2set_ini_file_directory, "Sets the directory in which to search for the sapnwrfc.ini file\n\n :param path_name: Directory in which to search for the sapnwrfc.ini file.\n :type path_name: string\n\n :return: nothing, raises an error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_3set_ini_file_directory = {"set_ini_file_directory", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_3set_ini_file_directory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_2set_ini_file_directory}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_3set_ini_file_directory(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_path_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_ini_file_directory (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path_name,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_path_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_ini_file_directory") < 0)) __PYX_ERR(0, 125, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_path_name = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_ini_file_directory", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 125, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.set_ini_file_directory", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_2set_ini_file_directory(__pyx_self, __pyx_v_path_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_2set_ini_file_directory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name) { - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC __pyx_v_pathName[0x200]; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - 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; - int __pyx_t_8; - SAP_UC *__pyx_t_9; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("set_ini_file_directory", 0); - - /* "pyrfc/_cyrfc.pyx":133 - * :return: nothing, raises an error - * """ - * if type(path_name) is not str: # <<<<<<<<<<<<<< - * raise TypeError('sapnwrfc.ini path is not a string:', path_name) - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_path_name)) != ((PyObject *)(&PyUnicode_Type))); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":134 - * """ - * if type(path_name) is not str: - * raise TypeError('sapnwrfc.ini path is not a string:', path_name) # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef SAP_UC pathName [512] - */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __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_2, 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_2, 1, __pyx_v_path_name); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 134, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":133 - * :return: nothing, raises an error - * """ - * if type(path_name) is not str: # <<<<<<<<<<<<<< - * raise TypeError('sapnwrfc.ini path is not a string:', path_name) - * cdef RFC_ERROR_INFO errorInfo - */ - } - - /* "pyrfc/_cyrfc.pyx":137 - * 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_2, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __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_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_7 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_v_path_name, __pyx_kp_u_sapnwrfc_ini}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 137, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_5 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_7 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 137, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = (!__pyx_t_1); - if (unlikely(__pyx_t_8)) { - - /* "pyrfc/_cyrfc.pyx":138 - * 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_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __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_3, 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_3, 1, __pyx_v_path_name); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __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, 138, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":137 - * cdef RFC_ERROR_INFO errorInfo - * cdef SAP_UC pathName [512] - * if not isfile(join(path_name, "sapnwrfc.ini")): # <<<<<<<<<<<<<< - * raise TypeError('sapnwrfc.ini not found in:', path_name) - * pathName = fillString(path_name) - */ - } - - /* "pyrfc/_cyrfc.pyx":139 - * 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_9 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_path_name); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 139, __pyx_L1_error) - memcpy(&(__pyx_v_pathName[0]), __pyx_t_9, sizeof(__pyx_v_pathName[0]) * (0x200 - 0)); - - /* "pyrfc/_cyrfc.pyx":140 - * raise TypeError('sapnwrfc.ini not found in:', path_name) - * pathName = fillString(path_name) - * cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcSetIniPath(__pyx_v_pathName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":141 - * pathName = fillString(path_name) - * cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - __pyx_t_8 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_8)) { - - /* "pyrfc/_cyrfc.pyx":142 - * cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __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, 142, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":141 - * pathName = fillString(path_name) - * cdef RFC_RC rc = RfcSetIniPath(pathName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":125 - * - * - * 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_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("pyrfc._cyrfc.set_ini_file_directory", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":145 - * - * - * def reload_ini_file(): # <<<<<<<<<<<<<< - * """Reloads the contents of the sapnwrfc.ini file into memory. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_5reload_ini_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_4reload_ini_file, "Reloads the contents of the sapnwrfc.ini file into memory.\n\n Searches the directory given by ``RfcSetIniPath()`` (or the current working directory)\n for the file sapnwrfc.ini and loads its contents into memory. Reloading the sapnwrfc.ini\n file is only necessary after the file has been manually edited.\n If you want to use a sapnwrfc.ini file in a different location, consider using ``RfcSetIniPath()``.\n\n Note: If a file with the name ``sapnwrfc.ini`` does not exist in the given directory,\n this is not considered an error! Default settings are used in this case.\n\n :return: nothing, raises an error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_5reload_ini_file = {"reload_ini_file", (PyCFunction)__pyx_pw_5pyrfc_6_cyrfc_5reload_ini_file, METH_NOARGS, __pyx_doc_5pyrfc_6_cyrfc_4reload_ini_file}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_5reload_ini_file(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("reload_ini_file (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_4reload_ini_file(__pyx_self); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_4reload_ini_file(CYTHON_UNUSED PyObject *__pyx_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reload_ini_file", 0); - - /* "pyrfc/_cyrfc.pyx":159 - * """ - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcReloadIniFile (&errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcReloadIniFile((&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":160 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcReloadIniFile (&errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":161 - * cdef RFC_RC rc = RfcReloadIniFile (&errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __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, 161, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":160 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcReloadIniFile (&errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":145 - * - * - * def reload_ini_file(): # <<<<<<<<<<<<<< - * """Reloads the contents of the sapnwrfc.ini file into memory. - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.reload_ini_file", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":164 - * - * - * def language_iso_to_sap(lang_iso): # <<<<<<<<<<<<<< - * """Language code conversion of ISO code to SAP code. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_7language_iso_to_sap(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6language_iso_to_sap, "Language code conversion of ISO code to SAP code.\n\n :param lang_iso: Language ISO code\n :type lang_iso: string\n\n :return: SAP language code of char 1 type\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n if ISO to SAP code conversion fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_7language_iso_to_sap = {"language_iso_to_sap", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_7language_iso_to_sap, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6language_iso_to_sap}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_7language_iso_to_sap(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_lang_iso = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("language_iso_to_sap (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lang_iso,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lang_iso)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "language_iso_to_sap") < 0)) __PYX_ERR(0, 164, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_lang_iso = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("language_iso_to_sap", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 164, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.language_iso_to_sap", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6language_iso_to_sap(__pyx_self, __pyx_v_lang_iso); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6language_iso_to_sap(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lang_iso) { - SAP_UC *__pyx_v_uclang_iso; - SAP_UC __pyx_v_uclang_sap[8]; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("language_iso_to_sap", 0); - - /* "pyrfc/_cyrfc.pyx":175 - * if ISO to SAP code conversion fails. - * """ - * cdef SAP_UC *uclang_iso = fillString(lang_iso) # <<<<<<<<<<<<<< - * cdef SAP_UC uclang_sap[8] - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_lang_iso); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 175, __pyx_L1_error) - __pyx_v_uclang_iso = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":178 - * cdef SAP_UC uclang_sap[8] - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo) # <<<<<<<<<<<<<< - * free(uclang_iso) - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcLanguageIsoToSap(__pyx_v_uclang_iso, __pyx_v_uclang_sap, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":179 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo) - * free(uclang_iso) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - free(__pyx_v_uclang_iso); - - /* "pyrfc/_cyrfc.pyx":180 - * cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo) - * free(uclang_iso) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(uclang_sap, 1) - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":181 - * free(uclang_iso) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(uclang_sap, 1) - * - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __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, 181, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":180 - * cdef RFC_RC rc = RfcLanguageIsoToSap(uclang_iso, uclang_sap, &errorInfo) - * free(uclang_iso) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(uclang_sap, 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":182 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * return wrapString(uclang_sap, 1) # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_4.__pyx_n = 1; - __pyx_t_4.uclen = __pyx_int_1; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uclang_sap, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":164 - * - * - * def language_iso_to_sap(lang_iso): # <<<<<<<<<<<<<< - * """Language code conversion of ISO code to SAP code. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.language_iso_to_sap", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":185 - * - * - * def language_sap_to_iso(lang_sap): # <<<<<<<<<<<<<< - * """Language code conversion of SAP code to ISO code. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_9language_sap_to_iso(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_8language_sap_to_iso, "Language code conversion of SAP code to ISO code.\n\n :param lang_sap: Language SAP code\n :type lang_sap: string\n\n :return: ISO language code\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n if SAP to ISO code conversion fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_9language_sap_to_iso = {"language_sap_to_iso", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_9language_sap_to_iso, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_8language_sap_to_iso}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_9language_sap_to_iso(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_lang_sap = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("language_sap_to_iso (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lang_sap,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_lang_sap)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "language_sap_to_iso") < 0)) __PYX_ERR(0, 185, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_lang_sap = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("language_sap_to_iso", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 185, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.language_sap_to_iso", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_8language_sap_to_iso(__pyx_self, __pyx_v_lang_sap); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_8language_sap_to_iso(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lang_sap) { - SAP_UC *__pyx_v_uclang_sap; - SAP_UC __pyx_v_uclang_iso[16]; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("language_sap_to_iso", 0); - - /* "pyrfc/_cyrfc.pyx":196 - * if SAP to ISO code conversion fails. - * """ - * cdef SAP_UC *uclang_sap = fillString(lang_sap) # <<<<<<<<<<<<<< - * cdef SAP_UC uclang_iso[16] - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_lang_sap); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 196, __pyx_L1_error) - __pyx_v_uclang_sap = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":199 - * cdef SAP_UC uclang_iso[16] - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo) # <<<<<<<<<<<<<< - * free(uclang_sap) - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcLanguageSapToIso(__pyx_v_uclang_sap, __pyx_v_uclang_iso, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":200 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo) - * free(uclang_sap) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - free(__pyx_v_uclang_sap); - - /* "pyrfc/_cyrfc.pyx":201 - * cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo) - * free(uclang_sap) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(uclang_iso, 2) - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":202 - * free(uclang_sap) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(uclang_iso, 2) - * - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __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, 202, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":201 - * cdef RFC_RC rc = RfcLanguageSapToIso(uclang_sap, uclang_iso, &errorInfo) - * free(uclang_sap) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(uclang_iso, 2) - */ - } - - /* "pyrfc/_cyrfc.pyx":203 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * return wrapString(uclang_iso, 2) # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_4.__pyx_n = 1; - __pyx_t_4.uclen = __pyx_int_2; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uclang_iso, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":185 - * - * - * def language_sap_to_iso(lang_sap): # <<<<<<<<<<<<<< - * """Language code conversion of SAP code to ISO code. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.language_sap_to_iso", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":206 - * - * - * def set_cryptolib_path(path_name): # <<<<<<<<<<<<<< - * """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_11set_cryptolib_path(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10set_cryptolib_path, "Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc.\n\n The parameter path_name needs also to contain the name of the library.\n This function has the same effect as the sapnwrfc.ini parameter TLS_SAPCRYPTOLIB.\n This API cannot reset a new path to the library during runtime. Once set, the path is definitive.\n\n :param path_name: Absolute path to crypto library\n :type path_name: string\n\n :return: nothing, raises an error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_11set_cryptolib_path = {"set_cryptolib_path", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_11set_cryptolib_path, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10set_cryptolib_path}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_11set_cryptolib_path(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_path_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_cryptolib_path (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path_name,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_path_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 206, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_cryptolib_path") < 0)) __PYX_ERR(0, 206, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_path_name = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_cryptolib_path", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 206, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.set_cryptolib_path", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10set_cryptolib_path(__pyx_self, __pyx_v_path_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10set_cryptolib_path(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path_name) { - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC __pyx_v_pathName[0x200]; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - SAP_UC *__pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("set_cryptolib_path", 0); - - /* "pyrfc/_cyrfc.pyx":218 - * :return: nothing, raises an error - * """ - * if type(path_name) is not str: # <<<<<<<<<<<<<< - * raise TypeError('sapnwrfc.ini path is not a string:', path_name) - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_path_name)) != ((PyObject *)(&PyUnicode_Type))); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":219 - * """ - * if type(path_name) is not str: - * raise TypeError('sapnwrfc.ini path is not a string:', path_name) # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef SAP_UC pathName [512] - */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __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_2, 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_2, 1, __pyx_v_path_name); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 219, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":218 - * :return: nothing, raises an error - * """ - * if type(path_name) is not str: # <<<<<<<<<<<<<< - * raise TypeError('sapnwrfc.ini path is not a string:', path_name) - * cdef RFC_ERROR_INFO errorInfo - */ - } - - /* "pyrfc/_cyrfc.pyx":222 - * 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_2, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_path_name}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 222, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = (!__pyx_t_1); - if (unlikely(__pyx_t_6)) { - - /* "pyrfc/_cyrfc.pyx":223 - * 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_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_kp_u_Crypto_library_not_found); - __Pyx_GIVEREF(__pyx_kp_u_Crypto_library_not_found); - PyTuple_SET_ITEM(__pyx_t_3, 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_3, 1, __pyx_v_path_name); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __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, 223, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":222 - * cdef RFC_ERROR_INFO errorInfo - * cdef SAP_UC pathName [512] - * if not isfile(path_name): # <<<<<<<<<<<<<< - * raise TypeError('Crypto library not found:', path_name) - * pathName = fillString(path_name) - */ - } - - /* "pyrfc/_cyrfc.pyx":224 - * 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_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_path_name); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 224, __pyx_L1_error) - memcpy(&(__pyx_v_pathName[0]), __pyx_t_7, sizeof(__pyx_v_pathName[0]) * (0x200 - 0)); - - /* "pyrfc/_cyrfc.pyx":225 - * raise TypeError('Crypto library not found:', path_name) - * pathName = fillString(path_name) - * cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcLoadCryptoLibrary(__pyx_v_pathName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":226 - * pathName = fillString(path_name) - * cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - __pyx_t_6 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_6)) { - - /* "pyrfc/_cyrfc.pyx":227 - * cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 227, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":226 - * pathName = fillString(path_name) - * cdef RFC_RC rc = RfcLoadCryptoLibrary(pathName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":206 - * - * - * 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_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.set_cryptolib_path", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":230 - * - * - * def set_locale_radix(value=None): # <<<<<<<<<<<<<< - * """Sets the locale radix for decimal conversions. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_13set_locale_radix(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_12set_locale_radix, "Sets the locale radix for decimal conversions.\n\n :param value: Locale radix like ``.`` or ``,``\n :type path_name: string\n\n :return: New radix set\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_13set_locale_radix = {"set_locale_radix", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_13set_locale_radix, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_12set_locale_radix}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_13set_locale_radix(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_value = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_locale_radix (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_value,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)((PyObject *)Py_None)); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value); - if (value) { values[0] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 230, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_locale_radix") < 0)) __PYX_ERR(0, 230, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_value = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_locale_radix", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 230, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.set_locale_radix", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_12set_locale_radix(__pyx_self, __pyx_v_value); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_12set_locale_radix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_value) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - 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("set_locale_radix", 0); - __Pyx_INCREF(__pyx_v_value); - - /* "pyrfc/_cyrfc.pyx":239 - * """ - * global _LOCALE_RADIX - * if value is None: # <<<<<<<<<<<<<< - * value = localeconv()['decimal_point'] - * _LOCALE_RADIX = value - */ - __pyx_t_1 = (__pyx_v_value == Py_None); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":240 - * global _LOCALE_RADIX - * if value is None: - * value = localeconv()['decimal_point'] # <<<<<<<<<<<<<< - * _LOCALE_RADIX = value - * return _LOCALE_RADIX - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_localeconv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_decimal_point); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":239 - * """ - * global _LOCALE_RADIX - * if value is None: # <<<<<<<<<<<<<< - * value = localeconv()['decimal_point'] - * _LOCALE_RADIX = value - */ - } - - /* "pyrfc/_cyrfc.pyx":241 - * if value is None: - * value = localeconv()['decimal_point'] - * _LOCALE_RADIX = value # <<<<<<<<<<<<<< - * return _LOCALE_RADIX - * - */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOCALE_RADIX, __pyx_v_value) < 0) __PYX_ERR(0, 241, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":242 - * value = localeconv()['decimal_point'] - * _LOCALE_RADIX = value - * return _LOCALE_RADIX # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_LOCALE_RADIX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":230 - * - * - * def set_locale_radix(value=None): # <<<<<<<<<<<<<< - * """Sets the locale radix for decimal conversions. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.set_locale_radix", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":245 - * - * - * cdef _cancel_connection(client_connection): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc__cancel_connection(PyObject *__pyx_v_client_connection) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - uintptr_t __pyx_t_3; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_cancel_connection", 0); - - /* "pyrfc/_cyrfc.pyx":248 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if client_connection.handle is not None: # <<<<<<<<<<<<<< - * rc = RfcCancel(client_connection.handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_client_connection, __pyx_n_s_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":249 - * cdef RFC_ERROR_INFO errorInfo - * if client_connection.handle is not None: - * rc = RfcCancel(client_connection.handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_client_connection, __pyx_n_s_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_1); if (unlikely((__pyx_t_3 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 249, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_rc = RfcCancel(((RFC_CONNECTION_HANDLE)((uintptr_t)__pyx_t_3)), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":250 - * if client_connection.handle is not None: - * rc = RfcCancel(client_connection.handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - __pyx_t_4 = (__pyx_v_rc != RFC_OK); - if (!__pyx_t_4) { - } else { - __pyx_t_2 = __pyx_t_4; - goto __pyx_L5_bool_binop_done; - } - __pyx_t_4 = (__pyx_v_errorInfo.code != RFC_OK); - __pyx_t_2 = __pyx_t_4; - __pyx_L5_bool_binop_done:; - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":251 - * rc = RfcCancel(client_connection.handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __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, 251, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":250 - * if client_connection.handle is not None: - * rc = RfcCancel(client_connection.handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":248 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if client_connection.handle is not None: # <<<<<<<<<<<<<< - * rc = RfcCancel(client_connection.handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: - */ - } - - /* "pyrfc/_cyrfc.pyx":245 - * - * - * cdef _cancel_connection(client_connection): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc._cancel_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":254 - * - * - * def cancel_connection(client_connection): # <<<<<<<<<<<<<< - * """Immediately cancels the RFC call which is currently being called over the given RFC connection - * and closes the connection. Can be used only on an RFC client connection. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15cancel_connection(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_14cancel_connection, "Immediately cancels the RFC call which is currently being called over the given RFC connection\n and closes the connection. Can be used only on an RFC client connection.\n\n RFC call cancellation with timeout can be done automatically, without using this method explicitely.\n The ``timeout`` option can be at connection level, when creating connection instance, or at RFC call level, as\n RFC ``Connection.call()`` option. Either way, the connection will be cancelled if RFC call takes longer than ``timeout`` seconds.\n\n :param client_connection: RFC client connection instance to be cancelled\n :type client_connection: Connection\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection cannot be cancelled cleanly.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15cancel_connection = {"cancel_connection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_15cancel_connection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_14cancel_connection}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15cancel_connection(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_client_connection = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("cancel_connection (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_client_connection,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_client_connection)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "cancel_connection") < 0)) __PYX_ERR(0, 254, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_client_connection = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cancel_connection", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 254, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.cancel_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_14cancel_connection(__pyx_self, __pyx_v_client_connection); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_14cancel_connection(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_client_connection) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("cancel_connection", 0); - - /* "pyrfc/_cyrfc.pyx":268 - * thereof if the connection cannot be cancelled cleanly. - * """ - * Thread(target=_cancel_connection, args=(client_connection,)).start() # <<<<<<<<<<<<<< - * - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(__pyx_f_5pyrfc_6_cyrfc__cancel_connection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_t_4) < 0) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_client_connection); - __Pyx_GIVEREF(__pyx_v_client_connection); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_client_connection); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_args, __pyx_t_4) < 0) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":254 - * - * - * def cancel_connection(client_connection): # <<<<<<<<<<<<<< - * """Immediately cancels the RFC call which is currently being called over the given RFC connection - * and closes the connection. Can be used only on an RFC client connection. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.cancel_connection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":287 - * cdef RFC_CONNECTION_PARAMETER *_params - * - * def __cinit__(self, **params): # <<<<<<<<<<<<<< - * self._params_count = len(params) - * if self._params_count < 1: - */ - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_params = 0; - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1;} - if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1; - if (__pyx_kwds) { - __pyx_v_params = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues); - if (unlikely(!__pyx_v_params)) return -1; - __Pyx_GOTREF(__pyx_v_params); - } else { - __pyx_v_params = PyDict_New(); - if (unlikely(!__pyx_v_params)) return -1; - __Pyx_GOTREF(__pyx_v_params); - } - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters___cinit__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self), __pyx_v_params); - - /* function exit code */ - __Pyx_DECREF(__pyx_v_params); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters___cinit__(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self, PyObject *__pyx_v_params) { - int __pyx_v_i; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_value = NULL; - int __pyx_r; - __Pyx_RefNannyDeclarations - Py_ssize_t __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - Py_ssize_t __pyx_t_7; - int __pyx_t_8; - SAP_UC *__pyx_t_9; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "pyrfc/_cyrfc.pyx":288 - * - * def __cinit__(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, 288, __pyx_L1_error) - __pyx_v_self->_params_count = ((unsigned int)__pyx_t_1); - - /* "pyrfc/_cyrfc.pyx":289 - * def __cinit__(self, **params): - * self._params_count = len(params) - * if self._params_count < 1: # <<<<<<<<<<<<<< - * raise RFCError("Connection parameters missing") - * self._params = malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER)) - */ - __pyx_t_2 = (__pyx_v_self->_params_count < 1); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":290 - * self._params_count = len(params) - * if self._params_count < 1: - * raise RFCError("Connection parameters missing") # <<<<<<<<<<<<<< - * self._params = 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, 290, __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_Connection_parameters_missing}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __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, 290, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":289 - * def __cinit__(self, **params): - * self._params_count = len(params) - * if self._params_count < 1: # <<<<<<<<<<<<<< - * raise RFCError("Connection parameters missing") - * self._params = malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER)) - */ - } - - /* "pyrfc/_cyrfc.pyx":291 - * if self._params_count < 1: - * raise RFCError("Connection parameters missing") - * self._params = malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER)) # <<<<<<<<<<<<<< - * cdef int i = 0 - * for name, value in params.iteritems(): - */ - __pyx_v_self->_params = ((RFC_CONNECTION_PARAMETER *)malloc((__pyx_v_self->_params_count * (sizeof(RFC_CONNECTION_PARAMETER))))); - - /* "pyrfc/_cyrfc.pyx":292 - * raise RFCError("Connection parameters missing") - * self._params = malloc(self._params_count * sizeof(RFC_CONNECTION_PARAMETER)) - * cdef int i = 0 # <<<<<<<<<<<<<< - * for name, value in params.iteritems(): - * self._params[i].name = fillString(name) - */ - __pyx_v_i = 0; - - /* "pyrfc/_cyrfc.pyx":293 - * self._params = 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_7), (&__pyx_t_6)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 293, __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_7, &__pyx_t_1, &__pyx_t_4, &__pyx_t_5, NULL, __pyx_t_6); - if (unlikely(__pyx_t_8 == 0)) break; - if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":294 - * cdef int i = 0 - * for name, value in params.iteritems(): - * self._params[i].name = fillString(name) # <<<<<<<<<<<<<< - * self._params[i].value = fillString(value) - * i += 1 - */ - __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 294, __pyx_L1_error) - (__pyx_v_self->_params[__pyx_v_i]).name = __pyx_t_9; - - /* "pyrfc/_cyrfc.pyx":295 - * for name, value in params.iteritems(): - * self._params[i].name = fillString(name) - * self._params[i].value = fillString(value) # <<<<<<<<<<<<<< - * i += 1 - * - */ - __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_9 == ((SAP_UC *)NULL))) __PYX_ERR(0, 295, __pyx_L1_error) - (__pyx_v_self->_params[__pyx_v_i]).value = __pyx_t_9; - - /* "pyrfc/_cyrfc.pyx":296 - * self._params[i].name = fillString(name) - * self._params[i].value = fillString(value) - * i += 1 # <<<<<<<<<<<<<< - * - * def __dealloc__(self): - */ - __pyx_v_i = (__pyx_v_i + 1); - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":287 - * cdef RFC_CONNECTION_PARAMETER *_params - * - * def __cinit__(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._cyrfc.ConnectionParameters.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":298 - * i += 1 - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self._free() - * - */ - -/* Python wrapper */ -static void __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_3__dealloc__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_2__dealloc__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); -} - -static void __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_2__dealloc__(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self) { - __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("__dealloc__", 0); - - /* "pyrfc/_cyrfc.pyx":299 - * - * def __dealloc__(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, 299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":298 - * i += 1 - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self._free() - * - */ - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_WriteUnraisable("pyrfc._cyrfc.ConnectionParameters.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_RefNannyFinishContext(); -} - -/* "pyrfc/_cyrfc.pyx":301 - * self._free() - * - * def _free(self): # <<<<<<<<<<<<<< - * if self._params_count > 0: - * for i in range(self._params_count): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_5_free = {"_free", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_free (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_free", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_free", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_4_free(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_4_free(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self) { - unsigned int __pyx_v_i; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - unsigned int __pyx_t_2; - unsigned int __pyx_t_3; - unsigned int __pyx_t_4; - __Pyx_RefNannySetupContext("_free", 0); - - /* "pyrfc/_cyrfc.pyx":302 - * - * def _free(self): - * if self._params_count > 0: # <<<<<<<<<<<<<< - * for i in range(self._params_count): - * free(self._params[i].name) - */ - __pyx_t_1 = (__pyx_v_self->_params_count > 0); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":303 - * def _free(self): - * if self._params_count > 0: - * for i in range(self._params_count): # <<<<<<<<<<<<<< - * free(self._params[i].name) - * free( self._params[i].value) - */ - __pyx_t_2 = __pyx_v_self->_params_count; - __pyx_t_3 = __pyx_t_2; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":304 - * if self._params_count > 0: - * for i in range(self._params_count): - * free(self._params[i].name) # <<<<<<<<<<<<<< - * free( self._params[i].value) - * free(self._params) - */ - free(((SAP_UC *)(__pyx_v_self->_params[__pyx_v_i]).name)); - - /* "pyrfc/_cyrfc.pyx":305 - * for i in range(self._params_count): - * free(self._params[i].name) - * free( self._params[i].value) # <<<<<<<<<<<<<< - * free(self._params) - * self._params_count = 0 - */ - free(((SAP_UC *)(__pyx_v_self->_params[__pyx_v_i]).value)); - } - - /* "pyrfc/_cyrfc.pyx":306 - * free(self._params[i].name) - * free( self._params[i].value) - * free(self._params) # <<<<<<<<<<<<<< - * self._params_count = 0 - * - */ - free(__pyx_v_self->_params); - - /* "pyrfc/_cyrfc.pyx":307 - * free( self._params[i].value) - * free(self._params) - * self._params_count = 0 # <<<<<<<<<<<<<< - * - * def free(self): - */ - __pyx_v_self->_params_count = 0; - - /* "pyrfc/_cyrfc.pyx":302 - * - * def _free(self): - * if self._params_count > 0: # <<<<<<<<<<<<<< - * for i in range(self._params_count): - * free(self._params[i].name) - */ - } - - /* "pyrfc/_cyrfc.pyx":301 - * 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; -} - -/* "pyrfc/_cyrfc.pyx":309 - * self._params_count = 0 - * - * def free(self): # <<<<<<<<<<<<<< - * self._free() - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7free(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_7free = {"free", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7free, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7free(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("free (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("free", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "free", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_6free(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_6free(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("free", 0); - - /* "pyrfc/_cyrfc.pyx":310 - * - * def free(self): - * self._free() # <<<<<<<<<<<<<< - * - * ################################################################################ - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_free); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":309 - * self._params_count = 0 - * - * def free(self): # <<<<<<<<<<<<<< - * self._free() - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.ConnectionParameters.free", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_8__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); - __PYX_ERR(1, 2, __pyx_L1_error) - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.ConnectionParameters.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_11__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_11__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v___pyx_state = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.ConnectionParameters.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_10__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_v_self), __pyx_v___pyx_state); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_20ConnectionParameters_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< - */ - __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); - __PYX_ERR(1, 4, __pyx_L1_error) - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.ConnectionParameters.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":342 - * - * """ - * def __init__(self, name, nuc_length, uc_length): # <<<<<<<<<<<<<< - * self.fields = [] - * if len(name)<1 or len(name)>30: - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_1__init__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_1__init__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_self = 0; - PyObject *__pyx_v_name = 0; - PyObject *__pyx_v_nuc_length = 0; - PyObject *__pyx_v_uc_length = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - { - 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 (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 342, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nuc_length)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 342, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 3: - if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_uc_length)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 342, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 342, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 4)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - values[3] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 342, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_15TypeDescription___init__(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_nuc_length, __pyx_v_uc_length); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length) { - PyObject *__pyx_v_int_field = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - Py_ssize_t __pyx_t_3; - int __pyx_t_4; - Py_UCS4 __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "pyrfc/_cyrfc.pyx":343 - * """ - * def __init__(self, name, nuc_length, uc_length): - * self.fields = [] # <<<<<<<<<<<<<< - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __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, 343, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":344 - * def __init__(self, name, nuc_length, uc_length): - * self.fields = [] - * if len(name)<1 or len(name)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * for int_field in [nuc_length, uc_length]: - */ - __pyx_t_3 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 344, __pyx_L1_error) - __pyx_t_4 = (__pyx_t_3 < 1); - 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, 344, __pyx_L1_error) - __pyx_t_4 = (__pyx_t_3 > 30); - __pyx_t_2 = __pyx_t_4; - __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":345 - * self.fields = [] - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") # <<<<<<<<<<<<<< - * for int_field in [nuc_length, uc_length]: - * if type(int_field) not in [int, long]: - */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u_field_name_string); - __pyx_t_3 += 23; - __Pyx_GIVEREF(__pyx_kp_u_field_name_string); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_field_name_string); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u_should_be_from_1_30_chars); - __pyx_t_3 += 28; - __Pyx_GIVEREF(__pyx_kp_u_should_be_from_1_30_chars); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_should_be_from_1_30_chars); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __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, 345, __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, 345, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":344 - * def __init__(self, name, nuc_length, uc_length): - * self.fields = [] - * if len(name)<1 or len(name)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * for int_field in [nuc_length, uc_length]: - */ - } - - /* "pyrfc/_cyrfc.pyx":346 - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * for int_field in [nuc_length, uc_length]: # <<<<<<<<<<<<<< - * if type(int_field) not in [int, long]: - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_nuc_length); - __Pyx_GIVEREF(__pyx_v_nuc_length); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nuc_length); - __Pyx_INCREF(__pyx_v_uc_length); - __Pyx_GIVEREF(__pyx_v_uc_length); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_uc_length); - __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - for (;;) { - if (__pyx_t_3 >= 2) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 346, __pyx_L1_error) - #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - #endif - __Pyx_XDECREF_SET(__pyx_v_int_field, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":347 - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * for int_field in [nuc_length, uc_length]: - * if type(int_field) not in [int, long]: # <<<<<<<<<<<<<< - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.name = name - */ - __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_int_field))); - __pyx_t_1 = ((PyObject *)Py_TYPE(__pyx_v_int_field)); - __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)(&PyInt_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_4) { - } else { - __pyx_t_2 = __pyx_t_4; - goto __pyx_L9_bool_binop_done; - } - __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)(&PyLong_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 347, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 347, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __pyx_t_4; - __pyx_L9_bool_binop_done:; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_t_2; - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":348 - * for int_field in [nuc_length, uc_length]: - * if type(int_field) not in [int, long]: - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") # <<<<<<<<<<<<<< - * self.name = name - * self.nuc_length = nuc_length - */ - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u_field); - __pyx_t_8 += 7; - __Pyx_GIVEREF(__pyx_kp_u_field); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_field); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u_length); - __pyx_t_8 += 10; - __Pyx_GIVEREF(__pyx_kp_u_length); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_length); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_int_field, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u_must_be_of_type_integer); - __pyx_t_8 += 25; - __Pyx_GIVEREF(__pyx_kp_u_must_be_of_type_integer); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_must_be_of_type_integer); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 348, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":347 - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * for int_field in [nuc_length, uc_length]: - * if type(int_field) not in [int, long]: # <<<<<<<<<<<<<< - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.name = name - */ - } - - /* "pyrfc/_cyrfc.pyx":346 - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * for int_field in [nuc_length, uc_length]: # <<<<<<<<<<<<<< - * if type(int_field) not in [int, long]: - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - */ - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":349 - * if type(int_field) not in [int, long]: - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.name = name # <<<<<<<<<<<<<< - * self.nuc_length = nuc_length - * self.uc_length = uc_length - */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name, __pyx_v_name) < 0) __PYX_ERR(0, 349, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":350 - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.name = name - * self.nuc_length = nuc_length # <<<<<<<<<<<<<< - * self.uc_length = uc_length - * - */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 350, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":351 - * 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, 351, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":342 - * - * """ - * def __init__(self, name, nuc_length, uc_length): # <<<<<<<<<<<<<< - * self.fields = [] - * if len(name)<1 or len(name)>30: - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_int_field); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":353 - * self.uc_length = uc_length - * - * def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset, # <<<<<<<<<<<<<< - * uc_offset, decimals=0, type_description=None): - * """ Adds a field to the type description. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_3add_field(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_15TypeDescription_2add_field, " Adds a field to the type description.\n\n :param name: Field name\n :type name: string (30)\n :param field_type: RfcFieldType enum name\n :type field_type: string\n :param nuc_length: NUC length\n :type nuc_length: int\n :param uc_length: UC length\n :type uc_length: int\n :param nuc_offset: NUC offset.\n :type nuc_offset: int\n :param uc_offset: UC offset.\n :type uc_offset: int\n :param decimals: Decimals (default=0)\n :type decimals: int\n :param type_description: An object of class TypeDescription or None (default=None)\n :type type_description: object of class TypeDescription\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_3add_field = {"add_field", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_3add_field, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_15TypeDescription_2add_field}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_3add_field(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_self = 0; - PyObject *__pyx_v_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; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_field_type,&__pyx_n_s_nuc_length,&__pyx_n_s_uc_length,&__pyx_n_s_nuc_offset,&__pyx_n_s_uc_offset,&__pyx_n_s_decimals,&__pyx_n_s_type_description,0}; - PyObject* values[9] = {0,0,0,0,0,0,0,0,0}; - values[7] = ((PyObject *)((PyObject *)__pyx_int_0)); - - /* "pyrfc/_cyrfc.pyx":354 - * - * 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 (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8); - CYTHON_FALLTHROUGH; - case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7); - CYTHON_FALLTHROUGH; - case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); - CYTHON_FALLTHROUGH; - case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); - CYTHON_FALLTHROUGH; - case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); - CYTHON_FALLTHROUGH; - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 1); __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_field_type)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 2); __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 3: - if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nuc_length)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 3); __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 4: - if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_uc_length)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 4); __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 5: - if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nuc_offset)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 5); __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 6: - if (likely((values[6] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_uc_offset)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_field", 0, 7, 9, 6); __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 7: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_decimals); - if (value) { values[7] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 8: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type_description); - if (value) { values[8] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 353, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_field") < 0)) __PYX_ERR(0, 353, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8); - CYTHON_FALLTHROUGH; - case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7); - CYTHON_FALLTHROUGH; - case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); - values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); - values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); - values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 353, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.add_field", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_2add_field(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_field_type, __pyx_v_nuc_length, __pyx_v_uc_length, __pyx_v_nuc_offset, __pyx_v_uc_offset, __pyx_v_decimals, __pyx_v_type_description); - - /* "pyrfc/_cyrfc.pyx":353 - * self.uc_length = uc_length - * - * def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset, # <<<<<<<<<<<<<< - * uc_offset, decimals=0, type_description=None): - * """ Adds a field to the type description. - */ - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_2add_field(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_field_type, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length, PyObject *__pyx_v_nuc_offset, PyObject *__pyx_v_uc_offset, PyObject *__pyx_v_decimals, PyObject *__pyx_v_type_description) { - PyObject *__pyx_v_int_field = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - Py_ssize_t __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - Py_UCS4 __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - Py_ssize_t __pyx_t_11; - int __pyx_t_12; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("add_field", 0); - - /* "pyrfc/_cyrfc.pyx":374 - * :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, 374, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_1 < 1); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":375 - * """ - * if len(name)<1: - * return None # <<<<<<<<<<<<<< - * if len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":374 - * :type type_description: object of class TypeDescription - * """ - * if len(name)<1: # <<<<<<<<<<<<<< - * return None - * if len(name)>30: - */ - } - - /* "pyrfc/_cyrfc.pyx":376 - * if len(name)<1: - * return None - * if len(name)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * if field_type not in enum_names(RfcFieldType): - */ - __pyx_t_1 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 376, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_1 > 30); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":377 - * return None - * if len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") # <<<<<<<<<<<<<< - * if field_type not in enum_names(RfcFieldType): - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_field_name_string); - __pyx_t_1 += 23; - __Pyx_GIVEREF(__pyx_kp_u_field_name_string); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_field_name_string); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; - __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_should_be_from_1_30_chars); - __pyx_t_1 += 28; - __Pyx_GIVEREF(__pyx_kp_u_should_be_from_1_30_chars); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_should_be_from_1_30_chars); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 377, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":376 - * if len(name)<1: - * return None - * if len(name)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * if field_type not in enum_names(RfcFieldType): - */ - } - - /* "pyrfc/_cyrfc.pyx":378 - * if len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * if field_type not in enum_names(RfcFieldType): # <<<<<<<<<<<<<< - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 378, __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_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_field_type, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 378, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":379 - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * if field_type not in enum_names(RfcFieldType): - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") # <<<<<<<<<<<<<< - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: - * if not isinstance(int_field, (int, long)): - */ - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_field_type_string); - __pyx_t_1 += 23; - __Pyx_GIVEREF(__pyx_kp_u_field_type_string); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_field_type_string); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_field_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; - __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_must_be_in); - __pyx_t_1 += 13; - __Pyx_GIVEREF(__pyx_kp_u_must_be_in); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_must_be_in); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_9); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4; - __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 379, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":378 - * if len(name)>30: - * raise TypeError(f"field 'name' (string) '{name}' should be from 1-30 chars.") - * if field_type not in enum_names(RfcFieldType): # <<<<<<<<<<<<<< - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: - */ - } - - /* "pyrfc/_cyrfc.pyx":380 - * if field_type not in enum_names(RfcFieldType): - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: # <<<<<<<<<<<<<< - * if not isinstance(int_field, (int, long)): - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - */ - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_nuc_length); - __Pyx_GIVEREF(__pyx_v_nuc_length); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_nuc_length); - __Pyx_INCREF(__pyx_v_nuc_offset); - __Pyx_GIVEREF(__pyx_v_nuc_offset); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_nuc_offset); - __Pyx_INCREF(__pyx_v_uc_length); - __Pyx_GIVEREF(__pyx_v_uc_length); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_uc_length); - __Pyx_INCREF(__pyx_v_uc_offset); - __Pyx_GIVEREF(__pyx_v_uc_offset); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_uc_offset); - __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - for (;;) { - if (__pyx_t_1 >= 4) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(0, 380, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - __Pyx_XDECREF_SET(__pyx_v_int_field, __pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":381 - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: - * if not isinstance(int_field, (int, long)): # <<<<<<<<<<<<<< - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.fields.append({ - */ - __pyx_t_10 = PyInt_Check(__pyx_v_int_field); - if (!__pyx_t_10) { - } else { - __pyx_t_2 = __pyx_t_10; - goto __pyx_L9_bool_binop_done; - } - __pyx_t_10 = PyLong_Check(__pyx_v_int_field); - __pyx_t_2 = __pyx_t_10; - __pyx_L9_bool_binop_done:; - __pyx_t_10 = (!__pyx_t_2); - if (unlikely(__pyx_t_10)) { - - /* "pyrfc/_cyrfc.pyx":382 - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: - * if not isinstance(int_field, (int, long)): - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") # <<<<<<<<<<<<<< - * self.fields.append({ - * 'name': name, - */ - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 382, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_field); - __pyx_t_11 += 7; - __Pyx_GIVEREF(__pyx_kp_u_field); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_field); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 382, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; - __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_length); - __pyx_t_11 += 10; - __Pyx_GIVEREF(__pyx_kp_u_length); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_length); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_int_field, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 382, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; - __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_must_be_of_type_integer); - __pyx_t_11 += 25; - __Pyx_GIVEREF(__pyx_kp_u_must_be_of_type_integer); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_must_be_of_type_integer); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 382, __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, 382, __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, 382, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":381 - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: - * if not isinstance(int_field, (int, long)): # <<<<<<<<<<<<<< - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.fields.append({ - */ - } - - /* "pyrfc/_cyrfc.pyx":380 - * if field_type not in enum_names(RfcFieldType): - * raise TypeError(f"'field_type' (string) '{field_type}' must be in {enum_names(RfcFieldType)}") - * for int_field in [nuc_length, nuc_offset, uc_length, uc_offset]: # <<<<<<<<<<<<<< - * if not isinstance(int_field, (int, long)): - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - */ - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":383 - * if not isinstance(int_field, (int, long)): - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.fields.append({ # <<<<<<<<<<<<<< - * 'name': name, - * 'field_type': field_type, - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 383, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - - /* "pyrfc/_cyrfc.pyx":384 - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.fields.append({ - * 'name': name, # <<<<<<<<<<<<<< - * 'field_type': field_type, - * 'nuc_length': nuc_length, - */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_name, __pyx_v_name) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":385 - * self.fields.append({ - * 'name': name, - * 'field_type': field_type, # <<<<<<<<<<<<<< - * 'nuc_length': nuc_length, - * 'nuc_offset': nuc_offset, - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_field_type, __pyx_v_field_type) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":386 - * 'name': name, - * 'field_type': field_type, - * 'nuc_length': nuc_length, # <<<<<<<<<<<<<< - * 'nuc_offset': nuc_offset, - * 'uc_length': uc_length, - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":387 - * 'field_type': field_type, - * 'nuc_length': nuc_length, - * 'nuc_offset': nuc_offset, # <<<<<<<<<<<<<< - * 'uc_length': uc_length, - * 'uc_offset': uc_offset, - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nuc_offset, __pyx_v_nuc_offset) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":388 - * 'nuc_length': nuc_length, - * 'nuc_offset': nuc_offset, - * 'uc_length': uc_length, # <<<<<<<<<<<<<< - * 'uc_offset': uc_offset, - * 'decimals': decimals, - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":389 - * 'nuc_offset': nuc_offset, - * 'uc_length': uc_length, - * 'uc_offset': uc_offset, # <<<<<<<<<<<<<< - * 'decimals': decimals, - * 'type_description': type_description - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_uc_offset, __pyx_v_uc_offset) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":390 - * 'uc_length': uc_length, - * 'uc_offset': uc_offset, - * 'decimals': decimals, # <<<<<<<<<<<<<< - * 'type_description': type_description - * }) - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_decimals, __pyx_v_decimals) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":391 - * 'uc_offset': uc_offset, - * 'decimals': decimals, - * 'type_description': type_description # <<<<<<<<<<<<<< - * }) - * - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_type_description, __pyx_v_type_description) < 0) __PYX_ERR(0, 384, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":383 - * if not isinstance(int_field, (int, long)): - * raise TypeError(f"field '{name}' length '{int_field}' must be of type integer") - * self.fields.append({ # <<<<<<<<<<<<<< - * 'name': name, - * 'field_type': field_type, - */ - __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_t_3); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 383, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":353 - * self.uc_length = uc_length - * - * def add_field(self, name, field_type, nuc_length, uc_length, nuc_offset, # <<<<<<<<<<<<<< - * uc_offset, decimals=0, type_description=None): - * """ Adds a field to the type description. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.add_field", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_int_field); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":394 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_5__repr__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_5__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_5__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_15TypeDescription_5__repr__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_self = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 394, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) __PYX_ERR(0, 394, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_self = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 394, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_4__repr__(__pyx_self, __pyx_v_self); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_15TypeDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - Py_UCS4 __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__repr__", 0); - - /* "pyrfc/_cyrfc.pyx":395 - * - * def __repr__(self): - * return f"" - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = 0; - __pyx_t_3 = 127; - __Pyx_INCREF(__pyx_kp_u_TypeDescription); - __pyx_t_2 += 18; - __Pyx_GIVEREF(__pyx_kp_u_TypeDescription); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_TypeDescription); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __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, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_with); - __pyx_t_2 += 7; - __Pyx_GIVEREF(__pyx_kp_u_with); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_with); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fields); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_fields_n_uclength); - __pyx_t_2 += 20; - __Pyx_GIVEREF(__pyx_kp_u_fields_n_uclength); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_fields_n_uclength); - - /* "pyrfc/_cyrfc.pyx":396 - * def __repr__(self): - * return f"" # <<<<<<<<<<<<<< - * - * ################################################################################ - */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nuc_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__3); - __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__3); - PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_uc_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __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, 396, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u__4); - __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__4); - PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4); - - /* "pyrfc/_cyrfc.pyx":395 - * - * def __repr__(self): - * return f"" - * - */ - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":394 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.TypeDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":426 - * - * """ - * def __init__(self, name): # <<<<<<<<<<<<<< - * self.name = name - * self.parameters = [] - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_1__init__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_1__init__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_self = 0; - PyObject *__pyx_v_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,0}; - PyObject* values[2] = {0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 426, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 426, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 426, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 2)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 426, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription___init__(__pyx_self, __pyx_v_self, __pyx_v_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "pyrfc/_cyrfc.pyx":427 - * """ - * 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, 427, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":428 - * 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, 428, __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, 428, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":426 - * - * """ - * def __init__(self, name): # <<<<<<<<<<<<<< - * self.name = name - * self.parameters = [] - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":430 - * self.parameters = [] - * - * def add_parameter(self, name, parameter_type, direction, nuc_length, # <<<<<<<<<<<<<< - * uc_length, decimals=0, default_value="", parameter_text="", - * optional=False, type_description=None): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter, " Adds a parameter to the function description.\n\n :param name: Parameter name\n :type name: string (30)\n :param parameter_type: RfcFieldType enum name\n :type parameter_type: string\n :param direction: RfcParameterDirection enum name\n :type direction: string\n :param nuc_length: NUC length\n :type nuc_length: int\n :param uc_length: UC length\n :type uc_length: int\n :param decimals: Decimals (default=0)\n :type decimals: int\n :param default_value: Default value (default=\"\")\n :type default_value: string (30)\n :param parameter_text: Parameter text (default=\"\")\n :type parameter_text: string (79)\n :param optional: Is the parameter optional (default=False)\n :type optional: bool\n :param type_description: An object of class TypeDescription or None (default=None)\n :type type_description: object of class TypeDescription\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter = {"add_parameter", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_self = 0; - PyObject *__pyx_v_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; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_name,&__pyx_n_s_parameter_type,&__pyx_n_s_direction,&__pyx_n_s_nuc_length,&__pyx_n_s_uc_length,&__pyx_n_s_decimals,&__pyx_n_s_default_value,&__pyx_n_s_parameter_text,&__pyx_n_s_optional,&__pyx_n_s_type_description,0}; - PyObject* values[11] = {0,0,0,0,0,0,0,0,0,0,0}; - values[6] = ((PyObject *)((PyObject *)__pyx_int_0)); - values[7] = ((PyObject *)((PyObject*)__pyx_kp_u__5)); - values[8] = ((PyObject *)((PyObject*)__pyx_kp_u__5)); - - /* "pyrfc/_cyrfc.pyx":432 - * 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 (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10); - CYTHON_FALLTHROUGH; - case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9); - CYTHON_FALLTHROUGH; - case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8); - CYTHON_FALLTHROUGH; - case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7); - CYTHON_FALLTHROUGH; - case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); - CYTHON_FALLTHROUGH; - case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); - CYTHON_FALLTHROUGH; - case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); - CYTHON_FALLTHROUGH; - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 1); __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parameter_type)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 2); __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 3: - if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_direction)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 3); __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 4: - if (likely((values[4] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_nuc_length)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 4); __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 5: - if (likely((values[5] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_uc_length)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_parameter", 0, 6, 11, 5); __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 6: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_decimals); - if (value) { values[6] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 7: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_default_value); - if (value) { values[7] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 8: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parameter_text); - if (value) { values[8] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 9: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_optional); - if (value) { values[9] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 10: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type_description); - if (value) { values[10] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_parameter") < 0)) __PYX_ERR(0, 430, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10); - CYTHON_FALLTHROUGH; - case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9); - CYTHON_FALLTHROUGH; - case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8); - CYTHON_FALLTHROUGH; - case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7); - CYTHON_FALLTHROUGH; - case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6); - CYTHON_FALLTHROUGH; - case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5); - values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4); - values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 430, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.add_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter(__pyx_self, __pyx_v_self, __pyx_v_name, __pyx_v_parameter_type, __pyx_v_direction, __pyx_v_nuc_length, __pyx_v_uc_length, __pyx_v_decimals, __pyx_v_default_value, __pyx_v_parameter_text, __pyx_v_optional, __pyx_v_type_description); - - /* "pyrfc/_cyrfc.pyx":430 - * self.parameters = [] - * - * def add_parameter(self, name, parameter_type, direction, nuc_length, # <<<<<<<<<<<<<< - * uc_length, decimals=0, default_value="", parameter_text="", - * optional=False, type_description=None): - */ - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_2add_parameter(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_parameter_type, PyObject *__pyx_v_direction, PyObject *__pyx_v_nuc_length, PyObject *__pyx_v_uc_length, PyObject *__pyx_v_decimals, PyObject *__pyx_v_default_value, PyObject *__pyx_v_parameter_text, PyObject *__pyx_v_optional, PyObject *__pyx_v_type_description) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - Py_ssize_t __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - Py_UCS4 __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("add_parameter", 0); - - /* "pyrfc/_cyrfc.pyx":456 - * :type type_description: object of class TypeDescription - * """ - * if len(name)<1 or len(name)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.") - * if parameter_type not in enum_names(RfcFieldType): - */ - __pyx_t_2 = PyObject_Length(__pyx_v_name); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 456, __pyx_L1_error) - __pyx_t_3 = (__pyx_t_2 < 1); - 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, 456, __pyx_L1_error) - __pyx_t_3 = (__pyx_t_2 > 30); - __pyx_t_1 = __pyx_t_3; - __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":457 - * """ - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.") # <<<<<<<<<<<<<< - * if parameter_type not in enum_names(RfcFieldType): - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") - */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u_field_name_string_2); - __pyx_t_2 += 22; - __Pyx_GIVEREF(__pyx_kp_u_field_name_string_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_field_name_string_2); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u_should_be_from_1_30_chars_2); - __pyx_t_2 += 27; - __Pyx_GIVEREF(__pyx_kp_u_should_be_from_1_30_chars_2); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_should_be_from_1_30_chars_2); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 457, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 457, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":456 - * :type type_description: object of class TypeDescription - * """ - * if len(name)<1 or len(name)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.") - * if parameter_type not in enum_names(RfcFieldType): - */ - } - - /* "pyrfc/_cyrfc.pyx":458 - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.") - * if parameter_type not in enum_names(RfcFieldType): # <<<<<<<<<<<<<< - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") - * if direction not in enum_names(RfcParameterDirection): - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_parameter_type, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":459 - * raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.") - * if parameter_type not in enum_names(RfcFieldType): - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") # <<<<<<<<<<<<<< - * if direction not in enum_names(RfcParameterDirection): - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") - */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u_parameter_type_string); - __pyx_t_2 += 27; - __Pyx_GIVEREF(__pyx_kp_u_parameter_type_string); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_parameter_type_string); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_parameter_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u_must_be_in); - __pyx_t_2 += 13; - __Pyx_GIVEREF(__pyx_kp_u_must_be_in); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_be_in); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(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_9 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 459, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 459, __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, 459, __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, 459, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":458 - * if len(name)<1 or len(name)>30: - * raise TypeError(f"field 'name' (string) {name} should be from 1-30 chars.") - * if parameter_type not in enum_names(RfcFieldType): # <<<<<<<<<<<<<< - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") - * if direction not in enum_names(RfcParameterDirection): - */ - } - - /* "pyrfc/_cyrfc.pyx":460 - * if parameter_type not in enum_names(RfcFieldType): - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") - * if direction not in enum_names(RfcParameterDirection): # <<<<<<<<<<<<<< - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") - * if len(default_value)>30: - */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - 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_9 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 460, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_direction, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 460, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":461 - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") - * if direction not in enum_names(RfcParameterDirection): - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") # <<<<<<<<<<<<<< - * if len(default_value)>30: - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - */ - __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u_direction_string); - __pyx_t_2 += 22; - __Pyx_GIVEREF(__pyx_kp_u_direction_string); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_direction_string); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_direction, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u_must_be_in_2); - __pyx_t_2 += 14; - __Pyx_GIVEREF(__pyx_kp_u_must_be_in_2); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_be_in_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_8}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_2 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_4, 4, __pyx_kp_u__6); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 461, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":460 - * if parameter_type not in enum_names(RfcFieldType): - * raise TypeError(f"'parameter_type' (string) '{parameter_type}' must be in {enum_names(RfcFieldType)}") - * if direction not in enum_names(RfcParameterDirection): # <<<<<<<<<<<<<< - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") - * if len(default_value)>30: - */ - } - - /* "pyrfc/_cyrfc.pyx":462 - * if direction not in enum_names(RfcParameterDirection): - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") - * if len(default_value)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - * if len(parameter_text)>79: - */ - __pyx_t_2 = PyObject_Length(__pyx_v_default_value); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 462, __pyx_L1_error) - __pyx_t_1 = (__pyx_t_2 > 30); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":463 - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") - * if len(default_value)>30: - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") # <<<<<<<<<<<<<< - * if len(parameter_text)>79: - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") - */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u_default_value_string); - __pyx_t_2 += 26; - __Pyx_GIVEREF(__pyx_kp_u_default_value_string); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_default_value_string); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_default_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u_must_not_exceed_30_chars); - __pyx_t_2 += 27; - __Pyx_GIVEREF(__pyx_kp_u_must_not_exceed_30_chars); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_must_not_exceed_30_chars); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 463, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":462 - * if direction not in enum_names(RfcParameterDirection): - * raise TypeError(f"'direction' (string) '{direction}' must be in '{enum_names(RfcParameterDirection)}'") - * if len(default_value)>30: # <<<<<<<<<<<<<< - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - * if len(parameter_text)>79: - */ - } - - /* "pyrfc/_cyrfc.pyx":464 - * if len(default_value)>30: - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - * if len(parameter_text)>79: # <<<<<<<<<<<<<< - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") - * self.parameters.append({ - */ - __pyx_t_2 = PyObject_Length(__pyx_v_parameter_text); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 464, __pyx_L1_error) - __pyx_t_1 = (__pyx_t_2 > 79); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":465 - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - * if len(parameter_text)>79: - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") # <<<<<<<<<<<<<< - * self.parameters.append({ - * 'name': name, - */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __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, 465, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":464 - * if len(default_value)>30: - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - * if len(parameter_text)>79: # <<<<<<<<<<<<<< - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") - * self.parameters.append({ - */ - } - - /* "pyrfc/_cyrfc.pyx":466 - * if len(parameter_text)>79: - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") - * self.parameters.append({ # <<<<<<<<<<<<<< - * 'name': name, - * 'parameter_type': parameter_type, - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameters); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - - /* "pyrfc/_cyrfc.pyx":467 - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") - * self.parameters.append({ - * 'name': name, # <<<<<<<<<<<<<< - * 'parameter_type': parameter_type, - * 'direction': direction, - */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_name, __pyx_v_name) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":468 - * self.parameters.append({ - * 'name': name, - * 'parameter_type': parameter_type, # <<<<<<<<<<<<<< - * 'direction': direction, - * 'nuc_length': nuc_length, - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_parameter_type, __pyx_v_parameter_type) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":469 - * 'name': name, - * 'parameter_type': parameter_type, - * 'direction': direction, # <<<<<<<<<<<<<< - * 'nuc_length': nuc_length, - * 'uc_length': uc_length, - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_direction, __pyx_v_direction) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":470 - * 'parameter_type': parameter_type, - * 'direction': direction, - * 'nuc_length': nuc_length, # <<<<<<<<<<<<<< - * 'uc_length': uc_length, - * 'decimals': decimals, - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_nuc_length, __pyx_v_nuc_length) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":471 - * 'direction': direction, - * 'nuc_length': nuc_length, - * 'uc_length': uc_length, # <<<<<<<<<<<<<< - * 'decimals': decimals, - * 'default_value': default_value, - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_uc_length, __pyx_v_uc_length) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":472 - * 'nuc_length': nuc_length, - * 'uc_length': uc_length, - * 'decimals': decimals, # <<<<<<<<<<<<<< - * 'default_value': default_value, - * 'parameter_text': parameter_text, - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_decimals, __pyx_v_decimals) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":473 - * 'uc_length': uc_length, - * 'decimals': decimals, - * 'default_value': default_value, # <<<<<<<<<<<<<< - * 'parameter_text': parameter_text, - * 'optional': optional, - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_default_value, __pyx_v_default_value) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":474 - * 'decimals': decimals, - * 'default_value': default_value, - * 'parameter_text': parameter_text, # <<<<<<<<<<<<<< - * 'optional': optional, - * 'type_description': type_description - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_parameter_text, __pyx_v_parameter_text) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":475 - * 'default_value': default_value, - * 'parameter_text': parameter_text, - * 'optional': optional, # <<<<<<<<<<<<<< - * 'type_description': type_description - * }) - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_optional, __pyx_v_optional) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":476 - * 'parameter_text': parameter_text, - * 'optional': optional, - * 'type_description': type_description # <<<<<<<<<<<<<< - * }) - * - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_type_description, __pyx_v_type_description) < 0) __PYX_ERR(0, 467, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":466 - * if len(parameter_text)>79: - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") - * self.parameters.append({ # <<<<<<<<<<<<<< - * 'name': name, - * 'parameter_type': parameter_type, - */ - __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_t_6); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":430 - * self.parameters = [] - * - * def add_parameter(self, name, parameter_type, direction, nuc_length, # <<<<<<<<<<<<<< - * uc_length, decimals=0, default_value="", parameter_text="", - * optional=False, type_description=None): - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.add_parameter", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":479 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_5__repr__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_5__repr__ = {"__repr__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_5__repr__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19FunctionDescription_5__repr__(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_self = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 479, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__repr__") < 0)) __PYX_ERR(0, 479, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_self = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__repr__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 479, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_4__repr__(__pyx_self, __pyx_v_self); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_19FunctionDescription_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - Py_ssize_t __pyx_t_2; - Py_UCS4 __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__repr__", 0); - - /* "pyrfc/_cyrfc.pyx":480 - * - * def __repr__(self): - * return f"" # <<<<<<<<<<<<<< - * - * # NOTES ON ERROR HANDLING - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = 0; - __pyx_t_3 = 127; - __Pyx_INCREF(__pyx_kp_u_FunctionDescription); - __pyx_t_2 += 22; - __Pyx_GIVEREF(__pyx_kp_u_FunctionDescription); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_FunctionDescription); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __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, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_with); - __pyx_t_2 += 7; - __Pyx_GIVEREF(__pyx_kp_u_with); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_with); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_parameters); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 480, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_params); - __pyx_t_2 += 8; - __Pyx_GIVEREF(__pyx_kp_u_params); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_params); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":479 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.FunctionDescription.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":558 - * cdef ConnectionParameters _connection - * - * @property # <<<<<<<<<<<<<< - * def version(self): - * """Get SAP NW RFC SDK and PyRFC binding versions - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7version_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7version_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_7version___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_7version___get__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - unsigned int __pyx_v_major; - unsigned int __pyx_v_minor; - unsigned int __pyx_v_patchlevel; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":563 - * :returns: SAP NW RFC SDK major, minor, patch level and PyRFC binding version - * """ - * cdef unsigned major = 0 # <<<<<<<<<<<<<< - * cdef unsigned minor = 0 - * cdef unsigned patchlevel = 0 - */ - __pyx_v_major = 0; - - /* "pyrfc/_cyrfc.pyx":564 - * """ - * cdef unsigned major = 0 - * cdef unsigned minor = 0 # <<<<<<<<<<<<<< - * cdef unsigned patchlevel = 0 - * RfcGetVersion(&major, &minor, &patchlevel) - */ - __pyx_v_minor = 0; - - /* "pyrfc/_cyrfc.pyx":565 - * cdef unsigned major = 0 - * cdef unsigned minor = 0 - * cdef unsigned patchlevel = 0 # <<<<<<<<<<<<<< - * RfcGetVersion(&major, &minor, &patchlevel) - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} - */ - __pyx_v_patchlevel = 0; - - /* "pyrfc/_cyrfc.pyx":566 - * cdef unsigned minor = 0 - * cdef unsigned patchlevel = 0 - * RfcGetVersion(&major, &minor, &patchlevel) # <<<<<<<<<<<<<< - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} - * - */ - (void)(RfcGetVersion((&__pyx_v_major), (&__pyx_v_minor), (&__pyx_v_patchlevel))); - - /* "pyrfc/_cyrfc.pyx":567 - * cdef unsigned patchlevel = 0 - * RfcGetVersion(&major, &minor, &patchlevel) - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __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, 567, __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, 567, __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, 567, __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, 567, __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, 567, __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, 567, __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, 567, __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, 567, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":558 - * cdef ConnectionParameters _connection - * - * @property # <<<<<<<<<<<<<< - * def version(self): - * """Get SAP NW RFC SDK and PyRFC binding versions - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":569 - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} - * - * @property # <<<<<<<<<<<<<< - * def options(self): - * """Client connection configuration - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7options_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7options_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_7options___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_7options___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":577 - * :type: dict - * """ - * return self.__config # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->_Connection__config); - __pyx_r = __pyx_v_self->_Connection__config; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":569 - * return {'major': major, 'minor': minor, 'patchLevel': patchlevel, 'platform': platform} - * - * @property # <<<<<<<<<<<<<< - * def options(self): - * """Client connection configuration - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":579 - * return self.__config - * - * @property # <<<<<<<<<<<<<< - * def handle(self): - * """Get client connection handle - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_6handle_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_6handle_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_6handle___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_6handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":586 - * :type: uintptr_t - * """ - * return self._handle if self._handle is not NULL else None # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - if ((__pyx_v_self->_handle != NULL)) { - __pyx_t_2 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __pyx_t_2; - __pyx_t_2 = 0; - } else { - __Pyx_INCREF(Py_None); - __pyx_t_1 = Py_None; - } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":579 - * return self.__config - * - * @property # <<<<<<<<<<<<<< - * def handle(self): - * """Get client connection handle - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":588 - * return self._handle if self._handle is not NULL else None - * - * @property # <<<<<<<<<<<<<< - * def alive(self): - * """Conection alive property - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_5alive_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_5alive_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_5alive___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_5alive___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":595 - * :type: boolean - * """ - * return self._handle != NULL # <<<<<<<<<<<<<< - * - * def __init__(self, config=None, **params): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_handle != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":588 - * return self._handle if self._handle is not NULL else None - * - * @property # <<<<<<<<<<<<<< - * def alive(self): - * """Conection alive property - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.alive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":597 - * return self._handle != NULL - * - * def __init__(self, config=None, **params): # <<<<<<<<<<<<<< - * # check and set connection configuration - * config = config or {} - */ - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_config = 0; - PyObject *__pyx_v_params = 0; - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_config); - if (value) { values[0] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 597, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_params, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 597, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_VARARGS(__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, __pyx_nargs); __PYX_ERR(0, 597, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection___init__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_config, __pyx_v_params); - - /* function exit code */ - __Pyx_DECREF(__pyx_v_params); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_10Connection___init__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_config, PyObject *__pyx_v_params) { - PyObject *__pyx_v_k = NULL; - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - Py_ssize_t __pyx_t_9; - Py_UCS4 __pyx_t_10; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; - unsigned int __pyx_t_13; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_INCREF(__pyx_v_config); - - /* "pyrfc/_cyrfc.pyx":599 - * def __init__(self, config=None, **params): - * # check and set connection configuration - * config = config or {} # <<<<<<<<<<<<<< - * for k in config: - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: - */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_config); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 599, __pyx_L1_error) - if (!__pyx_t_2) { - } else { - __Pyx_INCREF(__pyx_v_config); - __pyx_t_1 = __pyx_v_config; - goto __pyx_L3_bool_binop_done; - } - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_t_3; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_L3_bool_binop_done:; - __Pyx_DECREF_SET(__pyx_v_config, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":600 - * # check and set connection configuration - * config = config or {} - * for k in config: # <<<<<<<<<<<<<< - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: - * raise RFCError(f"Connection configuration option '{k}' is not supported") - */ - if (likely(PyList_CheckExact(__pyx_v_config)) || PyTuple_CheckExact(__pyx_v_config)) { - __pyx_t_1 = __pyx_v_config; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; - __pyx_t_5 = NULL; - } else { - __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) - } - for (;;) { - if (likely(!__pyx_t_5)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 600, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 600, __pyx_L1_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } - } else { - __pyx_t_3 = __pyx_t_5(__pyx_t_1); - if (unlikely(!__pyx_t_3)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 600, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":601 - * config = config or {} - * for k in config: - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: # <<<<<<<<<<<<<< - * raise RFCError(f"Connection configuration option '{k}' is not supported") - * self.__config = {} - */ - __Pyx_INCREF(__pyx_v_k); - __pyx_t_3 = __pyx_v_k; - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_dtime, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 601, __pyx_L1_error) - if (__pyx_t_6) { - } else { - __pyx_t_2 = __pyx_t_6; - goto __pyx_L8_bool_binop_done; - } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_return_import_params, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 601, __pyx_L1_error) - if (__pyx_t_6) { - } else { - __pyx_t_2 = __pyx_t_6; - goto __pyx_L8_bool_binop_done; - } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_rstrip, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 601, __pyx_L1_error) - if (__pyx_t_6) { - } else { - __pyx_t_2 = __pyx_t_6; - goto __pyx_L8_bool_binop_done; - } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_timeout, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 601, __pyx_L1_error) - __pyx_t_2 = __pyx_t_6; - __pyx_L8_bool_binop_done:; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __pyx_t_2; - if (unlikely(__pyx_t_6)) { - - /* "pyrfc/_cyrfc.pyx":602 - * for k in config: - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: - * raise RFCError(f"Connection configuration option '{k}' is not supported") # <<<<<<<<<<<<<< - * self.__config = {} - * self.__config['dtime'] = config.get('dtime', False) - */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = 0; - __pyx_t_10 = 127; - __Pyx_INCREF(__pyx_kp_u_Connection_configuration_option); - __pyx_t_9 += 33; - __Pyx_GIVEREF(__pyx_kp_u_Connection_configuration_option); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Connection_configuration_option); - __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_k, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10; - __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11); - __Pyx_GIVEREF(__pyx_t_11); - PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11); - __pyx_t_11 = 0; - __Pyx_INCREF(__pyx_kp_u_is_not_supported); - __pyx_t_9 += 18; - __Pyx_GIVEREF(__pyx_kp_u_is_not_supported); - PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_is_not_supported); - __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_12 = 0; - 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_12 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_11}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_12, 1+__pyx_t_12); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 602, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":601 - * config = config or {} - * for k in config: - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: # <<<<<<<<<<<<<< - * raise RFCError(f"Connection configuration option '{k}' is not supported") - * self.__config = {} - */ - } - - /* "pyrfc/_cyrfc.pyx":600 - * # check and set connection configuration - * config = config or {} - * for k in config: # <<<<<<<<<<<<<< - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: - * raise RFCError(f"Connection configuration option '{k}' is not supported") - */ - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":603 - * if k not in['dtime', 'return_import_params', 'rstrip', 'timeout']: - * raise RFCError(f"Connection configuration option '{k}' is not supported") - * self.__config = {} # <<<<<<<<<<<<<< - * self.__config['dtime'] = config.get('dtime', False) - * self.__config['return_import_params'] = config.get('return_import_params', False) - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->_Connection__config); - __Pyx_DECREF(__pyx_v_self->_Connection__config); - __pyx_v_self->_Connection__config = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":604 - * raise RFCError(f"Connection configuration option '{k}' is not supported") - * self.__config = {} - * self.__config['dtime'] = config.get('dtime', False) # <<<<<<<<<<<<<< - * self.__config['return_import_params'] = config.get('return_import_params', False) - * self.__config['rstrip'] = config.get('rstrip', True) - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 604, __pyx_L1_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_self->_Connection__config, __pyx_n_u_dtime, __pyx_t_3) < 0))) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":605 - * self.__config = {} - * self.__config['dtime'] = config.get('dtime', False) - * self.__config['return_import_params'] = config.get('return_import_params', False) # <<<<<<<<<<<<<< - * self.__config['rstrip'] = config.get('rstrip', True) - * self.__config['timeout'] = config.get('timeout', None) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 605, __pyx_L1_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_self->_Connection__config, __pyx_n_u_return_import_params, __pyx_t_1) < 0))) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":606 - * self.__config['dtime'] = config.get('dtime', False) - * self.__config['return_import_params'] = config.get('return_import_params', False) - * self.__config['rstrip'] = config.get('rstrip', True) # <<<<<<<<<<<<<< - * self.__config['timeout'] = config.get('timeout', None) - * - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 606, __pyx_L1_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_self->_Connection__config, __pyx_n_u_rstrip, __pyx_t_3) < 0))) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":607 - * self.__config['return_import_params'] = config.get('return_import_params', False) - * self.__config['rstrip'] = config.get('rstrip', True) - * self.__config['timeout'] = config.get('timeout', None) # <<<<<<<<<<<<<< - * - * # set internal configuration - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 607, __pyx_L1_error) - } - if (unlikely((PyDict_SetItem(__pyx_v_self->_Connection__config, __pyx_n_u_timeout, __pyx_t_1) < 0))) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":610 - * - * # set internal configuration - * self.__bconfig = 0 # <<<<<<<<<<<<<< - * if self.__config['dtime']: - * self.__bconfig |= _MASK_DTIME - */ - __pyx_v_self->_Connection__bconfig = 0; - - /* "pyrfc/_cyrfc.pyx":611 - * # set internal configuration - * self.__bconfig = 0 - * if self.__config['dtime']: # <<<<<<<<<<<<<< - * self.__bconfig |= _MASK_DTIME - * if self.__config['return_import_params']: - */ - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 611, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_Connection__config, __pyx_n_u_dtime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 611, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":612 - * self.__bconfig = 0 - * if self.__config['dtime']: - * self.__bconfig |= _MASK_DTIME # <<<<<<<<<<<<<< - * if self.__config['return_import_params']: - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS - */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_Connection__bconfig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_DTIME); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_self->_Connection__bconfig = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":611 - * # set internal configuration - * self.__bconfig = 0 - * if self.__config['dtime']: # <<<<<<<<<<<<<< - * self.__bconfig |= _MASK_DTIME - * if self.__config['return_import_params']: - */ - } - - /* "pyrfc/_cyrfc.pyx":613 - * if self.__config['dtime']: - * self.__bconfig |= _MASK_DTIME - * if self.__config['return_import_params']: # <<<<<<<<<<<<<< - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS - * if self.__config['rstrip']: - */ - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 613, __pyx_L1_error) - } - __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_self->_Connection__config, __pyx_n_u_return_import_params); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 613, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":614 - * self.__bconfig |= _MASK_DTIME - * if self.__config['return_import_params']: - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS # <<<<<<<<<<<<<< - * if self.__config['rstrip']: - * self.__bconfig |= _MASK_RSTRIP - */ - __pyx_t_7 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_Connection__bconfig); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyNumber_InPlaceOr(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_self->_Connection__bconfig = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":613 - * if self.__config['dtime']: - * self.__bconfig |= _MASK_DTIME - * if self.__config['return_import_params']: # <<<<<<<<<<<<<< - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS - * if self.__config['rstrip']: - */ - } - - /* "pyrfc/_cyrfc.pyx":615 - * if self.__config['return_import_params']: - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS - * if self.__config['rstrip']: # <<<<<<<<<<<<<< - * self.__bconfig |= _MASK_RSTRIP - * - */ - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 615, __pyx_L1_error) - } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_Connection__config, __pyx_n_u_rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":616 - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS - * if self.__config['rstrip']: - * self.__bconfig |= _MASK_RSTRIP # <<<<<<<<<<<<<< - * - * self._connection = ConnectionParameters(**params) - */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_Connection__bconfig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_MASK_RSTRIP); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyNumber_InPlaceOr(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_13 = __Pyx_PyInt_As_unsigned_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 616, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_self->_Connection__bconfig = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":615 - * if self.__config['return_import_params']: - * self.__bconfig |= _MASK_RETURN_IMPORT_PARAMS - * if self.__config['rstrip']: # <<<<<<<<<<<<<< - * self.__bconfig |= _MASK_RSTRIP - * - */ - } - - /* "pyrfc/_cyrfc.pyx":618 - * self.__bconfig |= _MASK_RSTRIP - * - * self._connection = ConnectionParameters(**params) # <<<<<<<<<<<<<< - * self._handle = NULL - * self.active_transaction = False - */ - __pyx_t_7 = PyDict_Copy(__pyx_v_params); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters), __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GIVEREF(__pyx_t_3); - __Pyx_GOTREF((PyObject *)__pyx_v_self->_connection); - __Pyx_DECREF((PyObject *)__pyx_v_self->_connection); - __pyx_v_self->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":619 - * - * self._connection = ConnectionParameters(**params) - * self._handle = NULL # <<<<<<<<<<<<<< - * self.active_transaction = False - * self.active_unit = False - */ - __pyx_v_self->_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":620 - * self._connection = ConnectionParameters(**params) - * self._handle = NULL - * self.active_transaction = False # <<<<<<<<<<<<<< - * self.active_unit = False - * self._open() - */ - __pyx_v_self->active_transaction = 0; - - /* "pyrfc/_cyrfc.pyx":621 - * self._handle = NULL - * self.active_transaction = False - * self.active_unit = False # <<<<<<<<<<<<<< - * self._open() - * - */ - __pyx_v_self->active_unit = 0; - - /* "pyrfc/_cyrfc.pyx":622 - * self.active_transaction = False - * self.active_unit = False - * self._open() # <<<<<<<<<<<<<< - * - * def free(self): - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":597 - * return self._handle != NULL - * - * def __init__(self, config=None, **params): # <<<<<<<<<<<<<< - * # check and set connection configuration - * config = config or {} - */ - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_k); - __Pyx_XDECREF(__pyx_v_config); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":624 - * self._open() - * - * def free(self): # <<<<<<<<<<<<<< - * """ Explicitly free connection parameters and close the connection. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_2free, " Explicitly free connection parameters and close the connection.\n\n Note that this is usually required because the object destruction\n can be delayed by the garbage collection and problems may occur\n when too many connections are opened.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_3free = {"free", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_2free}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("free (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("free", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "free", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_2free(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_2free(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("free", 0); - - /* "pyrfc/_cyrfc.pyx":631 - * when too many connections are opened. - * """ - * _server_log("Connection", f"{self.handle} free") # <<<<<<<<<<<<<< - * self._close() - * if self._connection is not None: - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_server_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_4, __pyx_kp_u_free_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_5 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_Connection, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":632 - * """ - * _server_log("Connection", f"{self.handle} free") - * self._close() # <<<<<<<<<<<<<< - * if self._connection is not None: - * 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, 632, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":633 - * _server_log("Connection", f"{self.handle} free") - * self._close() - * if self._connection is not None: # <<<<<<<<<<<<<< - * self._connection._free() - * - */ - __pyx_t_6 = (((PyObject *)__pyx_v_self->_connection) != Py_None); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":634 - * self._close() - * if self._connection is not None: - * self._connection._free() # <<<<<<<<<<<<<< - * - * def __dealloc__(self): - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_connection), __pyx_n_s_free); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":633 - * _server_log("Connection", f"{self.handle} free") - * self._close() - * if self._connection is not None: # <<<<<<<<<<<<<< - * self._connection._free() - * - */ - } - - /* "pyrfc/_cyrfc.pyx":624 - * 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_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.free", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":636 - * self._connection._free() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self.free() - * - */ - -/* Python wrapper */ -static void __pyx_pw_5pyrfc_6_cyrfc_10Connection_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5pyrfc_6_cyrfc_10Connection_5__dealloc__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5pyrfc_6_cyrfc_10Connection_4__dealloc__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); -} - -static void __pyx_pf_5pyrfc_6_cyrfc_10Connection_4__dealloc__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - __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("__dealloc__", 0); - - /* "pyrfc/_cyrfc.pyx":637 - * - * def __dealloc__(self): - * self.free() # <<<<<<<<<<<<<< - * - * def __enter__(self): - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_free_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":636 - * self._connection._free() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self.free() - * - */ - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_WriteUnraisable("pyrfc._cyrfc.Connection.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_RefNannyFinishContext(); -} - -/* "pyrfc/_cyrfc.pyx":639 - * self.free() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_7__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_6__enter__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_6__enter__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__enter__", 0); - - /* "pyrfc/_cyrfc.pyx":640 - * - * def __enter__(self): - * return self # <<<<<<<<<<<<<< - * - * def __exit__(self, type, value, traceback): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF((PyObject *)__pyx_v_self); - __pyx_r = ((PyObject *)__pyx_v_self); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":639 - * self.free() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":642 - * return self - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * # Although the _close() method is also called in the destructor, the - * # explicit call assures the immediate closing to the connection. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_9__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - CYTHON_UNUSED PyObject *__pyx_v_type = 0; - CYTHON_UNUSED PyObject *__pyx_v_value = 0; - CYTHON_UNUSED PyObject *__pyx_v_traceback = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0}; - PyObject* values[3] = {0,0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 642, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_traceback)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 642, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 642, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 3)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[2] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 642, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_8__exit__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_type, __pyx_v_value, __pyx_v_traceback); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_8__exit__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__exit__", 0); - - /* "pyrfc/_cyrfc.pyx":645 - * # Although the _close() method is also called in the destructor, the - * # explicit call assures the immediate closing to the connection. - * self._close() # <<<<<<<<<<<<<< - * - * def open(self): - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":642 - * return self - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * # Although the _close() method is also called in the destructor, the - * # explicit call assures the immediate closing to the connection. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":647 - * self._close() - * - * def open(self): # <<<<<<<<<<<<<< - * """ Open client the connection - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_10open, " Open client the connection\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection cannot be opened.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_11open = {"open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_10open}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("open (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("open", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "open", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_10open(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_10open(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("open", 0); - - /* "pyrfc/_cyrfc.pyx":653 - * thereof if the connection cannot be opened. - * """ - * self._open() # <<<<<<<<<<<<<< - * - * def reopen(self): - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":647 - * self._close() - * - * def open(self): # <<<<<<<<<<<<<< - * """ Open client the connection - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.open", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":655 - * self._open() - * - * def reopen(self): # <<<<<<<<<<<<<< - * """ Re-open client the connection - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_12reopen, " Re-open client the connection\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection cannot be re-opened.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_13reopen = {"reopen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_12reopen}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("reopen (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("reopen", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reopen", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_12reopen(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_12reopen(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reopen", 0); - - /* "pyrfc/_cyrfc.pyx":661 - * thereof if the connection cannot be re-opened. - * """ - * self._reopen() # <<<<<<<<<<<<<< - * - * def close(self): - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_reopen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":655 - * self._open() - * - * def reopen(self): # <<<<<<<<<<<<<< - * """ Re-open client the connection - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.reopen", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":663 - * self._reopen() - * - * def close(self): # <<<<<<<<<<<<<< - * """ Close the connection - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_14close, " Close the connection\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection cannot be closed cleanly.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_15close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_14close}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("close (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_14close(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_14close(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("close", 0); - - /* "pyrfc/_cyrfc.pyx":669 - * thereof if the connection cannot be closed cleanly. - * """ - * self._close() # <<<<<<<<<<<<<< - * - * def cancel(self): - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":663 - * self._reopen() - * - * def close(self): # <<<<<<<<<<<<<< - * """ Close the connection - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.close", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":671 - * self._close() - * - * def cancel(self): # <<<<<<<<<<<<<< - * """ Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_16cancel, " Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection cannot be cancelled cleanly.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_17cancel = {"cancel", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_16cancel}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("cancel (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("cancel", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "cancel", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_16cancel(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_16cancel(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("cancel", 0); - - /* "pyrfc/_cyrfc.pyx":677 - * thereof if the connection cannot be cancelled cleanly. - * """ - * cancel_connection(self) # <<<<<<<<<<<<<< - * - * def __bool__(self): - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cancel_connection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":671 - * self._close() - * - * def cancel(self): # <<<<<<<<<<<<<< - * """ Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":679 - * cancel_connection(self) - * - * def __bool__(self): # <<<<<<<<<<<<<< - * return self.alive - * - */ - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_18__bool__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_18__bool__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__bool__", 0); - - /* "pyrfc/_cyrfc.pyx":680 - * - * 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, 680, __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, 680, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":679 - * cancel_connection(self) - * - * def __bool__(self): # <<<<<<<<<<<<<< - * return self.alive - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":682 - * return self.alive - * - * cdef _reopen(self): # <<<<<<<<<<<<<< - * self._close() - * self._open() - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__reopen(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_reopen", 0); - - /* "pyrfc/_cyrfc.pyx":683 - * - * 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, 683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":684 - * cdef _reopen(self): - * self._close() - * self._open() # <<<<<<<<<<<<<< - * - * cdef _open(self): - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":682 - * return self.alive - * - * cdef _reopen(self): # <<<<<<<<<<<<<< - * self._close() - * self._open() - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._reopen", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":686 - * self._open() - * - * cdef _open(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * with nogil: - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__open(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_open", 0); - - /* "pyrfc/_cyrfc.pyx":688 - * 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; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":689 - * cdef RFC_ERROR_INFO errorInfo - * with nogil: - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo) # <<<<<<<<<<<<<< - * if not self._handle: - * self._error(&errorInfo) - */ - __pyx_v_self->_handle = RfcOpenConnection(__pyx_v_self->_connection->_params, __pyx_v_self->_connection->_params_count, (&__pyx_v_errorInfo)); - } - - /* "pyrfc/_cyrfc.pyx":688 - * cdef _open(self): - * cdef RFC_ERROR_INFO errorInfo - * with nogil: # <<<<<<<<<<<<<< - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo) - * if not self._handle: - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "pyrfc/_cyrfc.pyx":690 - * 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)); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":691 - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo) - * if not self._handle: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * def _close(self): - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":690 - * with nogil: - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &errorInfo) - * if not self._handle: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":686 - * self._open() - * - * cdef _open(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * with nogil: - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._open", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":693 - * self._error(&errorInfo) - * - * def _close(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_21_close = {"_close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_close (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_close", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_close", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_20_close(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_20_close(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - __Pyx_RefNannySetupContext("_close", 0); - - /* "pyrfc/_cyrfc.pyx":695 - * def _close(self): - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: # <<<<<<<<<<<<<< - * RfcCloseConnection(self._handle, &errorInfo) - * # no error code check, assume closed - */ - __pyx_t_1 = (__pyx_v_self->_handle != NULL); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":696 - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: - * RfcCloseConnection(self._handle, &errorInfo) # <<<<<<<<<<<<<< - * # no error code check, assume closed - * self._handle = NULL - */ - (void)(RfcCloseConnection(__pyx_v_self->_handle, (&__pyx_v_errorInfo))); - - /* "pyrfc/_cyrfc.pyx":698 - * RfcCloseConnection(self._handle, &errorInfo) - * # no error code check, assume closed - * self._handle = NULL # <<<<<<<<<<<<<< - * - * cdef _error(self, RFC_ERROR_INFO* errorInfo): - */ - __pyx_v_self->_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":695 - * def _close(self): - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: # <<<<<<<<<<<<<< - * RfcCloseConnection(self._handle, &errorInfo) - * # no error code check, assume closed - */ - } - - /* "pyrfc/_cyrfc.pyx":693 - * self._error(&errorInfo) - * - * def _close(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":700 - * self._handle = NULL - * - * cdef _error(self, RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * """ - * Error treatment of a connection. - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Connection__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_error", 0); - - /* "pyrfc/_cyrfc.pyx":715 - * # self.alive = False - * - * raise wrapError(errorInfo) # <<<<<<<<<<<<<< - * - * def ping(self): - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError(__pyx_v_errorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __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, 715, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":700 - * self._handle = NULL - * - * cdef _error(self, RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * """ - * Error treatment of a connection. - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._error", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":717 - * raise wrapError(errorInfo) - * - * def ping(self): # <<<<<<<<<<<<<< - * """ Send a RFC Ping through the current connection - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_22ping, " Send a RFC Ping through the current connection\n\n Returns nothing.\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the RFC Ping fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_23ping = {"ping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_22ping}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("ping (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("ping", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "ping", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_22ping(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_22ping(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("ping", 0); - - /* "pyrfc/_cyrfc.pyx":727 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * rc = RfcPing(self._handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcPing(__pyx_v_self->_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":728 - * 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); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":729 - * rc = RfcPing(self._handle, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * def reset_server_context(self): - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":728 - * cdef RFC_ERROR_INFO errorInfo - * rc = RfcPing(self._handle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":717 - * raise wrapError(errorInfo) - * - * def ping(self): # <<<<<<<<<<<<<< - * """ Send a RFC Ping through the current connection - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.ping", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":731 - * self._error(&errorInfo) - * - * def reset_server_context(self): # <<<<<<<<<<<<<< - * """ Resets the SAP server context ("user context / ABAP session context") - * associated with the given client connection, but does not close the connection - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_24reset_server_context, " Resets the SAP server context (\"user context / ABAP session context\")\n associated with the given client connection, but does not close the connection\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof in case resetting the server context fails.\n (Better close the connection in that case.).\n :exc:`sapnwrf2.CommunicationError` if no conversion\n was found for the\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_25reset_server_context = {"reset_server_context", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_24reset_server_context}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("reset_server_context (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("reset_server_context", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset_server_context", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_24reset_server_context(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_24reset_server_context(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reset_server_context", 0); - - /* "pyrfc/_cyrfc.pyx":744 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * rc = RfcResetServerContext(self._handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcResetServerContext(__pyx_v_self->_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":745 - * 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); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":746 - * rc = RfcResetServerContext(self._handle, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * def get_connection_attributes(self): - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":745 - * cdef RFC_ERROR_INFO errorInfo - * rc = RfcResetServerContext(self._handle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":731 - * self._error(&errorInfo) - * - * def reset_server_context(self): # <<<<<<<<<<<<<< - * """ Resets the SAP server context ("user context / ABAP session context") - * associated with the given client connection, but does not close the connection - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.reset_server_context", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":748 - * self._error(&errorInfo) - * - * def get_connection_attributes(self): # <<<<<<<<<<<<<< - * """ Get connection details - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes, " Get connection details\n\n :returns: Mapping of connection information keys:\n\n * active_unit: True if there is a filled and submitted unit w/o being confirmed or destroyed.\n * dest: RFC destination\n * host: Own host name\n * partnerHost: Partner host name\n * sysNumber: R/3 system number\n * sysId: R/3 system ID\n * client: Client (\"Mandant\")\n * user: User\n * language: Language\n * trace: Trace level (0-3)\n * isoLanguage: 2-byte ISO-Language\n * codepage: Own code page\n * partnerCodepage: Partner code page\n * rfcRole: C/S: RFC Client / RFC Server\n * type: 2/3/E/R: R/2,R/3,Ext,Reg.Ext\n * partnerType: 2/3/E/R: R/2,R/3,Ext,Reg.Ext\n * rel: My system release\n * partnerRe: Partner system release\n * kernelRel: Partner kernel release\n * cpicConvId: CPI-C Conversation ID\n * progName: Name calling APAB program (report, module pool)\n * partnerBytesPerChar: Bytes per char in backend codepage.\n * partnerSystemCodepage: Partner system code page\n * reserved: Reserved for later use\n\n Note: all values, except ``active_unit`` are right stripped string values.\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass thereof if the RFC call fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes = {"get_connection_attributes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("get_connection_attributes (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("get_connection_attributes", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_connection_attributes", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_ATTRIBUTES __pyx_v_attributes; - PyObject *__pyx_v_result = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __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("get_connection_attributes", 0); - - /* "pyrfc/_cyrfc.pyx":786 - * cdef RFC_ATTRIBUTES attributes - * - * result = {} # <<<<<<<<<<<<<< - * - * if self.is_valid(): - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_result = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":788 - * result = {} - * - * if self.is_valid(): # <<<<<<<<<<<<<< - * rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_valid); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 788, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_5) { - - /* "pyrfc/_cyrfc.pyx":789 - * - * if self.is_valid(): - * rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcGetConnectionAttributes(__pyx_v_self->_handle, (&__pyx_v_attributes), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":790 - * if self.is_valid(): - * rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_5 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_5) { - - /* "pyrfc/_cyrfc.pyx":791 - * rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * result = wrapConnectionAttributes(attributes) - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":790 - * if self.is_valid(): - * rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":793 - * self._error(&errorInfo) - * - * result = wrapConnectionAttributes(attributes) # <<<<<<<<<<<<<< - * result.update({ - * 'active_unit': self.active_unit or self.active_transaction - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(__pyx_v_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 793, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":794 - * - * result = wrapConnectionAttributes(attributes) - * result.update({ # <<<<<<<<<<<<<< - * 'active_unit': self.active_unit or self.active_transaction - * }) - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 794, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - - /* "pyrfc/_cyrfc.pyx":795 - * result = wrapConnectionAttributes(attributes) - * result.update({ - * 'active_unit': self.active_unit or self.active_transaction # <<<<<<<<<<<<<< - * }) - * return result - */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - 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, 795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __pyx_t_7; - __pyx_t_7 = 0; - goto __pyx_L5_bool_binop_done; - } - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->active_transaction); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 795, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __pyx_t_7; - __pyx_t_7 = 0; - __pyx_L5_bool_binop_done:; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_active_unit, __pyx_t_6) < 0) __PYX_ERR(0, 795, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_4 = 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 794, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":788 - * result = {} - * - * if self.is_valid(): # <<<<<<<<<<<<<< - * rc = RfcGetConnectionAttributes(self._handle, &attributes, &errorInfo) - * if rc != RFC_OK: - */ - } - - /* "pyrfc/_cyrfc.pyx":797 - * 'active_unit': self.active_unit or self.active_transaction - * }) - * return result # <<<<<<<<<<<<<< - * - * def is_valid(self): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_result); - __pyx_r = __pyx_v_result; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":748 - * self._error(&errorInfo) - * - * def get_connection_attributes(self): # <<<<<<<<<<<<<< - * """ Get connection details - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_connection_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":799 - * return result - * - * def is_valid(self): # <<<<<<<<<<<<<< - * """Checks an RFC connection. Can be used to check whether a client/server connection - * has already been closed, or whether the NW RFC library still "considers" the connection - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_28is_valid, "Checks an RFC connection. Can be used to check whether a client/server connection\n has already been closed, or whether the NW RFC library still \"considers\" the connection\n to be open.\n\n .. note::\n This does not guarantee that the connection is indeed still alive:\n A firewall may silently have closed the connection without notifying\n the endpoints. If you want to find out, whether the connection is still alive,\n you'll have to use the more expensive RfcPing().\n\n :returns: boolean\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_29is_valid = {"is_valid", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_28is_valid}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("is_valid (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("is_valid", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_valid", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_28is_valid(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_28is_valid(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_INT __pyx_v_isValid; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - __Pyx_RefNannySetupContext("is_valid", 0); - - /* "pyrfc/_cyrfc.pyx":815 - * cdef RFC_INT isValid - * - * rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo) # <<<<<<<<<<<<<< - * - * if rc != RFC_OK or errorInfo.code != RFC_OK: - */ - __pyx_v_rc = RfcIsConnectionHandleValid(__pyx_v_self->_handle, (&__pyx_v_isValid), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":817 - * rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo) - * - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * return False - * return True - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - 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); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":818 - * - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * return False # <<<<<<<<<<<<<< - * return True - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_False); - __pyx_r = Py_False; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":817 - * rc = RfcIsConnectionHandleValid(self._handle, &isValid, &errorInfo) - * - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * return False - * return True - */ - } - - /* "pyrfc/_cyrfc.pyx":819 - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * return False - * return True # <<<<<<<<<<<<<< - * - * # def c_handle_test(self, p_handle): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(Py_True); - __pyx_r = Py_True; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":799 - * return result - * - * def is_valid(self): # <<<<<<<<<<<<<< - * """Checks an RFC connection. Can be used to check whether a client/server connection - * has already been closed, or whether the NW RFC library still "considers" the connection - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":828 - * # print("c:handle", "ok" if c_handle - self._handle == 0 else "error") - * - * def get_function_description(self, func_name): # <<<<<<<<<<<<<< - * """ Returns a function description of a function module. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_30get_function_description, " Returns a function description of a function module.\n\n :param func_name: Name of the function module whose description\n will be returned.\n :type func_name: string\n\n :return: A :class:`FunctionDescription` object.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_31get_function_description = {"get_function_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_30get_function_description}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_func_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("get_function_description (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_function_description") < 0)) __PYX_ERR(0, 828, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_func_name = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_function_description", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 828, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_function_description", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_30get_function_description(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_func_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_30get_function_description(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name) { - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC *__pyx_v_funcName; - RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - SAP_UC *__pyx_t_5; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_function_description", 0); - - /* "pyrfc/_cyrfc.pyx":838 - * """ - * 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, 838, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_5 == ((SAP_UC *)NULL))) __PYX_ERR(0, 838, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_funcName = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":839 - * cdef RFC_ERROR_INFO errorInfo - * funcName = fillString(func_name.upper()) - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) # <<<<<<<<<<<<<< - * free(funcName) - * if not funcDesc: - */ - __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":840 - * funcName = fillString(func_name.upper()) - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) # <<<<<<<<<<<<<< - * if not funcDesc: - * self._error(&errorInfo) - */ - free(__pyx_v_funcName); - - /* "pyrfc/_cyrfc.pyx":841 - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - * if not funcDesc: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return wrapFunctionDescription(funcDesc) - */ - __pyx_t_6 = (!(__pyx_v_funcDesc != 0)); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":842 - * free(funcName) - * if not funcDesc: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * return wrapFunctionDescription(funcDesc) - * - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":841 - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - * if not funcDesc: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return wrapFunctionDescription(funcDesc) - */ - } - - /* "pyrfc/_cyrfc.pyx":843 - * if not funcDesc: - * self._error(&errorInfo) - * return wrapFunctionDescription(funcDesc) # <<<<<<<<<<<<<< - * - * def call(self, func_name, options=None, **params): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapFunctionDescription(__pyx_v_funcDesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":828 - * # print("c:handle", "ok" if c_handle - self._handle == 0 else "error") - * - * def get_function_description(self, func_name): # <<<<<<<<<<<<<< - * """ Returns a function description of a function module. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_function_description", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":845 - * return wrapFunctionDescription(funcDesc) - * - * def call(self, func_name, options=None, **params): # <<<<<<<<<<<<<< - * """ Invokes a remote-enabled function module via RFC. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_32call, " Invokes a remote-enabled function module via RFC.\n\n :param func_name: Name of the function module that will be invoked.\n :type func_name: string\n\n :param options: Call options for single remote ABAP function call. Allowed keys:\n\n - ``not_requested`` Allows to deactivate certain parameters in the function module interface.\n This is particularly useful for BAPIs which have many large tables, the Python client is not interested in.\n Deactivate those, to reduce network traffic and memory consumption in your application considerably.\n\n This functionality can be used for input and output parameters. If the parameter is an input, no data for\n that parameter will be sent to the backend. If it's an output, the backend will be informed not to return\n data for that parameter.\n\n - ``timeout`` Cancel RFC connection if ongoing RFC call not completed within ``timeout`` seconds.\n Timeout can be also set as client connection configuration option, in which case is valid for all RFC calls.\n\n Examples: https://github.com/SAP/PyRFC/tree/main/examples/timeout\n\n :type options: dictionary\n\n :param params: Parameter of the function module. All non optional\n IMPORT, CHANGING, and TABLE parameters must be provided.\n :type params: keyword arguments\n\n :return: Dictionary with all EXPORT, CHANGING, and TABLE parameters.\n The IMPORT parameters are also given, if :attr:`Connection.config.return_import_params`\n is set to ``True``.\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the RFC call fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_33call = {"call", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_32call}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_func_name = 0; - PyObject *__pyx_v_options = 0; - PyObject *__pyx_v_params = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,&__pyx_n_s_options,0}; - PyObject* values[2] = {0,0}; - values[1] = ((PyObject *)Py_None); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_options); - if (value) { values[1] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, __pyx_v_params, values + 0, kwd_pos_args, "call") < 0)) __PYX_ERR(0, 845, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 845, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_DECREF(__pyx_v_params); __pyx_v_params = 0; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.call", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_32call(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_func_name, __pyx_v_options, __pyx_v_params); - - /* function exit code */ - __Pyx_DECREF(__pyx_v_params); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_32call(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_options, PyObject *__pyx_v_params) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_ERROR_INFO __pyx_v_openErrorInfo; - SAP_UC *__pyx_v_cName; - SAP_UC *__pyx_v_funcName; - RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc; - RFC_FUNCTION_HANDLE __pyx_v_funcCont; - int __pyx_v_isActive; - PyObject *__pyx_v_skip_parameters = NULL; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_cancel_timer = NULL; - PyObject *__pyx_v_timeout = NULL; - PyObject *__pyx_v_value = NULL; - PyObject *__pyx_v_closed_handle = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - SAP_UC *__pyx_t_6; - Py_ssize_t __pyx_t_7; - Py_UCS4 __pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *(*__pyx_t_10)(PyObject *); - PyObject *__pyx_t_11 = NULL; - Py_ssize_t __pyx_t_12; - int __pyx_t_13; - int __pyx_t_14; - int __pyx_t_15; - char const *__pyx_t_16; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - PyObject *__pyx_t_22 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("call", 0); - __Pyx_INCREF(__pyx_v_options); - - /* "pyrfc/_cyrfc.pyx":883 - * cdef RFC_ERROR_INFO openErrorInfo - * cdef SAP_UC *cName - * if type(func_name) is not str: # <<<<<<<<<<<<<< - * raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name)) - * cdef SAP_UC *funcName = fillString(func_name) - */ - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_func_name)) != ((PyObject *)(&PyUnicode_Type))); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":884 - * cdef SAP_UC *cName - * if type(func_name) is not str: - * raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name)) # <<<<<<<<<<<<<< - * cdef SAP_UC *funcName = fillString(func_name) - * if self._handle == NULL: - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 884, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[4] = {__pyx_t_4, __pyx_kp_u_Remote_function_module_name_must, __pyx_v_func_name, ((PyObject *)Py_TYPE(__pyx_v_func_name))}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 884, __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, 884, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":883 - * cdef RFC_ERROR_INFO openErrorInfo - * cdef SAP_UC *cName - * if type(func_name) is not str: # <<<<<<<<<<<<<< - * raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name)) - * cdef SAP_UC *funcName = fillString(func_name) - */ - } - - /* "pyrfc/_cyrfc.pyx":885 - * if type(func_name) is not str: - * raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name)) - * cdef SAP_UC *funcName = fillString(func_name) # <<<<<<<<<<<<<< - * if self._handle == NULL: - * raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed") - */ - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_6 == ((SAP_UC *)NULL))) __PYX_ERR(0, 885, __pyx_L1_error) - __pyx_v_funcName = __pyx_t_6; - - /* "pyrfc/_cyrfc.pyx":886 - * raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name)) - * cdef SAP_UC *funcName = fillString(func_name) - * if self._handle == NULL: # <<<<<<<<<<<<<< - * raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed") - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - */ - __pyx_t_1 = (__pyx_v_self->_handle == NULL); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":887 - * cdef SAP_UC *funcName = fillString(func_name) - * if self._handle == NULL: - * raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed") # <<<<<<<<<<<<<< - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 887, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = 0; - __pyx_t_8 = 127; - __Pyx_INCREF(__pyx_kp_u_Remote_function_module); - __pyx_t_7 += 24; - __Pyx_GIVEREF(__pyx_kp_u_Remote_function_module); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Remote_function_module); - __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 887, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8; - __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); - __pyx_t_9 = 0; - __Pyx_INCREF(__pyx_kp_u_invocation_rejected_because_the); - __pyx_t_7 += 54; - __Pyx_GIVEREF(__pyx_kp_u_invocation_rejected_because_the); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_invocation_rejected_because_the); - __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 887, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_9}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 887, __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, 887, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":886 - * raise RFCError("Remote function module name must be unicode string, received:", func_name, type(func_name)) - * cdef SAP_UC *funcName = fillString(func_name) - * if self._handle == NULL: # <<<<<<<<<<<<<< - * raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed") - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":888 - * if self._handle == NULL: - * raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed") - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) # <<<<<<<<<<<<<< - * free(funcName) - * if not funcDesc: - */ - __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":889 - * raise RFCError(f"Remote function module '{func_name}' invocation rejected because the connection is closed") - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) # <<<<<<<<<<<<<< - * if not funcDesc: - * self._error(&errorInfo) - */ - free(__pyx_v_funcName); - - /* "pyrfc/_cyrfc.pyx":890 - * 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_1 = (!(__pyx_v_funcDesc != 0)); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":891 - * free(funcName) - * if not funcDesc: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":890 - * cdef RFC_FUNCTION_DESC_HANDLE funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - * if not funcDesc: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":892 - * if not funcDesc: - * self._error(&errorInfo) - * cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo) # <<<<<<<<<<<<<< - * if not funcCont: - * self._error(&errorInfo) - */ - __pyx_v_funcCont = RfcCreateFunction(__pyx_v_funcDesc, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":893 - * self._error(&errorInfo) - * cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * cdef int isActive = 0 - */ - __pyx_t_1 = (!(__pyx_v_funcCont != 0)); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":894 - * cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * cdef int isActive = 0 - * options = options or {} - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":893 - * self._error(&errorInfo) - * cdef RFC_FUNCTION_HANDLE funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * cdef int isActive = 0 - */ - } - - /* "pyrfc/_cyrfc.pyx":895 - * if not funcCont: - * self._error(&errorInfo) - * cdef int isActive = 0 # <<<<<<<<<<<<<< - * options = options or {} - * try: # now we have a function module - */ - __pyx_v_isActive = 0; - - /* "pyrfc/_cyrfc.pyx":896 - * self._error(&errorInfo) - * cdef int isActive = 0 - * options = options or {} # <<<<<<<<<<<<<< - * try: # now we have a function module - * if 'not_requested' in options: - */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_options); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 896, __pyx_L1_error) - if (!__pyx_t_1) { - } else { - __Pyx_INCREF(__pyx_v_options); - __pyx_t_2 = __pyx_v_options; - goto __pyx_L7_bool_binop_done; - } - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_3); - __pyx_t_2 = __pyx_t_3; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_L7_bool_binop_done:; - __Pyx_DECREF_SET(__pyx_v_options, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":897 - * cdef int isActive = 0 - * options = options or {} - * try: # now we have a function module # <<<<<<<<<<<<<< - * if 'not_requested' in options: - * skip_parameters = options['not_requested'] - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":898 - * options = options or {} - * try: # now we have a function module - * if 'not_requested' in options: # <<<<<<<<<<<<<< - * skip_parameters = options['not_requested'] - * if type(skip_parameters) is not list: - */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_not_requested, __pyx_v_options, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 898, __pyx_L10_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":899 - * try: # now we have a function module - * if 'not_requested' in options: - * skip_parameters = options['not_requested'] # <<<<<<<<<<<<<< - * if type(skip_parameters) is not list: - * skip_parameters = [skip_parameters] - */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_options, __pyx_n_u_not_requested); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_skip_parameters = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":900 - * if 'not_requested' in options: - * skip_parameters = options['not_requested'] - * if type(skip_parameters) is not list: # <<<<<<<<<<<<<< - * skip_parameters = [skip_parameters] - * for name in skip_parameters: - */ - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_skip_parameters)) != ((PyObject *)(&PyList_Type))); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":901 - * skip_parameters = options['not_requested'] - * if type(skip_parameters) is not list: - * skip_parameters = [skip_parameters] # <<<<<<<<<<<<<< - * for name in skip_parameters: - * cName = fillString(name) - */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_skip_parameters); - __Pyx_GIVEREF(__pyx_v_skip_parameters); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_skip_parameters); - __Pyx_DECREF_SET(__pyx_v_skip_parameters, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":900 - * if 'not_requested' in options: - * skip_parameters = options['not_requested'] - * if type(skip_parameters) is not list: # <<<<<<<<<<<<<< - * skip_parameters = [skip_parameters] - * for name in skip_parameters: - */ - } - - /* "pyrfc/_cyrfc.pyx":902 - * if type(skip_parameters) is not list: - * skip_parameters = [skip_parameters] - * for name in skip_parameters: # <<<<<<<<<<<<<< - * cName = fillString(name) - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) - */ - if (likely(PyList_CheckExact(__pyx_v_skip_parameters)) || PyTuple_CheckExact(__pyx_v_skip_parameters)) { - __pyx_t_2 = __pyx_v_skip_parameters; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; - __pyx_t_10 = NULL; - } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_skip_parameters); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 902, __pyx_L10_error) - } - for (;;) { - if (likely(!__pyx_t_10)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 902, __pyx_L10_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 902, __pyx_L10_error) - #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - #endif - } - } else { - __pyx_t_3 = __pyx_t_10(__pyx_t_2); - if (unlikely(!__pyx_t_3)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 902, __pyx_L10_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_3); - } - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":903 - * skip_parameters = [skip_parameters] - * for name in skip_parameters: - * cName = fillString(name) # <<<<<<<<<<<<<< - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) - * free(cName) - */ - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_6 == ((SAP_UC *)NULL))) __PYX_ERR(0, 903, __pyx_L10_error) - __pyx_v_cName = __pyx_t_6; - - /* "pyrfc/_cyrfc.pyx":904 - * for name in skip_parameters: - * cName = fillString(name) - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) # <<<<<<<<<<<<<< - * free(cName) - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcSetParameterActive(__pyx_v_funcCont, __pyx_v_cName, __pyx_v_isActive, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":905 - * cName = fillString(name) - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) - * free(cName) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - free(__pyx_v_cName); - - /* "pyrfc/_cyrfc.pyx":906 - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) - * free(cName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * # set connection timeout, starts before writing input parameters to container - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":907 - * free(cName) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * # set connection timeout, starts before writing input parameters to container - * cancel_timer = None - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 907, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":906 - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) - * free(cName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * # set connection timeout, starts before writing input parameters to container - */ - } - - /* "pyrfc/_cyrfc.pyx":902 - * if type(skip_parameters) is not list: - * skip_parameters = [skip_parameters] - * for name in skip_parameters: # <<<<<<<<<<<<<< - * cName = fillString(name) - * rc = RfcSetParameterActive(funcCont, cName, isActive, &errorInfo) - */ - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":898 - * options = options or {} - * try: # now we have a function module - * if 'not_requested' in options: # <<<<<<<<<<<<<< - * skip_parameters = options['not_requested'] - * if type(skip_parameters) is not list: - */ - } - - /* "pyrfc/_cyrfc.pyx":909 - * self._error(&errorInfo) - * # set connection timeout, starts before writing input parameters to container - * cancel_timer = None # <<<<<<<<<<<<<< - * timeout = options.get('timeout', self.__config['timeout']) - * if timeout is not None: - */ - __Pyx_INCREF(Py_None); - __pyx_v_cancel_timer = Py_None; - - /* "pyrfc/_cyrfc.pyx":910 - * # set connection timeout, starts before writing input parameters to container - * cancel_timer = None - * timeout = options.get('timeout', self.__config['timeout']) # <<<<<<<<<<<<<< - * if timeout is not None: - * cancel_timer = Timer(timeout, cancel_connection, (self,)) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_options, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - if (unlikely(__pyx_v_self->_Connection__config == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 910, __pyx_L10_error) - } - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_v_self->_Connection__config, __pyx_n_u_timeout); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 910, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_timeout, __pyx_t_9}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 2+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_v_timeout = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":911 - * cancel_timer = None - * timeout = options.get('timeout', self.__config['timeout']) - * if timeout is not None: # <<<<<<<<<<<<<< - * cancel_timer = Timer(timeout, cancel_connection, (self,)) - * cancel_timer.start() - */ - __pyx_t_1 = (__pyx_v_timeout != Py_None); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":912 - * timeout = options.get('timeout', self.__config['timeout']) - * if timeout is not None: - * cancel_timer = Timer(timeout, cancel_connection, (self,)) # <<<<<<<<<<<<<< - * cancel_timer.start() - * for name, value in params.iteritems(): - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Timer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 912, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_cancel_connection); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 912, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF((PyObject *)__pyx_v_self); - __Pyx_GIVEREF((PyObject *)__pyx_v_self); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_11 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_5 = 1; - } - } - { - PyObject *__pyx_callargs[4] = {__pyx_t_11, __pyx_v_timeout, __pyx_t_9, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 3+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF_SET(__pyx_v_cancel_timer, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":913 - * if timeout is not None: - * cancel_timer = Timer(timeout, cancel_connection, (self,)) - * cancel_timer.start() # <<<<<<<<<<<<<< - * for name, value in params.iteritems(): - * fillFunctionParameter(funcDesc, funcCont, name, value) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cancel_timer, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 913, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":911 - * cancel_timer = None - * timeout = options.get('timeout', self.__config['timeout']) - * if timeout is not None: # <<<<<<<<<<<<<< - * cancel_timer = Timer(timeout, cancel_connection, (self,)) - * cancel_timer.start() - */ - } - - /* "pyrfc/_cyrfc.pyx":914 - * cancel_timer = Timer(timeout, cancel_connection, (self,)) - * cancel_timer.start() - * for name, value in params.iteritems(): # <<<<<<<<<<<<<< - * fillFunctionParameter(funcDesc, funcCont, name, value) - * # save old handle for troubleshooting - */ - __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_params, 1, __pyx_n_s_iteritems, (&__pyx_t_12), (&__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_2); - __pyx_t_2 = __pyx_t_3; - __pyx_t_3 = 0; - while (1) { - __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_12, &__pyx_t_7, &__pyx_t_3, &__pyx_t_4, NULL, __pyx_t_5); - if (unlikely(__pyx_t_13 == 0)) break; - if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 914, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GOTREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); - __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_4); - __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":915 - * cancel_timer.start() - * for name, value in params.iteritems(): - * fillFunctionParameter(funcDesc, funcCont, name, value) # <<<<<<<<<<<<<< - * # save old handle for troubleshooting - * with nogil: - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":917 - * fillFunctionParameter(funcDesc, funcCont, name, value) - * # save old handle for troubleshooting - * with nogil: # <<<<<<<<<<<<<< - * rc = RfcInvoke(self._handle, funcCont, &errorInfo) - * if cancel_timer is not None: - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":918 - * # save old handle for troubleshooting - * with nogil: - * rc = RfcInvoke(self._handle, funcCont, &errorInfo) # <<<<<<<<<<<<<< - * if cancel_timer is not None: - * cancel_timer.cancel() - */ - __pyx_v_rc = RfcInvoke(__pyx_v_self->_handle, __pyx_v_funcCont, (&__pyx_v_errorInfo)); - } - - /* "pyrfc/_cyrfc.pyx":917 - * fillFunctionParameter(funcDesc, funcCont, name, value) - * # save old handle for troubleshooting - * with nogil: # <<<<<<<<<<<<<< - * rc = RfcInvoke(self._handle, funcCont, &errorInfo) - * if cancel_timer is not None: - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L23; - } - __pyx_L23:; - } - } - - /* "pyrfc/_cyrfc.pyx":919 - * with nogil: - * rc = RfcInvoke(self._handle, funcCont, &errorInfo) - * if cancel_timer is not None: # <<<<<<<<<<<<<< - * cancel_timer.cancel() - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - */ - __pyx_t_1 = (__pyx_v_cancel_timer != Py_None); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":920 - * rc = RfcInvoke(self._handle, funcCont, &errorInfo) - * if cancel_timer is not None: - * cancel_timer.cancel() # <<<<<<<<<<<<<< - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cancel_timer, __pyx_n_s_cancel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":919 - * with nogil: - * rc = RfcInvoke(self._handle, funcCont, &errorInfo) - * if cancel_timer is not None: # <<<<<<<<<<<<<< - * cancel_timer.cancel() - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - */ - } - - /* "pyrfc/_cyrfc.pyx":922 - * cancel_timer.cancel() - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * if errorInfo.code in ( - * RFC_COMMUNICATION_FAILURE, - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":923 - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: - * if errorInfo.code in ( # <<<<<<<<<<<<<< - * RFC_COMMUNICATION_FAILURE, - * RFC_ABAP_RUNTIME_FAILURE, - */ - switch (__pyx_v_errorInfo.code) { - case RFC_COMMUNICATION_FAILURE: - - /* "pyrfc/_cyrfc.pyx":924 - * if rc != RFC_OK: - * if errorInfo.code in ( - * RFC_COMMUNICATION_FAILURE, # <<<<<<<<<<<<<< - * RFC_ABAP_RUNTIME_FAILURE, - * RFC_ABAP_MESSAGE, - */ - case RFC_ABAP_RUNTIME_FAILURE: - - /* "pyrfc/_cyrfc.pyx":925 - * if errorInfo.code in ( - * RFC_COMMUNICATION_FAILURE, - * RFC_ABAP_RUNTIME_FAILURE, # <<<<<<<<<<<<<< - * RFC_ABAP_MESSAGE, - * RFC_EXTERNAL_FAILURE - */ - case RFC_ABAP_MESSAGE: - - /* "pyrfc/_cyrfc.pyx":926 - * RFC_COMMUNICATION_FAILURE, - * RFC_ABAP_RUNTIME_FAILURE, - * RFC_ABAP_MESSAGE, # <<<<<<<<<<<<<< - * RFC_EXTERNAL_FAILURE - * ) or errorInfo.group in ( - */ - case RFC_EXTERNAL_FAILURE: - - /* "pyrfc/_cyrfc.pyx":923 - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: - * if errorInfo.code in ( # <<<<<<<<<<<<<< - * RFC_COMMUNICATION_FAILURE, - * RFC_ABAP_RUNTIME_FAILURE, - */ - __pyx_t_14 = 1; - break; - default: - __pyx_t_14 = 0; - break; - } - __pyx_t_15 = __pyx_t_14; - if (!__pyx_t_15) { - } else { - __pyx_t_1 = __pyx_t_15; - goto __pyx_L27_bool_binop_done; - } - - /* "pyrfc/_cyrfc.pyx":928 - * RFC_ABAP_MESSAGE, - * RFC_EXTERNAL_FAILURE - * ) or errorInfo.group in ( # <<<<<<<<<<<<<< - * ABAP_RUNTIME_FAILURE, - * LOGON_FAILURE, - */ - switch (__pyx_v_errorInfo.group) { - case ABAP_RUNTIME_FAILURE: - - /* "pyrfc/_cyrfc.pyx":929 - * RFC_EXTERNAL_FAILURE - * ) or errorInfo.group in ( - * ABAP_RUNTIME_FAILURE, # <<<<<<<<<<<<<< - * LOGON_FAILURE, - * COMMUNICATION_FAILURE, - */ - case LOGON_FAILURE: - - /* "pyrfc/_cyrfc.pyx":930 - * ) or errorInfo.group in ( - * ABAP_RUNTIME_FAILURE, - * LOGON_FAILURE, # <<<<<<<<<<<<<< - * COMMUNICATION_FAILURE, - * EXTERNAL_RUNTIME_FAILURE): - */ - case COMMUNICATION_FAILURE: - - /* "pyrfc/_cyrfc.pyx":931 - * ABAP_RUNTIME_FAILURE, - * LOGON_FAILURE, - * COMMUNICATION_FAILURE, # <<<<<<<<<<<<<< - * EXTERNAL_RUNTIME_FAILURE): - * # Connection closed, re-open - */ - case EXTERNAL_RUNTIME_FAILURE: - - /* "pyrfc/_cyrfc.pyx":928 - * RFC_ABAP_MESSAGE, - * RFC_EXTERNAL_FAILURE - * ) or errorInfo.group in ( # <<<<<<<<<<<<<< - * ABAP_RUNTIME_FAILURE, - * LOGON_FAILURE, - */ - __pyx_t_15 = 1; - break; - default: - __pyx_t_15 = 0; - break; - } - __pyx_t_14 = __pyx_t_15; - __pyx_t_1 = __pyx_t_14; - __pyx_L27_bool_binop_done:; - - /* "pyrfc/_cyrfc.pyx":923 - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: - * if errorInfo.code in ( # <<<<<<<<<<<<<< - * RFC_COMMUNICATION_FAILURE, - * RFC_ABAP_RUNTIME_FAILURE, - */ - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":934 - * EXTERNAL_RUNTIME_FAILURE): - * # Connection closed, re-open - * closed_handle = self.handle # <<<<<<<<<<<<<< - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo) - * if openErrorInfo.code != RFC_OK: - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 934, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_closed_handle = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":935 - * # Connection closed, re-open - * closed_handle = self.handle - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo) # <<<<<<<<<<<<<< - * if openErrorInfo.code != RFC_OK: - * self._handle = NULL - */ - __pyx_v_self->_handle = RfcOpenConnection(__pyx_v_self->_connection->_params, __pyx_v_self->_connection->_params_count, (&__pyx_v_openErrorInfo)); - - /* "pyrfc/_cyrfc.pyx":936 - * closed_handle = self.handle - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo) - * if openErrorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * self._handle = NULL - * # Communication error returned as error - */ - __pyx_t_1 = (__pyx_v_openErrorInfo.code != RFC_OK); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":937 - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo) - * if openErrorInfo.code != RFC_OK: - * self._handle = NULL # <<<<<<<<<<<<<< - * # Communication error returned as error - * errorInfo = openErrorInfo - */ - __pyx_v_self->_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":939 - * self._handle = NULL - * # Communication error returned as error - * errorInfo = openErrorInfo # <<<<<<<<<<<<<< - * elif errorInfo.code == RFC_CANCELED: - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") - */ - __pyx_v_errorInfo = __pyx_v_openErrorInfo; - - /* "pyrfc/_cyrfc.pyx":936 - * closed_handle = self.handle - * self._handle = RfcOpenConnection(self._connection._params, self._connection._params_count, &openErrorInfo) - * if openErrorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * self._handle = NULL - * # Communication error returned as error - */ - goto __pyx_L29; - } - - /* "pyrfc/_cyrfc.pyx":940 - * # Communication error returned as error - * errorInfo = openErrorInfo - * elif errorInfo.code == RFC_CANCELED: # <<<<<<<<<<<<<< - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") - * self._error(&errorInfo) - */ - __pyx_t_1 = (__pyx_v_errorInfo.code == RFC_CANCELED); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":941 - * errorInfo = openErrorInfo - * elif errorInfo.code == RFC_CANCELED: - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS: - */ - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = 0; - __pyx_t_8 = 127; - __Pyx_INCREF(__pyx_kp_u_Connection_was_canceled); - __pyx_t_12 += 25; - __Pyx_GIVEREF(__pyx_kp_u_Connection_was_canceled); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Connection_was_canceled); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_closed_handle, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_8; - __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u_New_handle); - __pyx_t_12 += 14; - __Pyx_GIVEREF(__pyx_kp_u_New_handle); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_New_handle); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 941, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8; - __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_12, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_6 == ((SAP_UC *)NULL))) __PYX_ERR(0, 941, __pyx_L10_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - memcpy(&(__pyx_v_errorInfo.message[0]), __pyx_t_6, sizeof(__pyx_v_errorInfo.message[0]) * (0x200 - 0)); - - /* "pyrfc/_cyrfc.pyx":940 - * # Communication error returned as error - * errorInfo = openErrorInfo - * elif errorInfo.code == RFC_CANCELED: # <<<<<<<<<<<<<< - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") - * self._error(&errorInfo) - */ - } - __pyx_L29:; - - /* "pyrfc/_cyrfc.pyx":923 - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: - * if errorInfo.code in ( # <<<<<<<<<<<<<< - * RFC_COMMUNICATION_FAILURE, - * RFC_ABAP_RUNTIME_FAILURE, - */ - } - - /* "pyrfc/_cyrfc.pyx":942 - * elif errorInfo.code == RFC_CANCELED: - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS: - * return wrapResult(funcDesc, funcCont, 0, self.__bconfig) - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":922 - * cancel_timer.cancel() - * # print("invoke:", errorInfo.group, rc, self.handle, self.is_valid()) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * if errorInfo.code in ( - * RFC_COMMUNICATION_FAILURE, - */ - } - - /* "pyrfc/_cyrfc.pyx":943 - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") - * self._error(&errorInfo) - * if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS: # <<<<<<<<<<<<<< - * return wrapResult(funcDesc, funcCont, 0, self.__bconfig) - * else: - */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_Connection__bconfig); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MASK_RETURN_IMPORT_PARAMS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyNumber_And(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 943, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 943, __pyx_L10_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":944 - * self._error(&errorInfo) - * if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS: - * return wrapResult(funcDesc, funcCont, 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->_Connection__bconfig); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 944, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcCont, ((RFC_DIRECTION)0), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L9_return; - - /* "pyrfc/_cyrfc.pyx":943 - * errorInfo.message = fillString(f"Connection was canceled: {closed_handle}. New handle: {self.handle}") - * self._error(&errorInfo) - * if self.__bconfig & _MASK_RETURN_IMPORT_PARAMS: # <<<<<<<<<<<<<< - * return wrapResult(funcDesc, funcCont, 0, self.__bconfig) - * else: - */ - } - - /* "pyrfc/_cyrfc.pyx":946 - * return wrapResult(funcDesc, funcCont, 0, self.__bconfig) - * else: - * return wrapResult(funcDesc, funcCont, RFC_IMPORT, self.__bconfig) # <<<<<<<<<<<<<< - * finally: - * RfcDestroyFunction(funcCont, NULL) - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->_Connection__bconfig); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 946, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcCont, RFC_IMPORT, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 946, __pyx_L10_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L9_return; - } - } - - /* "pyrfc/_cyrfc.pyx":948 - * return wrapResult(funcDesc, funcCont, RFC_IMPORT, self.__bconfig) - * finally: - * RfcDestroyFunction(funcCont, NULL) # <<<<<<<<<<<<<< - * - * ########################################################################## - */ - /*finally:*/ { - __pyx_L10_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 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; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19) < 0)) __Pyx_ErrFetch(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __Pyx_XGOTREF(__pyx_t_22); - __pyx_t_5 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_16 = __pyx_filename; - { - (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL)); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); - } - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_ErrRestore(__pyx_t_17, __pyx_t_18, __pyx_t_19); - __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; - __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_16; - goto __pyx_L1_error; - } - __pyx_L9_return: { - __pyx_t_22 = __pyx_r; - __pyx_r = 0; - (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL)); - __pyx_r = __pyx_t_22; - __pyx_t_22 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":845 - * return wrapFunctionDescription(funcDesc) - * - * def call(self, func_name, options=None, **params): # <<<<<<<<<<<<<< - * """ Invokes a remote-enabled function module via RFC. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.call", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_skip_parameters); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_cancel_timer); - __Pyx_XDECREF(__pyx_v_timeout); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_v_closed_handle); - __Pyx_XDECREF(__pyx_v_options); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":953 - * # HELPER METHODS - * - * def type_desc_get(self, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_34type_desc_get, "Removes the Type Description from SAP NW RFC Lib cache\n\n :param type_name: system id (connection parameters sysid)\n :type type_name: string\n\n :returns: error code\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_35type_desc_get = {"type_desc_get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_34type_desc_get}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_type_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("type_desc_get (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type_name,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 953, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "type_desc_get") < 0)) __PYX_ERR(0, 953, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_type_name = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("type_desc_get", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 953, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.type_desc_get", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_34type_desc_get(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_type_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_34type_desc_get(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_type_name) { - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC *__pyx_v_typeName; - RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - SAP_UC *__pyx_t_5; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("type_desc_get", 0); - - /* "pyrfc/_cyrfc.pyx":962 - * """ - * 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, 962, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_5 == ((SAP_UC *)NULL))) __PYX_ERR(0, 962, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_typeName = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":963 - * cdef RFC_ERROR_INFO errorInfo - * typeName = fillString(type_name.upper()) - * cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo) # <<<<<<<<<<<<<< - * free(typeName) - * if typeDesc == NULL: - */ - __pyx_v_typeDesc = RfcGetTypeDesc(__pyx_v_self->_handle, __pyx_v_typeName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":964 - * typeName = fillString(type_name.upper()) - * cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo) - * free(typeName) # <<<<<<<<<<<<<< - * if typeDesc == NULL: - * self._error(&errorInfo) - */ - free(__pyx_v_typeName); - - /* "pyrfc/_cyrfc.pyx":965 - * cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo) - * free(typeName) - * if typeDesc == NULL: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return wrapTypeDescription(typeDesc) - */ - __pyx_t_6 = (__pyx_v_typeDesc == NULL); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":966 - * free(typeName) - * if typeDesc == NULL: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * return wrapTypeDescription(typeDesc) - * - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":965 - * cdef RFC_TYPE_DESC_HANDLE typeDesc = RfcGetTypeDesc(self._handle, typeName, &errorInfo) - * free(typeName) - * if typeDesc == NULL: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return wrapTypeDescription(typeDesc) - */ - } - - /* "pyrfc/_cyrfc.pyx":967 - * if typeDesc == NULL: - * self._error(&errorInfo) - * return wrapTypeDescription(typeDesc) # <<<<<<<<<<<<<< - * - * def type_desc_remove(self, sysid, type_name): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(__pyx_v_typeDesc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":953 - * # HELPER METHODS - * - * def type_desc_get(self, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.type_desc_get", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":969 - * return wrapTypeDescription(typeDesc) - * - * def type_desc_remove(self, sysid, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_36type_desc_remove, "Removes the Type Description from SAP NW RFC Lib cache\n\n :param sysid: system id (connection parameters sysid)\n :type sysid: string\n\n :param type_name: Name of the type to be removed\n :type func_name: string\n\n :returns: error code\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_37type_desc_remove = {"type_desc_remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_36type_desc_remove}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_sysid = 0; - PyObject *__pyx_v_type_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sysid,&__pyx_n_s_type_name,0}; - PyObject* values[2] = {0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sysid)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 969, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 969, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("type_desc_remove", 1, 2, 2, 1); __PYX_ERR(0, 969, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "type_desc_remove") < 0)) __PYX_ERR(0, 969, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 2)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 969, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.type_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_36type_desc_remove(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_sysid, __pyx_v_type_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_36type_desc_remove(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_type_name) { - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC *__pyx_v_sysId; - SAP_UC *__pyx_v_typeName; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("type_desc_remove", 0); - - /* "pyrfc/_cyrfc.pyx":981 - * """ - * cdef RFC_ERROR_INFO errorInfo - * sysId = fillString(sysid) # <<<<<<<<<<<<<< - * typeName = fillString(type_name) - * cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo) - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_sysid); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 981, __pyx_L1_error) - __pyx_v_sysId = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":982 - * cdef RFC_ERROR_INFO errorInfo - * sysId = fillString(sysid) - * typeName = fillString(type_name) # <<<<<<<<<<<<<< - * cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo) - * free(sysId) - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_type_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 982, __pyx_L1_error) - __pyx_v_typeName = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":983 - * sysId = fillString(sysid) - * typeName = fillString(type_name) - * cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo) # <<<<<<<<<<<<<< - * free(sysId) - * free(typeName) - */ - __pyx_v_rc = RfcRemoveTypeDesc(__pyx_v_sysId, __pyx_v_typeName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":984 - * typeName = fillString(type_name) - * cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo) - * free(sysId) # <<<<<<<<<<<<<< - * free(typeName) - * if rc != RFC_OK: - */ - free(__pyx_v_sysId); - - /* "pyrfc/_cyrfc.pyx":985 - * cdef RFC_RC rc = RfcRemoveTypeDesc(sysId, typeName, &errorInfo) - * free(sysId) - * free(typeName) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - free(__pyx_v_typeName); - - /* "pyrfc/_cyrfc.pyx":986 - * free(sysId) - * free(typeName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return rc - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":987 - * free(typeName) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * return rc - * - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":986 - * free(sysId) - * free(typeName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return rc - */ - } - - /* "pyrfc/_cyrfc.pyx":988 - * 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, 988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":969 - * return wrapTypeDescription(typeDesc) - * - * def type_desc_remove(self, sysid, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.type_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":990 - * return rc - * - * def func_desc_remove(self, sysid, func_name): # <<<<<<<<<<<<<< - * """Removes the Function Description from SAP NW RFC Lib cache - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_38func_desc_remove, "Removes the Function Description from SAP NW RFC Lib cache\n\n :param sysid: system id (connection parameters sysid)\n :type sysid: string\n\n :param func_name: Name of the function module to be removed\n :type func_name: string\n\n :returns: error code\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_39func_desc_remove = {"func_desc_remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_38func_desc_remove}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_sysid = 0; - PyObject *__pyx_v_func_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sysid,&__pyx_n_s_func_name,0}; - PyObject* values[2] = {0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sysid)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 990, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 990, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("func_desc_remove", 1, 2, 2, 1); __PYX_ERR(0, 990, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "func_desc_remove") < 0)) __PYX_ERR(0, 990, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 2)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 990, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.func_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_38func_desc_remove(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_sysid, __pyx_v_func_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_38func_desc_remove(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_sysid, PyObject *__pyx_v_func_name) { - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC *__pyx_v_sysId; - SAP_UC *__pyx_v_funcName; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("func_desc_remove", 0); - - /* "pyrfc/_cyrfc.pyx":1002 - * """ - * cdef RFC_ERROR_INFO errorInfo - * sysId = fillString(sysid) # <<<<<<<<<<<<<< - * funcName = fillString(func_name) - * cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo) - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_sysid); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1002, __pyx_L1_error) - __pyx_v_sysId = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":1003 - * cdef RFC_ERROR_INFO errorInfo - * sysId = fillString(sysid) - * funcName = fillString(func_name) # <<<<<<<<<<<<<< - * cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo) - * free(sysId) - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1003, __pyx_L1_error) - __pyx_v_funcName = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":1004 - * sysId = fillString(sysid) - * funcName = fillString(func_name) - * cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo) # <<<<<<<<<<<<<< - * free(sysId) - * free(funcName) - */ - __pyx_v_rc = RfcRemoveFunctionDesc(__pyx_v_sysId, __pyx_v_funcName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1005 - * funcName = fillString(func_name) - * cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo) - * free(sysId) # <<<<<<<<<<<<<< - * free(funcName) - * if rc != RFC_OK: - */ - free(__pyx_v_sysId); - - /* "pyrfc/_cyrfc.pyx":1006 - * cdef RFC_RC rc = RfcRemoveFunctionDesc(sysId, funcName, &errorInfo) - * free(sysId) - * free(funcName) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - free(__pyx_v_funcName); - - /* "pyrfc/_cyrfc.pyx":1007 - * free(sysId) - * free(funcName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return rc - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1008 - * free(funcName) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * return rc - * - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1007 - * free(sysId) - * free(funcName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return rc - */ - } - - /* "pyrfc/_cyrfc.pyx":1009 - * 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, 1009, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":990 - * return rc - * - * def func_desc_remove(self, sysid, func_name): # <<<<<<<<<<<<<< - * """Removes the Function Description from SAP NW RFC Lib cache - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.func_desc_remove", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1014 - * # TRANSACTIONAL / QUEUED RFC - * - * def _get_transaction_id(self): # <<<<<<<<<<<<<< - * """ Returns a unique 24 char transaction ID (GUID).""" - * cdef RFC_RC rc - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id, " Returns a unique 24 char transaction ID (GUID)."); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id = {"_get_transaction_id", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_get_transaction_id (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_get_transaction_id", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_get_transaction_id", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_TID __pyx_v_tid; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_get_transaction_id", 0); - - /* "pyrfc/_cyrfc.pyx":1020 - * 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, 1020, __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, 1020, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (!__pyx_t_2); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1021 - * - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcGetTransactionID(self._handle, tid, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1020 - * cdef RFC_TID tid - * - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcGetTransactionID(self._handle, tid, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1022 - * if not self.alive: - * self._open() - * rc = RfcGetTransactionID(self._handle, tid, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcGetTransactionID(__pyx_v_self->_handle, __pyx_v_tid, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1023 - * 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); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1024 - * rc = RfcGetTransactionID(self._handle, tid, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(tid, RFC_TID_LN) - * - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1023 - * self._open() - * rc = RfcGetTransactionID(self._handle, tid, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return wrapString(tid, RFC_TID_LN) - */ - } - - /* "pyrfc/_cyrfc.pyx":1025 - * 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, 1025, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_t_1; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_tid, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1025, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1014 - * # TRANSACTIONAL / QUEUED RFC - * - * def _get_transaction_id(self): # <<<<<<<<<<<<<< - * """ Returns a unique 24 char transaction ID (GUID).""" - * cdef RFC_RC rc - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._get_transaction_id", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1027 - * return wrapString(tid, RFC_TID_LN) - * - * def _create_and_submit_transaction(self, transaction_id, calls, queue_name=None): # <<<<<<<<<<<<<< - * # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff) - * cdef RFC_RC rc - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction = {"_create_and_submit_transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_transaction_id = 0; - PyObject *__pyx_v_calls = 0; - PyObject *__pyx_v_queue_name = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - 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 (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_transaction_id)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_calls)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("_create_and_submit_transaction", 0, 2, 3, 1); __PYX_ERR(0, 1027, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_name); - if (value) { values[2] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1027, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_create_and_submit_transaction") < 0)) __PYX_ERR(0, 1027, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1027, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_42_create_and_submit_transaction(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_transaction_id, __pyx_v_calls, __pyx_v_queue_name); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_42_create_and_submit_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_transaction_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_name) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - SAP_UC *__pyx_v_queueName; - RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc; - RFC_FUNCTION_HANDLE __pyx_v_funcCont; - SAP_UC *__pyx_v_tid; - PyObject *__pyx_v_func_name = NULL; - PyObject *__pyx_v_params = NULL; - SAP_UC *__pyx_v_funcName; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_value = NULL; - CYTHON_UNUSED PyObject *__pyx_v_e = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - SAP_UC *__pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *(*__pyx_t_14)(PyObject *); - Py_ssize_t __pyx_t_15; - Py_ssize_t __pyx_t_16; - int __pyx_t_17; - int __pyx_t_18; - char const *__pyx_t_19; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - PyObject *__pyx_t_22 = NULL; - PyObject *__pyx_t_23 = NULL; - PyObject *__pyx_t_24 = NULL; - PyObject *__pyx_t_25 = NULL; - char const *__pyx_t_26; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_create_and_submit_transaction", 0); - - /* "pyrfc/_cyrfc.pyx":1035 - * 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, 1035, __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, 1035, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (!__pyx_t_2); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1036 - * - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * - * tid = fillString(transaction_id) - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1035 - * cdef RFC_FUNCTION_HANDLE funcCont - * - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1038 - * self._open() - * - * tid = fillString(transaction_id) # <<<<<<<<<<<<<< - * queueName = NULL - * if queue_name: - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_transaction_id); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1038, __pyx_L1_error) - __pyx_v_tid = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1039 - * - * tid = fillString(transaction_id) - * queueName = NULL # <<<<<<<<<<<<<< - * if queue_name: - * queueName = fillString(queue_name) - */ - __pyx_v_queueName = NULL; - - /* "pyrfc/_cyrfc.pyx":1040 - * 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, 1040, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1041 - * queueName = NULL - * if queue_name: - * queueName = fillString(queue_name) # <<<<<<<<<<<<<< - * self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo) - * - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_queue_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1041, __pyx_L1_error) - __pyx_v_queueName = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1040 - * tid = fillString(transaction_id) - * queueName = NULL - * if queue_name: # <<<<<<<<<<<<<< - * queueName = fillString(queue_name) - * self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1042 - * if queue_name: - * queueName = fillString(queue_name) - * self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo) # <<<<<<<<<<<<<< - * - * if queue_name: - */ - __pyx_v_self->_tHandle = RfcCreateTransaction(__pyx_v_self->_handle, __pyx_v_tid, __pyx_v_queueName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1044 - * 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, 1044, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1045 - * - * if queue_name: - * free(queueName) # <<<<<<<<<<<<<< - * free(tid) - * if self._tHandle == NULL: - */ - free(__pyx_v_queueName); - - /* "pyrfc/_cyrfc.pyx":1044 - * self._tHandle = RfcCreateTransaction(self._handle, tid, queueName, &errorInfo) - * - * if queue_name: # <<<<<<<<<<<<<< - * free(queueName) - * free(tid) - */ - } - - /* "pyrfc/_cyrfc.pyx":1046 - * if queue_name: - * free(queueName) - * free(tid) # <<<<<<<<<<<<<< - * if self._tHandle == NULL: - * self._error(&errorInfo) - */ - free(__pyx_v_tid); - - /* "pyrfc/_cyrfc.pyx":1047 - * free(queueName) - * free(tid) - * if self._tHandle == NULL: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * self.active_transaction = True - */ - __pyx_t_3 = (__pyx_v_self->_tHandle == NULL); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1048 - * free(tid) - * if self._tHandle == NULL: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * self.active_transaction = True - * - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1047 - * free(queueName) - * free(tid) - * if self._tHandle == NULL: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * self.active_transaction = True - */ - } - - /* "pyrfc/_cyrfc.pyx":1049 - * if self._tHandle == NULL: - * self._error(&errorInfo) - * self.active_transaction = True # <<<<<<<<<<<<<< - * - * try: - */ - __pyx_v_self->active_transaction = 1; - - /* "pyrfc/_cyrfc.pyx":1051 - * self.active_transaction = True - * - * try: # <<<<<<<<<<<<<< - * for func_name, params in calls: - * funcName = fillString(func_name) - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_7); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1052 - * - * 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, 1052, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __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, 1052, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1052, __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, 1052, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); - 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, 1052, __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, 1052, __pyx_L7_error) - __pyx_L16_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_11); - __pyx_t_11 = 0; - __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_12); - __pyx_t_12 = 0; - - /* "pyrfc/_cyrfc.pyx":1053 - * try: - * for func_name, params in calls: - * funcName = fillString(func_name) # <<<<<<<<<<<<<< - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1053, __pyx_L7_error) - __pyx_v_funcName = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1054 - * for func_name, params in calls: - * funcName = fillString(func_name) - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) # <<<<<<<<<<<<<< - * free(funcName) - * if not funcDesc: - */ - __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1055 - * funcName = fillString(func_name) - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) # <<<<<<<<<<<<<< - * if not funcDesc: - * self._error(&errorInfo) - */ - free(__pyx_v_funcName); - - /* "pyrfc/_cyrfc.pyx":1056 - * 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)); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1057 - * free(funcName) - * if not funcDesc: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: - */ - __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1057, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - - /* "pyrfc/_cyrfc.pyx":1056 - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - * if not funcDesc: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1058 - * if not funcDesc: - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) # <<<<<<<<<<<<<< - * if not funcCont: - * self._error(&errorInfo) - */ - __pyx_v_funcCont = RfcCreateFunction(__pyx_v_funcDesc, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1059 - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * try: - */ - __pyx_t_3 = (!(__pyx_v_funcCont != 0)); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1060 - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * try: - * for name, value in params.iteritems(): - */ - __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1060, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - - /* "pyrfc/_cyrfc.pyx":1059 - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * try: - */ - } - - /* "pyrfc/_cyrfc.pyx":1061 - * if not funcCont: - * self._error(&errorInfo) - * try: # <<<<<<<<<<<<<< - * for name, value in params.iteritems(): - * fillFunctionParameter(funcDesc, funcCont, name, value) - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1062 - * 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, 1062, __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, 1062, __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, 1062, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_GOTREF(__pyx_t_11); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_12); - __pyx_t_12 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11); - __pyx_t_11 = 0; - - /* "pyrfc/_cyrfc.pyx":1063 - * try: - * for name, value in params.iteritems(): - * fillFunctionParameter(funcDesc, funcCont, name, value) # <<<<<<<<<<<<<< - * # Add RFC call to transaction - * rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo) - */ - __pyx_t_11 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1063, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - } - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - - /* "pyrfc/_cyrfc.pyx":1065 - * fillFunctionParameter(funcDesc, funcCont, name, value) - * # Add RFC call to transaction - * rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcInvokeInTransaction(__pyx_v_self->_tHandle, __pyx_v_funcCont, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1066 - * # 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); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1067 - * rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * finally: - * RfcDestroyFunction(funcCont, NULL) - */ - __pyx_t_10 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1067, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - - /* "pyrfc/_cyrfc.pyx":1066 - * # Add RFC call to transaction - * rc = RfcInvokeInTransaction(self._tHandle, funcCont, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * finally: - */ - } - } - - /* "pyrfc/_cyrfc.pyx":1069 - * self._error(&errorInfo) - * finally: - * RfcDestroyFunction(funcCont, NULL) # <<<<<<<<<<<<<< - * # execute - * with nogil: - */ - /*finally:*/ { - /*normal exit:*/{ - (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL)); - goto __pyx_L23; - } - __pyx_L22_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __Pyx_XGOTREF(__pyx_t_22); - __Pyx_XGOTREF(__pyx_t_23); - __Pyx_XGOTREF(__pyx_t_24); - __Pyx_XGOTREF(__pyx_t_25); - __pyx_t_17 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename; - { - (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL)); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_XGIVEREF(__pyx_t_24); - __Pyx_XGIVEREF(__pyx_t_25); - __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25); - } - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22); - __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; - __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19; - goto __pyx_L7_error; - } - __pyx_L23:; - } - - /* "pyrfc/_cyrfc.pyx":1052 - * - * try: - * for func_name, params in calls: # <<<<<<<<<<<<<< - * funcName = fillString(func_name) - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - */ - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1071 - * RfcDestroyFunction(funcCont, NULL) - * # execute - * with nogil: # <<<<<<<<<<<<<< - * rc = RfcSubmitTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1072 - * # execute - * with nogil: - * rc = RfcSubmitTransaction(self._tHandle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcSubmitTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo)); - } - - /* "pyrfc/_cyrfc.pyx":1071 - * 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_L34; - } - __pyx_L34:; - } - } - - /* "pyrfc/_cyrfc.pyx":1073 - * with nogil: - * rc = RfcSubmitTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_3 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1074 - * rc = RfcSubmitTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * except RFCError as e: - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1073 - * with nogil: - * rc = RfcSubmitTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1051 - * self.active_transaction = True - * - * try: # <<<<<<<<<<<<<< - * for func_name, params in calls: - * funcName = fillString(func_name) - */ - } - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - goto __pyx_L12_try_end; - __pyx_L7_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - - /* "pyrfc/_cyrfc.pyx":1076 - * 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, 1076, __pyx_L9_except_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_18 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_12); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_ErrRestore(__pyx_t_1, __pyx_t_10, __pyx_t_11); - __pyx_t_1 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; - if (__pyx_t_18) { - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_10, &__pyx_t_1) < 0) __PYX_ERR(0, 1076, __pyx_L9_except_error) - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_10); - __pyx_v_e = __pyx_t_10; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1078 - * except RFCError as e: - * # clean up actions - * RfcDestroyTransaction(self._tHandle, NULL) # <<<<<<<<<<<<<< - * raise - * - */ - (void)(RfcDestroyTransaction(__pyx_v_self->_tHandle, NULL)); - - /* "pyrfc/_cyrfc.pyx":1079 - * # 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, 1079, __pyx_L41_error) - } - - /* "pyrfc/_cyrfc.pyx":1076 - * self._error(&errorInfo) - * - * except RFCError as e: # <<<<<<<<<<<<<< - * # clean up actions - * RfcDestroyTransaction(self._tHandle, NULL) - */ - /*finally:*/ { - __pyx_L41_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 = 0; - } - 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; - - /* "pyrfc/_cyrfc.pyx":1051 - * self.active_transaction = True - * - * try: # <<<<<<<<<<<<<< - * for func_name, params in calls: - * funcName = fillString(func_name) - */ - __pyx_L9_except_error:; - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_XGIVEREF(__pyx_t_6); - __Pyx_XGIVEREF(__pyx_t_7); - __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); - goto __pyx_L1_error; - __pyx_L12_try_end:; - } - - /* "pyrfc/_cyrfc.pyx":1027 - * return wrapString(tid, RFC_TID_LN) - * - * def _create_and_submit_transaction(self, transaction_id, calls, queue_name=None): # <<<<<<<<<<<<<< - * # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff) - * cdef RFC_RC rc - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XDECREF(__pyx_v_params); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_v_e); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1081 - * raise - * - * def _destroy_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction = {"_destroy_transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_destroy_transaction (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_destroy_transaction", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_destroy_transaction", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_44_destroy_transaction(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_44_destroy_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_destroy_transaction", 0); - - /* "pyrfc/_cyrfc.pyx":1084 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1085 - * 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, 1085, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_No_transaction_handle_for_this_c}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __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, 1085, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1084 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if not self.active_transaction: # <<<<<<<<<<<<<< - * raise RFCError("No transaction handle for this connection available.") - * if not self.alive: - */ - } - - /* "pyrfc/_cyrfc.pyx":1086 - * 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, 1086, __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, 1086, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = (!__pyx_t_1); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1087 - * raise RFCError("No transaction handle for this connection available.") - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1086 - * if not self.active_transaction: - * raise RFCError("No transaction handle for this connection available.") - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1088 - * if not self.alive: - * self._open() - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) # <<<<<<<<<<<<<< - * self.active_transaction = False - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcDestroyTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1089 - * self._open() - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_self->active_transaction = 0; - - /* "pyrfc/_cyrfc.pyx":1090 - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_6 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1091 - * self.active_transaction = False - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * def _confirm_transaction(self): - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1091, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1090 - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1081 - * raise - * - * def _destroy_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._destroy_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1093 - * self._error(&errorInfo) - * - * def _confirm_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction = {"_confirm_transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_confirm_transaction (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_confirm_transaction", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_confirm_transaction", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_46_confirm_transaction(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_46_confirm_transaction(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_confirm_transaction", 0); - - /* "pyrfc/_cyrfc.pyx":1096 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1097 - * 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, 1097, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_No_transaction_handle_for_this_c}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1097, __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, 1097, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1096 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if not self.active_transaction: # <<<<<<<<<<<<<< - * raise RFCError("No transaction handle for this connection available.") - * if not self.alive: - */ - } - - /* "pyrfc/_cyrfc.pyx":1098 - * 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, 1098, __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, 1098, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = (!__pyx_t_1); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1099 - * raise RFCError("No transaction handle for this connection available.") - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcConfirmTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1098 - * if not self.active_transaction: - * raise RFCError("No transaction handle for this connection available.") - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcConfirmTransaction(self._tHandle, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1100 - * if not self.alive: - * self._open() - * rc = RfcConfirmTransaction(self._tHandle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcConfirmTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1101 - * self._open() - * rc = RfcConfirmTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - */ - __pyx_t_6 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1102 - * rc = RfcConfirmTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1101 - * self._open() - * rc = RfcConfirmTransaction(self._tHandle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1103 - * if rc != RFC_OK: - * self._error(&errorInfo) - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) # <<<<<<<<<<<<<< - * self.active_transaction = False - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcDestroyTransaction(__pyx_v_self->_tHandle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1104 - * self._error(&errorInfo) - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_self->active_transaction = 0; - - /* "pyrfc/_cyrfc.pyx":1105 - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_6 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1106 - * self.active_transaction = False - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * ########################################################################## - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1105 - * rc = RfcDestroyTransaction(self._tHandle, &errorInfo) - * self.active_transaction = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1093 - * self._error(&errorInfo) - * - * def _confirm_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._confirm_transaction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1111 - * # BACKGROUND RFC - * - * def _get_unit_id(self): # <<<<<<<<<<<<<< - * """Returns a unique 32 char bgRFC unit ID (GUID).""" - * cdef RFC_RC rc - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_48_get_unit_id, "Returns a unique 32 char bgRFC unit ID (GUID)."); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_49_get_unit_id = {"_get_unit_id", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_48_get_unit_id}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_get_unit_id (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_get_unit_id", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_get_unit_id", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_48_get_unit_id(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_48_get_unit_id(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_UNITID __pyx_v_uid; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_get_unit_id", 0); - - /* "pyrfc/_cyrfc.pyx":1117 - * 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, 1117, __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, 1117, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (!__pyx_t_2); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1118 - * - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcGetUnitID(self._handle, uid, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1117 - * cdef RFC_UNITID uid - * - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcGetUnitID(self._handle, uid, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1119 - * if not self.alive: - * self._open() - * rc = RfcGetUnitID(self._handle, uid, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcGetUnitID(__pyx_v_self->_handle, __pyx_v_uid, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1120 - * 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); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1121 - * rc = RfcGetUnitID(self._handle, uid, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(uid, RFC_UNITID_LN) - * - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1120 - * self._open() - * rc = RfcGetUnitID(self._handle, uid, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * return wrapString(uid, RFC_UNITID_LN) - */ - } - - /* "pyrfc/_cyrfc.pyx":1122 - * 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, 1122, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_t_1; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uid, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1111 - * # BACKGROUND RFC - * - * def _get_unit_id(self): # <<<<<<<<<<<<<< - * """Returns a unique 32 char bgRFC unit ID (GUID).""" - * cdef RFC_RC rc - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._get_unit_id", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1124 - * return wrapString(uid, RFC_UNITID_LN) - * - * def _create_and_submit_unit(self, unit_id, calls, queue_names=None, attributes=None): # <<<<<<<<<<<<<< - * # Note: no persistence action is taken of maintaining the arguments (cf. Schmidt, Li (2009c), p. 5ff) - * cdef RFC_RC rc - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit = {"_create_and_submit_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit_id = 0; - PyObject *__pyx_v_calls = 0; - PyObject *__pyx_v_queue_names = 0; - PyObject *__pyx_v_attributes = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - 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 (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit_id)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_calls)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("_create_and_submit_unit", 0, 2, 4, 1); __PYX_ERR(0, 1124, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_names); - if (value) { values[2] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 3: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attributes); - if (value) { values[3] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_create_and_submit_unit") < 0)) __PYX_ERR(0, 1124, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1124, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_50_create_and_submit_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_50_create_and_submit_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit_id, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_names, PyObject *__pyx_v_attributes) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - int __pyx_v_queueNameCount; - SAP_UC **__pyx_v_queueNames; - RFC_UNIT_ATTRIBUTES __pyx_v_unitAttr; - RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier; - RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc; - RFC_FUNCTION_HANDLE __pyx_v_funcCont; - SAP_UC *__pyx_v_sapuc; - SAP_UC *__pyx_v_uid; - PyObject *__pyx_v_i = NULL; - PyObject *__pyx_v_queue_name = NULL; - PyObject *__pyx_v_func_name = NULL; - PyObject *__pyx_v_params = NULL; - SAP_UC *__pyx_v_funcName; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_value = NULL; - CYTHON_UNUSED PyObject *__pyx_v_e = NULL; - PyObject *__pyx_v_unit_identifier = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - SAP_UC *__pyx_t_4; - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - PyObject *(*__pyx_t_7)(PyObject *); - PyObject *__pyx_t_8 = NULL; - Py_ssize_t __pyx_t_9; - short __pyx_t_10; - 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; - PyObject *(*__pyx_t_16)(PyObject *); - Py_ssize_t __pyx_t_17; - int __pyx_t_18; - 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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_create_and_submit_unit", 0); - __Pyx_INCREF(__pyx_v_queue_names); - - /* "pyrfc/_cyrfc.pyx":1137 - * 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, 1137, __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, 1137, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (!__pyx_t_2); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1138 - * - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * - * # uid - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1138, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1137 - * cdef SAP_UC* sapuc - * - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1141 - * - * # uid - * uid = fillString(unit_id) # <<<<<<<<<<<<<< - * # queue - * queue_names = queue_names or [] - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_unit_id); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1141, __pyx_L1_error) - __pyx_v_uid = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1143 - * 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, 1143, __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, 1143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_5); - __pyx_t_1 = __pyx_t_5; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_L4_bool_binop_done:; - __Pyx_DECREF_SET(__pyx_v_queue_names, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1144 - * # 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, 1144, __pyx_L1_error) - __pyx_t_3 = (__pyx_t_6 == 0); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1145 - * queue_names = queue_names or [] - * if len(queue_names) == 0: - * queueNameCount = 0 # <<<<<<<<<<<<<< - * queueNames = NULL - * else: - */ - __pyx_v_queueNameCount = 0; - - /* "pyrfc/_cyrfc.pyx":1146 - * if len(queue_names) == 0: - * queueNameCount = 0 - * queueNames = NULL # <<<<<<<<<<<<<< - * else: - * queueNameCount = int(len(queue_names)) - */ - __pyx_v_queueNames = NULL; - - /* "pyrfc/_cyrfc.pyx":1144 - * # queue - * queue_names = queue_names or [] - * if len(queue_names) == 0: # <<<<<<<<<<<<<< - * queueNameCount = 0 - * queueNames = NULL - */ - goto __pyx_L6; - } - - /* "pyrfc/_cyrfc.pyx":1148 - * queueNames = NULL - * else: - * queueNameCount = int(len(queue_names)) # <<<<<<<<<<<<<< - * queueNames = 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, 1148, __pyx_L1_error) - __pyx_v_queueNameCount = ((int)__pyx_t_6); - - /* "pyrfc/_cyrfc.pyx":1149 - * else: - * queueNameCount = int(len(queue_names)) - * queueNames = mallocU(queueNameCount * sizeof(SAP_UC*)) # <<<<<<<<<<<<<< - * for i, queue_name in enumerate(queue_names): - * queueNames[i] = fillString(queue_name) - */ - __pyx_v_queueNames = ((SAP_UC **)mallocU((__pyx_v_queueNameCount * (sizeof(SAP_UC *))))); - - /* "pyrfc/_cyrfc.pyx":1150 - * queueNameCount = int(len(queue_names)) - * queueNames = 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, 1150, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1150, __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, 1150, __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, 1150, __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, 1150, __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, 1150, __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, 1150, __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, 1150, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); - __pyx_t_1 = __pyx_t_8; - __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1151 - * queueNames = mallocU(queueNameCount * sizeof(SAP_UC*)) - * for i, queue_name in enumerate(queue_names): - * queueNames[i] = fillString(queue_name) # <<<<<<<<<<<<<< - * # attributes - * # set default values - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_queue_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1151, __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, 1151, __pyx_L1_error) - (__pyx_v_queueNames[__pyx_t_9]) = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1150 - * queueNameCount = int(len(queue_names)) - * queueNames = mallocU(queueNameCount * sizeof(SAP_UC*)) - * for i, queue_name in enumerate(queue_names): # <<<<<<<<<<<<<< - * queueNames[i] = fillString(queue_name) - * # attributes - */ - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_L6:; - - /* "pyrfc/_cyrfc.pyx":1154 - * # attributes - * # set default values - * memsetR(&unitAttr, 0, sizeof(RFC_UNIT_ATTRIBUTES)) # <<<<<<<<<<<<<< - * memsetR(&uIdentifier, 0, sizeof(RFC_UNIT_IDENTIFIER)) - * # unitAttr.kernelTrace = 0 (short) If != 0, the backend will write kernel traces, while executing this unit. - */ - memsetR((&__pyx_v_unitAttr), 0, (sizeof(RFC_UNIT_ATTRIBUTES))); - - /* "pyrfc/_cyrfc.pyx":1155 - * # set default values - * memsetR(&unitAttr, 0, sizeof(RFC_UNIT_ATTRIBUTES)) - * memsetR(&uIdentifier, 0, sizeof(RFC_UNIT_IDENTIFIER)) # <<<<<<<<<<<<<< - * # unitAttr.kernelTrace = 0 (short) If != 0, the backend will write kernel traces, while executing this unit. - * # unitAttr.satTrace = 0 (short) If != 0, the backend will keep a "history" for this unit. - */ - memsetR((&__pyx_v_uIdentifier), 0, (sizeof(RFC_UNIT_IDENTIFIER))); - - /* "pyrfc/_cyrfc.pyx":1182 - * # 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); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1183 - * # 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_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_kernel_trace, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1183, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1184 - * 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, 1184, __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, 1184, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_unitAttr.kernelTrace = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":1183 - * # In the client case the nwrfclib fills this automatically. - * if attributes is not None: - * if 'kernel_trace' in attributes: # <<<<<<<<<<<<<< - * unitAttr.kernelTrace = attributes['kernel_trace'] - * if 'sat_trace' in attributes: - */ - } - - /* "pyrfc/_cyrfc.pyx":1185 - * 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, 1185, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1186 - * 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, 1186, __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, 1186, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_unitAttr.satTrace = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":1185 - * if 'kernel_trace' in attributes: - * unitAttr.kernelTrace = attributes['kernel_trace'] - * if 'sat_trace' in attributes: # <<<<<<<<<<<<<< - * unitAttr.satTrace = attributes['sat_trace'] - * if 'unit_history' in attributes: - */ - } - - /* "pyrfc/_cyrfc.pyx":1187 - * 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_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_unit_history, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1187, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1188 - * 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, 1188, __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, 1188, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_unitAttr.unitHistory = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":1187 - * if 'sat_trace' in attributes: - * unitAttr.satTrace = attributes['sat_trace'] - * if 'unit_history' in attributes: # <<<<<<<<<<<<<< - * unitAttr.unitHistory = attributes['unit_history'] - * if 'lock' in attributes: - */ - } - - /* "pyrfc/_cyrfc.pyx":1189 - * 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, 1189, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1190 - * 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, 1190, __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, 1190, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_unitAttr.lock = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":1189 - * if 'unit_history' in attributes: - * unitAttr.unitHistory = attributes['unit_history'] - * if 'lock' in attributes: # <<<<<<<<<<<<<< - * unitAttr.lock = attributes['lock'] - * if 'no_commit_check' in attributes: - */ - } - - /* "pyrfc/_cyrfc.pyx":1191 - * if 'lock' in attributes: - * unitAttr.lock = attributes['lock'] - * if 'no_commit_check' in attributes: # <<<<<<<<<<<<<< - * unitAttr.noCommitCheck = attributes['no_commit_check'] - * if 'user' in attributes and attributes['user'] is not None: - */ - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_no_commit_check, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1191, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1192 - * unitAttr.lock = attributes['lock'] - * if 'no_commit_check' in attributes: - * unitAttr.noCommitCheck = attributes['no_commit_check'] # <<<<<<<<<<<<<< - * if 'user' in attributes and attributes['user'] is not None: - * # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User. - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_no_commit_check); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __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, 1192, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_unitAttr.noCommitCheck = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":1191 - * if 'lock' in attributes: - * unitAttr.lock = attributes['lock'] - * if 'no_commit_check' in attributes: # <<<<<<<<<<<<<< - * unitAttr.noCommitCheck = attributes['no_commit_check'] - * if 'user' in attributes and attributes['user'] is not None: - */ - } - - /* "pyrfc/_cyrfc.pyx":1193 - * if 'no_commit_check' in attributes: - * unitAttr.noCommitCheck = attributes['no_commit_check'] - * if 'user' in attributes and attributes['user'] is not None: # <<<<<<<<<<<<<< - * # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User. - * sapuc = fillString(attributes['user'][0:12]) - */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_user, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1193, __pyx_L1_error) - if (__pyx_t_2) { - } else { - __pyx_t_3 = __pyx_t_2; - goto __pyx_L17_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, 1193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __pyx_t_2; - __pyx_L17_bool_binop_done:; - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1195 - * 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, 1195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 12, NULL, NULL, &__pyx_slice__12, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1195, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_sapuc = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1196 - * # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User. - * sapuc = fillString(attributes['user'][0:12]) - * strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * if 'client' in attributes: - */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_user); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 12, NULL, NULL, &__pyx_slice__12, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1196, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_unitAttr.user, __pyx_v_sapuc, (__pyx_t_6 + 1)); - - /* "pyrfc/_cyrfc.pyx":1197 - * sapuc = fillString(attributes['user'][0:12]) - * strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if 'client' in attributes: - * # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000". - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":1193 - * if 'no_commit_check' in attributes: - * unitAttr.noCommitCheck = attributes['no_commit_check'] - * if 'user' in attributes and attributes['user'] is not None: # <<<<<<<<<<<<<< - * # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User. - * sapuc = fillString(attributes['user'][0:12]) - */ - } - - /* "pyrfc/_cyrfc.pyx":1198 - * strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1) - * free(sapuc) - * if 'client' in attributes: # <<<<<<<<<<<<<< - * # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000". - * sapuc = fillString(attributes['client'][0:3]) - */ - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_client, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1198, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1200 - * 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, 1200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1200, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_sapuc = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1201 - * # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000". - * sapuc = fillString(attributes['client'][0:3]) - * strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * if 't_code' in attributes: - */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_client); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1201, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_unitAttr.client, __pyx_v_sapuc, (__pyx_t_6 + 1)); - - /* "pyrfc/_cyrfc.pyx":1202 - * sapuc = fillString(attributes['client'][0:3]) - * strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if 't_code' in attributes: - * # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "". - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":1198 - * strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1) - * free(sapuc) - * if 'client' in attributes: # <<<<<<<<<<<<<< - * # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000". - * sapuc = fillString(attributes['client'][0:3]) - */ - } - - /* "pyrfc/_cyrfc.pyx":1203 - * strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1) - * free(sapuc) - * if 't_code' in attributes: # <<<<<<<<<<<<<< - * # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "". - * sapuc = fillString(attributes['t_code'][0:20]) - */ - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_t_code, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1203, __pyx_L1_error) - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1205 - * 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, 1205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1205, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_sapuc = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1206 - * # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "". - * sapuc = fillString(attributes['t_code'][0:20]) - * strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * if 'program' in attributes and attributes['program'] is not None: - */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_t_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1206, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_unitAttr.tCode, __pyx_v_sapuc, (__pyx_t_6 + 1)); - - /* "pyrfc/_cyrfc.pyx":1207 - * sapuc = fillString(attributes['t_code'][0:20]) - * strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if 'program' in attributes and attributes['program'] is not None: - * # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name. - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":1203 - * strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1) - * free(sapuc) - * if 't_code' in attributes: # <<<<<<<<<<<<<< - * # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "". - * sapuc = fillString(attributes['t_code'][0:20]) - */ - } - - /* "pyrfc/_cyrfc.pyx":1208 - * strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1) - * free(sapuc) - * if 'program' in attributes and attributes['program'] is not None: # <<<<<<<<<<<<<< - * # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name. - * sapuc = fillString(attributes['program'][0:40]) - */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_program, __pyx_v_attributes, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1208, __pyx_L1_error) - if (__pyx_t_2) { - } else { - __pyx_t_3 = __pyx_t_2; - goto __pyx_L22_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, 1208, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__pyx_t_1 != Py_None); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __pyx_t_2; - __pyx_L22_bool_binop_done:; - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1210 - * 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, 1210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 40, NULL, NULL, &__pyx_slice__15, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_5); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1210, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_sapuc = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1211 - * # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name. - * sapuc = fillString(attributes['program'][0:40]) - * strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * - */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_attributes, __pyx_n_u_program); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1211, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 40, NULL, NULL, &__pyx_slice__15, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1211, __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, 1211, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_unitAttr.program, __pyx_v_sapuc, (__pyx_t_6 + 1)); - - /* "pyrfc/_cyrfc.pyx":1212 - * sapuc = fillString(attributes['program'][0:40]) - * strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * - * self._uHandle = RfcCreateUnit(self._handle, uid, queueNames, queueNameCount, &unitAttr, &uIdentifier, &errorInfo) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":1208 - * strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1) - * free(sapuc) - * if 'program' in attributes and attributes['program'] is not None: # <<<<<<<<<<<<<< - * # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name. - * sapuc = fillString(attributes['program'][0:40]) - */ - } - - /* "pyrfc/_cyrfc.pyx":1182 - * # Sending time in UTC (GMT-0). Used only when the external program is server. - * # In the client case the nwrfclib fills this automatically. - * if attributes is not None: # <<<<<<<<<<<<<< - * if 'kernel_trace' in attributes: - * unitAttr.kernelTrace = attributes['kernel_trace'] - */ - } - - /* "pyrfc/_cyrfc.pyx":1214 - * free(sapuc) - * - * self._uHandle = RfcCreateUnit(self._handle, uid, queueNames, queueNameCount, &unitAttr, &uIdentifier, &errorInfo) # <<<<<<<<<<<<<< - * - * # queue (deallocate) - */ - __pyx_v_self->_uHandle = RfcCreateUnit(__pyx_v_self->_handle, __pyx_v_uid, ((const SAP_UC* *)__pyx_v_queueNames), __pyx_v_queueNameCount, (&__pyx_v_unitAttr), (&__pyx_v_uIdentifier), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1217 - * - * # 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, 1217, __pyx_L1_error) - __pyx_t_3 = (__pyx_t_6 > 0); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1218 - * # 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, 1218, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1218, __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, 1218, __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, 1218, __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, 1218, __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, 1218, __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, 1218, __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, 1218, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); - __pyx_t_1 = __pyx_t_8; - __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1219 - * 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, 1219, __pyx_L1_error) - free((__pyx_v_queueNames[__pyx_t_9])); - - /* "pyrfc/_cyrfc.pyx":1218 - * # queue (deallocate) - * if len(queue_names) > 0: - * for i, queue_name in enumerate(queue_names): # <<<<<<<<<<<<<< - * free(queueNames[i]) - * free(queueNames) - */ - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1220 - * for i, queue_name in enumerate(queue_names): - * free(queueNames[i]) - * free(queueNames) # <<<<<<<<<<<<<< - * # uid (deallocate) - * free(uid) - */ - free(__pyx_v_queueNames); - - /* "pyrfc/_cyrfc.pyx":1217 - * - * # queue (deallocate) - * if len(queue_names) > 0: # <<<<<<<<<<<<<< - * for i, queue_name in enumerate(queue_names): - * free(queueNames[i]) - */ - } - - /* "pyrfc/_cyrfc.pyx":1222 - * free(queueNames) - * # uid (deallocate) - * free(uid) # <<<<<<<<<<<<<< - * - * if self._uHandle == NULL: - */ - free(__pyx_v_uid); - - /* "pyrfc/_cyrfc.pyx":1224 - * free(uid) - * - * if self._uHandle == NULL: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * self.active_unit = True - */ - __pyx_t_3 = (__pyx_v_self->_uHandle == NULL); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1225 - * - * if self._uHandle == NULL: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * self.active_unit = True - * - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1224 - * free(uid) - * - * if self._uHandle == NULL: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * self.active_unit = True - */ - } - - /* "pyrfc/_cyrfc.pyx":1226 - * if self._uHandle == NULL: - * self._error(&errorInfo) - * self.active_unit = True # <<<<<<<<<<<<<< - * - * try: - */ - __pyx_v_self->active_unit = 1; - - /* "pyrfc/_cyrfc.pyx":1228 - * 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_11, &__pyx_t_12, &__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1229 - * - * 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, 1229, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L29_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, 1229, __pyx_L29_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L29_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, 1229, __pyx_L29_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L29_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, 1229, __pyx_L29_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, 1229, __pyx_L29_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_14 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_8 = PyList_GET_ITEM(sequence, 0); - __pyx_t_14 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_14); - #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1229, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1229, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_14); - #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_15 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1229, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_15); - index = 0; __pyx_t_8 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_8)) goto __pyx_L37_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - index = 1; __pyx_t_14 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L37_unpacking_failed; - __Pyx_GOTREF(__pyx_t_14); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 1229, __pyx_L29_error) - __pyx_t_16 = NULL; - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - goto __pyx_L38_unpacking_done; - __pyx_L37_unpacking_failed:; - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_16 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1229, __pyx_L29_error) - __pyx_L38_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_8); - __pyx_t_8 = 0; - __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_14); - __pyx_t_14 = 0; - - /* "pyrfc/_cyrfc.pyx":1230 - * try: - * for func_name, params in calls: - * funcName = fillString(func_name) # <<<<<<<<<<<<<< - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1230, __pyx_L29_error) - __pyx_v_funcName = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":1231 - * for func_name, params in calls: - * funcName = fillString(func_name) - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) # <<<<<<<<<<<<<< - * free(funcName) - * if not funcDesc: - */ - __pyx_v_funcDesc = RfcGetFunctionDesc(__pyx_v_self->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1232 - * funcName = fillString(func_name) - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) # <<<<<<<<<<<<<< - * if not funcDesc: - * self._error(&errorInfo) - */ - free(__pyx_v_funcName); - - /* "pyrfc/_cyrfc.pyx":1233 - * 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)); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1234 - * free(funcName) - * if not funcDesc: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: - */ - __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1234, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1233 - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - * free(funcName) - * if not funcDesc: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1235 - * if not funcDesc: - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) # <<<<<<<<<<<<<< - * if not funcCont: - * self._error(&errorInfo) - */ - __pyx_v_funcCont = RfcCreateFunction(__pyx_v_funcDesc, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1236 - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * try: - */ - __pyx_t_3 = (!(__pyx_v_funcCont != 0)); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1237 - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * try: - * for name, value in params.iteritems(): - */ - __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1236 - * self._error(&errorInfo) - * funcCont = RfcCreateFunction(funcDesc, &errorInfo) - * if not funcCont: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * try: - */ - } - - /* "pyrfc/_cyrfc.pyx":1238 - * if not funcCont: - * self._error(&errorInfo) - * try: # <<<<<<<<<<<<<< - * for name, value in params.iteritems(): - * fillFunctionParameter(funcDesc, funcCont, name, value) - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1239 - * 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, 1239, __pyx_L44_error) - } - __pyx_t_14 = __Pyx_dict_iterator(__pyx_v_params, 0, __pyx_n_s_iteritems, (&__pyx_t_17), (&__pyx_t_18)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1239, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_XDECREF(__pyx_t_5); - __pyx_t_5 = __pyx_t_14; - __pyx_t_14 = 0; - while (1) { - __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_17, &__pyx_t_9, &__pyx_t_14, &__pyx_t_8, NULL, __pyx_t_18); - if (unlikely(__pyx_t_19 == 0)) break; - if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 1239, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_GOTREF(__pyx_t_8); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_14); - __pyx_t_14 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_8); - __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1240 - * try: - * for name, value in params.iteritems(): - * fillFunctionParameter(funcDesc, funcCont, name, value) # <<<<<<<<<<<<<< - * # Add RFC call to unit - * rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo) - */ - __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcCont, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1240, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1242 - * fillFunctionParameter(funcDesc, funcCont, name, value) - * # Add RFC call to unit - * rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcInvokeInUnit(__pyx_v_self->_uHandle, __pyx_v_funcCont, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1243 - * # 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); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1244 - * rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * finally: - * RfcDestroyFunction(funcCont, NULL) - */ - __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1244, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1243 - * # Add RFC call to unit - * rc = RfcInvokeInUnit(self._uHandle, funcCont, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * finally: - */ - } - } - - /* "pyrfc/_cyrfc.pyx":1246 - * self._error(&errorInfo) - * finally: - * RfcDestroyFunction(funcCont, NULL) # <<<<<<<<<<<<<< - * # execute - * _server_log("bgRFC", "Invocation finished. submitting unit.") - */ - /*finally:*/ { - /*normal exit:*/{ - (void)(RfcDestroyFunction(__pyx_v_funcCont, NULL)); - goto __pyx_L45; - } - __pyx_L44_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 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_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_18 = __pyx_lineno; __pyx_t_19 = __pyx_clineno; __pyx_t_20 = __pyx_filename; - { - (void)(RfcDestroyFunction(__pyx_v_funcCont, 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_18; __pyx_clineno = __pyx_t_19; __pyx_filename = __pyx_t_20; - goto __pyx_L29_error; - } - __pyx_L45:; - } - - /* "pyrfc/_cyrfc.pyx":1229 - * - * try: - * for func_name, params in calls: # <<<<<<<<<<<<<< - * funcName = fillString(func_name) - * funcDesc = RfcGetFunctionDesc(self._handle, funcName, &errorInfo) - */ - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1248 - * RfcDestroyFunction(funcCont, NULL) - * # execute - * _server_log("bgRFC", "Invocation finished. submitting unit.") # <<<<<<<<<<<<<< - * with nogil: - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1248, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1249 - * # execute - * _server_log("bgRFC", "Invocation finished. submitting unit.") - * with nogil: # <<<<<<<<<<<<<< - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - * if rc != RFC_OK: - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1250 - * _server_log("bgRFC", "Invocation finished. submitting unit.") - * with nogil: - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcSubmitUnit(__pyx_v_self->_uHandle, (&__pyx_v_errorInfo)); - } - - /* "pyrfc/_cyrfc.pyx":1249 - * # execute - * _server_log("bgRFC", "Invocation finished. submitting unit.") - * with nogil: # <<<<<<<<<<<<<< - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - * if rc != RFC_OK: - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L56; - } - __pyx_L56:; - } - } - - /* "pyrfc/_cyrfc.pyx":1251 - * with nogil: - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_3 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1252 - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * except RFCError as e: - */ - __pyx_t_5 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1251 - * with nogil: - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1228 - * self.active_unit = True - * - * try: # <<<<<<<<<<<<<< - * for func_name, params in calls: - * funcName = fillString(func_name) - */ - } - __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_L34_try_end; - __pyx_L29_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1254 - * self._error(&errorInfo) - * - * except RFCError as e: # <<<<<<<<<<<<<< - * # clean up actions - * RfcDestroyUnit(self._uHandle, NULL) - */ - __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_1, &__pyx_t_8); - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1254, __pyx_L31_except_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_19 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_5, __pyx_t_14); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_ErrRestore(__pyx_t_5, __pyx_t_1, __pyx_t_8); - __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_8 = 0; - if (__pyx_t_19) { - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 1254, __pyx_L31_except_error) - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_1); - __pyx_v_e = __pyx_t_1; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1256 - * except RFCError as e: - * # clean up actions - * RfcDestroyUnit(self._uHandle, NULL) # <<<<<<<<<<<<<< - * raise - * - */ - (void)(RfcDestroyUnit(__pyx_v_self->_uHandle, NULL)); - - /* "pyrfc/_cyrfc.pyx":1257 - * # clean up actions - * RfcDestroyUnit(self._uHandle, NULL) - * raise # <<<<<<<<<<<<<< - * - * unit_identifier = wrapUnitIdentifier(uIdentifier) - */ - __Pyx_GIVEREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ErrRestoreWithState(__pyx_t_8, __pyx_t_1, __pyx_t_5); - __pyx_t_8 = 0; __pyx_t_1 = 0; __pyx_t_5 = 0; - __PYX_ERR(0, 1257, __pyx_L63_error) - } - - /* "pyrfc/_cyrfc.pyx":1254 - * self._error(&errorInfo) - * - * except RFCError as e: # <<<<<<<<<<<<<< - * # clean up actions - * RfcDestroyUnit(self._uHandle, NULL) - */ - /*finally:*/ { - __pyx_L63_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_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 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_18 = __pyx_clineno; __pyx_t_27 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - } - 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_18; __pyx_filename = __pyx_t_27; - goto __pyx_L31_except_error; - } - } - } - goto __pyx_L31_except_error; - - /* "pyrfc/_cyrfc.pyx":1228 - * self.active_unit = True - * - * try: # <<<<<<<<<<<<<< - * for func_name, params in calls: - * funcName = fillString(func_name) - */ - __pyx_L31_except_error:; - __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_L34_try_end:; - } - - /* "pyrfc/_cyrfc.pyx":1259 - * raise - * - * unit_identifier = wrapUnitIdentifier(uIdentifier) # <<<<<<<<<<<<<< - * return unit_identifier["queued"] - * - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier(__pyx_v_uIdentifier); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1259, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_unit_identifier = __pyx_t_5; - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1260 - * - * unit_identifier = wrapUnitIdentifier(uIdentifier) - * return unit_identifier["queued"] # <<<<<<<<<<<<<< - * - * def _get_unit_state(self, unit): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit_identifier, __pyx_n_u_queued); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1124 - * 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_14); - __Pyx_XDECREF(__pyx_t_15); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._create_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_i); - __Pyx_XDECREF(__pyx_v_queue_name); - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XDECREF(__pyx_v_params); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_v_e); - __Pyx_XDECREF(__pyx_v_unit_identifier); - __Pyx_XDECREF(__pyx_v_queue_names); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1262 - * return unit_identifier["queued"] - * - * def _get_unit_state(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_53_get_unit_state = {"_get_unit_state", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_get_unit_state (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1262, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_get_unit_state") < 0)) __PYX_ERR(0, 1262, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_unit = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_get_unit_state", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1262, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._get_unit_state", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_52_get_unit_state(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_52_get_unit_state(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier; - RFC_UNIT_STATE __pyx_v_state; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - RFC_UNIT_IDENTIFIER __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - Py_ssize_t __pyx_t_10; - Py_UCS4 __pyx_t_11; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_get_unit_state", 0); - - /* "pyrfc/_cyrfc.pyx":1265 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit) # <<<<<<<<<<<<<< - * cdef RFC_UNIT_STATE state - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error) - __pyx_v_uIdentifier = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":1268 - * cdef RFC_UNIT_STATE state - * - * if not self.active_unit: # <<<<<<<<<<<<<< - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - */ - __pyx_t_2 = (!__pyx_v_self->active_unit); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1269 - * - * 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, 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_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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_No_unit_handle_for_this_connecti}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __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, 1269, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1268 - * cdef RFC_UNIT_STATE state - * - * if not self.active_unit: # <<<<<<<<<<<<<< - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - */ - } - - /* "pyrfc/_cyrfc.pyx":1270 - * if not self.active_unit: - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __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, 1270, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = (!__pyx_t_2); - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":1271 - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1270 - * if not self.active_unit: - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1272 - * if not self.alive: - * self._open() - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcGetUnitState(__pyx_v_self->_handle, (&__pyx_v_uIdentifier), (&__pyx_v_state), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1273 - * self._open() - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * if state not in enum_values(UnitState): - */ - __pyx_t_7 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":1274 - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * if state not in enum_values(UnitState): - * raise RFCError(f"Unit {unit['id']} has invalid state '{state}'") - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1273 - * self._open() - * rc = RfcGetUnitState(self._handle, &uIdentifier, &state, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * if state not in enum_values(UnitState): - */ - } - - /* "pyrfc/_cyrfc.pyx":1275 - * if rc != RFC_OK: - * self._error(&errorInfo) - * if state not in enum_values(UnitState): # <<<<<<<<<<<<<< - * raise RFCError(f"Unit {unit['id']} has invalid state '{state}'") - * return UnitState(state).name - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_UNIT_STATE(__pyx_v_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_enum_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_9); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_8}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1275, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__pyx_t_7)) { - - /* "pyrfc/_cyrfc.pyx":1276 - * self._error(&errorInfo) - * if state not in enum_values(UnitState): - * raise RFCError(f"Unit {unit['id']} has invalid state '{state}'") # <<<<<<<<<<<<<< - * return UnitState(state).name - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = 0; - __pyx_t_11 = 127; - __Pyx_INCREF(__pyx_kp_u_Unit); - __pyx_t_10 += 5; - __Pyx_GIVEREF(__pyx_kp_u_Unit); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Unit); - __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1276, __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, 1276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_11; - __pyx_t_10 += __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_has_invalid_state); - __pyx_t_10 += 20; - __Pyx_GIVEREF(__pyx_kp_u_has_invalid_state); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_has_invalid_state); - __pyx_t_9 = __Pyx_PyUnicode_From_RFC_UNIT_STATE(__pyx_v_state, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_11; - __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_9); - __pyx_t_9 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_10 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__6); - __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1276, __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, 1276, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1275 - * if rc != RFC_OK: - * self._error(&errorInfo) - * if state not in enum_values(UnitState): # <<<<<<<<<<<<<< - * raise RFCError(f"Unit {unit['id']} has invalid state '{state}'") - * return UnitState(state).name - */ - } - - /* "pyrfc/_cyrfc.pyx":1277 - * if state not in enum_values(UnitState): - * raise RFCError(f"Unit {unit['id']} has invalid state '{state}'") - * return UnitState(state).name # <<<<<<<<<<<<<< - * - * def _destroy_unit(self): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyInt_From_RFC_UNIT_STATE(__pyx_v_state); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_9}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1262 - * return unit_identifier["queued"] - * - * def _get_unit_state(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._get_unit_state", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1279 - * return UnitState(state).name - * - * def _destroy_unit(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_55_destroy_unit = {"_destroy_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_destroy_unit (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("_destroy_unit", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_destroy_unit", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_54_destroy_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_54_destroy_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_destroy_unit", 0); - - /* "pyrfc/_cyrfc.pyx":1282 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1283 - * 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, 1283, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_No_unit_handle_for_this_connecti}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __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, 1283, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1282 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if not self.active_unit: # <<<<<<<<<<<<<< - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - */ - } - - /* "pyrfc/_cyrfc.pyx":1284 - * 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, 1284, __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, 1284, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = (!__pyx_t_1); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1285 - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1284 - * if not self.active_unit: - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1286 - * if not self.alive: - * self._open() - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) # <<<<<<<<<<<<<< - * self.active_unit = False - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcDestroyUnit(__pyx_v_self->_uHandle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1287 - * self._open() - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_self->active_unit = 0; - - /* "pyrfc/_cyrfc.pyx":1288 - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_6 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":1289 - * self.active_unit = False - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * def _confirm_unit(self, unit): - */ - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1288 - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1279 - * return UnitState(state).name - * - * def _destroy_unit(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._destroy_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1291 - * self._error(&errorInfo) - * - * def _confirm_unit(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_57_confirm_unit = {"_confirm_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("_confirm_unit (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1291, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_confirm_unit") < 0)) __PYX_ERR(0, 1291, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_unit = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_confirm_unit", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1291, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_56_confirm_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_56_confirm_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - RFC_UNIT_IDENTIFIER __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_confirm_unit", 0); - - /* "pyrfc/_cyrfc.pyx":1294 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit) # <<<<<<<<<<<<<< - * - * if not self.active_unit: - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(__pyx_v_unit); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1294, __pyx_L1_error) - __pyx_v_uIdentifier = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":1296 - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1297 - * - * 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, 1297, __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_No_unit_handle_for_this_connecti}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __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, 1297, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1296 - * cdef RFC_UNIT_IDENTIFIER uIdentifier = fillUnitIdentifier(unit) - * - * if not self.active_unit: # <<<<<<<<<<<<<< - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - */ - } - - /* "pyrfc/_cyrfc.pyx":1298 - * 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, 1298, __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, 1298, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = (!__pyx_t_2); - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":1299 - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: - * self._open() # <<<<<<<<<<<<<< - * rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_open(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1298 - * if not self.active_unit: - * raise RFCError("No unit handle for this connection available.") - * if not self.alive: # <<<<<<<<<<<<<< - * self._open() - * rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1300 - * if not self.alive: - * self._open() - * rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_rc = RfcConfirmUnit(__pyx_v_self->_handle, (&__pyx_v_uIdentifier), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1301 - * self._open() - * rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - */ - __pyx_t_7 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":1302 - * rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo) - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1301 - * self._open() - * rc = RfcConfirmUnit(self._handle, &uIdentifier, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1303 - * if rc != RFC_OK: - * self._error(&errorInfo) - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) # <<<<<<<<<<<<<< - * self.active_unit = False - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcDestroyUnit(__pyx_v_self->_uHandle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1304 - * self._error(&errorInfo) - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * self._error(&errorInfo) - */ - __pyx_v_self->active_unit = 0; - - /* "pyrfc/_cyrfc.pyx":1305 - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - __pyx_t_7 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":1306 - * self.active_unit = False - * if rc != RFC_OK: - * self._error(&errorInfo) # <<<<<<<<<<<<<< - * - * ########################################################################## - */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection *)__pyx_v_self->__pyx_vtab)->_error(__pyx_v_self, (&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1305 - * rc = RfcDestroyUnit(self._uHandle, &errorInfo) - * self.active_unit = False - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * self._error(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1291 - * self._error(&errorInfo) - * - * def _confirm_unit(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1316 - * # * queued - boolean, set on fill_and_submit_unit() call - * - * def initialize_unit(self, background=True): # <<<<<<<<<<<<<< - * """ Initializes a logical unit of work (LUW), shorthand: unit - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_58initialize_unit, " Initializes a logical unit of work (LUW), shorthand: unit\n\n .. warning::\n\n The background protocol (bgRFC) is not working in the current version.\n Please use only tRFC/qRFC protocols.\n\n :param background: The bgRFC protocol will be used. If set to False,\n the t/qRFC protocol will be used. Note that the bgRFC protocol\n has extended functionality. Default: True\n :type background: boolean\n\n :returns: A dictionary describing the unit.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_59initialize_unit = {"initialize_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_58initialize_unit}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_background = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_background,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_True); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_background); - if (value) { values[0] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "initialize_unit") < 0)) __PYX_ERR(0, 1316, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1316, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.initialize_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_58initialize_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_background); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_58initialize_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_background) { - PyObject *__pyx_v_id = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - 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("initialize_unit", 0); - - /* "pyrfc/_cyrfc.pyx":1331 - * :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); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":1332 - * """ - * 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_unit_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_v_id = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1331 - * :returns: A dictionary describing the unit. - * """ - * if background is True: # use bgRFC # <<<<<<<<<<<<<< - * id = self._get_unit_id() - * elif background is False: # classic t/qRFC - */ - goto __pyx_L3; - } - - /* "pyrfc/_cyrfc.pyx":1333 - * 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_1 = (__pyx_v_background == Py_False); - if (likely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1334 - * 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_transaction_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_v_id = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1333 - * if background is True: # use bgRFC - * id = self._get_unit_id() - * elif background is False: # classic t/qRFC # <<<<<<<<<<<<<< - * id = self._get_transaction_id() - * else: - */ - goto __pyx_L3; - } - - /* "pyrfc/_cyrfc.pyx":1336 - * id = self._get_transaction_id() - * else: - * raise RFCError("Argument 'background' must be a boolean value.") # <<<<<<<<<<<<<< - * return {'background': background, 'id': id, "queued": False} - * - */ - /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Argument_background_must_be_a_bo}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __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, 1336, __pyx_L1_error) - } - __pyx_L3:; - - /* "pyrfc/_cyrfc.pyx":1337 - * else: - * raise RFCError("Argument 'background' must be a boolean value.") - * return {'background': background, 'id': id, "queued": False} # <<<<<<<<<<<<<< - * - * def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_background, __pyx_v_background) < 0) __PYX_ERR(0, 1337, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_id, __pyx_v_id) < 0) __PYX_ERR(0, 1337, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_queued, Py_False) < 0) __PYX_ERR(0, 1337, __pyx_L1_error) - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1316 - * # * 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_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.initialize_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_id); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1339 - * return {'background': background, 'id': id, "queued": False} - * - * def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None): # <<<<<<<<<<<<<< - * """ Fills a unit with one or more RFC and submits it to the backend. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit, " Fills a unit with one or more RFC and submits it to the backend.\n\n Fills a unit for this connection, prepare the invocation\n of multiple RFC function modules in it, and submits the unit\n to the backend.\n\n Afterwards, the unit is still attached to the connection object,\n until confirm_unit() or destroy_unit() is called. Until one of these\n methods are called, no other unit could be filled and submitted.\n\n :param unit: a unit descriptor as returned by\n :meth:`~pyrfc.Connection.initialize_unit`.\n :param calls: a list of call descriptions. Each call description is a\n tuple that contains the function name as the first element and\n the function arguments in form of a dictionary as the second element.\n :param queue_names:\n If the unit uses the background protocol, various queue names can\n be given (leading to a asynchronous unit, type 'Q'). If parameter\n is an empty list or None, a synchronous unit (type 'T') is created.\n\n If the unit does not use the background protocol, the queue name\n may be a list with exactly one element, leading to a qRFC, or\n an empty list or None, leading to a tRFC.\n :type queue_names: list of strings or None (default)\n :param attributes: optional argument for attributes of the unit -- only valid if the background protocol\n is used. The attributes dict may contain the following keywords:\n\n =============== ============================= ======================= ==========================================================================================\n keyword default type description\n =============== ============================= ======================= =======================================================================""===================\n kernel_trace 0 int If != 0, the backend will write kernel traces, while executing this unit.\n sat_trace 0 int If != 0, the backend will write statistic records, while executing this unit.\n unit_history 0 int If != 0, the backend will keep a \"history\" for this unit.\n lock 0 int Used only for type Q: If != 0, the unit will be written to the queue, but not processed.\n The unit can then be started manually in the ABAP debugger.\n no_commit_check 0 int Per default the backend will check during execution of a unit, whether one of the\n unit's function modules triggers an explicit or implicit COMMITWORK.\n In this case the unit is aborted with an error, because the transactional integrity of\n this unit cannot be guaranteed. By setting \"no_commit_check\" to true (!=0), this behavior\n can be suppressed, meaning the unit will be executed anyway, even if one of it's\n function modules \"misbehaves\" and triggers a COMMIT WORK.\n user current operating system user String, len |nbsp| 12 Sender User (optional).\n client \"000\" String, len |nbsp| 3 Sender Client (""\"Mandant\") (optional).\n t_code \"\" String, len |nbsp| 20 Sender Transaction Code (optional).\n program current executable name String, len |nbsp| 40 Sender Program (optional).\n =============== ============================= ======================= ==========================================================================================\n\n :type attributes: dict or None (default)\n :raises: :exc:`~pyrfc.RFCError` or a subclass thereof if an error\n occurred. In this case, the unit is destroyed.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit = {"fill_and_submit_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit = 0; - PyObject *__pyx_v_calls = 0; - PyObject *__pyx_v_queue_names = 0; - PyObject *__pyx_v_attributes = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - 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 (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_calls)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("fill_and_submit_unit", 0, 2, 4, 1); __PYX_ERR(0, 1339, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_queue_names); - if (value) { values[2] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 3: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_attributes); - if (value) { values[3] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fill_and_submit_unit") < 0)) __PYX_ERR(0, 1339, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3); - CYTHON_FALLTHROUGH; - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1339, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.fill_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit, PyObject *__pyx_v_calls, PyObject *__pyx_v_queue_names, PyObject *__pyx_v_attributes) { - PyObject *__pyx_v_func_name = NULL; - PyObject *__pyx_v_params = NULL; - PyObject *__pyx_v_bg = NULL; - PyObject *__pyx_v_unit_id = NULL; - PyObject *__pyx_v_queue_name = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *(*__pyx_t_10)(PyObject *); - int __pyx_t_11; - Py_UCS4 __pyx_t_12; - Py_ssize_t __pyx_t_13; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fill_and_submit_unit", 0); - - /* "pyrfc/_cyrfc.pyx":1392 - * """ - * - * if type(unit) is not dict or 'id' not in unit or 'background' not in unit: # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") - * if not isinstance(calls, Iterable): - */ - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_unit)) != ((PyObject *)(&PyDict_Type))); - 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_id, __pyx_v_unit, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1392, __pyx_L1_error) - 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, 1392, __pyx_L1_error) - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1393 - * - * if type(unit) is not dict or 'id' not in unit or 'background' not in unit: - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") # <<<<<<<<<<<<<< - * if not isinstance(calls, Iterable): - * raise TypeError("Parameter 'calls' must be iterable.") - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __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, 1393, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1392 - * """ - * - * if type(unit) is not dict or 'id' not in unit or 'background' not in unit: # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") - * if not isinstance(calls, Iterable): - */ - } - - /* "pyrfc/_cyrfc.pyx":1394 - * if type(unit) is not dict or 'id' not in unit or 'background' not in unit: - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") - * if not isinstance(calls, Iterable): # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'calls' must be iterable.") - * if len(calls)==0: - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1394, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_IsInstance(__pyx_v_calls, __pyx_t_3); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1394, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = (!__pyx_t_1); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1395 - * 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_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1395, __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, 1395, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1394 - * if type(unit) is not dict or 'id' not in unit or 'background' not in unit: - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") - * if not isinstance(calls, Iterable): # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'calls' must be iterable.") - * if len(calls)==0: - */ - } - - /* "pyrfc/_cyrfc.pyx":1396 - * 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_4 = PyObject_Length(__pyx_v_calls); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1396, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_4 == 0); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1397 - * raise TypeError("Parameter 'calls' must be iterable.") - * if len(calls)==0: - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") # <<<<<<<<<<<<<< - * for func_name, params in calls: - * if type(func_name) is not str or type(params) is not dict: - */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __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, 1397, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1396 - * if not isinstance(calls, Iterable): - * raise TypeError("Parameter 'calls' must be iterable.") - * if len(calls)==0: # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") - * for func_name, params in calls: - */ - } - - /* "pyrfc/_cyrfc.pyx":1398 - * if len(calls)==0: - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") - * for func_name, params in calls: # <<<<<<<<<<<<<< - * if type(func_name) is not str or type(params) is not dict: - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - */ - if (likely(PyList_CheckExact(__pyx_v_calls)) || PyTuple_CheckExact(__pyx_v_calls)) { - __pyx_t_3 = __pyx_v_calls; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; - __pyx_t_5 = NULL; - } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_calls); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1398, __pyx_L1_error) - } - 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_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1398, __pyx_L1_error) - #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - #endif - } else { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(0, 1398, __pyx_L1_error) - #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - #endif - } - } else { - __pyx_t_6 = __pyx_t_5(__pyx_t_3); - if (unlikely(!__pyx_t_6)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1398, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_6); - } - if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { - PyObject* sequence = __pyx_t_6; - 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, 1398, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_7 = PyList_GET_ITEM(sequence, 0); - __pyx_t_8 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_8); - #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); - index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L11_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed; - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 1398, __pyx_L1_error) - __pyx_t_10 = NULL; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - goto __pyx_L12_unpacking_done; - __pyx_L11_unpacking_failed:; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1398, __pyx_L1_error) - __pyx_L12_unpacking_done:; - } - __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_params, __pyx_t_8); - __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1399 - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") - * for func_name, params in calls: - * if type(func_name) is not str or type(params) is not dict: # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - * if self.active_unit: - */ - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_func_name)) != ((PyObject *)(&PyUnicode_Type))); - if (!__pyx_t_1) { - } else { - __pyx_t_2 = __pyx_t_1; - goto __pyx_L14_bool_binop_done; - } - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_params)) != ((PyObject *)(&PyDict_Type))); - __pyx_t_2 = __pyx_t_1; - __pyx_L14_bool_binop_done:; - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1400 - * for func_name, params in calls: - * if type(func_name) is not str or type(params) is not dict: - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") # <<<<<<<<<<<<<< - * if self.active_unit: - * raise RFCError("There is an active unit for this connection. " - */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_Raise(__pyx_t_6, 0, 0, 0); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 1400, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1399 - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") - * for func_name, params in calls: - * if type(func_name) is not str or type(params) is not dict: # <<<<<<<<<<<<<< - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - * if self.active_unit: - */ - } - - /* "pyrfc/_cyrfc.pyx":1398 - * if len(calls)==0: - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") - * for func_name, params in calls: # <<<<<<<<<<<<<< - * if type(func_name) is not str or type(params) is not dict: - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - */ - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1401 - * if type(func_name) is not str or type(params) is not dict: - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - * if self.active_unit: # <<<<<<<<<<<<<< - * raise RFCError("There is an active unit for this connection. " - * "Use destroy_unit() " + - */ - if (unlikely(__pyx_v_self->active_unit)) { - - /* "pyrfc/_cyrfc.pyx":1402 - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - * if self.active_unit: - * raise RFCError("There is an active unit for this connection. " # <<<<<<<<<<<<<< - * "Use destroy_unit() " + - * "or confirm_unit().") - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1402, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u_There_is_an_active_unit_for_this}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1402, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1401 - * if type(func_name) is not str or type(params) is not dict: - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") - * if self.active_unit: # <<<<<<<<<<<<<< - * raise RFCError("There is an active unit for this connection. " - * "Use destroy_unit() " + - */ - } - - /* "pyrfc/_cyrfc.pyx":1405 - * "Use destroy_unit() " + - * "or confirm_unit().") - * bg = unit['background'] # <<<<<<<<<<<<<< - * unit_id = unit['id'] - * - */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_background); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_bg = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1406 - * "or confirm_unit().") - * bg = unit['background'] - * unit_id = unit['id'] # <<<<<<<<<<<<<< - * - * if bg is True: - */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_unit_id = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1408 - * unit_id = unit['id'] - * - * if bg is True: # <<<<<<<<<<<<<< - * if len(unit_id) != RFC_UNITID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - */ - __pyx_t_2 = (__pyx_v_bg == Py_True); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1409 - * - * if bg is True: - * if len(unit_id) != RFC_UNITID_LN: # <<<<<<<<<<<<<< - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - */ - __pyx_t_4 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1409, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_4 != RFC_UNITID_LN); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1410 - * if bg is True: - * if len(unit_id) != RFC_UNITID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") # <<<<<<<<<<<<<< - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - * elif bg is False: - */ - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = 0; - __pyx_t_12 = 127; - __Pyx_INCREF(__pyx_kp_u_Length_of_parameter_unit_id_must); - __pyx_t_4 += 41; - __Pyx_GIVEREF(__pyx_kp_u_Length_of_parameter_unit_id_must); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Length_of_parameter_unit_id_must); - __pyx_t_6 = __Pyx_PyUnicode_From_int(RFC_UNITID_LN, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __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_chars_found); - __pyx_t_4 += 14; - __Pyx_GIVEREF(__pyx_kp_u_chars_found); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_chars_found); - __pyx_t_13 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1410, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_13, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__21); - __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__21); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__21); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1410, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1409 - * - * if bg is True: - * if len(unit_id) != RFC_UNITID_LN: # <<<<<<<<<<<<<< - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - */ - } - - /* "pyrfc/_cyrfc.pyx":1411 - * if len(unit_id) != RFC_UNITID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) # <<<<<<<<<<<<<< - * elif bg is False: - * if len(unit_id) != RFC_TID_LN: - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_unit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[5] = {__pyx_t_8, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_names, __pyx_v_attributes}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 4+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - if (unlikely((PyObject_SetItem(__pyx_v_unit, __pyx_n_u_queued, __pyx_t_3) < 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1408 - * unit_id = unit['id'] - * - * if bg is True: # <<<<<<<<<<<<<< - * if len(unit_id) != RFC_UNITID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - */ - goto __pyx_L18; - } - - /* "pyrfc/_cyrfc.pyx":1412 - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - * elif bg is False: # <<<<<<<<<<<<<< - * if len(unit_id) != RFC_TID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - */ - __pyx_t_2 = (__pyx_v_bg == Py_False); - if (likely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1413 - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - * elif bg is False: - * if len(unit_id) != RFC_TID_LN: # <<<<<<<<<<<<<< - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - * if attributes is not None: - */ - __pyx_t_4 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1413, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_4 != RFC_TID_LN); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1414 - * elif bg is False: - * if len(unit_id) != RFC_TID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") # <<<<<<<<<<<<<< - * if attributes is not None: - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") - */ - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = 0; - __pyx_t_12 = 127; - __Pyx_INCREF(__pyx_kp_u_Length_of_parameter_unit_id_must); - __pyx_t_4 += 41; - __Pyx_GIVEREF(__pyx_kp_u_Length_of_parameter_unit_id_must); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Length_of_parameter_unit_id_must); - __pyx_t_6 = __Pyx_PyUnicode_From_int(RFC_TID_LN, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __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_chars_found); - __pyx_t_4 += 14; - __Pyx_GIVEREF(__pyx_kp_u_chars_found); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_chars_found); - __pyx_t_13 = PyObject_Length(__pyx_v_unit_id); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1414, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_13, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__21); - __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__21); - PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__21); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1414, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1413 - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - * elif bg is False: - * if len(unit_id) != RFC_TID_LN: # <<<<<<<<<<<<<< - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - * if attributes is not None: - */ - } - - /* "pyrfc/_cyrfc.pyx":1415 - * if len(unit_id) != RFC_TID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - * if attributes is not None: # <<<<<<<<<<<<<< - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: - */ - __pyx_t_2 = (__pyx_v_attributes != Py_None); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1416 - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - * if attributes is not None: - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") # <<<<<<<<<<<<<< - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: - * self._create_and_submit_transaction(unit_id, calls) - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1416, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u_Argument_attributes_not_valid_t}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1416, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1415 - * if len(unit_id) != RFC_TID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - * if attributes is not None: # <<<<<<<<<<<<<< - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: - */ - } - - /* "pyrfc/_cyrfc.pyx":1417 - * if attributes is not None: - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: # <<<<<<<<<<<<<< - * self._create_and_submit_transaction(unit_id, calls) - * unit['queued'] = False - */ - __pyx_t_1 = (__pyx_v_queue_names == Py_None); - if (!__pyx_t_1) { - } else { - __pyx_t_2 = __pyx_t_1; - goto __pyx_L23_bool_binop_done; - } - __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_queue_names)) == ((PyObject *)(&PyList_Type))); - if (__pyx_t_1) { - } else { - __pyx_t_2 = __pyx_t_1; - goto __pyx_L23_bool_binop_done; - } - __pyx_t_4 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1417, __pyx_L1_error) - __pyx_t_1 = (__pyx_t_4 == 0); - __pyx_t_2 = __pyx_t_1; - __pyx_L23_bool_binop_done:; - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1418 - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: - * self._create_and_submit_transaction(unit_id, calls) # <<<<<<<<<<<<<< - * unit['queued'] = False - * elif len(queue_names) == 1: - */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_transaction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1418, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_unit_id, __pyx_v_calls}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1418, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1419 - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: - * self._create_and_submit_transaction(unit_id, calls) - * unit['queued'] = False # <<<<<<<<<<<<<< - * elif len(queue_names) == 1: - * queue_name = queue_names[0] - */ - if (unlikely((PyObject_SetItem(__pyx_v_unit, __pyx_n_u_queued, Py_False) < 0))) __PYX_ERR(0, 1419, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1417 - * if attributes is not None: - * raise RFCError("Argument 'attributes' not valid. (t/qRFC does not support attributes.)") - * if queue_names is None or type(queue_names) is list and len(queue_names) == 0: # <<<<<<<<<<<<<< - * self._create_and_submit_transaction(unit_id, calls) - * unit['queued'] = False - */ - goto __pyx_L22; - } - - /* "pyrfc/_cyrfc.pyx":1420 - * 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_4 = PyObject_Length(__pyx_v_queue_names); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1420, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_4 == 1); - if (likely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1421 - * 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_3 = __Pyx_GetItemInt(__pyx_v_queue_names, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_queue_name = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1422 - * 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_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_create_and_submit_transaction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[4] = {__pyx_t_8, __pyx_v_unit_id, __pyx_v_calls, __pyx_v_queue_name}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 3+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1423 - * 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, 1423, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1420 - * 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_L22; - } - - /* "pyrfc/_cyrfc.pyx":1425 - * 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_6, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u_Argument_queue_names_not_valid_t}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1425, __pyx_L1_error) - } - __pyx_L22:; - - /* "pyrfc/_cyrfc.pyx":1412 - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_UNITID_LN} chars, found {len(unit_id)}.") - * unit['queued'] = self._create_and_submit_unit(unit_id, calls, queue_names, attributes) - * elif bg is False: # <<<<<<<<<<<<<< - * if len(unit_id) != RFC_TID_LN: - * raise TypeError(f"Length of parameter 'unit['id']' must be {RFC_TID_LN} chars, found {len(unit_id)}.") - */ - goto __pyx_L18; - } - - /* "pyrfc/_cyrfc.pyx":1427 - * 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_6, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_kp_u_Argument_unit_not_valid_Is_unit}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1427, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1427, __pyx_L1_error) - } - __pyx_L18:; - - /* "pyrfc/_cyrfc.pyx":1428 - * else: - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * return unit # <<<<<<<<<<<<<< - * - * def get_unit_state(self, unit): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_unit); - __pyx_r = __pyx_v_unit; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1339 - * return {'background': background, 'id': id, "queued": False} - * - * def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None): # <<<<<<<<<<<<<< - * """ Fills a unit with one or more RFC and submits it to the backend. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.fill_and_submit_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XDECREF(__pyx_v_params); - __Pyx_XDECREF(__pyx_v_bg); - __Pyx_XDECREF(__pyx_v_unit_id); - __Pyx_XDECREF(__pyx_v_queue_name); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1430 - * return unit - * - * def get_unit_state(self, unit): # <<<<<<<<<<<<<< - * """Retrieves the processing status of the given background unit. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_62get_unit_state, "Retrieves the processing status of the given background unit.\n\n .. note::\n Only available for background units.\n\n :param unit: a unit descriptor as returned by\n :meth:`~pyrfc.Connection.initialize_unit`.\n :return: The state of the current bgRFC unit. Possible values are:\n RFC_UNIT_NOT_FOUND\n RFC_UNIT_IN_PROCESS\n RFC_UNIT_COMMITTED\n RFC_UNIT_ROLLED_BACK\n RFC_UNIT_CONFIRMED\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_63get_unit_state = {"get_unit_state", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_62get_unit_state}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("get_unit_state (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1430, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_unit_state") < 0)) __PYX_ERR(0, 1430, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_unit = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_unit_state", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1430, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_unit_state", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_62get_unit_state(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_62get_unit_state(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) { - PyObject *__pyx_v_bg = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - 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("get_unit_state", 0); - - /* "pyrfc/_cyrfc.pyx":1445 - * 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, 1445, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_bg = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1446 - * """ - * 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); - if (likely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1447 - * 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_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_unit_state); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_unit}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __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; - - /* "pyrfc/_cyrfc.pyx":1446 - * """ - * bg = unit['background'] - * if bg is True: # <<<<<<<<<<<<<< - * return self._get_unit_state(unit) - * elif bg is False: - */ - } - - /* "pyrfc/_cyrfc.pyx":1448 - * 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_2 = (__pyx_v_bg == Py_False); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1449 - * 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_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_No_state_check_possible_of_non_b}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __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, 1449, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1448 - * if bg is True: - * return self._get_unit_state(unit) - * elif bg is False: # <<<<<<<<<<<<<< - * raise RFCError("No state check possible of non-bgRFC units.") - * else: - */ - } - - /* "pyrfc/_cyrfc.pyx":1451 - * 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_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1451, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Argument_unit_not_valid_Is_unit}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __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, 1451, __pyx_L1_error) - } - - /* "pyrfc/_cyrfc.pyx":1430 - * 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_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.get_unit_state", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_bg); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1453 - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * - * def destroy_unit(self, unit): # <<<<<<<<<<<<<< - * """ Destroy the current unit. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_64destroy_unit, " Destroy the current unit.\n\n E.g. if the completed unit could not be recorded in the frontend.\n\n :param unit: a unit descriptor as returned by\n :meth:`~pyrfc.Connection.initialize_unit`.\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection attempt fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_65destroy_unit = {"destroy_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_64destroy_unit}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("destroy_unit (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1453, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "destroy_unit") < 0)) __PYX_ERR(0, 1453, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_unit = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("destroy_unit", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1453, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.destroy_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_64destroy_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_64destroy_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) { - PyObject *__pyx_v_bg = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("destroy_unit", 0); - - /* "pyrfc/_cyrfc.pyx":1463 - * 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, 1463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_bg = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1464 - * """ - * bg = unit['background'] - * if bg is True: # <<<<<<<<<<<<<< - * self._destroy_unit() - * elif bg is False: - */ - __pyx_t_2 = (__pyx_v_bg == Py_True); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1465 - * bg = unit['background'] - * if bg is True: - * self._destroy_unit() # <<<<<<<<<<<<<< - * elif bg is False: - * self._destroy_transaction() - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1464 - * """ - * bg = unit['background'] - * if bg is True: # <<<<<<<<<<<<<< - * self._destroy_unit() - * elif bg is False: - */ - goto __pyx_L3; - } - - /* "pyrfc/_cyrfc.pyx":1466 - * if bg is True: - * self._destroy_unit() - * elif bg is False: # <<<<<<<<<<<<<< - * self._destroy_transaction() - * else: - */ - __pyx_t_2 = (__pyx_v_bg == Py_False); - if (likely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1467 - * self._destroy_unit() - * elif bg is False: - * self._destroy_transaction() # <<<<<<<<<<<<<< - * else: - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy_transaction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1466 - * if bg is True: - * self._destroy_unit() - * elif bg is False: # <<<<<<<<<<<<<< - * self._destroy_transaction() - * else: - */ - goto __pyx_L3; - } - - /* "pyrfc/_cyrfc.pyx":1469 - * self._destroy_transaction() - * else: - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") # <<<<<<<<<<<<<< - * - * def confirm_unit(self, unit): - */ - /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Argument_unit_not_valid_Is_unit}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __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, 1469, __pyx_L1_error) - } - __pyx_L3:; - - /* "pyrfc/_cyrfc.pyx":1453 - * 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_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.destroy_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_bg); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1471 - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * - * def confirm_unit(self, unit): # <<<<<<<<<<<<<< - * """ Confirm the current unit in the backend. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Connection_66confirm_unit, " Confirm the current unit in the backend.\n\n This also destroys the unit.\n\n :param unit: a unit descriptor as returned by\n :meth:`~pyrfc.Connection.initialize_unit`.\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection attempt fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_67confirm_unit = {"confirm_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_66confirm_unit}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_unit = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("confirm_unit (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_unit,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_unit)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1471, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "confirm_unit") < 0)) __PYX_ERR(0, 1471, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_unit = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("confirm_unit", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1471, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_66confirm_unit(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v_unit); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_66confirm_unit(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_unit) { - PyObject *__pyx_v_bg = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - 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_unit", 0); - - /* "pyrfc/_cyrfc.pyx":1481 - * 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, 1481, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_bg = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1482 - * """ - * bg = unit['background'] - * if bg is True: # <<<<<<<<<<<<<< - * self._confirm_unit(unit) - * elif bg is False: - */ - __pyx_t_2 = (__pyx_v_bg == Py_True); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1483 - * bg = unit['background'] - * if bg is True: - * self._confirm_unit(unit) # <<<<<<<<<<<<<< - * elif bg is False: - * self._confirm_transaction() - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_confirm_unit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_unit}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1482 - * """ - * bg = unit['background'] - * if bg is True: # <<<<<<<<<<<<<< - * self._confirm_unit(unit) - * elif bg is False: - */ - goto __pyx_L3; - } - - /* "pyrfc/_cyrfc.pyx":1484 - * if bg is True: - * self._confirm_unit(unit) - * elif bg is False: # <<<<<<<<<<<<<< - * self._confirm_transaction() - * else: - */ - __pyx_t_2 = (__pyx_v_bg == Py_False); - if (likely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1485 - * self._confirm_unit(unit) - * elif bg is False: - * self._confirm_transaction() # <<<<<<<<<<<<<< - * else: - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_confirm_transaction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1485, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1484 - * if bg is True: - * self._confirm_unit(unit) - * elif bg is False: # <<<<<<<<<<<<<< - * self._confirm_transaction() - * else: - */ - goto __pyx_L3; - } - - /* "pyrfc/_cyrfc.pyx":1487 - * self._confirm_transaction() - * else: - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") # <<<<<<<<<<<<<< - * - * - */ - /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_Argument_unit_not_valid_Is_unit}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __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, 1487, __pyx_L1_error) - } - __pyx_L3:; - - /* "pyrfc/_cyrfc.pyx":1471 - * 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_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.confirm_unit", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_bg); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":550 - * """ - * cdef unsigned __bconfig - * cdef public dict __config # <<<<<<<<<<<<<< - * cdef bint active_transaction - * cdef bint active_unit - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_19_Connection__config___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_19_Connection__config___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->_Connection__config); - __pyx_r = __pyx_v_self->_Connection__config; - goto __pyx_L0; - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_19_Connection__config_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_19_Connection__config_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, PyObject *__pyx_v_value) { - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_value))) __PYX_ERR(0, 550, __pyx_L1_error) - __pyx_t_1 = __pyx_v_value; - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->_Connection__config); - __Pyx_DECREF(__pyx_v_self->_Connection__config); - __pyx_v_self->_Connection__config = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Connection._Connection__config.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_5__del__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_5__del__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_19_Connection__config_4__del__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_10Connection_19_Connection__config_4__del__(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__del__", 0); - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_self->_Connection__config); - __Pyx_DECREF(__pyx_v_self->_Connection__config); - __pyx_v_self->_Connection__config = ((PyObject*)Py_None); - - /* function exit code */ - __pyx_r = 0; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling" - * def __setstate_cython__(self, __pyx_state): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_68__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_68__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - 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_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__handle_self__tHandle_self, 0, 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_AddTraceback("pyrfc._cyrfc.Connection.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "self._handle,self._tHandle,self._uHandle cannot be converted to a Python object for pickling" - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v___pyx_state = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Connection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Connection_70__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_v_self), __pyx_v___pyx_state); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Connection_70__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - 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_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__handle_self__tHandle_self, 0, 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_AddTraceback("pyrfc._cyrfc.Connection.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1506 - * - * - * def default_auth_check(func_name=False, request_context = None): # <<<<<<<<<<<<<< - * request_context = request_context or {} - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_17default_auth_check(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_17default_auth_check = {"default_auth_check", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_17default_auth_check, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_17default_auth_check(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_func_name = 0; - PyObject *__pyx_v_request_context = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,&__pyx_n_s_request_context,0}; - PyObject* values[2] = {0,0}; - values[0] = ((PyObject *)((PyObject *)Py_False)); - values[1] = ((PyObject *)((PyObject *)Py_None)); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func_name); - if (value) { values[0] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 1: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_request_context); - if (value) { values[1] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "default_auth_check") < 0)) __PYX_ERR(0, 1506, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1506, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.default_auth_check", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_16default_auth_check(__pyx_self, __pyx_v_func_name, __pyx_v_request_context); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_16default_auth_check(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_request_context) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - Py_UCS4 __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("default_auth_check", 0); - __Pyx_INCREF(__pyx_v_request_context); - - /* "pyrfc/_cyrfc.pyx":1507 - * - * def default_auth_check(func_name=False, request_context = None): - * request_context = request_context or {} # <<<<<<<<<<<<<< - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) - * return RFC_OK - */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_request_context); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1507, __pyx_L1_error) - if (!__pyx_t_2) { - } else { - __Pyx_INCREF(__pyx_v_request_context); - __pyx_t_1 = __pyx_v_request_context; - goto __pyx_L3_bool_binop_done; - } - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1507, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_t_3; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_L3_bool_binop_done:; - __Pyx_DECREF_SET(__pyx_v_request_context, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1508 - * def default_auth_check(func_name=False, request_context = None): - * request_context = request_context or {} - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) # <<<<<<<<<<<<<< - * return RFC_OK - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1508, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = 0; - __pyx_t_6 = 127; - __Pyx_INCREF(__pyx_kp_u_authorization_check_for); - __pyx_t_5 += 25; - __Pyx_GIVEREF(__pyx_kp_u_authorization_check_for); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_authorization_check_for); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1508, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__6); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1508, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_request_context, __pyx_n_u_server_context); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1508, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__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; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1509 - * request_context = request_context or {} - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) - * return RFC_OK # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1506 - * - * - * def default_auth_check(func_name=False, request_context = None): # <<<<<<<<<<<<<< - * request_context = request_context or {} - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("pyrfc._cyrfc.default_auth_check", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_request_context); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1512 - * - * - * def _server_log(origin, log_message): # <<<<<<<<<<<<<< - * if server_context["server_log"]: - * print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'") - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19_server_log(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_19_server_log = {"_server_log", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_19_server_log, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_19_server_log(PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_origin = 0; - PyObject *__pyx_v_log_message = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,&__pyx_n_s_log_message,0}; - PyObject* values[2] = {0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_origin)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1512, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_log_message)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1512, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("_server_log", 1, 2, 2, 1); __PYX_ERR(0, 1512, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_server_log") < 0)) __PYX_ERR(0, 1512, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 2)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1512, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc._server_log", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_18_server_log(__pyx_self, __pyx_v_origin, __pyx_v_log_message); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_18_server_log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_origin, PyObject *__pyx_v_log_message) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - Py_ssize_t __pyx_t_4; - Py_UCS4 __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_server_log", 0); - - /* "pyrfc/_cyrfc.pyx":1513 - * - * 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, 1513, __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, 1513, __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, 1513, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":1514 - * def _server_log(origin, log_message): - * if server_context["server_log"]: - * print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'") # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = 0; - __pyx_t_5 = 127; - __Pyx_INCREF(__pyx_kp_u__22); - __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__22); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__22); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_datetime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __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, 1514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_8 = 0; - if (CYTHON_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_8 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_6, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __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, 1514, __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, 1514, __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__23); - __pyx_t_4 += 2; - __Pyx_GIVEREF(__pyx_kp_u__23); - PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__23); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_log_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_5; - __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_4 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__6); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __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, 1514, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1513 - * - * def _server_log(origin, log_message): - * if server_context["server_log"]: # <<<<<<<<<<<<<< - * print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'") - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1512 - * - * - * def _server_log(origin, log_message): # <<<<<<<<<<<<<< - * if server_context["server_log"]: - * print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'") - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc._server_log", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1517 - * - * - * cdef RFC_RC metadataLookup( # <<<<<<<<<<<<<< - * const SAP_UC* functionName, - * RFC_ATTRIBUTES rfcAttributes, - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_metadataLookup(SAP_UC const *__pyx_v_functionName, CYTHON_UNUSED RFC_ATTRIBUTES __pyx_v_rfcAttributes, RFC_FUNCTION_DESC_HANDLE *__pyx_v_funcDescHandle) { - PyObject *__pyx_v_function_name = NULL; - PyObject *__pyx_v_func_metadata = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - Py_UCS4 __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - uintptr_t __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("metadataLookup", 0); - - /* "pyrfc/_cyrfc.pyx":1523 - * ) with gil: - * global server_functions - * function_name = wrapString(functionName) # <<<<<<<<<<<<<< - * if function_name not in server_functions: - * _server_log("metadataLookup", f"No metadata found for function '{function_name}'.") - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_functionName, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_function_name = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1524 - * 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, 1524, __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, 1524, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1525 - * 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_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = 0; - __pyx_t_6 = 127; - __Pyx_INCREF(__pyx_kp_u_No_metadata_found_for_function); - __pyx_t_5 += 32; - __Pyx_GIVEREF(__pyx_kp_u_No_metadata_found_for_function); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_No_metadata_found_for_function); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_function_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u__24); - __pyx_t_5 += 2; - __Pyx_GIVEREF(__pyx_kp_u__24); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__24); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_8 = 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_8 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_n_u_metadataLookup, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1526 - * if function_name not in server_functions: - * _server_log("metadataLookup", f"No metadata found for function '{function_name}'.") - * return RFC_NOT_FOUND # <<<<<<<<<<<<<< - * func_metadata = server_functions[function_name] - * # callback = func_metadata['callback'] - */ - __pyx_r = RFC_NOT_FOUND; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1524 - * global server_functions - * function_name = wrapString(functionName) - * if function_name not in server_functions: # <<<<<<<<<<<<<< - * _server_log("metadataLookup", f"No metadata found for function '{function_name}'.") - * return RFC_NOT_FOUND - */ - } - - /* "pyrfc/_cyrfc.pyx":1527 - * _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] = func_metadata['func_desc_handle'] - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_function_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_func_metadata = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1529 - * func_metadata = server_functions[function_name] - * # callback = func_metadata['callback'] - * funcDescHandle[0] = func_metadata['func_desc_handle'] # <<<<<<<<<<<<<< - * _server_log("metadataLookup", f"Function '{function_name}' handle {funcDescHandle[0]}.") - * return RFC_OK - */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_metadata, __pyx_n_u_func_desc_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_9 == ((uintptr_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1529, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - (__pyx_v_funcDescHandle[0]) = ((RFC_FUNCTION_DESC_HANDLE)((uintptr_t)__pyx_t_9)); - - /* "pyrfc/_cyrfc.pyx":1530 - * # callback = func_metadata['callback'] - * funcDescHandle[0] = func_metadata['func_desc_handle'] - * _server_log("metadataLookup", f"Function '{function_name}' handle {funcDescHandle[0]}.") # <<<<<<<<<<<<<< - * return RFC_OK - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = 0; - __pyx_t_6 = 127; - __Pyx_INCREF(__pyx_kp_u_Function); - __pyx_t_5 += 10; - __Pyx_GIVEREF(__pyx_kp_u_Function); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Function); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_function_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); - __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u_handle_2); - __pyx_t_5 += 9; - __Pyx_GIVEREF(__pyx_kp_u_handle_2); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_handle_2); - __pyx_t_4 = __Pyx_PyInt_FromSize_t(((uintptr_t)(__pyx_v_funcDescHandle[0]))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_10); - __pyx_t_10 = 0; - __Pyx_INCREF(__pyx_kp_u__21); - __pyx_t_5 += 1; - __Pyx_GIVEREF(__pyx_kp_u__21); - PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_u__21); - __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_n_u_metadataLookup, __pyx_t_10}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1531 - * funcDescHandle[0] = func_metadata['func_desc_handle'] - * _server_log("metadataLookup", f"Function '{function_name}' handle {funcDescHandle[0]}.") - * return RFC_OK # <<<<<<<<<<<<<< - * - * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo): - */ - __pyx_r = RFC_OK; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1517 - * - * - * cdef RFC_RC metadataLookup( # <<<<<<<<<<<<<< - * const SAP_UC* functionName, - * RFC_ATTRIBUTES rfcAttributes, - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_AddTraceback("pyrfc._cyrfc.metadataLookup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_function_name); - __Pyx_XDECREF(__pyx_v_func_metadata); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1533 - * return RFC_OK - * - * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo): # <<<<<<<<<<<<<< - * cdef RFC_SERVER_CONTEXT context - * cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo) - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_get_server_context(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_ERROR_INFO *__pyx_v_serverErrorInfo) { - RFC_SERVER_CONTEXT __pyx_v_context; - RFC_RC __pyx_v_rc; - PyObject *__pyx_v_server_context = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_server_context", 0); - - /* "pyrfc/_cyrfc.pyx":1535 - * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo): - * cdef RFC_SERVER_CONTEXT context - * cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK or serverErrorInfo.code != RFC_OK: - * return None - */ - __pyx_v_rc = RfcGetServerContext(__pyx_v_rfcHandle, (&__pyx_v_context), __pyx_v_serverErrorInfo); - - /* "pyrfc/_cyrfc.pyx":1536 - * cdef RFC_SERVER_CONTEXT context - * cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo) - * if rc != RFC_OK or serverErrorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * return None - * - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - if (!__pyx_t_2) { - } else { - __pyx_t_1 = __pyx_t_2; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_2 = (__pyx_v_serverErrorInfo->code != RFC_OK); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":1537 - * cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo) - * if rc != RFC_OK or serverErrorInfo.code != RFC_OK: - * return None # <<<<<<<<<<<<<< - * - * server_context = { - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1536 - * cdef RFC_SERVER_CONTEXT context - * cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo) - * if rc != RFC_OK or serverErrorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * return None - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1540 - * - * server_context = { - * "call_type": UnitCallType(context.type), # <<<<<<<<<<<<<< - * "is_stateful": context.isStateful != 0 - * } - */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_UnitCallType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1540, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_RFC_CALL_TYPE(__pyx_v_context.type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1540, __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_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1540, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_call_type, __pyx_t_4) < 0) __PYX_ERR(0, 1540, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":1541 - * server_context = { - * "call_type": UnitCallType(context.type), - * "is_stateful": context.isStateful != 0 # <<<<<<<<<<<<<< - * } - * if context.type != RFC_SYNCHRONOUS: - */ - __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_context.isStateful != 0)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_is_stateful, __pyx_t_4) < 0) __PYX_ERR(0, 1540, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_server_context = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1543 - * "is_stateful": context.isStateful != 0 - * } - * if context.type != RFC_SYNCHRONOUS: # <<<<<<<<<<<<<< - * server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0]) - * if context.type == RFC_BACKGROUND_UNIT: - */ - __pyx_t_1 = (__pyx_v_context.type != RFC_SYNCHRONOUS); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":1544 - * } - * if context.type != RFC_SYNCHRONOUS: - * server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0]) # <<<<<<<<<<<<<< - * if context.type == RFC_BACKGROUND_UNIT: - * server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes) - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_context.unitIdentifier[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (unlikely((PyDict_SetItem(__pyx_v_server_context, __pyx_n_u_unit_identifier, __pyx_t_3) < 0))) __PYX_ERR(0, 1544, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1543 - * "is_stateful": context.isStateful != 0 - * } - * if context.type != RFC_SYNCHRONOUS: # <<<<<<<<<<<<<< - * server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0]) - * if context.type == RFC_BACKGROUND_UNIT: - */ - } - - /* "pyrfc/_cyrfc.pyx":1545 - * if context.type != RFC_SYNCHRONOUS: - * server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0]) - * if context.type == RFC_BACKGROUND_UNIT: # <<<<<<<<<<<<<< - * server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes) - * - */ - __pyx_t_1 = (__pyx_v_context.type == RFC_BACKGROUND_UNIT); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":1546 - * server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0]) - * if context.type == RFC_BACKGROUND_UNIT: - * server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes) # <<<<<<<<<<<<<< - * - * return server_context - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitAttributes(__pyx_v_context.unitAttributes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (unlikely((PyDict_SetItem(__pyx_v_server_context, __pyx_n_u_unit_attributes, __pyx_t_3) < 0))) __PYX_ERR(0, 1546, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1545 - * if context.type != RFC_SYNCHRONOUS: - * server_context["unit_identifier"] = wrapUnitIdentifier(context.unitIdentifier[0]) - * if context.type == RFC_BACKGROUND_UNIT: # <<<<<<<<<<<<<< - * server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1548 - * server_context ["unit_attributes"] = wrapUnitAttributes(context.unitAttributes) - * - * return server_context # <<<<<<<<<<<<<< - * - * cdef RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil: - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_server_context); - __pyx_r = __pyx_v_server_context; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1533 - * return RFC_OK - * - * cdef get_server_context(RFC_CONNECTION_HANDLE rfcHandle, RFC_ERROR_INFO* serverErrorInfo): # <<<<<<<<<<<<<< - * cdef RFC_SERVER_CONTEXT context - * cdef RFC_RC rc = RfcGetServerContext(rfcHandle, &context, serverErrorInfo) - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.get_server_context", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_server_context); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1550 - * return server_context - * - * cdef RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil: # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_genericHandler(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_FUNCTION_HANDLE __pyx_v_funcHandle, RFC_ERROR_INFO *__pyx_v_serverErrorInfo) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_ATTRIBUTES __pyx_v_attributes; - RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc; - RFC_ABAP_NAME __pyx_v_funcName; - PyObject *__pyx_v_context = NULL; - PyObject *__pyx_v_err_msg = NULL; - PyObject *__pyx_v_new_error = NULL; - PyObject *__pyx_v_func_name = NULL; - PyObject *__pyx_v_func_data = NULL; - PyObject *__pyx_v_callback = NULL; - PyObject *__pyx_v_server = NULL; - PyObject *__pyx_v_conn_attr = NULL; - PyObject *__pyx_v_request_context = NULL; - PyObject *__pyx_v_auth_function = NULL; - PyObject *__pyx_v_func_handle_variables = NULL; - PyObject *__pyx_v_result = NULL; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_value = NULL; - PyObject *__pyx_v_e = NULL; - CYTHON_UNUSED PyObject *__pyx_v_ex = NULL; - PyObject *__pyx_v_exctype = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - Py_ssize_t __pyx_t_3; - Py_UCS4 __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; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - int __pyx_t_13; - RFC_RC __pyx_t_14; - Py_ssize_t __pyx_t_15; - int __pyx_t_16; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - 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; - char const *__pyx_t_27; - PyObject *(*__pyx_t_28)(PyObject *); - char const *__pyx_t_29; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("genericHandler", 0); - - /* "pyrfc/_cyrfc.pyx":1560 - * - * # section 5.6.2 of SAP NWRFC SDK Programming Guide 7.50 - * context = get_server_context(rfcHandle, serverErrorInfo) # <<<<<<<<<<<<<< - * if context is None: - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_get_server_context(__pyx_v_rfcHandle, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_context = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1561 - * # section 5.6.2 of SAP NWRFC SDK Programming Guide 7.50 - * context = get_server_context(rfcHandle, serverErrorInfo) - * if context is None: # <<<<<<<<<<<<<< - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" - * new_error = ExternalRuntimeError( - */ - __pyx_t_2 = (__pyx_v_context == Py_None); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1562 - * context = get_server_context(rfcHandle, serverErrorInfo) - * if context is None: - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" # <<<<<<<<<<<<<< - * new_error = ExternalRuntimeError( - * message=err_msg, - */ - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Error_code); - __pyx_t_3 += 11; - __Pyx_GIVEREF(__pyx_kp_u_Error_code); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Error_code); - __pyx_t_5 = __Pyx_PyUnicode_From_RFC_RC(__pyx_v_serverErrorInfo->code, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); - __pyx_t_5 = 0; - __Pyx_INCREF(__pyx_kp_u_when_getting_server_context_for); - __pyx_t_3 += 45; - __Pyx_GIVEREF(__pyx_kp_u_when_getting_server_context_for); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_when_getting_server_context_for); - __pyx_t_5 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__6); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1562, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_err_msg = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":1563 - * if context is None: - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" - * new_error = ExternalRuntimeError( # <<<<<<<<<<<<<< - * message=err_msg, - * code=RFC_EXTERNAL_FAILURE - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1563, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - - /* "pyrfc/_cyrfc.pyx":1564 - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" - * new_error = ExternalRuntimeError( - * message=err_msg, # <<<<<<<<<<<<<< - * code=RFC_EXTERNAL_FAILURE - * ) - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_message, __pyx_v_err_msg) < 0) __PYX_ERR(0, 1564, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1565 - * new_error = ExternalRuntimeError( - * message=err_msg, - * code=RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * ) - * fillError(new_error, serverErrorInfo) - */ - __pyx_t_5 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1565, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_code, __pyx_t_5) < 0) __PYX_ERR(0, 1564, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1563 - * if context is None: - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" - * new_error = ExternalRuntimeError( # <<<<<<<<<<<<<< - * message=err_msg, - * code=RFC_EXTERNAL_FAILURE - */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_new_error = __pyx_t_5; - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1567 - * code=RFC_EXTERNAL_FAILURE - * ) - * fillError(new_error, serverErrorInfo) # <<<<<<<<<<<<<< - * return RFC_EXTERNAL_FAILURE - * - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1567, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1568 - * ) - * fillError(new_error, serverErrorInfo) - * return RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * - * funcDesc = RfcDescribeFunction(funcHandle, NULL) - */ - __pyx_r = RFC_EXTERNAL_FAILURE; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1561 - * # section 5.6.2 of SAP NWRFC SDK Programming Guide 7.50 - * context = get_server_context(rfcHandle, serverErrorInfo) - * if context is None: # <<<<<<<<<<<<<< - * err_msg = f"Error code {serverErrorInfo.code} when getting server context for connection '{rfcHandle}'" - * new_error = ExternalRuntimeError( - */ - } - - /* "pyrfc/_cyrfc.pyx":1570 - * return RFC_EXTERNAL_FAILURE - * - * funcDesc = RfcDescribeFunction(funcHandle, NULL) # <<<<<<<<<<<<<< - * RfcGetFunctionName(funcDesc, funcName, NULL) - * - */ - __pyx_v_funcDesc = RfcDescribeFunction(__pyx_v_funcHandle, NULL); - - /* "pyrfc/_cyrfc.pyx":1571 - * - * funcDesc = RfcDescribeFunction(funcHandle, NULL) - * RfcGetFunctionName(funcDesc, funcName, NULL) # <<<<<<<<<<<<<< - * - * func_name = wrapString(funcName) - */ - (void)(RfcGetFunctionName(__pyx_v_funcDesc, __pyx_v_funcName, NULL)); - - /* "pyrfc/_cyrfc.pyx":1573 - * 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_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_funcName, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1573, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_func_name = __pyx_t_5; - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1574 - * - * 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_5, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1574, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_func_name, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1574, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1575 - * func_name = wrapString(funcName) - * if func_name not in server_functions: - * _server_log("genericHandler", f"No metadata found for function '{function_name}'") # <<<<<<<<<<<<<< - * return RFC_NOT_FOUND - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1575, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_No_metadata_found_for_function); - __pyx_t_3 += 32; - __Pyx_GIVEREF(__pyx_kp_u_No_metadata_found_for_function); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_No_metadata_found_for_function); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_function_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_4; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8); - __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__6); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1575, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_9 = 0; - 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_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_n_u_genericHandler, __pyx_t_8}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1575, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1576 - * if func_name not in server_functions: - * _server_log("genericHandler", f"No metadata found for function '{function_name}'") - * return RFC_NOT_FOUND # <<<<<<<<<<<<<< - * - * func_data = server_functions[func_name] - */ - __pyx_r = RFC_NOT_FOUND; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1574 - * - * func_name = wrapString(funcName) - * if func_name not in server_functions: # <<<<<<<<<<<<<< - * _server_log("genericHandler", f"No metadata found for function '{function_name}'") - * return RFC_NOT_FOUND - */ - } - - /* "pyrfc/_cyrfc.pyx":1578 - * return RFC_NOT_FOUND - * - * func_data = server_functions[func_name] # <<<<<<<<<<<<<< - * callback = func_data['callback'] - * server = func_data['server'] - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_func_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_func_data = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1579 - * - * func_data = server_functions[func_name] - * callback = func_data['callback'] # <<<<<<<<<<<<<< - * server = func_data['server'] - * # func_desc = func_data['func_desc_handle'] - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_callback = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1580 - * func_data = server_functions[func_name] - * callback = func_data['callback'] - * server = func_data['server'] # <<<<<<<<<<<<<< - * # func_desc = func_data['func_desc_handle'] - * - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_server); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_server = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1583 - * # 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_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1584 - * - * try: - * rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") - */ - __pyx_v_rc = RfcGetConnectionAttributes(__pyx_v_rfcHandle, (&__pyx_v_attributes), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1585 - * try: - * rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") - * if not server.debug: - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":1586 - * rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo) - * if rc != RFC_OK: - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") # <<<<<<<<<<<<<< - * if not server.debug: - * raise ExternalRuntimeError(message="Invalid connection handle.") - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1586, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PyTuple_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1586, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Request_for); - __pyx_t_3 += 13; - __Pyx_GIVEREF(__pyx_kp_u_Request_for); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Request_for); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u_Error_while_retrieving_connecti); - __pyx_t_3 += 52; - __Pyx_GIVEREF(__pyx_kp_u_Error_while_retrieving_connecti); - PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_Error_while_retrieving_connecti); - __pyx_t_6 = __Pyx_PyUnicode_From_RFC_RC(__pyx_v_rc, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_INCREF(__pyx_kp_u__25); - __pyx_t_3 += 2; - __Pyx_GIVEREF(__pyx_kp_u__25); - PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_kp_u__25); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_8, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_n_u_genericHandler, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __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(0, 1586, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1587 - * if rc != RFC_OK: - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") - * if not server.debug: # <<<<<<<<<<<<<< - * raise ExternalRuntimeError(message="Invalid connection handle.") - * conn_attr = {} - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_server, __pyx_n_s_debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1587, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = (!__pyx_t_2); - if (unlikely(__pyx_t_13)) { - - /* "pyrfc/_cyrfc.pyx":1588 - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") - * if not server.debug: - * raise ExternalRuntimeError(message="Invalid connection handle.") # <<<<<<<<<<<<<< - * conn_attr = {} - * else: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1588, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_message, __pyx_kp_u_Invalid_connection_handle) < 0) __PYX_ERR(0, 1588, __pyx_L5_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1588, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_6, 0, 0, 0); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 1588, __pyx_L5_error) - - /* "pyrfc/_cyrfc.pyx":1587 - * if rc != RFC_OK: - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") - * if not server.debug: # <<<<<<<<<<<<<< - * raise ExternalRuntimeError(message="Invalid connection handle.") - * conn_attr = {} - */ - } - - /* "pyrfc/_cyrfc.pyx":1589 - * if not server.debug: - * raise ExternalRuntimeError(message="Invalid connection handle.") - * conn_attr = {} # <<<<<<<<<<<<<< - * else: - * conn_attr = wrapConnectionAttributes(attributes) - */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1589, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_conn_attr = __pyx_t_6; - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":1585 - * try: - * rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * _server_log("genericHandler", f"Request for '{func_name}': Error while retrieving connection attributes (rc={rc}).") - * if not server.debug: - */ - goto __pyx_L11; - } - - /* "pyrfc/_cyrfc.pyx":1591 - * conn_attr = {} - * else: - * conn_attr = wrapConnectionAttributes(attributes) # <<<<<<<<<<<<<< - * _server_log( - * "genericHandler", - */ - /*else*/ { - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(__pyx_v_attributes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1591, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_conn_attr = __pyx_t_6; - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":1592 - * else: - * conn_attr = wrapConnectionAttributes(attributes) - * _server_log( # <<<<<<<<<<<<<< - * "genericHandler", - * "User '{user}' from system '{sysId}' client '{client}' host '{partnerHost}' invokes '{func_name}'" - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1592, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - - /* "pyrfc/_cyrfc.pyx":1595 - * "genericHandler", - * "User '{user}' from system '{sysId}' client '{client}' host '{partnerHost}' invokes '{func_name}'" - * .format(func_name=func_name, **conn_attr) # <<<<<<<<<<<<<< - * ) - * - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_User_user_from_system_sysId_clie, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1595, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_func_name, __pyx_v_func_name) < 0) __PYX_ERR(0, 1595, __pyx_L5_error) - __pyx_t_8 = __pyx_t_7; - __pyx_t_7 = 0; - if (unlikely(__pyx_v_conn_attr == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 1595, __pyx_L5_error) - } - if (__Pyx_MergeKeywords(__pyx_t_8, __pyx_v_conn_attr) < 0) __PYX_ERR(0, 1595, __pyx_L5_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1595, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_n_u_genericHandler, __pyx_t_7}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1592, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_L11:; - - /* "pyrfc/_cyrfc.pyx":1600 - * # Context of the request. Might later be extended by activeParameter information. - * request_context = { - * 'connection_attributes': conn_attr, # <<<<<<<<<<<<<< - * 'server_context': context - * } - */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1600, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_connection_attributes, __pyx_v_conn_attr) < 0) __PYX_ERR(0, 1600, __pyx_L5_error) - - /* "pyrfc/_cyrfc.pyx":1601 - * request_context = { - * 'connection_attributes': conn_attr, - * 'server_context': context # <<<<<<<<<<<<<< - * } - * - */ - if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_server_context, __pyx_v_context) < 0) __PYX_ERR(0, 1600, __pyx_L5_error) - __pyx_v_request_context = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":1605 - * - * # Authorization check - * auth_function = server_context["auth_check"] # <<<<<<<<<<<<<< - * rc = auth_function(func_name, request_context) - * if rc != RFC_OK: - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_server_context); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1605, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_6, __pyx_n_u_auth_check); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1605, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_auth_function = __pyx_t_5; - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1606 - * # 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_6 = __pyx_v_auth_function; __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; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_v_func_name, __pyx_v_request_context}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1606, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_14 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1606, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_rc = __pyx_t_14; - - /* "pyrfc/_cyrfc.pyx":1607 - * auth_function = server_context["auth_check"] - * rc = auth_function(func_name, request_context) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * new_error = ExternalRuntimeError( - * message=f"Authentication exception raised by callback function: '{func_name}'", - */ - __pyx_t_13 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_13) { - - /* "pyrfc/_cyrfc.pyx":1608 - * rc = auth_function(func_name, request_context) - * if rc != RFC_OK: - * new_error = ExternalRuntimeError( # <<<<<<<<<<<<<< - * message=f"Authentication exception raised by callback function: '{func_name}'", - * code=RFC_EXTERNAL_FAILURE - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1608, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - - /* "pyrfc/_cyrfc.pyx":1609 - * if rc != RFC_OK: - * new_error = ExternalRuntimeError( - * message=f"Authentication exception raised by callback function: '{func_name}'", # <<<<<<<<<<<<<< - * code=RFC_EXTERNAL_FAILURE - * ) - */ - __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1609, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1609, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Authentication_exception_raised); - __pyx_t_3 += 55; - __Pyx_GIVEREF(__pyx_kp_u_Authentication_exception_raised); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Authentication_exception_raised); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1609, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_4; - __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8); - __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_3 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u__6); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1609, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_message, __pyx_t_8) < 0) __PYX_ERR(0, 1609, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1610 - * new_error = ExternalRuntimeError( - * message=f"Authentication exception raised by callback function: '{func_name}'", - * code=RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * ) - * fillError(new_error, serverErrorInfo) - */ - __pyx_t_8 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1610, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_code, __pyx_t_8) < 0) __PYX_ERR(0, 1609, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1608 - * rc = auth_function(func_name, request_context) - * if rc != RFC_OK: - * new_error = ExternalRuntimeError( # <<<<<<<<<<<<<< - * message=f"Authentication exception raised by callback function: '{func_name}'", - * code=RFC_EXTERNAL_FAILURE - */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1608, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_new_error = __pyx_t_8; - __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1612 - * code=RFC_EXTERNAL_FAILURE - * ) - * fillError(new_error, serverErrorInfo) # <<<<<<<<<<<<<< - * return RFC_EXTERNAL_FAILURE - * - */ - __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1612, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1613 - * ) - * fillError(new_error, serverErrorInfo) - * return RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * - * # Filter out variables that are of direction u'RFC_EXPORT' - */ - __pyx_r = RFC_EXTERNAL_FAILURE; - goto __pyx_L9_try_return; - - /* "pyrfc/_cyrfc.pyx":1607 - * auth_function = server_context["auth_check"] - * rc = auth_function(func_name, request_context) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * new_error = ExternalRuntimeError( - * message=f"Authentication exception raised by callback function: '{func_name}'", - */ - } - - /* "pyrfc/_cyrfc.pyx":1617 - * # Filter out variables that are of direction u'RFC_EXPORT' - * # (these will be set by the callback function) - * func_handle_variables = wrapResult(funcDesc, funcHandle, RFC_EXPORT, server.rstrip) # <<<<<<<<<<<<<< - * - * # Invoke callback function - */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_server, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1617, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapResult(__pyx_v_funcDesc, __pyx_v_funcHandle, RFC_EXPORT, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1617, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_func_handle_variables = __pyx_t_6; - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":1620 - * - * # Invoke callback function - * result = callback(request_context, **func_handle_variables) # <<<<<<<<<<<<<< - * - * # Return results - */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1620, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_v_request_context); - __Pyx_GIVEREF(__pyx_v_request_context); - PyTuple_SET_ITEM(__pyx_t_6, 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, 1620, __pyx_L5_error) - } - if (likely(PyDict_CheckExact(__pyx_v_func_handle_variables))) { - __pyx_t_8 = PyDict_Copy(__pyx_v_func_handle_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1620, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - } else { - __pyx_t_8 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_func_handle_variables); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1620, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - } - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_callback, __pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1620, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_result = __pyx_t_5; - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1623 - * - * # Return results - * if context["call_type"] != UnitCallType.background_unit: # <<<<<<<<<<<<<< - * for name, value in result.iteritems(): - * fillFunctionParameter(funcDesc, funcHandle, name, value) - */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_context, __pyx_n_u_call_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1623, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_UnitCallType); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1623, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_background_unit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1623, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1623, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1623, __pyx_L5_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__pyx_t_13) { - - /* "pyrfc/_cyrfc.pyx":1624 - * # Return results - * if context["call_type"] != UnitCallType.background_unit: - * for name, value in result.iteritems(): # <<<<<<<<<<<<<< - * fillFunctionParameter(funcDesc, funcHandle, name, value) - * - */ - __pyx_t_3 = 0; - if (unlikely(__pyx_v_result == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(0, 1624, __pyx_L5_error) - } - __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_result, 0, __pyx_n_s_iteritems, (&__pyx_t_15), (&__pyx_t_9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1624, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); - __pyx_t_8 = __pyx_t_6; - __pyx_t_6 = 0; - while (1) { - __pyx_t_16 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_15, &__pyx_t_3, &__pyx_t_6, &__pyx_t_5, NULL, __pyx_t_9); - if (unlikely(__pyx_t_16 == 0)) break; - if (unlikely(__pyx_t_16 == -1)) __PYX_ERR(0, 1624, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_5); - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1625 - * if context["call_type"] != UnitCallType.background_unit: - * for name, value in result.iteritems(): - * fillFunctionParameter(funcDesc, funcHandle, name, value) # <<<<<<<<<<<<<< - * - * # Server exception handling: cf. SAP NetWeaver RFC SDK 7.50 - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(__pyx_v_funcDesc, __pyx_v_funcHandle, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1625, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1623 - * - * # Return results - * if context["call_type"] != UnitCallType.background_unit: # <<<<<<<<<<<<<< - * for name, value in result.iteritems(): - * fillFunctionParameter(funcDesc, funcHandle, name, value) - */ - } - - /* "pyrfc/_cyrfc.pyx":1583 - * # func_desc = func_data['func_desc_handle'] - * - * try: # <<<<<<<<<<<<<< - * rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo) - * if rc != RFC_OK: - */ - } - __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; - goto __pyx_L10_try_end; - __pyx_L5_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __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; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":1629 - * # Server exception handling: cf. SAP NetWeaver RFC SDK 7.50 - * # 5.1 Preparing a Server Program for Receiving RFC Requests - * except ExternalRuntimeError as e: # System failure # <<<<<<<<<<<<<< - * # Parameter: message (optional: msg_type, msg_class, msg_number, msg_v1-v4) - * # returns: RFC_EXTERNAL_FAILURE - */ - __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1629, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_8, __pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_ErrRestore(__pyx_t_8, __pyx_t_5, __pyx_t_6); - __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - if (__pyx_t_9) { - __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1629, __pyx_L7_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_5); - __pyx_v_e = __pyx_t_5; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1632 - * # Parameter: message (optional: msg_type, msg_class, msg_number, msg_v1-v4) - * # returns: RFC_EXTERNAL_FAILURE - * fillError(e, serverErrorInfo) # <<<<<<<<<<<<<< - * serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.") - */ - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1632, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":1633 - * # returns: RFC_EXTERNAL_FAILURE - * fillError(e, serverErrorInfo) - * serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set. # <<<<<<<<<<<<<< - * _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.") - * return RFC_EXTERNAL_FAILURE - */ - __pyx_v_serverErrorInfo->code = RFC_EXTERNAL_FAILURE; - - /* "pyrfc/_cyrfc.pyx":1634 - * fillError(e, serverErrorInfo) - * serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.") # <<<<<<<<<<<<<< - * return RFC_EXTERNAL_FAILURE - * except ABAPRuntimeError as e: # ABAP Message - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1634, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = PyTuple_New(5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1634, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_15 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Request_for); - __pyx_t_15 += 13; - __Pyx_GIVEREF(__pyx_kp_u_Request_for); - PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_kp_u_Request_for); - __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1634, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18); - __Pyx_GIVEREF(__pyx_t_18); - PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18); - __pyx_t_18 = 0; - __Pyx_INCREF(__pyx_kp_u_raises_ExternalRuntimeError); - __pyx_t_15 += 30; - __Pyx_GIVEREF(__pyx_kp_u_raises_ExternalRuntimeError); - PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_kp_u_raises_ExternalRuntimeError); - __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1634, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18); - __Pyx_GIVEREF(__pyx_t_18); - PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_18); - __pyx_t_18 = 0; - __Pyx_INCREF(__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR); - __pyx_t_15 += 36; - __Pyx_GIVEREF(__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR); - PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR); - __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, __pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1634, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_17)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_17); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_18}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1634, __pyx_L22_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":1635 - * serverErrorInfo.code = RFC_EXTERNAL_FAILURE # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.") - * return RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * except ABAPRuntimeError as e: # ABAP Message - * # Parameter: msg_type, msg_class, msg_number, msg_v1-v4 - */ - __pyx_r = RFC_EXTERNAL_FAILURE; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L21_return; - } - - /* "pyrfc/_cyrfc.pyx":1629 - * # Server exception handling: cf. SAP NetWeaver RFC SDK 7.50 - * # 5.1 Preparing a Server Program for Receiving RFC Requests - * except ExternalRuntimeError as e: # System failure # <<<<<<<<<<<<<< - * # Parameter: message (optional: msg_type, msg_class, msg_number, msg_v1-v4) - * # returns: RFC_EXTERNAL_FAILURE - */ - /*finally:*/ { - __pyx_L22_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_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_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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_9 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_19 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - } - 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_9; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_19; - goto __pyx_L7_except_error; - } - __pyx_L21_return: { - __pyx_t_14 = __pyx_r; - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - __pyx_r = __pyx_t_14; - goto __pyx_L8_except_return; - } - } - } - - /* "pyrfc/_cyrfc.pyx":1636 - * _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.") - * return RFC_EXTERNAL_FAILURE - * except ABAPRuntimeError as e: # ABAP Message # <<<<<<<<<<<<<< - * # Parameter: msg_type, msg_class, msg_number, msg_v1-v4 - * # returns: RFC_ABAP_MESSAGE - */ - __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ABAPRuntimeError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1636, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_16 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_8, __pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_ErrRestore(__pyx_t_8, __pyx_t_5, __pyx_t_6); - __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - if (__pyx_t_16) { - __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1636, __pyx_L7_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_5); - __pyx_v_e = __pyx_t_5; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1639 - * # Parameter: msg_type, msg_class, msg_number, msg_v1-v4 - * # returns: RFC_ABAP_MESSAGE - * fillError(e, serverErrorInfo) # <<<<<<<<<<<<<< - * serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.") - */ - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1639, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":1640 - * # returns: RFC_ABAP_MESSAGE - * fillError(e, serverErrorInfo) - * serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set. # <<<<<<<<<<<<<< - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.") - * return RFC_ABAP_MESSAGE - */ - __pyx_v_serverErrorInfo->code = RFC_ABAP_MESSAGE; - - /* "pyrfc/_cyrfc.pyx":1641 - * fillError(e, serverErrorInfo) - * serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.") # <<<<<<<<<<<<<< - * return RFC_ABAP_MESSAGE - * except ABAPApplicationError as e: # ABAP Exception in implementing function - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = PyTuple_New(5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1641, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_15 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Request_for); - __pyx_t_15 += 13; - __Pyx_GIVEREF(__pyx_kp_u_Request_for); - PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_Request_for); - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1641, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_raises_ABAPRuntimeError); - __pyx_t_15 += 26; - __Pyx_GIVEREF(__pyx_kp_u_raises_ABAPRuntimeError); - PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_kp_u_raises_ABAPRuntimeError); - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1641, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE); - __pyx_t_15 += 32; - __Pyx_GIVEREF(__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE); - PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE); - __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_18, 5, __pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1641, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = NULL; - __pyx_t_16 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_18)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_18); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_16 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_18, __pyx_n_u_genericHandler, __pyx_t_17}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_16, 2+__pyx_t_16); - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1641, __pyx_L33_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":1642 - * serverErrorInfo.code = RFC_ABAP_MESSAGE # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.") - * return RFC_ABAP_MESSAGE # <<<<<<<<<<<<<< - * except ABAPApplicationError as e: # ABAP Exception in implementing function - * # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4) - */ - __pyx_r = RFC_ABAP_MESSAGE; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L32_return; - } - - /* "pyrfc/_cyrfc.pyx":1636 - * _server_log("genericHandler", f"Request for '{func_name}' raises ExternalRuntimeError {e} - code set to RFC_EXTERNAL_FAILURE.") - * return RFC_EXTERNAL_FAILURE - * except ABAPRuntimeError as e: # ABAP Message # <<<<<<<<<<<<<< - * # Parameter: msg_type, msg_class, msg_number, msg_v1-v4 - * # returns: RFC_ABAP_MESSAGE - */ - /*finally:*/ { - __pyx_L33_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_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_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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_16 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_26 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - } - 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_16; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_26; - goto __pyx_L7_except_error; - } - __pyx_L32_return: { - __pyx_t_14 = __pyx_r; - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - __pyx_r = __pyx_t_14; - goto __pyx_L8_except_return; - } - } - } - - /* "pyrfc/_cyrfc.pyx":1643 - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.") - * return RFC_ABAP_MESSAGE - * except ABAPApplicationError as e: # ABAP Exception in implementing function # <<<<<<<<<<<<<< - * # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4) - * # returns: RFC_ABAP_EXCEPTION - */ - __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ABAPApplicationError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1643, __pyx_L7_except_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_8, __pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_ErrRestore(__pyx_t_8, __pyx_t_5, __pyx_t_6); - __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - if (__pyx_t_9) { - __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) __PYX_ERR(0, 1643, __pyx_L7_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_t_5); - __pyx_v_e = __pyx_t_5; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1646 - * # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4) - * # returns: RFC_ABAP_EXCEPTION - * fillError(e, serverErrorInfo) # <<<<<<<<<<<<<< - * serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.") - */ - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_e, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":1647 - * # returns: RFC_ABAP_EXCEPTION - * fillError(e, serverErrorInfo) - * serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set. # <<<<<<<<<<<<<< - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.") - * return RFC_ABAP_EXCEPTION - */ - __pyx_v_serverErrorInfo->code = RFC_ABAP_EXCEPTION; - - /* "pyrfc/_cyrfc.pyx":1648 - * fillError(e, serverErrorInfo) - * serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.") # <<<<<<<<<<<<<< - * return RFC_ABAP_EXCEPTION - * except Exception as ex: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = PyTuple_New(5); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1648, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_15 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Request_for); - __pyx_t_15 += 13; - __Pyx_GIVEREF(__pyx_kp_u_Request_for); - PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_kp_u_Request_for); - __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1648, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18); - __Pyx_GIVEREF(__pyx_t_18); - PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18); - __pyx_t_18 = 0; - __Pyx_INCREF(__pyx_kp_u_raises_ABAPApplicationError); - __pyx_t_15 += 30; - __Pyx_GIVEREF(__pyx_kp_u_raises_ABAPApplicationError); - PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_kp_u_raises_ABAPApplicationError); - __pyx_t_18 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1648, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18); - __Pyx_GIVEREF(__pyx_t_18); - PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_18); - __pyx_t_18 = 0; - __Pyx_INCREF(__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION); - __pyx_t_15 += 34; - __Pyx_GIVEREF(__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION); - PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION); - __pyx_t_18 = __Pyx_PyUnicode_Join(__pyx_t_17, 5, __pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1648, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_17)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_17); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_n_u_genericHandler, __pyx_t_18}; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1648, __pyx_L44_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":1649 - * serverErrorInfo.code = RFC_ABAP_EXCEPTION # Overwrite code, if set. - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.") - * return RFC_ABAP_EXCEPTION # <<<<<<<<<<<<<< - * except Exception as ex: - * exctype, value = exc_info()[:2] - */ - __pyx_r = RFC_ABAP_EXCEPTION; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L43_return; - } - - /* "pyrfc/_cyrfc.pyx":1643 - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPRuntimeError {e} - code set to RFC_ABAP_MESSAGE.") - * return RFC_ABAP_MESSAGE - * except ABAPApplicationError as e: # ABAP Exception in implementing function # <<<<<<<<<<<<<< - * # Parameter: key (optional: msg_type, msg_class, msg_number, msg_v1-v4) - * # returns: RFC_ABAP_EXCEPTION - */ - /*finally:*/ { - __pyx_L44_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_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_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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_9 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_27 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - } - 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_9; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_27; - goto __pyx_L7_except_error; - } - __pyx_L43_return: { - __pyx_t_14 = __pyx_r; - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - __pyx_r = __pyx_t_14; - goto __pyx_L8_except_return; - } - } - } - - /* "pyrfc/_cyrfc.pyx":1650 - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.") - * return RFC_ABAP_EXCEPTION - * except Exception as ex: # <<<<<<<<<<<<<< - * exctype, value = exc_info()[:2] - * _server_log( - */ - __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_16) { - __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 1650, __pyx_L7_except_error) - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_5); - __pyx_v_ex = __pyx_t_5; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1651 - * return RFC_ABAP_EXCEPTION - * except Exception as ex: - * exctype, value = exc_info()[:2] # <<<<<<<<<<<<<< - * _server_log( - * "genericHandler", - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = NULL; - __pyx_t_16 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_18)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_18); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - __pyx_t_16 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_18, }; - __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_16, 0+__pyx_t_16); - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1651, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 2, NULL, NULL, &__pyx_slice__26, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { - PyObject* sequence = __pyx_t_1; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1651, __pyx_L55_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1); - } else { - __pyx_t_7 = PyList_GET_ITEM(sequence, 0); - __pyx_t_18 = PyList_GET_ITEM(sequence, 1); - } - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(__pyx_t_18); - #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1651, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1651, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_18); - #endif - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - Py_ssize_t index = -1; - __pyx_t_17 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1651, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_28 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_17); - index = 0; __pyx_t_7 = __pyx_t_28(__pyx_t_17); if (unlikely(!__pyx_t_7)) goto __pyx_L57_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - index = 1; __pyx_t_18 = __pyx_t_28(__pyx_t_17); if (unlikely(!__pyx_t_18)) goto __pyx_L57_unpacking_failed; - __Pyx_GOTREF(__pyx_t_18); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_28(__pyx_t_17), 2) < 0) __PYX_ERR(0, 1651, __pyx_L55_error) - __pyx_t_28 = NULL; - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - goto __pyx_L58_unpacking_done; - __pyx_L57_unpacking_failed:; - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_28 = NULL; - if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1651, __pyx_L55_error) - __pyx_L58_unpacking_done:; - } - __pyx_v_exctype = __pyx_t_7; - __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_18); - __pyx_t_18 = 0; - - /* "pyrfc/_cyrfc.pyx":1652 - * except Exception as ex: - * exctype, value = exc_info()[:2] - * _server_log( # <<<<<<<<<<<<<< - * "genericHandler", - * f"Request for '{func_name}' raises an invalid exception:\n Exception: {exctype}\n Values: {value}\n" - */ - __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_server_log); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1652, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_18); - - /* "pyrfc/_cyrfc.pyx":1654 - * _server_log( - * "genericHandler", - * f"Request for '{func_name}' raises an invalid exception:\n Exception: {exctype}\n Values: {value}\n" # <<<<<<<<<<<<<< - * "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n" - * "The values of the request were:\n" - */ - __pyx_t_7 = PyTuple_New(10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1654, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_15 = 0; - __pyx_t_4 = 127; - __Pyx_INCREF(__pyx_kp_u_Request_for); - __pyx_t_15 += 13; - __Pyx_GIVEREF(__pyx_kp_u_Request_for); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Request_for); - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1654, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_raises_an_invalid_exception_Exc); - __pyx_t_15 += 43; - __Pyx_GIVEREF(__pyx_kp_u_raises_an_invalid_exception_Exc); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_raises_an_invalid_exception_Exc); - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_exctype, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1654, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_Values); - __pyx_t_15 += 10; - __Pyx_GIVEREF(__pyx_kp_u_Values); - PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_u_Values); - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1654, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_Callback_functions_may_only_rai); - __pyx_t_15 += 140; - __Pyx_GIVEREF(__pyx_kp_u_Callback_functions_may_only_rai); - PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_kp_u_Callback_functions_may_only_rai); - - /* "pyrfc/_cyrfc.pyx":1657 - * "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n" - * "The values of the request were:\n" - * f"params: {func_handle_variables}\nrequest_context: {request_context}" # <<<<<<<<<<<<<< - * ) - * new_error = ExternalRuntimeError( - */ - if (unlikely(!__pyx_v_func_handle_variables)) { __Pyx_RaiseUnboundLocalError("func_handle_variables"); __PYX_ERR(0, 1657, __pyx_L55_error) } - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_func_handle_variables, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1657, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_request_context_2); - __pyx_t_15 += 18; - __Pyx_GIVEREF(__pyx_kp_u_request_context_2); - PyTuple_SET_ITEM(__pyx_t_7, 8, __pyx_kp_u_request_context_2); - if (unlikely(!__pyx_v_request_context)) { __Pyx_RaiseUnboundLocalError("request_context"); __PYX_ERR(0, 1657, __pyx_L55_error) } - __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_request_context, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1657, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_4; - __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_7, 9, __pyx_t_17); - __pyx_t_17 = 0; - - /* "pyrfc/_cyrfc.pyx":1654 - * _server_log( - * "genericHandler", - * f"Request for '{func_name}' raises an invalid exception:\n Exception: {exctype}\n Values: {value}\n" # <<<<<<<<<<<<<< - * "Callback functions may only raise ABAPApplicationError, ABAPRuntimeError, or ExternalRuntimeError.\n" - * "The values of the request were:\n" - */ - __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_7, 10, __pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1654, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_16 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_18); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_18, function); - __pyx_t_16 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_n_u_genericHandler, __pyx_t_17}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_16, 2+__pyx_t_16); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1659 - * f"params: {func_handle_variables}\nrequest_context: {request_context}" - * ) - * new_error = ExternalRuntimeError( # <<<<<<<<<<<<<< - * message="Invalid exception raised by callback function.", - * code=RFC_EXTERNAL_FAILURE - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ExternalRuntimeError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_1); - - /* "pyrfc/_cyrfc.pyx":1660 - * ) - * new_error = ExternalRuntimeError( - * message="Invalid exception raised by callback function.", # <<<<<<<<<<<<<< - * code=RFC_EXTERNAL_FAILURE - * ) - */ - __pyx_t_18 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1660, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_18); - if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_message, __pyx_kp_u_Invalid_exception_raised_by_call) < 0) __PYX_ERR(0, 1660, __pyx_L55_error) - - /* "pyrfc/_cyrfc.pyx":1661 - * new_error = ExternalRuntimeError( - * message="Invalid exception raised by callback function.", - * code=RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * ) - * fillError(new_error, serverErrorInfo) - */ - __pyx_t_17 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1661, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_code, __pyx_t_17) < 0) __PYX_ERR(0, 1660, __pyx_L55_error) - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - - /* "pyrfc/_cyrfc.pyx":1659 - * f"params: {func_handle_variables}\nrequest_context: {request_context}" - * ) - * new_error = ExternalRuntimeError( # <<<<<<<<<<<<<< - * message="Invalid exception raised by callback function.", - * code=RFC_EXTERNAL_FAILURE - */ - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1659, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF_SET(__pyx_v_new_error, __pyx_t_17); - __pyx_t_17 = 0; - - /* "pyrfc/_cyrfc.pyx":1663 - * code=RFC_EXTERNAL_FAILURE - * ) - * fillError(new_error, serverErrorInfo) # <<<<<<<<<<<<<< - * return RFC_EXTERNAL_FAILURE - * - */ - __pyx_t_17 = __pyx_f_5pyrfc_6_cyrfc_fillError(__pyx_v_new_error, __pyx_v_serverErrorInfo); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1663, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - - /* "pyrfc/_cyrfc.pyx":1664 - * ) - * fillError(new_error, serverErrorInfo) - * return RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * - * return RFC_OK - */ - __pyx_r = RFC_EXTERNAL_FAILURE; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - goto __pyx_L54_return; - } - - /* "pyrfc/_cyrfc.pyx":1650 - * _server_log("genericHandler", f"Request for '{func_name}' raises ABAPApplicationError {e} - code set to RFC_ABAP_EXCEPTION.") - * return RFC_ABAP_EXCEPTION - * except Exception as ex: # <<<<<<<<<<<<<< - * exctype, value = exc_info()[:2] - * _server_log( - */ - /*finally:*/ { - __pyx_L55_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_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_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 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_16 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_29 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - 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_16; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_29; - goto __pyx_L7_except_error; - } - __pyx_L54_return: { - __pyx_t_14 = __pyx_r; - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - __pyx_r = __pyx_t_14; - goto __pyx_L8_except_return; - } - } - } - goto __pyx_L7_except_error; - - /* "pyrfc/_cyrfc.pyx":1583 - * # func_desc = func_data['func_desc_handle'] - * - * try: # <<<<<<<<<<<<<< - * rc = RfcGetConnectionAttributes(rfcHandle, &attributes, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_L7_except_error:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L1_error; - __pyx_L9_try_return:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L0; - __pyx_L8_except_return:; - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); - goto __pyx_L0; - __pyx_L10_try_end:; - } - - /* "pyrfc/_cyrfc.pyx":1666 - * return RFC_EXTERNAL_FAILURE - * - * return RFC_OK # <<<<<<<<<<<<<< - * - * - */ - __pyx_r = RFC_OK; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1550 - * return server_context - * - * cdef RFC_RC genericHandler(RFC_CONNECTION_HANDLE rfcHandle, RFC_FUNCTION_HANDLE funcHandle, RFC_ERROR_INFO* serverErrorInfo) with gil: # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_17); - __Pyx_XDECREF(__pyx_t_18); - __Pyx_AddTraceback("pyrfc._cyrfc.genericHandler", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_context); - __Pyx_XDECREF(__pyx_v_err_msg); - __Pyx_XDECREF(__pyx_v_new_error); - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XDECREF(__pyx_v_func_data); - __Pyx_XDECREF(__pyx_v_callback); - __Pyx_XDECREF(__pyx_v_server); - __Pyx_XDECREF(__pyx_v_conn_attr); - __Pyx_XDECREF(__pyx_v_request_context); - __Pyx_XDECREF(__pyx_v_auth_function); - __Pyx_XDECREF(__pyx_v_func_handle_variables); - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XDECREF(__pyx_v_e); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_XDECREF(__pyx_v_exctype); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1708 - * cdef object _server_thread - * - * @property # <<<<<<<<<<<<<< - * def bgrfc_handlers(self): - * """Server bgRFC handlers - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_14bgrfc_handlers_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_14bgrfc_handlers_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_14bgrfc_handlers___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_14bgrfc_handlers___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":1715 - * :type: dict(str,function) - * """ - * return self.__bgRfcFunction # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1708 - * cdef object _server_thread - * - * @property # <<<<<<<<<<<<<< - * def bgrfc_handlers(self): - * """Server bgRFC handlers - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.bgrfc_handlers.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1717 - * return self.__bgRfcFunction - * - * @property # <<<<<<<<<<<<<< - * def bgrfc_handlers_count(self): - * """Server bgRFC handlers initialized - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_20bgrfc_handlers_count_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_20bgrfc_handlers_count_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_20bgrfc_handlers_count___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_20bgrfc_handlers_count___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_7genexpr__pyx_v_f = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - Py_ssize_t __pyx_t_3; - Py_ssize_t __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_t_9; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":1724 - * :type: int - * """ - * return len([f for f in self.__bgRfcFunction.values() if callable(f)]) # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1724, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__pyx_t_6 == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 1724, __pyx_L5_error) - } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_t_6, 0, __pyx_n_s_values, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1724, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_2); - __pyx_t_2 = __pyx_t_7; - __pyx_t_7 = 0; - while (1) { - __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_3, NULL, &__pyx_t_7, NULL, __pyx_t_5); - if (unlikely(__pyx_t_8 == 0)) break; - if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1724, __pyx_L5_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_f, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyCallable_Check(__pyx_7genexpr__pyx_v_f); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1724, __pyx_L5_error) - if (__pyx_t_9) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_f))) __PYX_ERR(0, 1724, __pyx_L5_error) - } - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_f); __pyx_7genexpr__pyx_v_f = 0; - goto __pyx_L9_exit_scope; - __pyx_L5_error:; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_f); __pyx_7genexpr__pyx_v_f = 0; - goto __pyx_L1_error; - __pyx_L9_exit_scope:; - } /* exit inner scope */ - __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1724, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1717 - * return self.__bgRfcFunction - * - * @property # <<<<<<<<<<<<<< - * def bgrfc_handlers_count(self): - * """Server bgRFC handlers initialized - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.bgrfc_handlers_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_7genexpr__pyx_v_f); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1726 - * return len([f for f in self.__bgRfcFunction.values() if callable(f)]) - * - * @property # <<<<<<<<<<<<<< - * def server_handle(self): - * """Server connection handle - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_13server_handle_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_13server_handle_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_13server_handle___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_13server_handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":1733 - * :type: uitptr_t - * """ - * return self._server_handle if self._server_handle is not NULL else None # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - if ((__pyx_v_self->_server_handle != NULL)) { - __pyx_t_2 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_self->_server_handle)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1733, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __pyx_t_2; - __pyx_t_2 = 0; - } else { - __Pyx_INCREF(Py_None); - __pyx_t_1 = Py_None; - } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1726 - * return len([f for f in self.__bgRfcFunction.values() if callable(f)]) - * - * @property # <<<<<<<<<<<<<< - * def server_handle(self): - * """Server connection handle - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.server_handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1735 - * return self._server_handle if self._server_handle is not NULL else None - * - * @property # <<<<<<<<<<<<<< - * def alive(self): - * """Server conection alive property - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5alive_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5alive_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_5alive___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_5alive___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":1742 - * :type: boolean - * """ - * return self._server_handle != NULL # <<<<<<<<<<<<<< - * - * def __bool__(self): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->_server_handle != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1735 - * return self._server_handle if self._server_handle is not NULL else None - * - * @property # <<<<<<<<<<<<<< - * def alive(self): - * """Server conection alive property - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.alive.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1744 - * return self._server_handle != NULL - * - * def __bool__(self): # <<<<<<<<<<<<<< - * return self.alive - * - */ - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_1__bool__(PyObject *__pyx_v_self); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_1__bool__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__bool__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server___bool__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_6Server___bool__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__bool__", 0); - - /* "pyrfc/_cyrfc.pyx":1745 - * - * def __bool__(self): - * return self.alive # <<<<<<<<<<<<<< - * - * def __cinit__(self, server_params, client_params, config=None): - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1745, __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, 1745, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1744 - * return self._server_handle != NULL - * - * def __bool__(self): # <<<<<<<<<<<<<< - * return self.alive - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.__bool__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1747 - * return self.alive - * - * def __cinit__(self, server_params, client_params, config=None): # <<<<<<<<<<<<<< - * # config parsing - * config = config or {} - */ - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_3__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_server_params = 0; - PyObject *__pyx_v_client_params = 0; - PyObject *__pyx_v_config = 0; - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_server_params,&__pyx_n_s_client_params,&__pyx_n_s_config,0}; - PyObject* values[3] = {0,0,0}; - values[2] = ((PyObject *)Py_None); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_server_params)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1747, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_client_params)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1747, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 1747, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_config); - if (value) { values[2] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1747, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1747, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1); - values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); - break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_server_params = values[0]; - __pyx_v_client_params = values[1]; - __pyx_v_config = values[2]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1747, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_2__cinit__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v_server_params, __pyx_v_client_params, __pyx_v_config); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_6Server_2__cinit__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_server_params, PyObject *__pyx_v_client_params, PyObject *__pyx_v_config) { - RFC_ERROR_INFO __pyx_v_errorInfo; - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - __Pyx_INCREF(__pyx_v_config); - - /* "pyrfc/_cyrfc.pyx":1749 - * def __cinit__(self, server_params, client_params, config=None): - * # config parsing - * config = config or {} # <<<<<<<<<<<<<< - * self.debug = config.get('debug', False) - * self.rstrip = config.get('rstrip', True) - */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_config); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1749, __pyx_L1_error) - if (!__pyx_t_2) { - } else { - __Pyx_INCREF(__pyx_v_config); - __pyx_t_1 = __pyx_v_config; - goto __pyx_L3_bool_binop_done; - } - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_t_3; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_L3_bool_binop_done:; - __Pyx_DECREF_SET(__pyx_v_config, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1750 - * # config parsing - * config = config or {} - * self.debug = config.get('debug', False) # <<<<<<<<<<<<<< - * self.rstrip = config.get('rstrip', True) - * server_context["server_log"] = config.get("server_log", False) - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_self->debug = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":1751 - * config = config or {} - * self.debug = config.get('debug', False) - * self.rstrip = config.get('rstrip', True) # <<<<<<<<<<<<<< - * server_context["server_log"] = config.get("server_log", False) - * server_context["auth_check"] = config.get("auth_check", default_auth_check) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1751, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1751, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1751, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_self->rstrip = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":1752 - * 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, 1752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_server_log_2, __pyx_t_3) < 0))) __PYX_ERR(0, 1752, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1753 - * 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, 1753, __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, 1753, __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; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_n_u_auth_check, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_n_u_auth_check, __pyx_t_3) < 0))) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1754 - * 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._server_handle_params = ConnectionParameters(**server_params) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1754, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_context); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1754, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_n_u_port, __pyx_t_1) < 0))) __PYX_ERR(0, 1754, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1756 - * server_context["port"] = config.get("port", 8080) - * - * self._server_handle_params = ConnectionParameters(**server_params) # <<<<<<<<<<<<<< - * self._client_connection = Connection(**client_params) - * self._server_thread=Thread(target=self.serve) - */ - if (unlikely(__pyx_v_server_params == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 1756, __pyx_L1_error) - } - if (likely(PyDict_CheckExact(__pyx_v_server_params))) { - __pyx_t_1 = PyDict_Copy(__pyx_v_server_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - __pyx_t_1 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_server_params); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GIVEREF(__pyx_t_3); - __Pyx_GOTREF((PyObject *)__pyx_v_self->_server_handle_params); - __Pyx_DECREF((PyObject *)__pyx_v_self->_server_handle_params); - __pyx_v_self->_server_handle_params = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)__pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1757 - * - * self._server_handle_params = ConnectionParameters(**server_params) - * self._client_connection = Connection(**client_params) # <<<<<<<<<<<<<< - * self._server_thread=Thread(target=self.serve) - * - */ - if (unlikely(__pyx_v_client_params == Py_None)) { - PyErr_SetString(PyExc_TypeError, "argument after ** must be a mapping, not NoneType"); - __PYX_ERR(0, 1757, __pyx_L1_error) - } - if (likely(PyDict_CheckExact(__pyx_v_client_params))) { - __pyx_t_3 = PyDict_Copy(__pyx_v_client_params); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - __pyx_t_3 = __Pyx_PyObject_CallOneArg((PyObject*)&PyDict_Type, __pyx_v_client_params); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1757, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF((PyObject *)__pyx_v_self->_client_connection); - __Pyx_DECREF((PyObject *)__pyx_v_self->_client_connection); - __pyx_v_self->_client_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1758 - * self._server_handle_params = ConnectionParameters(**server_params) - * self._client_connection = Connection(**client_params) - * self._server_thread=Thread(target=self.serve) # <<<<<<<<<<<<<< - * - * # Create Server - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Thread); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_serve); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_target, __pyx_t_4) < 0) __PYX_ERR(0, 1758, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_GOTREF(__pyx_v_self->_server_thread); - __Pyx_DECREF(__pyx_v_self->_server_thread); - __pyx_v_self->_server_thread = __pyx_t_4; - __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":1762 - * # Create Server - * cdef RFC_ERROR_INFO errorInfo - * with nogil: # <<<<<<<<<<<<<< - * self._server_handle = RfcCreateServer(self._server_handle_params._params, self._server_handle_params._params_count, &errorInfo) - * if errorInfo.code != RFC_OK: - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1763 - * cdef RFC_ERROR_INFO errorInfo - * with nogil: - * self._server_handle = RfcCreateServer(self._server_handle_params._params, self._server_handle_params._params_count, &errorInfo) # <<<<<<<<<<<<<< - * if errorInfo.code != RFC_OK: - * self._server_handle = NULL - */ - __pyx_v_self->_server_handle = RfcCreateServer(__pyx_v_self->_server_handle_params->_params, __pyx_v_self->_server_handle_params->_params_count, (&__pyx_v_errorInfo)); - } - - /* "pyrfc/_cyrfc.pyx":1762 - * # Create Server - * cdef RFC_ERROR_INFO errorInfo - * with nogil: # <<<<<<<<<<<<<< - * self._server_handle = RfcCreateServer(self._server_handle_params._params, self._server_handle_params._params_count, &errorInfo) - * if errorInfo.code != RFC_OK: - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L7; - } - __pyx_L7:; - } - } - - /* "pyrfc/_cyrfc.pyx":1764 - * with nogil: - * self._server_handle = RfcCreateServer(self._server_handle_params._params, self._server_handle_params._params_count, &errorInfo) - * if errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * self._server_handle = NULL - * raise wrapError(&errorInfo) - */ - __pyx_t_2 = (__pyx_v_errorInfo.code != RFC_OK); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1765 - * self._server_handle = RfcCreateServer(self._server_handle_params._params, self._server_handle_params._params_count, &errorInfo) - * if errorInfo.code != RFC_OK: - * self._server_handle = NULL # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _server_log("Server", f"{self.server_handle} created") - */ - __pyx_v_self->_server_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":1766 - * if errorInfo.code != RFC_OK: - * self._server_handle = NULL - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _server_log("Server", f"{self.server_handle} created") - * - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1766, __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, 1766, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1764 - * with nogil: - * self._server_handle = RfcCreateServer(self._server_handle_params._params, self._server_handle_params._params_count, &errorInfo) - * if errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * self._server_handle = NULL - * raise wrapError(&errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":1767 - * self._server_handle = NULL - * raise wrapError(&errorInfo) - * _server_log("Server", f"{self.server_handle} created") # <<<<<<<<<<<<<< - * - * # - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_server_handle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_5, __pyx_kp_u_created); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __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; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_n_u_Server, __pyx_t_1}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1767, __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; - - /* "pyrfc/_cyrfc.pyx":1747 - * return self.alive - * - * def __cinit__(self, server_params, client_params, config=None): # <<<<<<<<<<<<<< - * # config parsing - * config = config or {} - */ - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_config); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1782 - * - * @staticmethod - * cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["check"] - * if not callable(handler): - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCheckFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) { - PyObject *__pyx_v_handler = NULL; - PyObject *__pyx_v_unit_identifier = NULL; - PyObject *__pyx_v_ex = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - RFC_RC __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - char const *__pyx_t_15; - PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("_Server__onCheckFunction", 0); - - /* "pyrfc/_cyrfc.pyx":1783 - * @staticmethod - * cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["check"] # <<<<<<<<<<<<<< - * if not callable(handler): - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1783, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_check); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1784 - * cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["check"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1784, __pyx_L1_error) - __pyx_t_4 = (!__pyx_t_3); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1785 - * handler = Server.__bgRfcFunction["check"] - * if not callable(handler): - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") # <<<<<<<<<<<<<< - * return RCStatus.OK.value - * try: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_bgRFC_handler_onCheck_is_not_reg}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1785, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1786 - * if not callable(handler): - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value # <<<<<<<<<<<<<< - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1786, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1784 - * cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["check"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - } - - /* "pyrfc/_cyrfc.pyx":1787 - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1788 - * return RCStatus.OK.value - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) # <<<<<<<<<<<<<< - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_unit_identifier = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1789 - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value # <<<<<<<<<<<<<< - * except Exception as ex: - * _server_log("Error in bgRFC handler onCheck:", ex) - */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_handler); - __pyx_t_5 = __pyx_v_handler; __pyx_t_11 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_v_unit_identifier}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1789, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1789, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L8_try_return; - - /* "pyrfc/_cyrfc.pyx":1787 - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - } - __pyx_L4_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1790 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onCheck:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_6) { - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onCheckFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1790, __pyx_L6_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_ex = __pyx_t_2; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1791 - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - * _server_log("Error in bgRFC handler onCheck:", ex) # <<<<<<<<<<<<<< - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_server_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1791, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onCheck, __pyx_v_ex}; - __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1791, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - - /* "pyrfc/_cyrfc.pyx":1792 - * except Exception as ex: - * _server_log("Error in bgRFC handler onCheck:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value # <<<<<<<<<<<<<< - * - * @staticmethod - */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1792, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1792, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1792, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1792, __pyx_L15_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_r = __pyx_t_7; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L14_return; - } - - /* "pyrfc/_cyrfc.pyx":1790 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onCheck:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - /*finally:*/ { - __pyx_L15_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_19, &__pyx_t_20, &__pyx_t_21); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __pyx_t_6 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); - } - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; - goto __pyx_L6_except_error; - } - __pyx_L14_return: { - __pyx_t_7 = __pyx_r; - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L7_except_return; - } - } - } - goto __pyx_L6_except_error; - - /* "pyrfc/_cyrfc.pyx":1787 - * _server_log("bgRFC handler onCheck is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - __pyx_L6_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L1_error; - __pyx_L8_try_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - __pyx_L7_except_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - } - - /* "pyrfc/_cyrfc.pyx":1782 - * - * @staticmethod - * cdef RFC_RC __onCheckFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["check"] - * if not callable(handler): - */ - - /* 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_11); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onCheckFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_handler); - __Pyx_XDECREF(__pyx_v_unit_identifier); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1795 - * - * @staticmethod - * cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["commit"] - * if not callable(handler): - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCommitFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) { - PyObject *__pyx_v_handler = NULL; - PyObject *__pyx_v_unit_identifier = NULL; - PyObject *__pyx_v_ex = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - RFC_RC __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - char const *__pyx_t_15; - PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("_Server__onCommitFunction", 0); - - /* "pyrfc/_cyrfc.pyx":1796 - * @staticmethod - * cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["commit"] # <<<<<<<<<<<<<< - * if not callable(handler): - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1796, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_commit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1797 - * cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["commit"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1797, __pyx_L1_error) - __pyx_t_4 = (!__pyx_t_3); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1798 - * handler = Server.__bgRfcFunction["commit"] - * if not callable(handler): - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") # <<<<<<<<<<<<<< - * return RCStatus.OK.value - * try: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_bgRFC_handler_onCommit_is_not_re}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1799 - * if not callable(handler): - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value # <<<<<<<<<<<<<< - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1799, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1799, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1799, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1797 - * cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["commit"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - } - - /* "pyrfc/_cyrfc.pyx":1800 - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1801 - * return RCStatus.OK.value - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) # <<<<<<<<<<<<<< - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_unit_identifier = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1802 - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value # <<<<<<<<<<<<<< - * except Exception as ex: - * _server_log("Error in bgRFC handler onCommit:", ex) - */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_handler); - __pyx_t_5 = __pyx_v_handler; __pyx_t_11 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_v_unit_identifier}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1802, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L8_try_return; - - /* "pyrfc/_cyrfc.pyx":1800 - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - } - __pyx_L4_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1803 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onCommit:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_6) { - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onCommitFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1803, __pyx_L6_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_ex = __pyx_t_2; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1804 - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - * _server_log("Error in bgRFC handler onCommit:", ex) # <<<<<<<<<<<<<< - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_server_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1804, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onCommit, __pyx_v_ex}; - __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1804, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - - /* "pyrfc/_cyrfc.pyx":1805 - * except Exception as ex: - * _server_log("Error in bgRFC handler onCommit:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value # <<<<<<<<<<<<<< - * - * @staticmethod - */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1805, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1805, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1805, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1805, __pyx_L15_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_r = __pyx_t_7; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L14_return; - } - - /* "pyrfc/_cyrfc.pyx":1803 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onCommit:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - /*finally:*/ { - __pyx_L15_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_19, &__pyx_t_20, &__pyx_t_21); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __pyx_t_6 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); - } - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; - goto __pyx_L6_except_error; - } - __pyx_L14_return: { - __pyx_t_7 = __pyx_r; - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L7_except_return; - } - } - } - goto __pyx_L6_except_error; - - /* "pyrfc/_cyrfc.pyx":1800 - * _server_log("bgRFC handler onCommit is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - __pyx_L6_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L1_error; - __pyx_L8_try_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - __pyx_L7_except_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - } - - /* "pyrfc/_cyrfc.pyx":1795 - * - * @staticmethod - * cdef RFC_RC __onCommitFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["commit"] - * if not callable(handler): - */ - - /* 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_11); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onCommitFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_handler); - __Pyx_XDECREF(__pyx_v_unit_identifier); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1808 - * - * @staticmethod - * cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["rollback"] - * if not callable(handler): - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onRollbackFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) { - PyObject *__pyx_v_handler = NULL; - PyObject *__pyx_v_unit_identifier = NULL; - PyObject *__pyx_v_ex = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - RFC_RC __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - char const *__pyx_t_15; - PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("_Server__onRollbackFunction", 0); - - /* "pyrfc/_cyrfc.pyx":1809 - * @staticmethod - * cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["rollback"] # <<<<<<<<<<<<<< - * if not callable(handler): - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1809, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_rollback); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1809, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1810 - * cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["rollback"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1810, __pyx_L1_error) - __pyx_t_4 = (!__pyx_t_3); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1811 - * handler = Server.__bgRfcFunction["rollback"] - * if not callable(handler): - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") # <<<<<<<<<<<<<< - * return RCStatus.OK.value - * try: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_bgRFC_handler_onRollback_is_not}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1812 - * if not callable(handler): - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value # <<<<<<<<<<<<<< - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1812, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1812, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1812, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1812, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1810 - * cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["rollback"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - } - - /* "pyrfc/_cyrfc.pyx":1813 - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1814 - * return RCStatus.OK.value - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) # <<<<<<<<<<<<<< - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1814, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_unit_identifier = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1815 - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value # <<<<<<<<<<<<<< - * except Exception as ex: - * _server_log("Error in bgRFC handler onRollback:", ex) - */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1815, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_handler); - __pyx_t_5 = __pyx_v_handler; __pyx_t_11 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_v_unit_identifier}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1815, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1815, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1815, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L8_try_return; - - /* "pyrfc/_cyrfc.pyx":1813 - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - } - __pyx_L4_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1816 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onRollback:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_6) { - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onRollbackFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1816, __pyx_L6_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_ex = __pyx_t_2; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1817 - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - * _server_log("Error in bgRFC handler onRollback:", ex) # <<<<<<<<<<<<<< - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_server_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1817, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onRollbac, __pyx_v_ex}; - __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1817, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - - /* "pyrfc/_cyrfc.pyx":1818 - * except Exception as ex: - * _server_log("Error in bgRFC handler onRollback:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value # <<<<<<<<<<<<<< - * - * @staticmethod - */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1818, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1818, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1818, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1818, __pyx_L15_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_r = __pyx_t_7; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L14_return; - } - - /* "pyrfc/_cyrfc.pyx":1816 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onRollback:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - /*finally:*/ { - __pyx_L15_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_19, &__pyx_t_20, &__pyx_t_21); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __pyx_t_6 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); - } - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; - goto __pyx_L6_except_error; - } - __pyx_L14_return: { - __pyx_t_7 = __pyx_r; - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L7_except_return; - } - } - } - goto __pyx_L6_except_error; - - /* "pyrfc/_cyrfc.pyx":1813 - * _server_log("bgRFC handler onRollback is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - __pyx_L6_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L1_error; - __pyx_L8_try_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - __pyx_L7_except_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - } - - /* "pyrfc/_cyrfc.pyx":1808 - * - * @staticmethod - * cdef RFC_RC __onRollbackFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["rollback"] - * if not callable(handler): - */ - - /* 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_11); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onRollbackFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_handler); - __Pyx_XDECREF(__pyx_v_unit_identifier); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1821 - * - * @staticmethod - * cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["confirm"] - * if not callable(handler): - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onConfirmFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier) { - PyObject *__pyx_v_handler = NULL; - PyObject *__pyx_v_unit_identifier = NULL; - PyObject *__pyx_v_ex = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - RFC_RC __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - char const *__pyx_t_15; - PyObject *__pyx_t_16 = NULL; - PyObject *__pyx_t_17 = NULL; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("_Server__onConfirmFunction", 0); - - /* "pyrfc/_cyrfc.pyx":1822 - * @staticmethod - * cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["confirm"] # <<<<<<<<<<<<<< - * if not callable(handler): - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_confirm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1823 - * cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["confirm"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1823, __pyx_L1_error) - __pyx_t_4 = (!__pyx_t_3); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1824 - * handler = Server.__bgRfcFunction["confirm"] - * if not callable(handler): - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") # <<<<<<<<<<<<<< - * return RCStatus.OK.value - * try: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_bgRFC_handler_onConfirm_is_not_r}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1825 - * if not callable(handler): - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value # <<<<<<<<<<<<<< - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1823 - * cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: - * handler = Server.__bgRfcFunction["confirm"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - */ - } - - /* "pyrfc/_cyrfc.pyx":1826 - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1827 - * return RCStatus.OK.value - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) # <<<<<<<<<<<<<< - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_unit_identifier = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1828 - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value # <<<<<<<<<<<<<< - * except Exception as ex: - * _server_log("Error in bgRFC handler onConfirm:", ex) - */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1828, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_handler); - __pyx_t_5 = __pyx_v_handler; __pyx_t_11 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_v_unit_identifier}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1828, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_5)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1828, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L8_try_return; - - /* "pyrfc/_cyrfc.pyx":1826 - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - } - __pyx_L4_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1829 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onConfirm:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_6) { - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onConfirmFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1829, __pyx_L6_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_t_2); - __pyx_v_ex = __pyx_t_2; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1830 - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: - * _server_log("Error in bgRFC handler onConfirm:", ex) # <<<<<<<<<<<<<< - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_server_log); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1830, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_kp_u_Error_in_bgRFC_handler_onConfirm, __pyx_v_ex}; - __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1830, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - - /* "pyrfc/_cyrfc.pyx":1831 - * except Exception as ex: - * _server_log("Error in bgRFC handler onConfirm:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value # <<<<<<<<<<<<<< - * - * @staticmethod - */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1831, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1831, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1831, __pyx_L15_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1831, __pyx_L15_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_r = __pyx_t_7; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L14_return; - } - - /* "pyrfc/_cyrfc.pyx":1829 - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onConfirm:", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - /*finally:*/ { - __pyx_L15_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 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_19, &__pyx_t_20, &__pyx_t_21); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_17); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __pyx_t_6 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); - } - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_17); - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); - __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; - goto __pyx_L6_except_error; - } - __pyx_L14_return: { - __pyx_t_7 = __pyx_r; - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L7_except_return; - } - } - } - goto __pyx_L6_except_error; - - /* "pyrfc/_cyrfc.pyx":1826 - * _server_log("bgRFC handler onConfirm is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.OK.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * return handler(rfcHandle, unit_identifier).value - */ - __pyx_L6_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L1_error; - __pyx_L8_try_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - __pyx_L7_except_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - } - - /* "pyrfc/_cyrfc.pyx":1821 - * - * @staticmethod - * cdef RFC_RC __onConfirmFunction(RFC_CONNECTION_HANDLE rfcHandle, const RFC_UNIT_IDENTIFIER *identifier) with gil: # <<<<<<<<<<<<<< - * handler = Server.__bgRfcFunction["confirm"] - * if not callable(handler): - */ - - /* 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_11); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onConfirmFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_handler); - __Pyx_XDECREF(__pyx_v_unit_identifier); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1834 - * - * @staticmethod - * cdef RFC_RC __onGetStateFunction( # <<<<<<<<<<<<<< - * RFC_CONNECTION_HANDLE rfcHandle, - * const RFC_UNIT_IDENTIFIER *identifier, - */ - -static RFC_RC __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onGetStateFunction(RFC_CONNECTION_HANDLE __pyx_v_rfcHandle, RFC_UNIT_IDENTIFIER const *__pyx_v_identifier, RFC_UNIT_STATE *__pyx_v_unitState) { - PyObject *__pyx_v_handler = NULL; - PyObject *__pyx_v_unit_identifier = NULL; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v_ex = NULL; - RFC_RC __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - RFC_RC __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - Py_ssize_t __pyx_t_12; - Py_UCS4 __pyx_t_13; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - int __pyx_t_16; - char const *__pyx_t_17; - PyObject *__pyx_t_18 = NULL; - PyObject *__pyx_t_19 = NULL; - PyObject *__pyx_t_20 = NULL; - PyObject *__pyx_t_21 = NULL; - PyObject *__pyx_t_22 = NULL; - PyObject *__pyx_t_23 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); - #endif - __Pyx_RefNannySetupContext("_Server__onGetStateFunction", 0); - - /* "pyrfc/_cyrfc.pyx":1839 - * RFC_UNIT_STATE *unitState - * ) with gil: - * handler = Server.__bgRfcFunction["getState"] # <<<<<<<<<<<<<< - * if not callable(handler): - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_getState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_handler = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1840 - * ) with gil: - * handler = Server.__bgRfcFunction["getState"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - __pyx_t_3 = __Pyx_PyCallable_Check(__pyx_v_handler); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1840, __pyx_L1_error) - __pyx_t_4 = (!__pyx_t_3); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1841 - * handler = Server.__bgRfcFunction["getState"] - * if not callable(handler): - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") # <<<<<<<<<<<<<< - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * try: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; - __pyx_t_6 = 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u_bgRFC_handler_onGetState_is_not}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1842 - * if not callable(handler): - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.RFC_EXTERNAL_FAILURE.value # <<<<<<<<<<<<<< - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1842, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1840 - * ) with gil: - * handler = Server.__bgRfcFunction["getState"] - * if not callable(handler): # <<<<<<<<<<<<<< - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - } - - /* "pyrfc/_cyrfc.pyx":1843 - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * state = handler(rfcHandle, unit_identifier) - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1844 - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) # <<<<<<<<<<<<<< - * state = handler(rfcHandle, unit_identifier) - * # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50 - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier((__pyx_v_identifier[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_unit_identifier = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1845 - * try: - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * state = handler(rfcHandle, unit_identifier) # <<<<<<<<<<<<<< - * # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50 - * if state == UnitState.created or state == UnitState.executed: - */ - __pyx_t_1 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_rfcHandle)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_handler); - __pyx_t_5 = __pyx_v_handler; __pyx_t_11 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_11); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_v_unit_identifier}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_v_state = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1847 - * state = handler(rfcHandle, unit_identifier) - * # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50 - * if state == UnitState.created or state == UnitState.executed: # <<<<<<<<<<<<<< - * unitState[0] = RFC_UNIT_IN_PROCESS - * elif state == UnitState.committed: - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_created_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!__pyx_t_3) { - } else { - __pyx_t_4 = __pyx_t_3; - goto __pyx_L11_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_executed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1847, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __pyx_t_3; - __pyx_L11_bool_binop_done:; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1848 - * # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50 - * if state == UnitState.created or state == UnitState.executed: - * unitState[0] = RFC_UNIT_IN_PROCESS # <<<<<<<<<<<<<< - * elif state == UnitState.committed: - * idunitStateentifier[0] = RFC_UNIT_COMMITTED - */ - (__pyx_v_unitState[0]) = RFC_UNIT_IN_PROCESS; - - /* "pyrfc/_cyrfc.pyx":1847 - * state = handler(rfcHandle, unit_identifier) - * # section 5.6.3 pg 84 of SAP NWRFC SDK Programming Guide 7.50 - * if state == UnitState.created or state == UnitState.executed: # <<<<<<<<<<<<<< - * unitState[0] = RFC_UNIT_IN_PROCESS - * elif state == UnitState.committed: - */ - goto __pyx_L10; - } - - /* "pyrfc/_cyrfc.pyx":1849 - * if state == UnitState.created or state == UnitState.executed: - * unitState[0] = RFC_UNIT_IN_PROCESS - * elif state == UnitState.committed: # <<<<<<<<<<<<<< - * idunitStateentifier[0] = RFC_UNIT_COMMITTED - * elif state == UnitState.rolled_back: - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_committed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1849, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1849, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1850 - * unitState[0] = RFC_UNIT_IN_PROCESS - * elif state == UnitState.committed: - * idunitStateentifier[0] = RFC_UNIT_COMMITTED # <<<<<<<<<<<<<< - * elif state == UnitState.rolled_back: - * unitState[0] = RFC_UNIT_ROLLED_BACK - */ - __pyx_t_2 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_COMMITTED); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_idunitStateentifier); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1850, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - if (unlikely((__Pyx_SetItemInt(__pyx_t_5, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 1850, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1849 - * if state == UnitState.created or state == UnitState.executed: - * unitState[0] = RFC_UNIT_IN_PROCESS - * elif state == UnitState.committed: # <<<<<<<<<<<<<< - * idunitStateentifier[0] = RFC_UNIT_COMMITTED - * elif state == UnitState.rolled_back: - */ - goto __pyx_L10; - } - - /* "pyrfc/_cyrfc.pyx":1851 - * elif state == UnitState.committed: - * idunitStateentifier[0] = RFC_UNIT_COMMITTED - * elif state == UnitState.rolled_back: # <<<<<<<<<<<<<< - * unitState[0] = RFC_UNIT_ROLLED_BACK - * elif state == UnitState.confirmed: - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rolled_back); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1851, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1851, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1851, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":1852 - * idunitStateentifier[0] = RFC_UNIT_COMMITTED - * elif state == UnitState.rolled_back: - * unitState[0] = RFC_UNIT_ROLLED_BACK # <<<<<<<<<<<<<< - * elif state == UnitState.confirmed: - * unitState[0] = RFC_UNIT_CONFIRMED - */ - (__pyx_v_unitState[0]) = RFC_UNIT_ROLLED_BACK; - - /* "pyrfc/_cyrfc.pyx":1851 - * elif state == UnitState.committed: - * idunitStateentifier[0] = RFC_UNIT_COMMITTED - * elif state == UnitState.rolled_back: # <<<<<<<<<<<<<< - * unitState[0] = RFC_UNIT_ROLLED_BACK - * elif state == UnitState.confirmed: - */ - goto __pyx_L10; - } - - /* "pyrfc/_cyrfc.pyx":1853 - * elif state == UnitState.rolled_back: - * unitState[0] = RFC_UNIT_ROLLED_BACK - * elif state == UnitState.confirmed: # <<<<<<<<<<<<<< - * unitState[0] = RFC_UNIT_CONFIRMED - * else: - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_UnitState); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_confirmed); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1853, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_v_state, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1853, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 1853, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (likely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":1854 - * unitState[0] = RFC_UNIT_ROLLED_BACK - * elif state == UnitState.confirmed: - * unitState[0] = RFC_UNIT_CONFIRMED # <<<<<<<<<<<<<< - * else: - * raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'") - */ - (__pyx_v_unitState[0]) = RFC_UNIT_CONFIRMED; - - /* "pyrfc/_cyrfc.pyx":1853 - * elif state == UnitState.rolled_back: - * unitState[0] = RFC_UNIT_ROLLED_BACK - * elif state == UnitState.confirmed: # <<<<<<<<<<<<<< - * unitState[0] = RFC_UNIT_CONFIRMED - * else: - */ - goto __pyx_L10; - } - - /* "pyrfc/_cyrfc.pyx":1856 - * unitState[0] = RFC_UNIT_CONFIRMED - * else: - * raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'") # <<<<<<<<<<<<<< - * return RCStatus.OK.value - * except Exception as ex: - */ - /*else*/ { - __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = 0; - __pyx_t_13 = 127; - __Pyx_INCREF(__pyx_kp_u_TID); - __pyx_t_12 += 4; - __Pyx_GIVEREF(__pyx_kp_u_TID); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_TID); - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit_identifier, __pyx_n_u_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_13; - __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); - __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u_invalid_state); - __pyx_t_12 += 16; - __Pyx_GIVEREF(__pyx_kp_u_invalid_state); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_invalid_state); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_state, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_13; - __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1); - __pyx_t_1 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_12 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__6); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1856, __pyx_L4_error) - } - __pyx_L10:; - - /* "pyrfc/_cyrfc.pyx":1857 - * else: - * raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'") - * return RCStatus.OK.value # <<<<<<<<<<<<<< - * except Exception as ex: - * _server_log("Error in bgRFC handler onGetState:\n", ex) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_OK); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L4_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1857, __pyx_L4_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L8_try_return; - - /* "pyrfc/_cyrfc.pyx":1843 - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * state = handler(rfcHandle, unit_identifier) - */ - } - __pyx_L4_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1858 - * raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'") - * return RCStatus.OK.value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onGetState:\n", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_6) { - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onGetStateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_5) < 0) __PYX_ERR(0, 1858, __pyx_L6_except_error) - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_1); - __pyx_v_ex = __pyx_t_1; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1859 - * return RCStatus.OK.value - * except Exception as ex: - * _server_log("Error in bgRFC handler onGetState:\n", ex) # <<<<<<<<<<<<<< - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_server_log); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1859, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) { - __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14); - if (likely(__pyx_t_15)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14); - __Pyx_INCREF(__pyx_t_15); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_14, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_15, __pyx_kp_u_Error_in_bgRFC_handler_onGetStat, __pyx_v_ex}; - __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1859, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - - /* "pyrfc/_cyrfc.pyx":1860 - * except Exception as ex: - * _server_log("Error in bgRFC handler onGetState:\n", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value # <<<<<<<<<<<<<< - * - * def bgrfc_init(self, sysId=None, bgRfcFunction=None): - */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_RCStatus); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1860, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1860, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_14); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1860, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_7 = ((RFC_RC)__Pyx_PyInt_As_RFC_RC(__pyx_t_11)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1860, __pyx_L18_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_r = __pyx_t_7; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - goto __pyx_L17_return; - } - - /* "pyrfc/_cyrfc.pyx":1858 - * raise Exception(f"TID {unit_identifier['id']} invalid state '{state}'") - * return RCStatus.OK.value - * except Exception as ex: # <<<<<<<<<<<<<< - * _server_log("Error in bgRFC handler onGetState:\n", ex) - * return RCStatus.RFC_EXTERNAL_FAILURE.value - */ - /*finally:*/ { - __pyx_L18_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_19); - __Pyx_XGOTREF(__pyx_t_20); - __Pyx_XGOTREF(__pyx_t_21); - __Pyx_XGOTREF(__pyx_t_22); - __Pyx_XGOTREF(__pyx_t_23); - __pyx_t_6 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_XGIVEREF(__pyx_t_23); - __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23); - } - __Pyx_XGIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_19); - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20); - __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17; - goto __pyx_L6_except_error; - } - __pyx_L17_return: { - __pyx_t_7 = __pyx_r; - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - __pyx_r = __pyx_t_7; - goto __pyx_L7_except_return; - } - } - } - goto __pyx_L6_except_error; - - /* "pyrfc/_cyrfc.pyx":1843 - * _server_log("bgRFC handler onGetState is not registered for server connection handle '{rfcHandle}'") - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * try: # <<<<<<<<<<<<<< - * unit_identifier = wrapUnitIdentifier(identifier[0]) - * state = handler(rfcHandle, unit_identifier) - */ - __pyx_L6_except_error:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L1_error; - __pyx_L8_try_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - __pyx_L7_except_return:; - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); - goto __pyx_L0; - } - - /* "pyrfc/_cyrfc.pyx":1834 - * - * @staticmethod - * cdef RFC_RC __onGetStateFunction( # <<<<<<<<<<<<<< - * RFC_CONNECTION_HANDLE rfcHandle, - * const RFC_UNIT_IDENTIFIER *identifier, - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_14); - __Pyx_XDECREF(__pyx_t_15); - __Pyx_AddTraceback("pyrfc._cyrfc.Server._Server__onGetStateFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = (RFC_RC) 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_handler); - __Pyx_XDECREF(__pyx_v_unit_identifier); - __Pyx_XDECREF(__pyx_v_state); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_RefNannyFinishContext(); - #ifdef WITH_THREAD - __Pyx_PyGILState_Release(__pyx_gilstate_save); - #endif - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1862 - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - * def bgrfc_init(self, sysId=None, bgRfcFunction=None): # <<<<<<<<<<<<<< - * """Installs the necessary callback functions for processing incoming bgRFC calls. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5bgrfc_init(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_4bgrfc_init, "Installs the necessary callback functions for processing incoming bgRFC calls.\n\n These functions need to be implemented by Python application and will be used by the RFC runtime.\n When no callback function is provided, the default one is used,\n not necessarily matching your application requirements.\n\n For more info search for the ``RfcInstallBgRfcHandlers`` method in\n `SAP NetWeaver RFC SDK Doxygen Documentation `_\n\n :param sysId: System ID of the SAP system for which to use this set of transaction handlers, or None\n When None value provided, the transaction handlers will be used for bgRFC calls from\n any backend system, for which no explicit handlers have been installed.\n :type sysId: string or None\n\n :param bgRfcFunction: Function callbacks\n :type bgRfcFunction: dict(str, function)\n\n * \"check\": onCheckFunction,\n * \"commit\": onCommitFunction,\n * \"rollback\": onRollbackFunction,\n * \"confirm\": onConfirmFunction,\n * \"getState\": onGetStateFunction,\n\n :return: error code, zero when no error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_5bgrfc_init = {"bgrfc_init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_5bgrfc_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_4bgrfc_init}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5bgrfc_init(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_sysId = 0; - PyObject *__pyx_v_bgRfcFunction = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("bgrfc_init (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sysId,&__pyx_n_s_bgRfcFunction,0}; - PyObject* values[2] = {0,0}; - values[0] = ((PyObject *)Py_None); - values[1] = ((PyObject *)Py_None); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sysId); - if (value) { values[0] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1862, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 1: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_bgRfcFunction); - if (value) { values[1] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1862, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "bgrfc_init") < 0)) __PYX_ERR(0, 1862, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - } - __pyx_v_sysId = values[0]; - __pyx_v_bgRfcFunction = values[1]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("bgrfc_init", 0, 0, 2, __pyx_nargs); __PYX_ERR(0, 1862, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.bgrfc_init", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_4bgrfc_init(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v_sysId, __pyx_v_bgRfcFunction); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_4bgrfc_init(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_sysId, PyObject *__pyx_v_bgRfcFunction) { - PyObject *__pyx_v_func_name = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - Py_ssize_t __pyx_t_3; - PyObject *(*__pyx_t_4)(PyObject *); - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - Py_UCS4 __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers __pyx_t_11; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("bgrfc_init", 0); - - /* "pyrfc/_cyrfc.pyx":1888 - * :return: error code, zero when no error - * """ - * if bgRfcFunction is not None: # <<<<<<<<<<<<<< - * for func_name in bgRfcFunction: - * if func_name not in Server.__bgRfcFunction: - */ - __pyx_t_1 = (__pyx_v_bgRfcFunction != Py_None); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":1889 - * """ - * if bgRfcFunction is not None: - * for func_name in bgRfcFunction: # <<<<<<<<<<<<<< - * if func_name not in Server.__bgRfcFunction: - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - */ - if (likely(PyList_CheckExact(__pyx_v_bgRfcFunction)) || PyTuple_CheckExact(__pyx_v_bgRfcFunction)) { - __pyx_t_2 = __pyx_v_bgRfcFunction; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; - __pyx_t_4 = NULL; - } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_bgRfcFunction); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1889, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L1_error) - } - for (;;) { - if (likely(!__pyx_t_4)) { - if (likely(PyList_CheckExact(__pyx_t_2))) { - if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1889, __pyx_L1_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1889, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - } else { - if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1889, __pyx_L1_error) - #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1889, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - #endif - } - } else { - __pyx_t_5 = __pyx_t_4(__pyx_t_2); - if (unlikely(!__pyx_t_5)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1889, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_5); - } - __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_5); - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1890 - * if bgRfcFunction is not None: - * for func_name in bgRfcFunction: - * if func_name not in Server.__bgRfcFunction: # <<<<<<<<<<<<<< - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - * if not callable(bgRfcFunction[func_name]): - */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1890, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_func_name, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1890, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1891 - * for func_name in bgRfcFunction: - * if func_name not in Server.__bgRfcFunction: - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") # <<<<<<<<<<<<<< - * if not callable(bgRfcFunction[func_name]): - * raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'") - */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = 0; - __pyx_t_7 = 127; - __Pyx_INCREF(__pyx_kp_u_BgRfc_callback_function_key_not); - __pyx_t_6 += 44; - __Pyx_GIVEREF(__pyx_kp_u_BgRfc_callback_function_key_not); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_BgRfc_callback_function_key_not); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1891, __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__6); - __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__6); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 1891, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1890 - * if bgRfcFunction is not None: - * for func_name in bgRfcFunction: - * if func_name not in Server.__bgRfcFunction: # <<<<<<<<<<<<<< - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - * if not callable(bgRfcFunction[func_name]): - */ - } - - /* "pyrfc/_cyrfc.pyx":1892 - * if func_name not in Server.__bgRfcFunction: - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - * if not callable(bgRfcFunction[func_name]): # <<<<<<<<<<<<<< - * raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'") - * Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name] - */ - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_bgRfcFunction, __pyx_v_func_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_t_5); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1892, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = (!__pyx_t_1); - if (unlikely(__pyx_t_9)) { - - /* "pyrfc/_cyrfc.pyx":1893 - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - * if not callable(bgRfcFunction[func_name]): - * raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'") # <<<<<<<<<<<<<< - * Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name] - * return self.install_bgrfc_handlers(sysId) - */ - __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = 0; - __pyx_t_7 = 127; - __Pyx_INCREF(__pyx_kp_u_BgRfc_callback_function_referenc); - __pyx_t_6 += 39; - __Pyx_GIVEREF(__pyx_kp_u_BgRfc_callback_function_referenc); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_BgRfc_callback_function_referenc); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1893, __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_is_not_callable); - __pyx_t_6 += 20; - __Pyx_GIVEREF(__pyx_kp_u_is_not_callable); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_is_not_callable); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_bgRfcFunction, __pyx_v_func_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_7; - __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_10); - __pyx_t_10 = 0; - __Pyx_INCREF(__pyx_kp_u__6); - __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__6); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__6); - __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 1893, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1892 - * if func_name not in Server.__bgRfcFunction: - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - * if not callable(bgRfcFunction[func_name]): # <<<<<<<<<<<<<< - * raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'") - * Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name] - */ - } - - /* "pyrfc/_cyrfc.pyx":1894 - * if not callable(bgRfcFunction[func_name]): - * raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'") - * Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name] # <<<<<<<<<<<<<< - * return self.install_bgrfc_handlers(sysId) - * - */ - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_bgRfcFunction, __pyx_v_func_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - if (unlikely((PyObject_SetItem(__pyx_t_10, __pyx_v_func_name, __pyx_t_5) < 0))) __PYX_ERR(0, 1894, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1889 - * """ - * if bgRfcFunction is not None: - * for func_name in bgRfcFunction: # <<<<<<<<<<<<<< - * if func_name not in Server.__bgRfcFunction: - * raise TypeError(f"BgRfc callback function key not supported: '{func_name}'") - */ - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1888 - * :return: error code, zero when no error - * """ - * if bgRfcFunction is not None: # <<<<<<<<<<<<<< - * for func_name in bgRfcFunction: - * if func_name not in Server.__bgRfcFunction: - */ - } - - /* "pyrfc/_cyrfc.pyx":1895 - * raise TypeError(f"BgRfc callback function referenced by '{func_name}' is not callable: '{bgRfcFunction[func_name]}'") - * Server.__bgRfcFunction[func_name] = bgRfcFunction[func_name] - * return self.install_bgrfc_handlers(sysId) # <<<<<<<<<<<<<< - * - * cdef install_bgrfc_handlers(self, sysId=None): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_11.__pyx_n = 1; - __pyx_t_11.sysId = __pyx_v_sysId; - __pyx_t_2 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server *)__pyx_v_self->__pyx_vtab)->install_bgrfc_handlers(__pyx_v_self, &__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1895, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1862 - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - * def bgrfc_init(self, sysId=None, bgRfcFunction=None): # <<<<<<<<<<<<<< - * """Installs the necessary callback functions for processing incoming bgRFC calls. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.bgrfc_init", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1897 - * return self.install_bgrfc_handlers(sysId) - * - * cdef install_bgrfc_handlers(self, sysId=None): # <<<<<<<<<<<<<< - * ucSysId = fillString(sysId) if sysId is not None else NULL - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers *__pyx_optional_args) { - PyObject *__pyx_v_sysId = ((PyObject *)Py_None); - SAP_UC *__pyx_v_ucSysId; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_v_k = NULL; - CYTHON_UNUSED PyObject *__pyx_v_v = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - SAP_UC *__pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - int __pyx_t_9; - Py_ssize_t __pyx_t_10; - Py_ssize_t __pyx_t_11; - int __pyx_t_12; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("install_bgrfc_handlers", 0); - if (__pyx_optional_args) { - if (__pyx_optional_args->__pyx_n > 0) { - __pyx_v_sysId = __pyx_optional_args->sysId; - } - } - - /* "pyrfc/_cyrfc.pyx":1898 - * - * cdef install_bgrfc_handlers(self, sysId=None): - * ucSysId = fillString(sysId) if sysId is not None else NULL # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcInstallBgRfcHandlers( - */ - __pyx_t_2 = (__pyx_v_sysId != Py_None); - if (__pyx_t_2) { - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_sysId); if (unlikely(__pyx_t_3 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1898, __pyx_L1_error) - __pyx_t_1 = __pyx_t_3; - } else { - __pyx_t_1 = NULL; - } - __pyx_v_ucSysId = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":1900 - * ucSysId = fillString(sysId) if sysId is not None else NULL - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcInstallBgRfcHandlers( # <<<<<<<<<<<<<< - * ucSysId, - * Server.__onCheckFunction, - */ - __pyx_v_rc = RfcInstallBgRfcHandlers(__pyx_v_ucSysId, __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCheckFunction, __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCommitFunction, __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onRollbackFunction, __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onConfirmFunction, __pyx_f_5pyrfc_6_cyrfc_6Server__Server__onGetStateFunction, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1909 - * &errorInfo - * ) - * free(ucSysId) # <<<<<<<<<<<<<< - * _server_log(f"Server {self.server_handle}", f"bgRFC handlers installed: {self.bgrfc_handlers_count}") - * for k, v in self.__bgRfcFunction.items(): - */ - free(__pyx_v_ucSysId); - - /* "pyrfc/_cyrfc.pyx":1910 - * ) - * free(ucSysId) - * _server_log(f"Server {self.server_handle}", f"bgRFC handlers installed: {self.bgrfc_handlers_count}") # <<<<<<<<<<<<<< - * for k, v in self.__bgRfcFunction.items(): - * _server_log(f"bgRFC handler {k}", f"{self.__bgRfcFunction[k]}") - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_server_log); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_server_handle); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_6, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Server_2, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bgrfc_handlers_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_7, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_bgRFC_handlers_installed, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_8); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":1911 - * free(ucSysId) - * _server_log(f"Server {self.server_handle}", f"bgRFC handlers installed: {self.bgrfc_handlers_count}") - * for k, v in self.__bgRfcFunction.items(): # <<<<<<<<<<<<<< - * _server_log(f"bgRFC handler {k}", f"{self.__bgRfcFunction[k]}") - * if rc != RFC_OK or errorInfo.code != RFC_OK: - */ - __pyx_t_10 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1911, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (unlikely(__pyx_t_5 == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 1911, __pyx_L1_error) - } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_t_5, 0, __pyx_n_s_items, (&__pyx_t_11), (&__pyx_t_9)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1911, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); - __pyx_t_4 = __pyx_t_7; - __pyx_t_7 = 0; - while (1) { - __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_11, &__pyx_t_10, &__pyx_t_7, &__pyx_t_5, NULL, __pyx_t_9); - if (unlikely(__pyx_t_12 == 0)) break; - if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 1911, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5); - __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1912 - * _server_log(f"Server {self.server_handle}", f"bgRFC handlers installed: {self.bgrfc_handlers_count}") - * for k, v in self.__bgRfcFunction.items(): - * _server_log(f"bgRFC handler {k}", f"{self.__bgRfcFunction[k]}") # <<<<<<<<<<<<<< - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_server_log); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_k, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_bgRFC_handler, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Server__bgRfcFunction); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_k); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_13, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_13 = NULL; - __pyx_t_12 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_13)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_13); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_7, function); - __pyx_t_12 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_13, __pyx_t_8, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_12, 2+__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":1913 - * for k, v in self.__bgRfcFunction.items(): - * _server_log(f"bgRFC handler {k}", f"{self.__bgRfcFunction[k]}") - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return rc - */ - __pyx_t_14 = (__pyx_v_rc != RFC_OK); - if (!__pyx_t_14) { - } else { - __pyx_t_2 = __pyx_t_14; - goto __pyx_L6_bool_binop_done; - } - __pyx_t_14 = (__pyx_v_errorInfo.code != RFC_OK); - __pyx_t_2 = __pyx_t_14; - __pyx_L6_bool_binop_done:; - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1914 - * _server_log(f"bgRFC handler {k}", f"{self.__bgRfcFunction[k]}") - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return rc - * - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __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, 1914, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1913 - * for k, v in self.__bgRfcFunction.items(): - * _server_log(f"bgRFC handler {k}", f"{self.__bgRfcFunction[k]}") - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return rc - */ - } - - /* "pyrfc/_cyrfc.pyx":1915 - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * return rc # <<<<<<<<<<<<<< - * - * def add_function(self, func_name, callback): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1897 - * return self.install_bgrfc_handlers(sysId) - * - * cdef install_bgrfc_handlers(self, sysId=None): # <<<<<<<<<<<<<< - * ucSysId = fillString(sysId) if sysId is not None else NULL - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_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_13); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.install_bgrfc_handlers", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_k); - __Pyx_XDECREF(__pyx_v_v); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1917 - * return rc - * - * def add_function(self, func_name, callback): # <<<<<<<<<<<<<< - * """ - * Installs a function in the server. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_6add_function, "\n Installs a function in the server.\n\n :param func_name: ABAP remote function module name\n :type func_name: string\n\n :param callback: A callback function that implements the logic.\n The function must accept a ``request_context`` parameter and\n all IMPORT, CHANGING, and TABLE parameters of the given\n ``func_desc``.\n :raises: :exc:`RFCError` if a function with the name given is already\n installed.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_7add_function = {"add_function", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_6add_function}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_func_name = 0; - PyObject *__pyx_v_callback = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - 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); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_func_name,&__pyx_n_s_callback,0}; - PyObject* values[2] = {0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_func_name)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1917, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_callback)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1917, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("add_function", 1, 2, 2, 1); __PYX_ERR(0, 1917, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "add_function") < 0)) __PYX_ERR(0, 1917, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 2)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 1917, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.add_function", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_6add_function(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v_func_name, __pyx_v_callback); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_6add_function(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_func_name, PyObject *__pyx_v_callback) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_ABAP_NAME __pyx_v_funcName; - RFC_FUNCTION_DESC_HANDLE __pyx_v_func_desc_handle; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - Py_UCS4 __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_t_9; - SAP_UC *__pyx_t_10; - PyObject *__pyx_t_11 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("add_function", 0); - - /* "pyrfc/_cyrfc.pyx":1932 - * """ - * global server_functions - * if func_name in server_functions: # <<<<<<<<<<<<<< - * raise RFCError(f"Server function '{func_name}' already installed.") - * if not self._client_connection.alive: - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __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, 1932, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":1933 - * global server_functions - * if func_name in server_functions: - * raise RFCError(f"Server function '{func_name}' already installed.") # <<<<<<<<<<<<<< - * if not self._client_connection.alive: - * self._client_connection.open() - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1933, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1933, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = 0; - __pyx_t_6 = 127; - __Pyx_INCREF(__pyx_kp_u_Server_function); - __pyx_t_5 += 17; - __Pyx_GIVEREF(__pyx_kp_u_Server_function); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Server_function); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1933, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7); - __pyx_t_7 = 0; - __Pyx_INCREF(__pyx_kp_u_already_installed); - __pyx_t_5 += 20; - __Pyx_GIVEREF(__pyx_kp_u_already_installed); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_already_installed); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1933, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_8 = 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_8 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1933, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_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, 1933, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1932 - * """ - * global server_functions - * if func_name in server_functions: # <<<<<<<<<<<<<< - * raise RFCError(f"Server function '{func_name}' already installed.") - * if not self._client_connection.alive: - */ - } - - /* "pyrfc/_cyrfc.pyx":1934 - * if func_name in server_functions: - * raise RFCError(f"Server function '{func_name}' already installed.") - * if not self._client_connection.alive: # <<<<<<<<<<<<<< - * self._client_connection.open() - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_client_connection), __pyx_n_s_alive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __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, 1934, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = (!__pyx_t_2); - if (__pyx_t_9) { - - /* "pyrfc/_cyrfc.pyx":1935 - * raise RFCError(f"Server function '{func_name}' already installed.") - * if not self._client_connection.alive: - * self._client_connection.open() # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_ABAP_NAME funcName = fillString(func_name) - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_client_connection), __pyx_n_s_open); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1935, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_7, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1935, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1934 - * if func_name in server_functions: - * raise RFCError(f"Server function '{func_name}' already installed.") - * if not self._client_connection.alive: # <<<<<<<<<<<<<< - * self._client_connection.open() - * cdef RFC_ERROR_INFO errorInfo - */ - } - - /* "pyrfc/_cyrfc.pyx":1937 - * 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) - * if errorInfo.code != RFC_OK: - */ - __pyx_t_10 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_func_name); if (unlikely(__pyx_t_10 == ((SAP_UC *)NULL))) __PYX_ERR(0, 1937, __pyx_L1_error) - memcpy(&(__pyx_v_funcName[0]), __pyx_t_10, sizeof(__pyx_v_funcName[0]) * ((30 + 1) - 0)); - - /* "pyrfc/_cyrfc.pyx":1938 - * 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) # <<<<<<<<<<<<<< - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_func_desc_handle = RfcGetFunctionDesc(__pyx_v_self->_client_connection->_handle, __pyx_v_funcName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1939 - * cdef RFC_ABAP_NAME funcName = fillString(func_name) - * cdef RFC_FUNCTION_DESC_HANDLE func_desc_handle = RfcGetFunctionDesc(self._client_connection._handle, funcName, &errorInfo) - * if errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * self._client_connection.close() - */ - __pyx_t_9 = (__pyx_v_errorInfo.code != RFC_OK); - if (unlikely(__pyx_t_9)) { - - /* "pyrfc/_cyrfc.pyx":1940 - * cdef RFC_FUNCTION_DESC_HANDLE func_desc_handle = RfcGetFunctionDesc(self._client_connection._handle, funcName, &errorInfo) - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * self._client_connection.close() - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __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, 1940, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1939 - * cdef RFC_ABAP_NAME funcName = fillString(func_name) - * cdef RFC_FUNCTION_DESC_HANDLE func_desc_handle = RfcGetFunctionDesc(self._client_connection._handle, funcName, &errorInfo) - * if errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * self._client_connection.close() - */ - } - - /* "pyrfc/_cyrfc.pyx":1941 - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * self._client_connection.close() # <<<<<<<<<<<<<< - * - * server_functions[func_name] = { - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_client_connection), __pyx_n_s_close_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1941, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_7, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1944 - * - * server_functions[func_name] = { - * "func_desc_handle": func_desc_handle, # <<<<<<<<<<<<<< - * "callback": callback, - * "server": self - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_FromSize_t(((uintptr_t)__pyx_v_func_desc_handle)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1944, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_func_desc_handle, __pyx_t_3) < 0) __PYX_ERR(0, 1944, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1945 - * server_functions[func_name] = { - * "func_desc_handle": func_desc_handle, - * "callback": callback, # <<<<<<<<<<<<<< - * "server": self - * } - */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_callback, __pyx_v_callback) < 0) __PYX_ERR(0, 1944, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1946 - * "func_desc_handle": 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, 1944, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1943 - * self._client_connection.close() - * - * server_functions[func_name] = { # <<<<<<<<<<<<<< - * "func_desc_handle": func_desc_handle, - * "callback": callback, - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1943, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_func_name, __pyx_t_1) < 0))) __PYX_ERR(0, 1943, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1949 - * } - * - * _server_log(f"Server function {func_name}", "installed") # <<<<<<<<<<<<<< - * _server_log(f"Server function {func_name}", server_functions[func_name]) - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1949, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Server_function_2, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1949, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_8 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_4, __pyx_n_u_installed}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1949, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1950 - * - * _server_log(f"Server function {func_name}", "installed") - * _server_log(f"Server function {func_name}", server_functions[func_name]) # <<<<<<<<<<<<<< - * - * def serve(self): - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_func_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Server_function_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_v_func_name); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_8 = 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_8 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_7, __pyx_t_11}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1917 - * return rc - * - * def add_function(self, func_name, callback): # <<<<<<<<<<<<<< - * """ - * Installs a function in the server. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.add_function", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1952 - * _server_log(f"Server function {func_name}", server_functions[func_name]) - * - * def serve(self): # <<<<<<<<<<<<<< - * """ - * Starts the RFC server, waiting for incoming requests and processes them. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_8serve, "\n Starts the RFC server, waiting for incoming requests and processes them.\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the server processing fails.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_9serve = {"serve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_8serve}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("serve (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("serve", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "serve", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_8serve(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_8serve(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("serve", 0); - - /* "pyrfc/_cyrfc.pyx":1962 - * cdef RFC_ERROR_INFO errorInfo - * - * cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcInstallGenericServerFunction(__pyx_f_5pyrfc_6_cyrfc_genericHandler, __pyx_f_5pyrfc_6_cyrfc_metadataLookup, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1963 - * - * 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); - 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); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1964 - * cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * rc = RfcLaunchServer(self._server_handle, &errorInfo) - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1964, __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, 1964, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1963 - * - * cdef RFC_RC rc = RfcInstallGenericServerFunction(genericHandler, metadataLookup, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":1966 - * raise wrapError(&errorInfo) - * - * rc = RfcLaunchServer(self._server_handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcLaunchServer(__pyx_v_self->_server_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":1967 - * - * rc = RfcLaunchServer(self._server_handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _server_log("Server", f"{self.server_handle} launched") - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - 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); - __pyx_t_1 = __pyx_t_2; - __pyx_L7_bool_binop_done:; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":1968 - * rc = RfcLaunchServer(self._server_handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _server_log("Server", f"{self.server_handle} launched") - * - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __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, 1968, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1967 - * - * rc = RfcLaunchServer(self._server_handle, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _server_log("Server", f"{self.server_handle} launched") - */ - } - - /* "pyrfc/_cyrfc.pyx":1969 - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * _server_log("Server", f"{self.server_handle} launched") # <<<<<<<<<<<<<< - * - * return rc - */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_server_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_server_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_6, __pyx_kp_u_launched); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_7 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_n_u_Server, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7); - __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, 1969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1971 - * _server_log("Server", f"{self.server_handle} launched") - * - * return rc # <<<<<<<<<<<<<< - * - * def start(self): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(__pyx_v_rc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":1952 - * _server_log(f"Server function {func_name}", server_functions[func_name]) - * - * def serve(self): # <<<<<<<<<<<<<< - * """ - * Starts the RFC server, waiting for incoming requests and processes them. - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.serve", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1973 - * return rc - * - * def start(self): # <<<<<<<<<<<<<< - * """ - * Start the RFC server in new thread, waiting for incoming requests and processes them. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_11start(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_10start, "\n Start the RFC server in new thread, waiting for incoming requests and processes them.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_11start = {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_11start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_10start}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_11start(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("start (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("start", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "start", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_10start(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_10start(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("start", 0); - - /* "pyrfc/_cyrfc.pyx":1977 - * Start the RFC server in new thread, waiting for incoming requests and processes them. - * """ - * self._server_thread.start() # <<<<<<<<<<<<<< - * _server_log("Server", f"{self.server_handle} started") - * - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_server_thread, __pyx_n_s_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1977, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1977, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1978 - * """ - * self._server_thread.start() - * _server_log("Server", f"{self.server_handle} started") # <<<<<<<<<<<<<< - * - * def stop(self): - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_server_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1978, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_server_handle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1978, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1978, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_5, __pyx_kp_u_started); 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; - __pyx_t_4 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_4 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_n_u_Server, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1978, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1973 - * return rc - * - * def start(self): # <<<<<<<<<<<<<< - * """ - * Start the RFC server in new thread, waiting for incoming requests and processes them. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.start", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1980 - * _server_log("Server", f"{self.server_handle} started") - * - * def stop(self): # <<<<<<<<<<<<<< - * """ - * Stop the RFC server thread. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_12stop, "\n Stop the RFC server thread.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_13stop = {"stop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_12stop}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("stop (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("stop", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "stop", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_12stop(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_12stop(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - 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; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("stop", 0); - - /* "pyrfc/_cyrfc.pyx":1984 - * Stop the RFC server thread. - * """ - * if bool(self._server_thread) and self._server_thread.is_alive(): # <<<<<<<<<<<<<< - * self._server_thread.join() - * with nogil: - */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->_server_thread); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1984, __pyx_L1_error) - if ((!(!__pyx_t_2))) { - } else { - __pyx_t_1 = (!(!__pyx_t_2)); - goto __pyx_L4_bool_binop_done; - } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_server_thread, __pyx_n_s_is_alive); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1984, __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_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; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_5, }; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1984, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1984, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":1985 - * """ - * if bool(self._server_thread) and self._server_thread.is_alive(): - * self._server_thread.join() # <<<<<<<<<<<<<< - * with nogil: - * RfcShutdownServer(self._server_handle, 60, NULL) - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_server_thread, __pyx_n_s_join); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1985, __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_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; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_5, }; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1985, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1986 - * if bool(self._server_thread) and self._server_thread.is_alive(): - * self._server_thread.join() - * with nogil: # <<<<<<<<<<<<<< - * RfcShutdownServer(self._server_handle, 60, NULL) - * _server_log("Server", f"{self.server_handle} stopped") - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":1987 - * self._server_thread.join() - * with nogil: - * RfcShutdownServer(self._server_handle, 60, NULL) # <<<<<<<<<<<<<< - * _server_log("Server", f"{self.server_handle} stopped") - * - */ - (void)(RfcShutdownServer(__pyx_v_self->_server_handle, 60, NULL)); - } - - /* "pyrfc/_cyrfc.pyx":1986 - * if bool(self._server_thread) and self._server_thread.is_alive(): - * self._server_thread.join() - * with nogil: # <<<<<<<<<<<<<< - * RfcShutdownServer(self._server_handle, 60, NULL) - * _server_log("Server", f"{self.server_handle} stopped") - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L8; - } - __pyx_L8:; - } - } - - /* "pyrfc/_cyrfc.pyx":1988 - * with nogil: - * RfcShutdownServer(self._server_handle, 60, NULL) - * _server_log("Server", f"{self.server_handle} stopped") # <<<<<<<<<<<<<< - * - * def close(self): - */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_server_log); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_server_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_7, __pyx_kp_u_stopped); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_n_u_Server, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1988, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":1984 - * Stop the RFC server thread. - * """ - * if bool(self._server_thread) and self._server_thread.is_alive(): # <<<<<<<<<<<<<< - * self._server_thread.join() - * with nogil: - */ - } - - /* "pyrfc/_cyrfc.pyx":1980 - * _server_log("Server", f"{self.server_handle} started") - * - * def stop(self): # <<<<<<<<<<<<<< - * """ - * Stop the RFC server thread. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.stop", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1990 - * _server_log("Server", f"{self.server_handle} stopped") - * - * def close(self): # <<<<<<<<<<<<<< - * """ Explicitly close the registration. - * Note that this is usually not necessary as the registration will be closed - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_15close(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_14close, " Explicitly close the registration.\n Note that this is usually not necessary as the registration will be closed\n automatically upon object destruction. However, if the the object destruction\n is delayed by the garbage collection, problems may occur when too many\n servers are registered.\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_15close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_15close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_14close}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_15close(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("close (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_14close(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_14close(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_v_after_remove = NULL; - PyObject *__pyx_v_func_name = NULL; - PyObject *__pyx_v_func_data = 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; - Py_ssize_t __pyx_t_6; - Py_ssize_t __pyx_t_7; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("close", 0); - - /* "pyrfc/_cyrfc.pyx":1997 - * servers are registered. - * """ - * self.stop() # <<<<<<<<<<<<<< - * - * # Server connection close - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_stop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1997, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2000 - * - * # Server connection close - * if self._server_handle != NULL: # <<<<<<<<<<<<<< - * with nogil: - * RfcDestroyServer(self._server_handle, NULL) - */ - __pyx_t_5 = (__pyx_v_self->_server_handle != NULL); - if (__pyx_t_5) { - - /* "pyrfc/_cyrfc.pyx":2001 - * # Server connection close - * if self._server_handle != NULL: - * with nogil: # <<<<<<<<<<<<<< - * RfcDestroyServer(self._server_handle, NULL) - * self._server_handle = NULL - */ - { - #ifdef WITH_THREAD - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - #endif - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2002 - * if self._server_handle != NULL: - * with nogil: - * RfcDestroyServer(self._server_handle, NULL) # <<<<<<<<<<<<<< - * self._server_handle = NULL - * - */ - (void)(RfcDestroyServer(__pyx_v_self->_server_handle, NULL)); - } - - /* "pyrfc/_cyrfc.pyx":2001 - * # Server connection close - * if self._server_handle != NULL: - * with nogil: # <<<<<<<<<<<<<< - * RfcDestroyServer(self._server_handle, NULL) - * self._server_handle = NULL - */ - /*finally:*/ { - /*normal exit:*/{ - #ifdef WITH_THREAD - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - #endif - goto __pyx_L6; - } - __pyx_L6:; - } - } - - /* "pyrfc/_cyrfc.pyx":2003 - * with nogil: - * RfcDestroyServer(self._server_handle, NULL) - * self._server_handle = NULL # <<<<<<<<<<<<<< - * - * # Remove all installed server functions - */ - __pyx_v_self->_server_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":2000 - * - * # Server connection close - * if self._server_handle != NULL: # <<<<<<<<<<<<<< - * with nogil: - * RfcDestroyServer(self._server_handle, NULL) - */ - } - - /* "pyrfc/_cyrfc.pyx":2007 - * # Remove all installed server functions - * global server_functions - * after_remove = {} # <<<<<<<<<<<<<< - * for func_name, func_data in server_functions.items(): - * if func_data["server"] != self: - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2007, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_after_remove = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2008 - * global server_functions - * after_remove = {} - * for func_name, func_data in server_functions.items(): # <<<<<<<<<<<<<< - * if func_data["server"] != self: - * after_remove[func_name] = func_data - */ - __pyx_t_6 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_server_functions); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__pyx_t_2 == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 2008, __pyx_L1_error) - } - __pyx_t_3 = __Pyx_dict_iterator(__pyx_t_2, 0, __pyx_n_s_items, (&__pyx_t_7), (&__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_1); - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; - while (1) { - __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_7, &__pyx_t_6, &__pyx_t_3, &__pyx_t_2, NULL, __pyx_t_4); - if (unlikely(__pyx_t_8 == 0)) break; - if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 2008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_func_name, __pyx_t_3); - __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_func_data, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2009 - * after_remove = {} - * 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_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_func_data, __pyx_n_u_server); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2009, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, ((PyObject *)__pyx_v_self), Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2009, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2009, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_5) { - - /* "pyrfc/_cyrfc.pyx":2010 - * for func_name, func_data in server_functions.items(): - * if func_data["server"] != self: - * after_remove[func_name] = func_data # <<<<<<<<<<<<<< - * server_functions = after_remove - * _server_log("Server", f"{self.server_handle} closed") - */ - if (unlikely((PyDict_SetItem(__pyx_v_after_remove, __pyx_v_func_name, __pyx_v_func_data) < 0))) __PYX_ERR(0, 2010, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2009 - * after_remove = {} - * 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_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2011 - * if func_data["server"] != self: - * after_remove[func_name] = func_data - * server_functions = after_remove # <<<<<<<<<<<<<< - * _server_log("Server", f"{self.server_handle} closed") - * - */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_functions, __pyx_v_after_remove) < 0) __PYX_ERR(0, 2011, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2012 - * after_remove[func_name] = func_data - * server_functions = after_remove - * _server_log("Server", f"{self.server_handle} closed") # <<<<<<<<<<<<<< - * - * def __dealloc__(self): - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_server_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_server_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_9, __pyx_kp_u_closed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; - __pyx_t_4 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_9); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_4 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_n_u_Server, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":1990 - * _server_log("Server", f"{self.server_handle} stopped") - * - * 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_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.close", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_after_remove); - __Pyx_XDECREF(__pyx_v_func_name); - __Pyx_XDECREF(__pyx_v_func_data); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2014 - * _server_log("Server", f"{self.server_handle} closed") - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self.close() - * - */ - -/* Python wrapper */ -static void __pyx_pw_5pyrfc_6_cyrfc_6Server_17__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5pyrfc_6_cyrfc_6Server_17__dealloc__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5pyrfc_6_cyrfc_6Server_16__dealloc__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); -} - -static void __pyx_pf_5pyrfc_6_cyrfc_6Server_16__dealloc__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - __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("__dealloc__", 0); - - /* "pyrfc/_cyrfc.pyx":2015 - * - * def __dealloc__(self): - * self.close() # <<<<<<<<<<<<<< - * - * def get_server_attributes(self): - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2015, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2014 - * _server_log("Server", f"{self.server_handle} closed") - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self.close() - * - */ - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_WriteUnraisable("pyrfc._cyrfc.Server.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_RefNannyFinishContext(); -} - -/* "pyrfc/_cyrfc.pyx":2017 - * self.close() - * - * def get_server_attributes(self): # <<<<<<<<<<<<<< - * """Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_19get_server_attributes(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_6Server_18get_server_attributes, "Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server.\n\n :returns: Dictionary with server state and attributes\n :rtype: dict(str, str or int)\n\n * serverName: This server's name as given when creating the server.\n * protocolType: This RFC server's type:\n RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER\n * registrationCount: The current number of active registrations (in case of a Registered Server)\n or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server)\n * state: Used in state information in order to indicate the current state of an RFC Server.\n * currentBusyCount: The number of requests currently being processed.\n * peakBusyCount: The maximum number of requests the server has been processing in parallel since it has been created\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_19get_server_attributes = {"get_server_attributes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_19get_server_attributes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_18get_server_attributes}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_19get_server_attributes(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("get_server_attributes (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("get_server_attributes", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_server_attributes", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_18get_server_attributes(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_18get_server_attributes(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - RFC_RC __pyx_v_rc; - RFC_SERVER_ATTRIBUTES __pyx_v_attributes; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_v_rfcServerState = NULL; - PyObject *__pyx_v_protocol_type = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_server_attributes", 0); - - /* "pyrfc/_cyrfc.pyx":2036 - * cdef RFC_ERROR_INFO errorInfo - * - * rc = RfcGetServerAttributes(self._server_handle, &attributes, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetServerAttributes(__pyx_v_self->_server_handle, (&__pyx_v_attributes), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2037 - * - * rc = RfcGetServerAttributes(self._server_handle, &attributes, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) - */ - __pyx_t_2 = (__pyx_v_rc != RFC_OK); - 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); - __pyx_t_1 = __pyx_t_2; - __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2038 - * rc = RfcGetServerAttributes(self._server_handle, &attributes, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) - * protocol_type = None - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __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, 2038, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2037 - * - * rc = RfcGetServerAttributes(self._server_handle, &attributes, &errorInfo) - * if rc != RFC_OK or errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) - */ - } - - /* "pyrfc/_cyrfc.pyx":2039 - * if rc != RFC_OK or errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) # <<<<<<<<<<<<<< - * protocol_type = None - * if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER: - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_neg_1; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(RfcGetServerStateAsString(__pyx_v_attributes.state), &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_v_rfcServerState = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2040 - * raise wrapError(&errorInfo) - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) - * protocol_type = None # <<<<<<<<<<<<<< - * if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER: - * protocol_type = "multi count" - */ - __Pyx_INCREF(Py_None); - __pyx_v_protocol_type = Py_None; - - /* "pyrfc/_cyrfc.pyx":2041 - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) - * protocol_type = None - * if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER: # <<<<<<<<<<<<<< - * protocol_type = "multi count" - * else: - */ - __pyx_t_1 = (__pyx_v_attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":2042 - * protocol_type = None - * if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER: - * protocol_type = "multi count" # <<<<<<<<<<<<<< - * else: - * protocol_type = socket.gethostname() # Own host name - */ - __Pyx_INCREF(__pyx_kp_u_multi_count); - __Pyx_DECREF_SET(__pyx_v_protocol_type, __pyx_kp_u_multi_count); - - /* "pyrfc/_cyrfc.pyx":2041 - * rfcServerState = wrapString(RfcGetServerStateAsString(attributes.state), -1, True) - * protocol_type = None - * if attributes.type == RFC_MULTI_COUNT_REGISTERED_SERVER: # <<<<<<<<<<<<<< - * protocol_type = "multi count" - * else: - */ - goto __pyx_L6; - } - - /* "pyrfc/_cyrfc.pyx":2044 - * protocol_type = "multi count" - * else: - * protocol_type = socket.gethostname() # Own host name # <<<<<<<<<<<<<< - * return { - * # This server's name as given when creating the server. - */ - /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_socket); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2044, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_gethostname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2044, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(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_7 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_5, }; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2044, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __Pyx_DECREF_SET(__pyx_v_protocol_type, __pyx_t_3); - __pyx_t_3 = 0; - } - __pyx_L6:; - - /* "pyrfc/_cyrfc.pyx":2045 - * else: - * protocol_type = socket.gethostname() # Own host name - * return { # <<<<<<<<<<<<<< - * # This server's name as given when creating the server. - * 'serverName': wrapString(attributes.serverName, -1, True) - */ - __Pyx_XDECREF(__pyx_r); - - /* "pyrfc/_cyrfc.pyx":2047 - * return { - * # This server's name as given when creating the server. - * 'serverName': wrapString(attributes.serverName, -1, True) # <<<<<<<<<<<<<< - * # This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER - * , 'protocolType': protocol_type - */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2047, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_neg_1; - __pyx_t_4.rstrip = Py_True; - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.serverName, &__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2047, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_serverName, __pyx_t_6) < 0) __PYX_ERR(0, 2047, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2049 - * 'serverName': wrapString(attributes.serverName, -1, True) - * # This RFC server's type. Will be one of RFC_MULTI_COUNT_REGISTERED_SERVER or RFC_TCP_SOCKET_SERVER - * , 'protocolType': protocol_type # <<<<<<<<<<<<<< - * # The current number of active registrations (in case of a Registered Server) - * # or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server) - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_protocolType, __pyx_v_protocol_type) < 0) __PYX_ERR(0, 2047, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2052 - * # The current number of active registrations (in case of a Registered Server) - * # or the maximum number of parallel connections the server will accept (in case of a TCP Socket Server) - * , 'registrationCount': attributes.registrationCount # <<<<<<<<<<<<<< - * # Used in state information in order to indicate the current state of an RFC Server. - * , 'state': rfcServerState - */ - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_attributes.registrationCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2052, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_registrationCount, __pyx_t_6) < 0) __PYX_ERR(0, 2047, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2054 - * , 'registrationCount': attributes.registrationCount - * # Used in state information in order to indicate the current state of an RFC Server. - * , 'state': rfcServerState # <<<<<<<<<<<<<< - * # The number of requests currently being processed. - * , 'currentBusyCount': attributes.currentBusyCount - */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_state, __pyx_v_rfcServerState) < 0) __PYX_ERR(0, 2047, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2056 - * , 'state': rfcServerState - * # The number of requests currently being processed. - * , 'currentBusyCount': attributes.currentBusyCount # <<<<<<<<<<<<<< - * # The maximum number of requests the server has been processing in parallel since it has been created - * , 'peakBusyCount': attributes.peakBusyCount - */ - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_attributes.currentBusyCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2056, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_currentBusyCount, __pyx_t_6) < 0) __PYX_ERR(0, 2047, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2058 - * , 'currentBusyCount': attributes.currentBusyCount - * # The maximum number of requests the server has been processing in parallel since it has been created - * , 'peakBusyCount': attributes.peakBusyCount # <<<<<<<<<<<<<< - * } - * - */ - __pyx_t_6 = __Pyx_PyInt_From_unsigned_int(__pyx_v_attributes.peakBusyCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2058, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_peakBusyCount, __pyx_t_6) < 0) __PYX_ERR(0, 2047, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2017 - * self.close() - * - * def get_server_attributes(self): # <<<<<<<<<<<<<< - * """Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server. - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.get_server_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_rfcServerState); - __Pyx_XDECREF(__pyx_v_protocol_type); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2061 - * } - * - * cdef _error(self, RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * """ - * Error treatment of a connection. - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_6Server__error(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, RFC_ERROR_INFO *__pyx_v_errorInfo) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_error", 0); - - /* "pyrfc/_cyrfc.pyx":2076 - * # self.alive = False - * - * raise wrapError(errorInfo) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError(__pyx_v_errorInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __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, 2076, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2061 - * } - * - * cdef _error(self, RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * """ - * Error treatment of a connection. - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Server._error", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1701 - * thereof if the connection attempt fails. - * """ - * cdef public bint debug # <<<<<<<<<<<<<< - * cdef public bint rstrip - * cdef Connection _client_connection - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_5debug___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->debug); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.debug.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_6Server_5debug_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value) { - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1701, __pyx_L1_error) - __pyx_v_self->debug = __pyx_t_1; - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.debug.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":1702 - * """ - * cdef public bint debug - * cdef public bint rstrip # <<<<<<<<<<<<<< - * cdef Connection _client_connection - * cdef ConnectionParameters _server_handle_params - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->rstrip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Server.rstrip.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip_2__set__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_6Server_6rstrip_2__set__(struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, PyObject *__pyx_v_value) { - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1702, __pyx_L1_error) - __pyx_v_self->rstrip = __pyx_t_1; - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.rstrip.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_21__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_20__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< - * def __setstate_cython__(self, __pyx_state): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); - __PYX_ERR(1, 2, __pyx_L1_error) - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_6Server_23__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v___pyx_state = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_6Server_22__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)__pyx_v_self), __pyx_v___pyx_state); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_6Server_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Server *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< - */ - __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0); - __PYX_ERR(1, 4, __pyx_L1_error) - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Server.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2079 - * - * - * cdef RFC_TYPE_DESC_HANDLE fillTypeDescription(type_desc): # <<<<<<<<<<<<<< - * """ - * :param type_desc: object of class TypeDescription - */ - -static RFC_TYPE_DESC_HANDLE __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(PyObject *__pyx_v_type_desc) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc; - RFC_FIELD_DESC __pyx_v_fieldDesc; - SAP_UC *__pyx_v_sapuc; - PyObject *__pyx_v_field_desc = NULL; - RFC_TYPE_DESC_HANDLE __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - SAP_UC *__pyx_t_2; - int __pyx_t_3; - unsigned int __pyx_t_4; - unsigned int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - PyObject *(*__pyx_t_8)(PyObject *); - Py_ssize_t __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - RFCTYPE __pyx_t_12; - RFC_TYPE_DESC_HANDLE __pyx_t_13; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillTypeDescription", 0); - - /* "pyrfc/_cyrfc.pyx":2084 - * :return: Handle of RFC_TYPE_DESC_HANDLE - * """ - * cdef RFC_RC rc = RFC_OK # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_TYPE_DESC_HANDLE typeDesc - */ - __pyx_v_rc = RFC_OK; - - /* "pyrfc/_cyrfc.pyx":2091 - * - * # 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, 2091, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2091, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_sapuc = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":2092 - * # Set name, nuc_length, and uc_length - * sapuc = fillString(type_desc.name) - * typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo) # <<<<<<<<<<<<<< - * free(sapuc) - * if typeDesc == NULL: - */ - __pyx_v_typeDesc = RfcCreateTypeDesc(__pyx_v_sapuc, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2093 - * sapuc = fillString(type_desc.name) - * typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo) - * free(sapuc) # <<<<<<<<<<<<<< - * if typeDesc == NULL: - * raise wrapError(&errorInfo) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2094 - * 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); - if (unlikely(__pyx_t_3)) { - - /* "pyrfc/_cyrfc.pyx":2095 - * free(sapuc) - * if typeDesc == NULL: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2095, __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, 2095, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2094 - * typeDesc = RfcCreateTypeDesc(sapuc, &errorInfo) - * free(sapuc) - * if typeDesc == NULL: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2096 - * 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, 2096, __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, 2096, __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, 2096, __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, 2096, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_rc = RfcSetTypeLength(__pyx_v_typeDesc, __pyx_t_4, __pyx_t_5, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2097 - * 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); - if (unlikely(__pyx_t_3)) { - - /* "pyrfc/_cyrfc.pyx":2098 - * rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo) - * if rc != RFC_OK: - * RfcDestroyTypeDesc(typeDesc, NULL) # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - (void)(RfcDestroyTypeDesc(__pyx_v_typeDesc, NULL)); - - /* "pyrfc/_cyrfc.pyx":2099 - * if rc != RFC_OK: - * RfcDestroyTypeDesc(typeDesc, NULL) - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * for field_desc in type_desc.fields: - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2099, __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, 2099, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2097 - * raise wrapError(&errorInfo) - * rc = RfcSetTypeLength(typeDesc, type_desc.nuc_length, type_desc.uc_length, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * RfcDestroyTypeDesc(typeDesc, NULL) - * raise wrapError(&errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2101 - * 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, 2101, __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, 2101, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2101, __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, 2101, __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, 2101, __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, 2101, __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, 2101, __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, 2101, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_XDECREF_SET(__pyx_v_field_desc, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2103 - * 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, 2103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2103, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_sapuc = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":2104 - * # Set name - * sapuc = fillString(field_desc['name']) - * strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * fieldDesc.type = RfcFieldType[field_desc['field_type']].value - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2104, __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, 2104, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_fieldDesc.name, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2105 - * sapuc = fillString(field_desc['name']) - * strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * fieldDesc.type = RfcFieldType[field_desc['field_type']].value - * fieldDesc.nucLength = field_desc['nuc_length'] - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2106 - * strncpyU(fieldDesc.name, sapuc, len(field_desc['name']) + 1) - * free(sapuc) - * fieldDesc.type = RfcFieldType[field_desc['field_type']].value # <<<<<<<<<<<<<< - * fieldDesc.nucLength = field_desc['nuc_length'] - * fieldDesc.nucOffset = field_desc['nuc_offset'] - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2106, __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, 2106, __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, 2106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_12 = ((RFCTYPE)__Pyx_PyInt_As_RFCTYPE(__pyx_t_10)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2106, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.type = __pyx_t_12; - - /* "pyrfc/_cyrfc.pyx":2107 - * free(sapuc) - * fieldDesc.type = RfcFieldType[field_desc['field_type']].value - * fieldDesc.nucLength = field_desc['nuc_length'] # <<<<<<<<<<<<<< - * fieldDesc.nucOffset = field_desc['nuc_offset'] - * fieldDesc.ucLength = field_desc['uc_length'] - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_nuc_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2107, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2107, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.nucLength = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":2108 - * fieldDesc.type = RfcFieldType[field_desc['field_type']].value - * fieldDesc.nucLength = field_desc['nuc_length'] - * fieldDesc.nucOffset = field_desc['nuc_offset'] # <<<<<<<<<<<<<< - * fieldDesc.ucLength = field_desc['uc_length'] - * fieldDesc.ucOffset = field_desc['uc_offset'] - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_nuc_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2108, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2108, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.nucOffset = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":2109 - * fieldDesc.nucLength = field_desc['nuc_length'] - * fieldDesc.nucOffset = field_desc['nuc_offset'] - * fieldDesc.ucLength = field_desc['uc_length'] # <<<<<<<<<<<<<< - * fieldDesc.ucOffset = field_desc['uc_offset'] - * fieldDesc.decimals = field_desc['decimals'] - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_uc_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2109, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2109, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.ucLength = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":2110 - * fieldDesc.nucOffset = field_desc['nuc_offset'] - * fieldDesc.ucLength = field_desc['uc_length'] - * fieldDesc.ucOffset = field_desc['uc_offset'] # <<<<<<<<<<<<<< - * fieldDesc.decimals = field_desc['decimals'] - * if field_desc['type_description'] is not None: - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_uc_offset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2110, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2110, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.ucOffset = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":2111 - * fieldDesc.ucLength = field_desc['uc_length'] - * fieldDesc.ucOffset = field_desc['uc_offset'] - * fieldDesc.decimals = field_desc['decimals'] # <<<<<<<<<<<<<< - * if field_desc['type_description'] is not None: - * fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description']) - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_decimals); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2111, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_5 = __Pyx_PyInt_As_unsigned_int(__pyx_t_10); if (unlikely((__pyx_t_5 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2111, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.decimals = __pyx_t_5; - - /* "pyrfc/_cyrfc.pyx":2112 - * fieldDesc.ucOffset = field_desc['uc_offset'] - * fieldDesc.decimals = field_desc['decimals'] - * if field_desc['type_description'] is not None: # <<<<<<<<<<<<<< - * fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description']) - * else: - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2112, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_3 = (__pyx_t_10 != Py_None); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":2113 - * fieldDesc.decimals = field_desc['decimals'] - * if field_desc['type_description'] is not None: - * fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description']) # <<<<<<<<<<<<<< - * else: - * fieldDesc.typeDescHandle = NULL - */ - __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_field_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2113, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2113, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_v_fieldDesc.typeDescHandle = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2112 - * fieldDesc.ucOffset = field_desc['uc_offset'] - * fieldDesc.decimals = field_desc['decimals'] - * if field_desc['type_description'] is not None: # <<<<<<<<<<<<<< - * fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description']) - * else: - */ - goto __pyx_L7; - } - - /* "pyrfc/_cyrfc.pyx":2115 - * fieldDesc.typeDescHandle = fillTypeDescription(field_desc['type_description']) - * else: - * fieldDesc.typeDescHandle = NULL # <<<<<<<<<<<<<< - * fieldDesc.extendedDescription = NULL - * rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo) - */ - /*else*/ { - __pyx_v_fieldDesc.typeDescHandle = NULL; - } - __pyx_L7:; - - /* "pyrfc/_cyrfc.pyx":2116 - * else: - * fieldDesc.typeDescHandle = NULL - * fieldDesc.extendedDescription = NULL # <<<<<<<<<<<<<< - * rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_fieldDesc.extendedDescription = NULL; - - /* "pyrfc/_cyrfc.pyx":2117 - * fieldDesc.typeDescHandle = NULL - * fieldDesc.extendedDescription = NULL - * rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * RfcDestroyTypeDesc(typeDesc, NULL) - */ - __pyx_v_rc = RfcAddTypeField(__pyx_v_typeDesc, (&__pyx_v_fieldDesc), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2118 - * fieldDesc.extendedDescription = NULL - * rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * RfcDestroyTypeDesc(typeDesc, NULL) - * raise wrapError(&errorInfo) - */ - __pyx_t_3 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_3)) { - - /* "pyrfc/_cyrfc.pyx":2119 - * rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo) - * if rc != RFC_OK: - * RfcDestroyTypeDesc(typeDesc, NULL) # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - (void)(RfcDestroyTypeDesc(__pyx_v_typeDesc, NULL)); - - /* "pyrfc/_cyrfc.pyx":2120 - * if rc != RFC_OK: - * RfcDestroyTypeDesc(typeDesc, NULL) - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * return typeDesc - */ - __pyx_t_10 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2120, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2120, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2118 - * fieldDesc.extendedDescription = NULL - * rc = RfcAddTypeField(typeDesc, &fieldDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * RfcDestroyTypeDesc(typeDesc, NULL) - * raise wrapError(&errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2101 - * raise wrapError(&errorInfo) - * - * for field_desc in type_desc.fields: # <<<<<<<<<<<<<< - * # Set name - * sapuc = fillString(field_desc['name']) - */ - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2122 - * raise wrapError(&errorInfo) - * - * return typeDesc # <<<<<<<<<<<<<< - * - * cdef RFC_FUNCTION_DESC_HANDLE fillFunctionDescription(func_desc): - */ - __pyx_r = __pyx_v_typeDesc; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2079 - * - * - * 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_AddTraceback("pyrfc._cyrfc.fillTypeDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_field_desc); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2124 - * return typeDesc - * - * cdef RFC_FUNCTION_DESC_HANDLE fillFunctionDescription(func_desc): # <<<<<<<<<<<<<< - * """ - * :param func_desc: object of class FunctionDescription - */ - -static RFC_FUNCTION_DESC_HANDLE __pyx_f_5pyrfc_6_cyrfc_fillFunctionDescription(PyObject *__pyx_v_func_desc) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc; - RFC_PARAMETER_DESC __pyx_v_paramDesc; - SAP_UC *__pyx_v_sapuc; - PyObject *__pyx_v_param_desc = NULL; - RFC_RC __pyx_v_rc; - RFC_FUNCTION_DESC_HANDLE __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - SAP_UC *__pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - PyObject *(*__pyx_t_6)(PyObject *); - Py_ssize_t __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - RFCTYPE __pyx_t_10; - RFC_DIRECTION __pyx_t_11; - unsigned int __pyx_t_12; - RFC_TYPE_DESC_HANDLE __pyx_t_13; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillFunctionDescription", 0); - - /* "pyrfc/_cyrfc.pyx":2135 - * - * # 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, 2135, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2135, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_sapuc = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":2136 - * # Set name - * sapuc = fillString(func_desc.name) - * funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo) # <<<<<<<<<<<<<< - * free(sapuc) - * if funcDesc == NULL: - */ - __pyx_v_funcDesc = RfcCreateFunctionDesc(__pyx_v_sapuc, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2137 - * sapuc = fillString(func_desc.name) - * funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo) - * free(sapuc) # <<<<<<<<<<<<<< - * if funcDesc == NULL: - * raise wrapError(&errorInfo) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2138 - * funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo) - * free(sapuc) - * if funcDesc == NULL: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - __pyx_t_3 = (__pyx_v_funcDesc == NULL); - if (unlikely(__pyx_t_3)) { - - /* "pyrfc/_cyrfc.pyx":2139 - * free(sapuc) - * if funcDesc == NULL: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * for param_desc in func_desc.parameters: - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2139, __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, 2139, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2138 - * funcDesc = RfcCreateFunctionDesc(sapuc, &errorInfo) - * free(sapuc) - * if funcDesc == NULL: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":2141 - * 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, 2141, __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, 2141, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2141, __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, 2141, __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, 2141, __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, 2141, __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, 2141, __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, 2141, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_1); - } - __Pyx_XDECREF_SET(__pyx_v_param_desc, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2142 - * - * 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, 2142, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2142, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_sapuc = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":2143 - * for param_desc in func_desc.parameters: - * sapuc = fillString(param_desc['name']) - * strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * paramDesc.type = RfcFieldType[param_desc['parameter_type']].value - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2143, __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, 2143, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_paramDesc.name, __pyx_v_sapuc, (__pyx_t_7 + 1)); - - /* "pyrfc/_cyrfc.pyx":2144 - * sapuc = fillString(param_desc['name']) - * strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * paramDesc.type = RfcFieldType[param_desc['parameter_type']].value - * paramDesc.direction = RfcParameterDirection[param_desc['direction']].value - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2145 - * strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1) - * free(sapuc) - * paramDesc.type = RfcFieldType[param_desc['parameter_type']].value # <<<<<<<<<<<<<< - * paramDesc.direction = RfcParameterDirection[param_desc['direction']].value - * paramDesc.nucLength = param_desc['nuc_length'] - */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2145, __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, 2145, __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, 2145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = ((RFCTYPE)__Pyx_PyInt_As_RFCTYPE(__pyx_t_8)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2145, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_paramDesc.type = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":2146 - * free(sapuc) - * paramDesc.type = RfcFieldType[param_desc['parameter_type']].value - * paramDesc.direction = RfcParameterDirection[param_desc['direction']].value # <<<<<<<<<<<<<< - * paramDesc.nucLength = param_desc['nuc_length'] - * paramDesc.ucLength = param_desc['uc_length'] - */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2146, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_direction); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2146, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2146, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = ((RFC_DIRECTION)__Pyx_PyInt_As_RFC_DIRECTION(__pyx_t_9)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2146, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_paramDesc.direction = __pyx_t_11; - - /* "pyrfc/_cyrfc.pyx":2147 - * paramDesc.type = RfcFieldType[param_desc['parameter_type']].value - * paramDesc.direction = RfcParameterDirection[param_desc['direction']].value - * paramDesc.nucLength = param_desc['nuc_length'] # <<<<<<<<<<<<<< - * paramDesc.ucLength = param_desc['uc_length'] - * paramDesc.decimals = param_desc['decimals'] - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_nuc_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2147, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2147, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_paramDesc.nucLength = __pyx_t_12; - - /* "pyrfc/_cyrfc.pyx":2148 - * paramDesc.direction = RfcParameterDirection[param_desc['direction']].value - * paramDesc.nucLength = param_desc['nuc_length'] - * paramDesc.ucLength = param_desc['uc_length'] # <<<<<<<<<<<<<< - * paramDesc.decimals = param_desc['decimals'] - * # defaultValue - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_uc_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2148, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_paramDesc.ucLength = __pyx_t_12; - - /* "pyrfc/_cyrfc.pyx":2149 - * paramDesc.nucLength = param_desc['nuc_length'] - * paramDesc.ucLength = param_desc['uc_length'] - * paramDesc.decimals = param_desc['decimals'] # <<<<<<<<<<<<<< - * # defaultValue - * sapuc = fillString(param_desc['default_value']) - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_decimals); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2149, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_12 = __Pyx_PyInt_As_unsigned_int(__pyx_t_9); if (unlikely((__pyx_t_12 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2149, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_paramDesc.decimals = __pyx_t_12; - - /* "pyrfc/_cyrfc.pyx":2151 - * paramDesc.decimals = param_desc['decimals'] - * # defaultValue - * sapuc = fillString(param_desc['default_value']) # <<<<<<<<<<<<<< - * strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1) - * free(sapuc) - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_default_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2151, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_9); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2151, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_sapuc = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":2152 - * # defaultValue - * sapuc = fillString(param_desc['default_value']) - * strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * # parameterText - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_default_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2152, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2152, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - strncpyU(__pyx_v_paramDesc.defaultValue, __pyx_v_sapuc, (__pyx_t_7 + 1)); - - /* "pyrfc/_cyrfc.pyx":2153 - * sapuc = fillString(param_desc['default_value']) - * strncpyU(paramDesc.defaultValue, sapuc, len(param_desc['default_value']) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * # parameterText - * sapuc = fillString(param_desc['parameter_text']) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2155 - * free(sapuc) - * # parameterText - * sapuc = fillString(param_desc['parameter_text']) # <<<<<<<<<<<<<< - * strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1) - * free(sapuc) - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_9); if (unlikely(__pyx_t_2 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2155, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_sapuc = __pyx_t_2; - - /* "pyrfc/_cyrfc.pyx":2156 - * # parameterText - * sapuc = fillString(param_desc['parameter_text']) - * strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * paramDesc.optional = param_desc['optional'] - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_parameter_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2156, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2156, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - strncpyU(__pyx_v_paramDesc.parameterText, __pyx_v_sapuc, (__pyx_t_7 + 1)); - - /* "pyrfc/_cyrfc.pyx":2157 - * sapuc = fillString(param_desc['parameter_text']) - * strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * paramDesc.optional = param_desc['optional'] - * if param_desc['type_description'] is not None: - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2158 - * strncpyU(paramDesc.parameterText, sapuc, len(param_desc['parameter_text']) + 1) - * free(sapuc) - * paramDesc.optional = param_desc['optional'] # <<<<<<<<<<<<<< - * if param_desc['type_description'] is not None: - * paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description']) - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_optional); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2158, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 2158, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_paramDesc.optional = __pyx_t_3; - - /* "pyrfc/_cyrfc.pyx":2159 - * free(sapuc) - * paramDesc.optional = param_desc['optional'] - * if param_desc['type_description'] is not None: # <<<<<<<<<<<<<< - * paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description']) - * else: - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2159, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = (__pyx_t_9 != Py_None); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (__pyx_t_3) { - - /* "pyrfc/_cyrfc.pyx":2160 - * paramDesc.optional = param_desc['optional'] - * if param_desc['type_description'] is not None: - * paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description']) # <<<<<<<<<<<<<< - * else: - * paramDesc.typeDescHandle = NULL - */ - __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_param_desc, __pyx_n_u_type_description); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2160, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillTypeDescription(__pyx_t_9); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2160, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_v_paramDesc.typeDescHandle = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2159 - * free(sapuc) - * paramDesc.optional = param_desc['optional'] - * if param_desc['type_description'] is not None: # <<<<<<<<<<<<<< - * paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description']) - * else: - */ - goto __pyx_L6; - } - - /* "pyrfc/_cyrfc.pyx":2162 - * paramDesc.typeDescHandle = fillTypeDescription(param_desc['type_description']) - * else: - * paramDesc.typeDescHandle = NULL # <<<<<<<<<<<<<< - * paramDesc.extendedDescription = NULL - * rc = RfcAddParameter(funcDesc, ¶mDesc, &errorInfo) - */ - /*else*/ { - __pyx_v_paramDesc.typeDescHandle = NULL; - } - __pyx_L6:; - - /* "pyrfc/_cyrfc.pyx":2163 - * else: - * paramDesc.typeDescHandle = NULL - * paramDesc.extendedDescription = NULL # <<<<<<<<<<<<<< - * rc = RfcAddParameter(funcDesc, ¶mDesc, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_paramDesc.extendedDescription = NULL; - - /* "pyrfc/_cyrfc.pyx":2164 - * paramDesc.typeDescHandle = NULL - * paramDesc.extendedDescription = NULL - * rc = RfcAddParameter(funcDesc, ¶mDesc, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * RfcDestroyFunctionDesc(funcDesc, NULL) - */ - __pyx_v_rc = RfcAddParameter(__pyx_v_funcDesc, (&__pyx_v_paramDesc), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2165 - * paramDesc.extendedDescription = NULL - * rc = RfcAddParameter(funcDesc, ¶mDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * RfcDestroyFunctionDesc(funcDesc, NULL) - * raise wrapError(&errorInfo) - */ - __pyx_t_3 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_3)) { - - /* "pyrfc/_cyrfc.pyx":2166 - * rc = RfcAddParameter(funcDesc, ¶mDesc, &errorInfo) - * if rc != RFC_OK: - * RfcDestroyFunctionDesc(funcDesc, NULL) # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - (void)(RfcDestroyFunctionDesc(__pyx_v_funcDesc, NULL)); - - /* "pyrfc/_cyrfc.pyx":2167 - * if rc != RFC_OK: - * RfcDestroyFunctionDesc(funcDesc, NULL) - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * return funcDesc - */ - __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2167, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_Raise(__pyx_t_9, 0, 0, 0); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __PYX_ERR(0, 2167, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2165 - * paramDesc.extendedDescription = NULL - * rc = RfcAddParameter(funcDesc, ¶mDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * RfcDestroyFunctionDesc(funcDesc, NULL) - * raise wrapError(&errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2141 - * raise wrapError(&errorInfo) - * - * for param_desc in func_desc.parameters: # <<<<<<<<<<<<<< - * sapuc = fillString(param_desc['name']) - * strncpyU(paramDesc.name, sapuc, len(param_desc['name']) + 1) - */ - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":2169 - * raise wrapError(&errorInfo) - * - * return funcDesc # <<<<<<<<<<<<<< - * - * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *: - */ - __pyx_r = __pyx_v_funcDesc; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2124 - * 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_AddTraceback("pyrfc._cyrfc.fillFunctionDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_param_desc); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2171 - * return funcDesc - * - * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *: # <<<<<<<<<<<<<< - * cdef RFC_UNIT_IDENTIFIER uIdentifier - * cdef SAP_UC* sapuc - */ - -static RFC_UNIT_IDENTIFIER __pyx_f_5pyrfc_6_cyrfc_fillUnitIdentifier(PyObject *__pyx_v_unit) { - RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier; - SAP_UC *__pyx_v_sapuc; - RFC_UNIT_IDENTIFIER __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_t_3; - SAP_UC *__pyx_t_4; - Py_ssize_t __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - Py_UCS4 __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - Py_ssize_t __pyx_t_9; - int __pyx_t_10; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillUnitIdentifier", 0); - - /* "pyrfc/_cyrfc.pyx":2174 - * cdef RFC_UNIT_IDENTIFIER uIdentifier - * cdef SAP_UC* sapuc - * uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0] # <<<<<<<<<<<<<< - * if len(unit['id']) != RFC_UNITID_LN: - * raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).") - */ - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_queued); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __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, 2174, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_3) { - __Pyx_INCREF(__pyx_n_u_Q); - __pyx_t_1 = __pyx_n_u_Q; - } else { - __Pyx_INCREF(__pyx_n_u_T); - __pyx_t_1 = __pyx_n_u_T; - } - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2174, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_uIdentifier.unitType = (__pyx_t_4[0]); - - /* "pyrfc/_cyrfc.pyx":2175 - * cdef SAP_UC* sapuc - * uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0] - * if len(unit['id']) != RFC_UNITID_LN: # <<<<<<<<<<<<<< - * raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).") - * sapuc = fillString(unit['id']) - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2175, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2175, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = (__pyx_t_5 != RFC_UNITID_LN); - if (unlikely(__pyx_t_3)) { - - /* "pyrfc/_cyrfc.pyx":2176 - * uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0] - * if len(unit['id']) != RFC_UNITID_LN: - * raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).") # <<<<<<<<<<<<<< - * sapuc = fillString(unit['id']) - * strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1) - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = 0; - __pyx_t_7 = 127; - __Pyx_INCREF(__pyx_kp_u_Invalid_length_of_unit_id_should); - __pyx_t_5 += 40; - __Pyx_GIVEREF(__pyx_kp_u_Invalid_length_of_unit_id_should); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Invalid_length_of_unit_id_should); - __pyx_t_8 = __Pyx_PyUnicode_From_int(RFC_UNITID_LN, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_8); - __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u_but_found); - __pyx_t_5 += 12; - __Pyx_GIVEREF(__pyx_kp_u_but_found); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_but_found); - __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8); - __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__25); - __pyx_t_5 += 2; - __Pyx_GIVEREF(__pyx_kp_u__25); - PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__25); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_10 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_10 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 2176, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2175 - * cdef SAP_UC* sapuc - * uIdentifier.unitType = fillString("Q" if unit['queued'] else "T")[0] - * if len(unit['id']) != RFC_UNITID_LN: # <<<<<<<<<<<<<< - * raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).") - * sapuc = fillString(unit['id']) - */ - } - - /* "pyrfc/_cyrfc.pyx":2177 - * if len(unit['id']) != RFC_UNITID_LN: - * raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).") - * sapuc = fillString(unit['id']) # <<<<<<<<<<<<<< - * strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1) - * free(sapuc) - */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_unit, __pyx_n_u_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2177, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_1); if (unlikely(__pyx_t_4 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2177, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_sapuc = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":2178 - * raise RFCError(f"Invalid length of unit['id'] (should be {RFC_UNITID_LN}, but found {len(unit['id'])}).") - * sapuc = fillString(unit['id']) - * strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1) # <<<<<<<<<<<<<< - * free(sapuc) - * return uIdentifier - */ - strncpyU(__pyx_v_uIdentifier.unitID, __pyx_v_sapuc, (RFC_UNITID_LN + 1)); - - /* "pyrfc/_cyrfc.pyx":2179 - * sapuc = fillString(unit['id']) - * strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * return uIdentifier - * - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2180 - * strncpyU(uIdentifier.unitID, sapuc, RFC_UNITID_LN + 1) - * free(sapuc) - * return uIdentifier # <<<<<<<<<<<<<< - * - * - */ - __pyx_r = __pyx_v_uIdentifier; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2171 - * return funcDesc - * - * cdef RFC_UNIT_IDENTIFIER fillUnitIdentifier(unit) except *: # <<<<<<<<<<<<<< - * cdef RFC_UNIT_IDENTIFIER uIdentifier - * cdef SAP_UC* sapuc - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("pyrfc._cyrfc.fillUnitIdentifier", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_pretend_to_initialize(&__pyx_r); - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2193 - * cdef _connections - * - * def __init__(self, connections = None): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * self._throughput_handle = NULL - */ - -/* Python wrapper */ -static int __pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static int __pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_connections = 0; - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connections,0}; - PyObject* values[1] = {0}; - values[0] = ((PyObject *)Py_None); - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (kw_args > 0) { - PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connections); - if (value) { values[0] = value; kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2193, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 2193, __pyx_L3_error) - } - } else { - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_VARARGS(__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, __pyx_nargs); __PYX_ERR(0, 2193, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return -1; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput___init__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v_connections); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static int __pyx_pf_5pyrfc_6_cyrfc_10Throughput___init__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, PyObject *__pyx_v_connections) { - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_v_conn = NULL; - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - PyObject *(*__pyx_t_6)(PyObject *); - int __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_INCREF(__pyx_v_connections); - - /* "pyrfc/_cyrfc.pyx":2195 - * def __init__(self, connections = None): - * cdef RFC_ERROR_INFO errorInfo - * self._throughput_handle = NULL # <<<<<<<<<<<<<< - * self._connections = set() - * self._throughput_handle = RfcCreateThroughput(&errorInfo) - */ - __pyx_v_self->_throughput_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":2196 - * cdef RFC_ERROR_INFO errorInfo - * self._throughput_handle = NULL - * self._connections = set() # <<<<<<<<<<<<<< - * self._throughput_handle = RfcCreateThroughput(&errorInfo) - * if errorInfo.code != RFC_OK: - */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_v_self->_connections); - __Pyx_DECREF(__pyx_v_self->_connections); - __pyx_v_self->_connections = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2197 - * self._throughput_handle = NULL - * self._connections = set() - * self._throughput_handle = RfcCreateThroughput(&errorInfo) # <<<<<<<<<<<<<< - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_self->_throughput_handle = RfcCreateThroughput((&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2198 - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2199 - * self._throughput_handle = RfcCreateThroughput(&errorInfo) - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * Throughput._registry.append(self) - * connections = connections or [] - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2199, __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, 2199, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2198 - * self._connections = set() - * self._throughput_handle = RfcCreateThroughput(&errorInfo) - * if errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * Throughput._registry.append(self) - */ - } - - /* "pyrfc/_cyrfc.pyx":2200 - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * Throughput._registry.append(self) # <<<<<<<<<<<<<< - * connections = connections or [] - * if type(connections) is not list: - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput), __pyx_n_s_registry); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2200, __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, 2200, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2201 - * raise wrapError(&errorInfo) - * Throughput._registry.append(self) - * connections = connections or [] # <<<<<<<<<<<<<< - * if type(connections) is not list: - * connections = [connections] - */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_connections); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 2201, __pyx_L1_error) - if (!__pyx_t_2) { - } else { - __Pyx_INCREF(__pyx_v_connections); - __pyx_t_1 = __pyx_v_connections; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_4); - __pyx_t_1 = __pyx_t_4; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_L4_bool_binop_done:; - __Pyx_DECREF_SET(__pyx_v_connections, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2202 - * Throughput._registry.append(self) - * connections = connections or [] - * if type(connections) is not list: # <<<<<<<<<<<<<< - * connections = [connections] - * for conn in connections: - */ - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_connections)) != ((PyObject *)(&PyList_Type))); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":2203 - * connections = connections or [] - * if type(connections) is not list: - * connections = [connections] # <<<<<<<<<<<<<< - * for conn in connections: - * if not isinstance(conn, Connection): - */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_connections); - __Pyx_GIVEREF(__pyx_v_connections); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_connections); - __Pyx_DECREF_SET(__pyx_v_connections, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2202 - * Throughput._registry.append(self) - * connections = connections or [] - * if type(connections) is not list: # <<<<<<<<<<<<<< - * connections = [connections] - * for conn in connections: - */ - } - - /* "pyrfc/_cyrfc.pyx":2204 - * if type(connections) is not list: - * connections = [connections] - * for conn in connections: # <<<<<<<<<<<<<< - * if not isinstance(conn, Connection): - * raise TypeError('Connection object required, received', conn, 'of type', type(conn)) - */ - if (likely(PyList_CheckExact(__pyx_v_connections)) || PyTuple_CheckExact(__pyx_v_connections)) { - __pyx_t_1 = __pyx_v_connections; __Pyx_INCREF(__pyx_t_1); __pyx_t_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, 2204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2204, __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_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2204, __pyx_L1_error) - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely((0 < 0))) __PYX_ERR(0, 2204, __pyx_L1_error) - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } - } else { - __pyx_t_4 = __pyx_t_6(__pyx_t_1); - if (unlikely(!__pyx_t_4)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2204, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_4); - } - __Pyx_XDECREF_SET(__pyx_v_conn, __pyx_t_4); - __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":2205 - * 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_2 = __Pyx_TypeCheck(__pyx_v_conn, __pyx_ptype_5pyrfc_6_cyrfc_Connection); - __pyx_t_7 = (!__pyx_t_2); - if (unlikely(__pyx_t_7)) { - - /* "pyrfc/_cyrfc.pyx":2206 - * for conn in connections: - * if not isinstance(conn, Connection): - * raise TypeError('Connection object required, received', conn, 'of type', type(conn)) # <<<<<<<<<<<<<< - * self.setOnConnection(conn) - * - */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_kp_u_Connection_object_required_recei); - __Pyx_GIVEREF(__pyx_kp_u_Connection_object_required_recei); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Connection_object_required_recei); - __Pyx_INCREF(__pyx_v_conn); - __Pyx_GIVEREF(__pyx_v_conn); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_conn); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_of_type); - __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_conn))); - __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_conn))); - PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)Py_TYPE(__pyx_v_conn))); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 2206, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2205 - * connections = [connections] - * for conn in connections: - * if not isinstance(conn, Connection): # <<<<<<<<<<<<<< - * raise TypeError('Connection object required, received', conn, 'of type', type(conn)) - * self.setOnConnection(conn) - */ - } - - /* "pyrfc/_cyrfc.pyx":2207 - * if not isinstance(conn, Connection): - * raise TypeError('Connection object required, received', conn, 'of type', type(conn)) - * self.setOnConnection(conn) # <<<<<<<<<<<<<< - * - * @property - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setOnConnection); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2207, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = NULL; - __pyx_t_10 = 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_10 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_conn}; - __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2207, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "pyrfc/_cyrfc.pyx":2204 - * if type(connections) is not list: - * connections = [connections] - * for conn in connections: # <<<<<<<<<<<<<< - * if not isinstance(conn, Connection): - * raise TypeError('Connection object required, received', conn, 'of type', type(conn)) - */ - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2193 - * cdef _connections - * - * def __init__(self, connections = None): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * self._throughput_handle = NULL - */ - - /* function exit code */ - __pyx_r = 0; - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = -1; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_conn); - __Pyx_XDECREF(__pyx_v_connections); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2209 - * self.setOnConnection(conn) - * - * @property # <<<<<<<<<<<<<< - * def connections(self): - * """Get connections attached to throughput monitoring - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11connections_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_11connections_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_11connections___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_11connections___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":2216 - * :type: set of Connection - * """ - * return self._connections # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->_connections); - __pyx_r = __pyx_v_self->_connections; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2209 - * self.setOnConnection(conn) - * - * @property # <<<<<<<<<<<<<< - * def connections(self): - * """Get connections attached to throughput monitoring - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2218 - * return self._connections - * - * @property # <<<<<<<<<<<<<< - * def _handle(self): - * """Get throughput object handle - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7_handle_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7_handle_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_7_handle___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_7_handle___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":2225 - * :type: uintptr_t - * """ - * return 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, 2225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2218 - * return self._connections - * - * @property # <<<<<<<<<<<<<< - * def _handle(self): - * """Get throughput object handle - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput._handle.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2227 - * return self._throughput_handle - * - * def setOnConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Attaches a throughput object to a connection to be monitored by the throughput object. - * Once attached to a connection, the throughput object collects the data statistics of - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Throughput_2setOnConnection, "Attaches a throughput object to a connection to be monitored by the throughput object.\n Once attached to a connection, the throughput object collects the data statistics of\n function calls invoked via this connection.\n\n For more info search for the ``RfcSetThroughputOnConnection`` method in\n `SAP NetWeaver RFC SDK Doxygen Documentation `_\n\n :param connection: Connection instance to be attached to throughput monitoring\n :type connection: Connection\n\n :return: nothing, raises an error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_3setOnConnection = {"setOnConnection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_2setOnConnection}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setOnConnection (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connection,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connection)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2227, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "setOnConnection") < 0)) __PYX_ERR(0, 2227, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)values[0]); - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("setOnConnection", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2227, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.setOnConnection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_5pyrfc_6_cyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2227, __pyx_L1_error) - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_2setOnConnection(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v_connection); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_2setOnConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setOnConnection", 0); - - /* "pyrfc/_cyrfc.pyx":2241 - * """ - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcSetThroughputOnConnection(__pyx_v_connection->_handle, __pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2242 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2243 - * cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * self._connections.add(connection) - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2243, __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, 2243, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2242 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcSetThroughputOnConnection(connection._handle, self._throughput_handle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * self._connections.add(connection) - */ - } - - /* "pyrfc/_cyrfc.pyx":2244 - * 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, 2244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_connection)}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2244, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2227 - * return self._throughput_handle - * - * def setOnConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Attaches a throughput object to a connection to be monitored by the throughput object. - * Once attached to a connection, the throughput object collects the data statistics of - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.setOnConnection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2246 - * self._connections.add(connection) - * - * @staticmethod # <<<<<<<<<<<<<< - * def getFromConnection(Connection connection): - * """Returns the currently attached throughput object from a connection, if any. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection(CYTHON_UNUSED PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Throughput_4getFromConnection, "Returns the currently attached throughput object from a connection, if any.\n\n For more info search for the ``RfcGetThroughputFromConnection`` method in\n `SAP NetWeaver RFC SDK Doxygen Documentation `_\n\n :param connection: Connection instance\n :type connection: Connection\n\n :returns: Throughput object the connection is attached to, if any\n :rtype: Throughput\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass in case of error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_5getFromConnection = {"getFromConnection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_4getFromConnection}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection(CYTHON_UNUSED PyObject *__pyx_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("getFromConnection (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connection,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connection)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2246, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getFromConnection") < 0)) __PYX_ERR(0, 2246, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)values[0]); - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("getFromConnection", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2246, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.getFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_5pyrfc_6_cyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2247, __pyx_L1_error) - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_4getFromConnection(__pyx_v_connection); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_4getFromConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_THROUGHPUT_HANDLE __pyx_v_throughput; - PyObject *__pyx_v_t = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("getFromConnection", 0); - - /* "pyrfc/_cyrfc.pyx":2262 - * """ - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo) # <<<<<<<<<<<<<< - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_throughput = RfcGetThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2263 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2264 - * 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 == throughput: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2264, __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, 2264, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2263 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_THROUGHPUT_HANDLE throughput = RfcGetThroughputFromConnection(connection._handle, &errorInfo) - * if errorInfo.code != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * for t in Throughput._registry: - */ - } - - /* "pyrfc/_cyrfc.pyx":2265 - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * for t in Throughput._registry: # <<<<<<<<<<<<<< - * if t._handle == throughput: - * return t - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput), __pyx_n_s_registry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2265, __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, 2265, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2265, __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, 2265, __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, 2265, __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, 2265, __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, 2265, __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, 2265, __pyx_L1_error) - } - break; - } - __Pyx_GOTREF(__pyx_t_2); - } - __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2266 - * raise wrapError(&errorInfo) - * for t in Throughput._registry: - * if t._handle == throughput: # <<<<<<<<<<<<<< - * return t - * return None - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_handle_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2266, __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, 2266, __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, 2266, __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, 2266, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":2267 - * for t in Throughput._registry: - * if t._handle == throughput: - * return t # <<<<<<<<<<<<<< - * return None - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_t); - __pyx_r = __pyx_v_t; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2266 - * raise wrapError(&errorInfo) - * for t in Throughput._registry: - * if t._handle == throughput: # <<<<<<<<<<<<<< - * return t - * return None - */ - } - - /* "pyrfc/_cyrfc.pyx":2265 - * if errorInfo.code != RFC_OK: - * raise wrapError(&errorInfo) - * for t in Throughput._registry: # <<<<<<<<<<<<<< - * if t._handle == throughput: - * return t - */ - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2268 - * if t._handle == throughput: - * return t - * return None # <<<<<<<<<<<<<< - * - * def removeFromConnection(self, Connection connection): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2246 - * self._connections.add(connection) - * - * @staticmethod # <<<<<<<<<<<<<< - * def getFromConnection(Connection connection): - * """Returns the currently attached throughput object from a connection, if any. - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.getFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_t); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2270 - * return None - * - * def removeFromConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Removes the throughput object from a connection. - * The connection will no longer be monitored. - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection, "Removes the throughput object from a connection.\n The connection will no longer be monitored.\n\n :param connection: Connection instance\n :type connection: Connection\n :returns: Nothing\n :raises: :exc:`~pyrfc.RFCError` or a subclass in case of error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection = {"removeFromConnection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("removeFromConnection (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_connection,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_connection)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2270, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "removeFromConnection") < 0)) __PYX_ERR(0, 2270, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)values[0]); - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("removeFromConnection", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 2270, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.removeFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_connection), __pyx_ptype_5pyrfc_6_cyrfc_Connection, 1, "connection", 0))) __PYX_ERR(0, 2270, __pyx_L1_error) - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v_connection); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, struct __pyx_obj_5pyrfc_6_cyrfc_Connection *__pyx_v_connection) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("removeFromConnection", 0); - - /* "pyrfc/_cyrfc.pyx":2280 - * """ - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcRemoveThroughputFromConnection(__pyx_v_connection->_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2281 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2282 - * cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * self._connections.remove(connection) - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2282, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_Raise(__pyx_t_2, 0, 0, 0); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2282, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2281 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcRemoveThroughputFromConnection(connection._handle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * self._connections.remove(connection) - */ - } - - /* "pyrfc/_cyrfc.pyx":2283 - * 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, 2283, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 0; - 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, ((PyObject *)__pyx_v_connection)}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2270 - * return None - * - * def removeFromConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Removes the throughput object from a connection. - * The connection will no longer be monitored. - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.removeFromConnection", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2285 - * self._connections.remove(connection) - * - * def reset(self): # <<<<<<<<<<<<<< - * """Resets the data so far collected and aggregated by the throughput object. - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_5pyrfc_6_cyrfc_10Throughput_8reset, "Resets the data so far collected and aggregated by the throughput object.\n\n :returns: Nothing\n :raises: :exc:`~pyrfc.RFCError` or a subclass in case of error\n "); -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_9reset = {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_8reset}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("reset (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("reset", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "reset", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_8reset(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_8reset(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reset", 0); - - /* "pyrfc/_cyrfc.pyx":2292 - * """ - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcResetThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2293 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2294 - * cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * cdef _destroy(self): - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2294, __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, 2294, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2293 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc = RfcResetThroughput(self._throughput_handle, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":2285 - * self._connections.remove(connection) - * - * def reset(self): # <<<<<<<<<<<<<< - * """Resets the data so far collected and aggregated by the throughput object. - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2296 - * raise wrapError(&errorInfo) - * - * cdef _destroy(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_10Throughput__destroy(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("_destroy", 0); - - /* "pyrfc/_cyrfc.pyx":2299 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc - * self._registry.clear() # <<<<<<<<<<<<<< - * self._connections = None - * if self._throughput_handle != NULL: - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_registry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2299, __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, 2299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_2, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2300 - * cdef RFC_RC rc - * self._registry.clear() - * self._connections = None # <<<<<<<<<<<<<< - * if self._throughput_handle != NULL: - * rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo) - */ - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - __Pyx_GOTREF(__pyx_v_self->_connections); - __Pyx_DECREF(__pyx_v_self->_connections); - __pyx_v_self->_connections = Py_None; - - /* "pyrfc/_cyrfc.pyx":2301 - * self._registry.clear() - * self._connections = None - * if self._throughput_handle != NULL: # <<<<<<<<<<<<<< - * rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo) - * self._throughput_handle = NULL - */ - __pyx_t_5 = (__pyx_v_self->_throughput_handle != NULL); - if (__pyx_t_5) { - - /* "pyrfc/_cyrfc.pyx":2302 - * self._connections = None - * if self._throughput_handle != NULL: - * rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo) # <<<<<<<<<<<<<< - * self._throughput_handle = NULL - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcDestroyThroughput(__pyx_v_self->_throughput_handle, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2303 - * if self._throughput_handle != NULL: - * rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo) - * self._throughput_handle = NULL # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * # is ok - */ - __pyx_v_self->_throughput_handle = NULL; - - /* "pyrfc/_cyrfc.pyx":2304 - * rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo) - * self._throughput_handle = NULL - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * # is ok - * pass - */ - __pyx_t_5 = (__pyx_v_rc != RFC_OK); - if (__pyx_t_5) { - } - - /* "pyrfc/_cyrfc.pyx":2301 - * self._registry.clear() - * self._connections = None - * if self._throughput_handle != NULL: # <<<<<<<<<<<<<< - * rc = RfcDestroyThroughput(self._throughput_handle, &errorInfo) - * self._throughput_handle = NULL - */ - } - - /* "pyrfc/_cyrfc.pyx":2296 - * raise wrapError(&errorInfo) - * - * cdef _destroy(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_RC rc - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput._destroy", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2308 - * pass - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self.destroy() - * - */ - -/* Python wrapper */ -static void __pyx_pw_5pyrfc_6_cyrfc_10Throughput_11__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_5pyrfc_6_cyrfc_10Throughput_11__dealloc__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_5pyrfc_6_cyrfc_10Throughput_10__dealloc__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); -} - -static void __pyx_pf_5pyrfc_6_cyrfc_10Throughput_10__dealloc__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - __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("__dealloc__", 0); - - /* "pyrfc/_cyrfc.pyx":2309 - * - * def __dealloc__(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, 2309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2308 - * pass - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * self.destroy() - * - */ - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_WriteUnraisable("pyrfc._cyrfc.Throughput.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; - __Pyx_RefNannyFinishContext(); -} - -/* "pyrfc/_cyrfc.pyx":2311 - * self.destroy() - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * self._destroy() - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_13__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - CYTHON_UNUSED PyObject *__pyx_v_type = 0; - CYTHON_UNUSED PyObject *__pyx_v_value = 0; - CYTHON_UNUSED PyObject *__pyx_v_traceback = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_value,&__pyx_n_s_traceback,0}; - PyObject* values[3] = {0,0,0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); - CYTHON_FALLTHROUGH; - case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - CYTHON_FALLTHROUGH; - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_type)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2311, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - CYTHON_FALLTHROUGH; - case 1: - if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_value)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2311, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 2311, __pyx_L3_error) - } - CYTHON_FALLTHROUGH; - case 2: - if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_traceback)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2311, __pyx_L3_error) - else { - __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 2311, __pyx_L3_error) - } - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 2311, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 3)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); - values[2] = __Pyx_Arg_FASTCALL(__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, __pyx_nargs); __PYX_ERR(0, 2311, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_12__exit__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v_type, __pyx_v_value, __pyx_v_traceback); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_12__exit__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_type, CYTHON_UNUSED PyObject *__pyx_v_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__exit__", 0); - - /* "pyrfc/_cyrfc.pyx":2312 - * - * def __exit__(self, type, value, traceback): - * self._destroy() # <<<<<<<<<<<<<< - * - * def __enter__(self): - */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self->__pyx_vtab)->_destroy(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2311 - * self.destroy() - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * self._destroy() - * - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2314 - * self._destroy() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_15__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_14__enter__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_14__enter__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__enter__", 0); - - /* "pyrfc/_cyrfc.pyx":2315 - * - * def __enter__(self): - * return self # <<<<<<<<<<<<<< - * - * @property - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF((PyObject *)__pyx_v_self); - __pyx_r = ((PyObject *)__pyx_v_self); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2314 - * self._destroy() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - - /* function exit code */ - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2317 - * return self - * - * @property # <<<<<<<<<<<<<< - * def stats(self): - * """Get throughput monitor statistics - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5stats_1__get__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5stats_1__get__(PyObject *__pyx_v_self) { - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_5stats___get__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_5stats___get__(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_RC __pyx_v_rc; - SAP_ULLONG __pyx_v_numberOfCalls; - SAP_ULLONG __pyx_v_sentBytes; - SAP_ULLONG __pyx_v_receivedBytes; - SAP_ULLONG __pyx_v_applicationTime; - SAP_ULLONG __pyx_v_totalTime; - SAP_ULLONG __pyx_v_serializationTime; - SAP_ULLONG __pyx_v_deserializationTime; - PyObject *__pyx_v__stats = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "pyrfc/_cyrfc.pyx":2342 - * 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, 2342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v__stats = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2344 - * _stats = {} - * - * if self._throughput_handle == NULL: # <<<<<<<<<<<<<< - * raise RFCError('No connections assigned') - * - */ - __pyx_t_2 = (__pyx_v_self->_throughput_handle == NULL); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2345 - * - * 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, 2345, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_kp_u_No_connections_assigned}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2345, __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, 2345, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2344 - * _stats = {} - * - * if self._throughput_handle == NULL: # <<<<<<<<<<<<<< - * raise RFCError('No connections assigned') - * - */ - } - - /* "pyrfc/_cyrfc.pyx":2347 - * raise RFCError('No connections assigned') - * - * rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetNumberOfCalls(__pyx_v_self->_throughput_handle, (&__pyx_v_numberOfCalls), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2348 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2349 - * rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['numberOfCalls'] = numberOfCalls - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 2349, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2348 - * - * rc = RfcGetNumberOfCalls (self._throughput_handle, &numberOfCalls, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['numberOfCalls'] = numberOfCalls - */ - } - - /* "pyrfc/_cyrfc.pyx":2350 - * 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, 2350, __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, 2350, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2352 - * _stats['numberOfCalls'] = numberOfCalls - * - * rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetSentBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_sentBytes), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2353 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2354 - * rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['sentBytes'] = sentBytes - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2354, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 2354, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2353 - * - * rc = RfcGetSentBytes (self._throughput_handle, &sentBytes, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['sentBytes'] = sentBytes - */ - } - - /* "pyrfc/_cyrfc.pyx":2355 - * 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, 2355, __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, 2355, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2357 - * _stats['sentBytes'] = sentBytes - * - * rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetReceivedBytes(__pyx_v_self->_throughput_handle, (&__pyx_v_receivedBytes), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2358 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2359 - * rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['receivedBytes'] = receivedBytes - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 2359, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2358 - * - * rc = RfcGetReceivedBytes (self._throughput_handle, &receivedBytes, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['receivedBytes'] = receivedBytes - */ - } - - /* "pyrfc/_cyrfc.pyx":2360 - * 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, 2360, __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, 2360, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2362 - * _stats['receivedBytes'] = receivedBytes - * - * rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetApplicationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_applicationTime), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2363 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2364 - * rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['applicationTime'] = applicationTime - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2364, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_Raise(__pyx_t_1, 0, 0, 0); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 2364, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2363 - * - * rc = RfcGetApplicationTime (self._throughput_handle, &applicationTime, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['applicationTime'] = applicationTime - */ - } - - /* "pyrfc/_cyrfc.pyx":2365 - * 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, 2365, __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, 2365, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2367 - * _stats['applicationTime'] = applicationTime - * - * rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetTotalTime(__pyx_v_self->_throughput_handle, (&__pyx_v_totalTime), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2368 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2369 - * rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['totalTime'] = totalTime - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2369, __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, 2369, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2368 - * - * rc = RfcGetTotalTime (self._throughput_handle, &totalTime, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['totalTime'] = totalTime - */ - } - - /* "pyrfc/_cyrfc.pyx":2370 - * 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, 2370, __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, 2370, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2372 - * _stats['totalTime'] = totalTime - * - * rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetSerializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_serializationTime), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2373 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2374 - * rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['serializationTime'] = serializationTime - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2374, __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, 2374, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2373 - * - * rc = RfcGetSerializationTime (self._throughput_handle, &serializationTime, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['serializationTime'] = serializationTime - */ - } - - /* "pyrfc/_cyrfc.pyx":2375 - * 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, 2375, __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, 2375, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2377 - * _stats['serializationTime'] = serializationTime - * - * rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetDeserializationTime(__pyx_v_self->_throughput_handle, (&__pyx_v_deserializationTime), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2378 - * - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2379 - * rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * _stats['deserializationTime'] = deserializationTime - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2379, __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, 2379, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2378 - * - * rc = RfcGetDeserializationTime (self._throughput_handle, &deserializationTime, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * _stats['deserializationTime'] = deserializationTime - */ - } - - /* "pyrfc/_cyrfc.pyx":2380 - * 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, 2380, __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, 2380, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2382 - * _stats['deserializationTime'] = deserializationTime - * - * return _stats # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v__stats); - __pyx_r = __pyx_v__stats; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2317 - * return self - * - * @property # <<<<<<<<<<<<<< - * def stats(self): - * """Get throughput monitor statistics - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.stats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v__stats); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "self._throughput_handle cannot be converted to a Python object for pickling" - * def __setstate_cython__(self, __pyx_state): - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - if (unlikely(__pyx_nargs > 0)) { - __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;} - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_16__reduce_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - 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_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__throughput_handle_cannot_b, 0, 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_AddTraceback("pyrfc._cyrfc.Throughput.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "self._throughput_handle cannot be converted to a Python object for pickling" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "self._throughput_handle cannot be converted to a Python object for pickling" - */ - -/* Python wrapper */ -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -static PyMethodDef __pyx_mdef_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED const Py_ssize_t __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0}; - PyObject* values[1] = {0}; - if (__pyx_kwds) { - Py_ssize_t kw_args; - switch (__pyx_nargs) { - case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); - switch (__pyx_nargs) { - case 0: - if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) kw_args--; - else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error) - else goto __pyx_L5_argtuple_error; - } - if (unlikely(kw_args > 0)) { - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error) - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); - } - __pyx_v___pyx_state = values[0]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error) - __pyx_L3_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.Throughput.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_5pyrfc_6_cyrfc_10Throughput_18__setstate_cython__(((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)__pyx_v_self), __pyx_v___pyx_state); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_5pyrfc_6_cyrfc_10Throughput_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - 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_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__throughput_handle_cannot_b, 0, 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_AddTraceback("pyrfc._cyrfc.Throughput.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2389 - * ################################################################################ - * - * cdef fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_FUNCTION_HANDLE container, name, value): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc, RFC_FUNCTION_HANDLE __pyx_v_container, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_PARAMETER_DESC __pyx_v_paramDesc; - SAP_UC *__pyx_v_cName; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillFunctionParameter", 0); - - /* "pyrfc/_cyrfc.pyx":2393 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_PARAMETER_DESC paramDesc - * cName = fillString(name) # <<<<<<<<<<<<<< - * rc = RfcGetParameterDescByName(funcDesc, cName, ¶mDesc, &errorInfo) - * free(cName) - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2393, __pyx_L1_error) - __pyx_v_cName = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":2394 - * cdef RFC_PARAMETER_DESC paramDesc - * cName = fillString(name) - * rc = RfcGetParameterDescByName(funcDesc, cName, ¶mDesc, &errorInfo) # <<<<<<<<<<<<<< - * free(cName) - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcGetParameterDescByName(__pyx_v_funcDesc, __pyx_v_cName, (&__pyx_v_paramDesc), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2395 - * cName = fillString(name) - * rc = RfcGetParameterDescByName(funcDesc, cName, ¶mDesc, &errorInfo) - * free(cName) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - free(__pyx_v_cName); - - /* "pyrfc/_cyrfc.pyx":2396 - * rc = RfcGetParameterDescByName(funcDesc, cName, ¶mDesc, &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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2397 - * free(cName) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle) - * - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2397, __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, 2397, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2396 - * rc = RfcGetParameterDescByName(funcDesc, cName, ¶mDesc, &errorInfo) - * free(cName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle) - */ - } - - /* "pyrfc/_cyrfc.pyx":2398 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle) # <<<<<<<<<<<<<< - * - * cdef fillStructureField(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, name, value): - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillVariable(__pyx_v_paramDesc.type, __pyx_v_container, __pyx_v_paramDesc.name, __pyx_v_value, __pyx_v_paramDesc.typeDescHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2398, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2389 - * ################################################################################ - * - * cdef fillFunctionParameter(RFC_FUNCTION_DESC_HANDLE funcDesc, RFC_FUNCTION_HANDLE container, name, value): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.fillFunctionParameter", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2400 - * fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle) - * - * cdef fillStructureField(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, name, value): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillStructureField(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_STRUCTURE_HANDLE __pyx_v_container, PyObject *__pyx_v_name, PyObject *__pyx_v_value) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_FIELD_DESC __pyx_v_fieldDesc; - SAP_UC *__pyx_v_cName; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - SAP_UC *__pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillStructureField", 0); - - /* "pyrfc/_cyrfc.pyx":2404 - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_FIELD_DESC fieldDesc - * cdef SAP_UC* cName = fillString(name) # <<<<<<<<<<<<<< - * rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo) - * free(cName) - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_name); if (unlikely(__pyx_t_1 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2404, __pyx_L1_error) - __pyx_v_cName = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":2405 - * cdef RFC_FIELD_DESC fieldDesc - * cdef SAP_UC* cName = fillString(name) - * rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo) # <<<<<<<<<<<<<< - * free(cName) - * if rc != RFC_OK: - */ - __pyx_v_rc = RfcGetFieldDescByName(__pyx_v_typeDesc, __pyx_v_cName, (&__pyx_v_fieldDesc), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2406 - * cdef SAP_UC* cName = fillString(name) - * rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo) - * free(cName) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - free(__pyx_v_cName); - - /* "pyrfc/_cyrfc.pyx":2407 - * 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); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2408 - * free(cName) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle) - * - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2408, __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, 2408, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2407 - * rc = RfcGetFieldDescByName(typeDesc, cName, &fieldDesc, &errorInfo) - * free(cName) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle) - */ - } - - /* "pyrfc/_cyrfc.pyx":2409 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle) # <<<<<<<<<<<<<< - * - * cdef fillTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, lines): - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillVariable(__pyx_v_fieldDesc.type, __pyx_v_container, __pyx_v_fieldDesc.name, __pyx_v_value, __pyx_v_fieldDesc.typeDescHandle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2400 - * fillVariable(paramDesc.type, container, paramDesc.name, value, paramDesc.typeDescHandle) - * - * cdef fillStructureField(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, name, value): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.fillStructureField", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2411 - * fillVariable(fieldDesc.type, container, fieldDesc.name, value, fieldDesc.typeDescHandle) - * - * cdef fillTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, lines): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef RFC_STRUCTURE_HANDLE lineHandle - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillTable(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_TABLE_HANDLE __pyx_v_container, PyObject *__pyx_v_lines) { - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_STRUCTURE_HANDLE __pyx_v_lineHandle; - unsigned int __pyx_v_rowCount; - unsigned int __pyx_v_i; - PyObject *__pyx_v_line = NULL; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_value = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - Py_ssize_t __pyx_t_1; - int __pyx_t_2; - PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillTable", 0); - - /* "pyrfc/_cyrfc.pyx":2414 - * 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, 2414, __pyx_L1_error) - __pyx_v_rowCount = ((unsigned int)__pyx_t_1); - - /* "pyrfc/_cyrfc.pyx":2415 - * cdef RFC_STRUCTURE_HANDLE lineHandle - * cdef unsigned int rowCount = int(len(lines)) - * cdef unsigned int i = 0 # <<<<<<<<<<<<<< - * while i < rowCount: - * lineHandle = RfcAppendNewRow(container, &errorInfo) - */ - __pyx_v_i = 0; - - /* "pyrfc/_cyrfc.pyx":2416 - * 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); - if (!__pyx_t_2) break; - - /* "pyrfc/_cyrfc.pyx":2417 - * cdef unsigned int i = 0 - * while i < rowCount: - * lineHandle = RfcAppendNewRow(container, &errorInfo) # <<<<<<<<<<<<<< - * if not lineHandle: - * raise wrapError(&errorInfo) - */ - __pyx_v_lineHandle = RfcAppendNewRow(__pyx_v_container, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2418 - * while i < rowCount: - * lineHandle = RfcAppendNewRow(container, &errorInfo) - * if not lineHandle: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * line = lines[i] - */ - __pyx_t_2 = (!(__pyx_v_lineHandle != 0)); - if (unlikely(__pyx_t_2)) { - - /* "pyrfc/_cyrfc.pyx":2419 - * lineHandle = RfcAppendNewRow(container, &errorInfo) - * if not lineHandle: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * line = lines[i] - * if type(line) is dict: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __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, 2419, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2418 - * while i < rowCount: - * lineHandle = RfcAppendNewRow(container, &errorInfo) - * if not lineHandle: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * line = lines[i] - */ - } - - /* "pyrfc/_cyrfc.pyx":2420 - * if not lineHandle: - * raise wrapError(&errorInfo) - * line = lines[i] # <<<<<<<<<<<<<< - * if type(line) is dict: - * for name, value in line.iteritems(): - */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_lines, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2420, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2421 - * raise wrapError(&errorInfo) - * line = lines[i] - * if type(line) is dict: # <<<<<<<<<<<<<< - * for name, value in line.iteritems(): - * fillStructureField(typeDesc, lineHandle, name, value) - */ - __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_line)) == ((PyObject *)(&PyDict_Type))); - if (__pyx_t_2) { - - /* "pyrfc/_cyrfc.pyx":2422 - * line = lines[i] - * if type(line) is dict: - * for name, value in line.iteritems(): # <<<<<<<<<<<<<< - * fillStructureField(typeDesc, lineHandle, name, value) - * else: - */ - __pyx_t_1 = 0; - if (unlikely(__pyx_v_line == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(0, 2422, __pyx_L1_error) - } - __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_line, 0, __pyx_n_s_iteritems, (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2422, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); - __pyx_t_3 = __pyx_t_6; - __pyx_t_6 = 0; - while (1) { - __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_4, &__pyx_t_1, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_5); - if (unlikely(__pyx_t_8 == 0)) break; - if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 2422, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); - __pyx_t_7 = 0; - - /* "pyrfc/_cyrfc.pyx":2423 - * if type(line) is dict: - * for name, value in line.iteritems(): - * fillStructureField(typeDesc, lineHandle, name, value) # <<<<<<<<<<<<<< - * else: - * fillStructureField(typeDesc, lineHandle, '', line) - */ - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_lineHandle, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2423, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2421 - * raise wrapError(&errorInfo) - * line = lines[i] - * if type(line) is dict: # <<<<<<<<<<<<<< - * for name, value in line.iteritems(): - * fillStructureField(typeDesc, lineHandle, name, value) - */ - goto __pyx_L6; - } - - /* "pyrfc/_cyrfc.pyx":2425 - * fillStructureField(typeDesc, lineHandle, name, value) - * else: - * fillStructureField(typeDesc, lineHandle, '', line) # <<<<<<<<<<<<<< - * i += 1 - * - */ - /*else*/ { - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_lineHandle, __pyx_kp_u__5, __pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2425, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_L6:; - - /* "pyrfc/_cyrfc.pyx":2426 - * else: - * fillStructureField(typeDesc, lineHandle, '', line) - * i += 1 # <<<<<<<<<<<<<< - * - * cdef fillVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, value, RFC_TYPE_DESC_HANDLE typeDesc): - */ - __pyx_v_i = (__pyx_v_i + 1); - } - - /* "pyrfc/_cyrfc.pyx":2411 - * 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_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_AddTraceback("pyrfc._cyrfc.fillTable", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_line); - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2428 - * i += 1 - * - * cdef fillVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, value, RFC_TYPE_DESC_HANDLE typeDesc): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillVariable(RFCTYPE __pyx_v_typ, RFC_FUNCTION_HANDLE __pyx_v_container, SAP_UC *__pyx_v_cName, PyObject *__pyx_v_value, RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_STRUCTURE_HANDLE __pyx_v_struct; - RFC_TABLE_HANDLE __pyx_v_table; - SAP_UC *__pyx_v_cValue; - SAP_RAW *__pyx_v_bValue; - PyObject *__pyx_v_name = NULL; - CYTHON_UNUSED PyObject *__pyx_v_ex = NULL; - PyObject *__pyx_v_svalue = NULL; - PyObject *__pyx_v_locale_radix = NULL; - int __pyx_v_format_ok; - PyObject *__pyx_v_e = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - Py_ssize_t __pyx_t_8; - int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; - int __pyx_t_11; - SAP_RAW *__pyx_t_12; - SAP_UC *__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; - 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; - int __pyx_t_26; - char const *__pyx_t_27; - RFC_INT __pyx_t_28; - RFC_INT8 __pyx_t_29; - Py_UCS4 __pyx_t_30; - PyObject *__pyx_t_31 = NULL; - char const *__pyx_t_32; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillVariable", 0); - __Pyx_INCREF(__pyx_v_value); - - /* "pyrfc/_cyrfc.pyx":2437 - * global _LOCALE_RADIX - * # print ("fill", wrapString(cName), value, type(value)) - * try: # <<<<<<<<<<<<<< - * if typ == RFCTYPE_STRUCTURE: - * if type(value) is not dict: - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_1); - __Pyx_XGOTREF(__pyx_t_2); - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2438 - * # print ("fill", wrapString(cName), value, type(value)) - * try: - * if typ == RFCTYPE_STRUCTURE: # <<<<<<<<<<<<<< - * if type(value) is not dict: - * raise TypeError('dictionary required for structure parameter, received', str(type(value))) - */ - switch (__pyx_v_typ) { - case RFCTYPE_STRUCTURE: - - /* "pyrfc/_cyrfc.pyx":2439 - * 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))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2440 - * 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_5 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2440, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2440, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_kp_u_dictionary_required_for_structur); - __Pyx_GIVEREF(__pyx_kp_u_dictionary_required_for_structur); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_dictionary_required_for_structur); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2440, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2440, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2439 - * try: - * if typ == RFCTYPE_STRUCTURE: - * if type(value) is not dict: # <<<<<<<<<<<<<< - * raise TypeError('dictionary required for structure parameter, received', str(type(value))) - * rc = RfcGetStructure(container, cName, &struct, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2441 - * if type(value) is not dict: - * raise TypeError('dictionary required for structure parameter, received', str(type(value))) - * rc = RfcGetStructure(container, cName, &struct, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetStructure(__pyx_v_container, __pyx_v_cName, (&__pyx_v_struct), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2442 - * 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_4 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2443 - * 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_5 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2443, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2443, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2442 - * raise TypeError('dictionary required for structure parameter, received', str(type(value))) - * rc = RfcGetStructure(container, cName, &struct, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * for name, value in value.iteritems(): - */ - } - - /* "pyrfc/_cyrfc.pyx":2444 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * for name, value in value.iteritems(): # <<<<<<<<<<<<<< - * fillStructureField(typeDesc, struct, name, value) - * elif typ == RFCTYPE_TABLE: - */ - __pyx_t_7 = 0; - if (unlikely(__pyx_v_value == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "iteritems"); - __PYX_ERR(0, 2444, __pyx_L3_error) - } - __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_value, 0, __pyx_n_s_iteritems, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2444, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); - __pyx_t_5 = __pyx_t_6; - __pyx_t_6 = 0; - while (1) { - __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_8, &__pyx_t_7, &__pyx_t_6, &__pyx_t_10, NULL, __pyx_t_9); - if (unlikely(__pyx_t_11 == 0)) break; - if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 2444, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_10); - __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_10); - __pyx_t_10 = 0; - - /* "pyrfc/_cyrfc.pyx":2445 - * 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_10 = __pyx_f_5pyrfc_6_cyrfc_fillStructureField(__pyx_v_typeDesc, __pyx_v_struct, __pyx_v_name, __pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2445, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2438 - * # print ("fill", wrapString(cName), value, type(value)) - * try: - * if typ == RFCTYPE_STRUCTURE: # <<<<<<<<<<<<<< - * if type(value) is not dict: - * raise TypeError('dictionary required for structure parameter, received', str(type(value))) - */ - break; - case RFCTYPE_TABLE: - - /* "pyrfc/_cyrfc.pyx":2447 - * 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_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyList_Type))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2448 - * 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_5 = __Pyx_PyObject_Str(((PyObject *)Py_TYPE(__pyx_v_value))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2448, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2448, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __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_10, 0, __pyx_kp_u_list_required_for_table_paramete); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2448, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2448, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2447 - * fillStructureField(typeDesc, struct, name, value) - * elif typ == RFCTYPE_TABLE: - * if type(value) is not list: # <<<<<<<<<<<<<< - * raise TypeError('list required for table parameter, received', str(type(value))) - * rc = RfcGetTable(container, cName, &table, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2449 - * if type(value) is not list: - * raise TypeError('list required for table parameter, received', str(type(value))) - * rc = RfcGetTable(container, cName, &table, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetTable(__pyx_v_container, __pyx_v_cName, (&__pyx_v_table), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2450 - * 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); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2451 - * rc = RfcGetTable(container, cName, &table, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * fillTable(typeDesc, table, value) - * elif typ == RFCTYPE_BYTE: - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2451, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2451, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2450 - * raise TypeError('list required for table parameter, received', str(type(value))) - * rc = RfcGetTable(container, cName, &table, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * fillTable(typeDesc, table, value) - */ - } - - /* "pyrfc/_cyrfc.pyx":2452 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * fillTable(typeDesc, table, value) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_BYTE: - * bValue = fillBytes(value) - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_fillTable(__pyx_v_typeDesc, __pyx_v_table, __pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2452, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2446 - * for name, value in value.iteritems(): - * fillStructureField(typeDesc, struct, name, value) - * elif typ == RFCTYPE_TABLE: # <<<<<<<<<<<<<< - * if type(value) is not list: - * raise TypeError('list required for table parameter, received', str(type(value))) - */ - break; - case RFCTYPE_BYTE: - - /* "pyrfc/_cyrfc.pyx":2454 - * fillTable(typeDesc, table, value) - * elif typ == RFCTYPE_BYTE: - * bValue = fillBytes(value) # <<<<<<<<<<<<<< - * rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo) - * free(bValue) - */ - __pyx_t_12 = __pyx_f_5pyrfc_6_cyrfc_fillBytes(__pyx_v_value); if (unlikely(__pyx_t_12 == ((SAP_RAW *)NULL))) __PYX_ERR(0, 2454, __pyx_L3_error) - __pyx_v_bValue = __pyx_t_12; - - /* "pyrfc/_cyrfc.pyx":2455 - * elif typ == RFCTYPE_BYTE: - * bValue = fillBytes(value) - * rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo) # <<<<<<<<<<<<<< - * free(bValue) - * elif typ == RFCTYPE_XSTRING: - */ - __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2455, __pyx_L3_error) - __pyx_v_rc = RfcSetBytes(__pyx_v_container, __pyx_v_cName, __pyx_v_bValue, ((unsigned int)__pyx_t_8), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2456 - * bValue = fillBytes(value) - * rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo) - * free(bValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_XSTRING: - * bValue = fillBytes(value) - */ - free(__pyx_v_bValue); - - /* "pyrfc/_cyrfc.pyx":2453 - * raise wrapError(&errorInfo) - * fillTable(typeDesc, table, value) - * elif typ == RFCTYPE_BYTE: # <<<<<<<<<<<<<< - * bValue = fillBytes(value) - * rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo) - */ - break; - case RFCTYPE_XSTRING: - - /* "pyrfc/_cyrfc.pyx":2458 - * free(bValue) - * elif typ == RFCTYPE_XSTRING: - * bValue = fillBytes(value) # <<<<<<<<<<<<<< - * rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo) - * free(bValue) - */ - __pyx_t_12 = __pyx_f_5pyrfc_6_cyrfc_fillBytes(__pyx_v_value); if (unlikely(__pyx_t_12 == ((SAP_RAW *)NULL))) __PYX_ERR(0, 2458, __pyx_L3_error) - __pyx_v_bValue = __pyx_t_12; - - /* "pyrfc/_cyrfc.pyx":2459 - * elif typ == RFCTYPE_XSTRING: - * bValue = fillBytes(value) - * rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo) # <<<<<<<<<<<<<< - * free(bValue) - * elif typ == RFCTYPE_CHAR: - */ - __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2459, __pyx_L3_error) - __pyx_v_rc = RfcSetXString(__pyx_v_container, __pyx_v_cName, __pyx_v_bValue, ((unsigned int)__pyx_t_8), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2460 - * bValue = fillBytes(value) - * rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo) - * free(bValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_CHAR: - * if type(value) is not str: - */ - free(__pyx_v_bValue); - - /* "pyrfc/_cyrfc.pyx":2457 - * rc = RfcSetBytes(container, cName, bValue, int(len(value)), &errorInfo) - * free(bValue) - * elif typ == RFCTYPE_XSTRING: # <<<<<<<<<<<<<< - * bValue = fillBytes(value) - * rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo) - */ - break; - case RFCTYPE_CHAR: - - /* "pyrfc/_cyrfc.pyx":2462 - * free(bValue) - * elif typ == RFCTYPE_CHAR: - * if type(value) is not str: # <<<<<<<<<<<<<< - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - */ - __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyUnicode_Type))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2463 - * elif typ == RFCTYPE_CHAR: - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2463, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __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_5, 0, __pyx_kp_u_an_string_is_required_received); - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_5, 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_5, 3, ((PyObject *)Py_TYPE(__pyx_v_value))); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2463, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2463, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2462 - * free(bValue) - * elif typ == RFCTYPE_CHAR: - * if type(value) is not str: # <<<<<<<<<<<<<< - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - */ - } - - /* "pyrfc/_cyrfc.pyx":2464 - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) # <<<<<<<<<<<<<< - * rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2464, __pyx_L3_error) - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2465 - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - * rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * elif typ == RFCTYPE_STRING: - */ - __pyx_v_rc = RfcSetChars(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2466 - * cValue = fillString(value) - * rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_STRING: - * if type(value) is not str: - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2461 - * rc = RfcSetXString(container, cName, bValue, int(len(value)), &errorInfo) - * free(bValue) - * elif typ == RFCTYPE_CHAR: # <<<<<<<<<<<<<< - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) - */ - break; - case RFCTYPE_STRING: - - /* "pyrfc/_cyrfc.pyx":2468 - * free(cValue) - * elif typ == RFCTYPE_STRING: - * if type(value) is not str: # <<<<<<<<<<<<<< - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - */ - __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyUnicode_Type))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2469 - * elif typ == RFCTYPE_STRING: - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - __pyx_t_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2469, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __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_10, 0, __pyx_kp_u_an_string_is_required_received); - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_10, 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_10, 3, ((PyObject *)Py_TYPE(__pyx_v_value))); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2469, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2469, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2468 - * free(cValue) - * elif typ == RFCTYPE_STRING: - * if type(value) is not str: # <<<<<<<<<<<<<< - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - */ - } - - /* "pyrfc/_cyrfc.pyx":2470 - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) # <<<<<<<<<<<<<< - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2470, __pyx_L3_error) - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2471 - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * elif typ == RFCTYPE_NUM: - */ - __pyx_v_rc = RfcSetString(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2472 - * cValue = fillString(value) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_NUM: - * try: - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2467 - * rc = RfcSetChars(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - * elif typ == RFCTYPE_STRING: # <<<<<<<<<<<<<< - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) - */ - break; - case RFCTYPE_NUM: - - /* "pyrfc/_cyrfc.pyx":2474 - * free(cValue) - * elif typ == RFCTYPE_NUM: - * try: # <<<<<<<<<<<<<< - * if value.isdigit(): - * cValue = fillString(value) - */ - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_16); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2475 - * elif typ == RFCTYPE_NUM: - * try: - * if value.isdigit(): # <<<<<<<<<<<<<< - * cValue = fillString(value) - * rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2475, __pyx_L17_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_6, }; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2475, __pyx_L17_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2475, __pyx_L17_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (likely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2476 - * try: - * if value.isdigit(): - * cValue = fillString(value) # <<<<<<<<<<<<<< - * rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2476, __pyx_L17_error) - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2477 - * if value.isdigit(): - * cValue = fillString(value) - * rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * else: - */ - __pyx_v_rc = RfcSetNum(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2478 - * cValue = fillString(value) - * rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * else: - * raise - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2475 - * elif typ == RFCTYPE_NUM: - * try: - * if value.isdigit(): # <<<<<<<<<<<<<< - * cValue = fillString(value) - * rc = RfcSetNum(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - goto __pyx_L23; - } - - /* "pyrfc/_cyrfc.pyx":2480 - * free(cValue) - * else: - * raise # <<<<<<<<<<<<<< - * except Exception as ex: - * raise TypeError('a numeric string is required, received', value, 'of type', type(value)) - */ - /*else*/ { - __Pyx_ReraiseException(); __PYX_ERR(0, 2480, __pyx_L17_error) - } - __pyx_L23:; - - /* "pyrfc/_cyrfc.pyx":2474 - * free(cValue) - * elif typ == RFCTYPE_NUM: - * try: # <<<<<<<<<<<<<< - * if value.isdigit(): - * cValue = fillString(value) - */ - } - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - goto __pyx_L22_try_end; - __pyx_L17_error:; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2481 - * else: - * raise - * except Exception as ex: # <<<<<<<<<<<<<< - * raise TypeError('a numeric string is required, received', value, 'of type', type(value)) - * elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: - */ - __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_9) { - __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_10, &__pyx_t_6) < 0) __PYX_ERR(0, 2481, __pyx_L19_except_error) - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_t_10); - __pyx_v_ex = __pyx_t_10; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2482 - * raise - * except Exception as ex: - * raise TypeError('a numeric string is required, received', value, 'of type', type(value)) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: - * # cast to string prevents rounding errors in NWRFC SDK - */ - __pyx_t_17 = PyTuple_New(4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2482, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_17); - __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_17, 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_17, 1, __pyx_v_value); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_17, 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_17, 3, ((PyObject *)Py_TYPE(__pyx_v_value))); - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2482, __pyx_L29_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_Raise(__pyx_t_18, 0, 0, 0); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __PYX_ERR(0, 2482, __pyx_L29_error) - } - - /* "pyrfc/_cyrfc.pyx":2481 - * else: - * raise - * except Exception as ex: # <<<<<<<<<<<<<< - * raise TypeError('a numeric string is required, received', value, 'of type', type(value)) - * elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: - */ - /*finally:*/ { - __pyx_L29_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_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_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 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_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_19 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - 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_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_19; - goto __pyx_L19_except_error; - } - } - } - goto __pyx_L19_except_error; - - /* "pyrfc/_cyrfc.pyx":2474 - * free(cValue) - * elif typ == RFCTYPE_NUM: - * try: # <<<<<<<<<<<<<< - * if value.isdigit(): - * cValue = fillString(value) - */ - __pyx_L19_except_error:; - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); - goto __pyx_L3_error; - __pyx_L22_try_end:; - } - - /* "pyrfc/_cyrfc.pyx":2473 - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - * elif typ == RFCTYPE_NUM: # <<<<<<<<<<<<<< - * try: - * if value.isdigit(): - */ - break; - case RFCTYPE_BCD: - - /* "pyrfc/_cyrfc.pyx":2483 - * except Exception as ex: - * raise TypeError('a numeric string is required, received', value, 'of type', type(value)) - * elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: # <<<<<<<<<<<<<< - * # cast to string prevents rounding errors in NWRFC SDK - * try: - */ - case RFCTYPE_FLOAT: - case RFCTYPE_DECF16: - case RFCTYPE_DECF34: - - /* "pyrfc/_cyrfc.pyx":2485 - * 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_16, &__pyx_t_15, &__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_14); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2486 - * # 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_26 = (((PyObject *)Py_TYPE(__pyx_v_value)) == ((PyObject *)(&PyFloat_Type))); - if (!__pyx_t_26) { - } else { - __pyx_t_4 = __pyx_t_26; - goto __pyx_L42_bool_binop_done; - } - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2486, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_26 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_6); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = __pyx_t_26; - __pyx_L42_bool_binop_done:; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2487 - * 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_6 = __Pyx_PyObject_Str(__pyx_v_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2487, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_svalue = __pyx_t_6; - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2486 - * # cast to string prevents rounding errors in NWRFC SDK - * try: - * if type(value) is float or type(value) is Decimal: # <<<<<<<<<<<<<< - * svalue = str(value) - * else: - */ - goto __pyx_L41; - } - - /* "pyrfc/_cyrfc.pyx":2490 - * else: - * # string passed from application should be locale correct, do nothing - * svalue = value # <<<<<<<<<<<<<< - * # decimal separator must be "." for the Decimal parsing check - * locale_radix = _LOCALE_RADIX # localeconv()['decimal_point'] - */ - /*else*/ { - __Pyx_INCREF(__pyx_v_value); - __pyx_v_svalue = __pyx_v_value; - } - __pyx_L41:; - - /* "pyrfc/_cyrfc.pyx":2492 - * svalue = value - * # decimal separator must be "." for the Decimal parsing check - * locale_radix = _LOCALE_RADIX # localeconv()['decimal_point'] # <<<<<<<<<<<<<< - * if locale_radix != ".": - * Decimal('.'.join(svalue.rsplit(locale_radix, 1))) - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_LOCALE_RADIX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2492, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_v_locale_radix = __pyx_t_6; - __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2493 - * # decimal separator must be "." for the Decimal parsing check - * locale_radix = _LOCALE_RADIX # localeconv()['decimal_point'] - * if locale_radix != ".": # <<<<<<<<<<<<<< - * Decimal('.'.join(svalue.rsplit(locale_radix, 1))) - * else: - */ - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_locale_radix, __pyx_kp_u__21, Py_NE)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2493, __pyx_L35_error) - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2494 - * locale_radix = _LOCALE_RADIX # localeconv()['decimal_point'] - * if locale_radix != ".": - * Decimal('.'.join(svalue.rsplit(locale_radix, 1))) # <<<<<<<<<<<<<< - * else: - * Decimal(svalue) - */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2494, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_svalue, __pyx_n_s_rsplit); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2494, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_18))) { - __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_18); - if (likely(__pyx_t_17)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); - __Pyx_INCREF(__pyx_t_17); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_18, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_17, __pyx_v_locale_radix, __pyx_int_1}; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2494, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - } - __pyx_t_18 = PyUnicode_Join(__pyx_kp_u__21, __pyx_t_5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2494, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_18}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2494, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2493 - * # decimal separator must be "." for the Decimal parsing check - * locale_radix = _LOCALE_RADIX # localeconv()['decimal_point'] - * if locale_radix != ".": # <<<<<<<<<<<<<< - * Decimal('.'.join(svalue.rsplit(locale_radix, 1))) - * else: - */ - goto __pyx_L44; - } - - /* "pyrfc/_cyrfc.pyx":2496 - * Decimal('.'.join(svalue.rsplit(locale_radix, 1))) - * else: - * Decimal(svalue) # <<<<<<<<<<<<<< - * cValue = fillString(svalue) - * except Exception as ex: - */ - /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2496, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = NULL; - __pyx_t_11 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_18)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_18); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_11 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_v_svalue}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2496, __pyx_L35_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_L44:; - - /* "pyrfc/_cyrfc.pyx":2497 - * else: - * Decimal(svalue) - * cValue = fillString(svalue) # <<<<<<<<<<<<<< - * except Exception as ex: - * raise TypeError('a decimal value required, received', value, 'of type', type(value)) - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_svalue); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2497, __pyx_L35_error) - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2485 - * 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_16); __pyx_t_16 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L40_try_end; - __pyx_L35_error:; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2498 - * Decimal(svalue) - * cValue = fillString(svalue) - * except Exception as ex: # <<<<<<<<<<<<<< - * raise TypeError('a decimal value required, received', value, 'of type', type(value)) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_11) { - __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_18) < 0) __PYX_ERR(0, 2498, __pyx_L37_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_INCREF(__pyx_t_10); - __pyx_v_ex = __pyx_t_10; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2499 - * cValue = fillString(svalue) - * except Exception as ex: - * raise TypeError('a decimal value required, received', value, 'of type', type(value)) # <<<<<<<<<<<<<< - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - */ - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2499, __pyx_L50_error) - __Pyx_GOTREF(__pyx_t_5); - __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_5, 0, __pyx_kp_u_a_decimal_value_required_receive); - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_5, 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_5, 3, ((PyObject *)Py_TYPE(__pyx_v_value))); - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2499, __pyx_L50_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_Raise(__pyx_t_17, 0, 0, 0); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __PYX_ERR(0, 2499, __pyx_L50_error) - } - - /* "pyrfc/_cyrfc.pyx":2498 - * Decimal(svalue) - * cValue = fillString(svalue) - * except Exception as ex: # <<<<<<<<<<<<<< - * raise TypeError('a decimal value required, received', value, 'of type', type(value)) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - /*finally:*/ { - __pyx_L50_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_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_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 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_11 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_27 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - } - 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_11; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_27; - goto __pyx_L37_except_error; - } - } - } - goto __pyx_L37_except_error; - - /* "pyrfc/_cyrfc.pyx":2485 - * 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_L37_except_error:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); - goto __pyx_L3_error; - __pyx_L40_try_end:; - } - - /* "pyrfc/_cyrfc.pyx":2500 - * except Exception as ex: - * raise TypeError('a decimal value required, received', value, 'of type', type(value)) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2): - */ - __pyx_v_rc = RfcSetString(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2501 - * raise TypeError('a decimal value required, received', value, 'of type', type(value)) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2): - * if type(value) is not int: - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2483 - * except Exception as ex: - * raise TypeError('a numeric string is required, received', value, 'of type', type(value)) - * elif typ == RFCTYPE_BCD or typ == RFCTYPE_FLOAT or typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: # <<<<<<<<<<<<<< - * # cast to string prevents rounding errors in NWRFC SDK - * try: - */ - break; - case RFCTYPE_INT: - - /* "pyrfc/_cyrfc.pyx":2502 - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - * elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2): # <<<<<<<<<<<<<< - * if type(value) is not int: - * raise TypeError('an integer required, received', value, 'of type', type(value)) - */ - case RFCTYPE_INT1: - case RFCTYPE_INT2: - - /* "pyrfc/_cyrfc.pyx":2503 - * 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))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2504 - * 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_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2504, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_INCREF(__pyx_kp_u_an_integer_required_received); - __Pyx_GIVEREF(__pyx_kp_u_an_integer_required_received); - PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_an_integer_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_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2504, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2504, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2503 - * free(cValue) - * elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2): - * if type(value) is not int: # <<<<<<<<<<<<<< - * raise TypeError('an integer required, received', value, 'of type', type(value)) - * rc = RfcSetInt(container, cName, value, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2505 - * 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_28 = __Pyx_PyInt_As_RFC_INT(__pyx_v_value); if (unlikely((__pyx_t_28 == ((RFC_INT)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2505, __pyx_L3_error) - __pyx_v_rc = RfcSetInt(__pyx_v_container, __pyx_v_cName, __pyx_t_28, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2502 - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - * elif typ in (RFCTYPE_INT, RFCTYPE_INT1, RFCTYPE_INT2): # <<<<<<<<<<<<<< - * if type(value) is not int: - * raise TypeError('an integer required, received', value, 'of type', type(value)) - */ - break; - case RFCTYPE_INT8: - - /* "pyrfc/_cyrfc.pyx":2507 - * 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_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyInt_Type))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2508 - * 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_10 = PyTuple_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2508, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_INCREF(__pyx_kp_u_an_integer_required_received); - __Pyx_GIVEREF(__pyx_kp_u_an_integer_required_received); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_an_integer_required_received); - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v_value); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_10, 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_10, 3, ((PyObject *)Py_TYPE(__pyx_v_value))); - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_10, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2508, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_Raise(__pyx_t_18, 0, 0, 0); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __PYX_ERR(0, 2508, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2507 - * rc = RfcSetInt(container, cName, value, &errorInfo) - * elif typ == RFCTYPE_INT8: - * if type(value) is not int: # <<<<<<<<<<<<<< - * raise TypeError('an integer required, received', value, 'of type', type(value)) - * rc = RfcSetInt8(container, cName, value, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2509 - * if type(value) is not int: - * raise TypeError('an integer required, received', value, 'of type', type(value)) - * rc = RfcSetInt8(container, cName, value, &errorInfo) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_UTCLONG: - * if type(value) is not str: - */ - __pyx_t_29 = __Pyx_PyInt_As_RFC_INT8(__pyx_v_value); if (unlikely((__pyx_t_29 == ((RFC_INT8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2509, __pyx_L3_error) - __pyx_v_rc = RfcSetInt8(__pyx_v_container, __pyx_v_cName, __pyx_t_29, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2506 - * raise TypeError('an integer required, received', value, 'of type', type(value)) - * rc = RfcSetInt(container, cName, value, &errorInfo) - * elif typ == RFCTYPE_INT8: # <<<<<<<<<<<<<< - * if type(value) is not int: - * raise TypeError('an integer required, received', value, 'of type', type(value)) - */ - break; - case RFCTYPE_UTCLONG: - - /* "pyrfc/_cyrfc.pyx":2511 - * rc = RfcSetInt8(container, cName, value, &errorInfo) - * elif typ == RFCTYPE_UTCLONG: - * if type(value) is not str: # <<<<<<<<<<<<<< - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - */ - __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) != ((PyObject *)(&PyUnicode_Type))); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2512 - * elif typ == RFCTYPE_UTCLONG: - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - */ - __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2512, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __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_18, 0, __pyx_kp_u_an_string_is_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_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2512, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2512, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2511 - * rc = RfcSetInt8(container, cName, value, &errorInfo) - * elif typ == RFCTYPE_UTCLONG: - * if type(value) is not str: # <<<<<<<<<<<<<< - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - */ - } - - /* "pyrfc/_cyrfc.pyx":2513 - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) # <<<<<<<<<<<<<< - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2513, __pyx_L3_error) - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2514 - * raise TypeError('an string is required, received', value, 'of type', type(value)) - * cValue = fillString(value) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * elif typ == RFCTYPE_DATE: - */ - __pyx_v_rc = RfcSetString(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, strlenU(__pyx_v_cValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2515 - * cValue = fillString(value) - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_DATE: - * if value: - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2510 - * raise TypeError('an integer required, received', value, 'of type', type(value)) - * rc = RfcSetInt8(container, cName, value, &errorInfo) - * elif typ == RFCTYPE_UTCLONG: # <<<<<<<<<<<<<< - * if type(value) is not str: - * raise TypeError('an string is required, received', value, 'of type', type(value)) - */ - break; - case RFCTYPE_DATE: - - /* "pyrfc/_cyrfc.pyx":2517 - * free(cValue) - * elif typ == RFCTYPE_DATE: - * if value: # <<<<<<<<<<<<<< - * format_ok = True - * if type(value) is date: - */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2517, __pyx_L3_error) - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2518 - * elif typ == RFCTYPE_DATE: - * if value: - * format_ok = True # <<<<<<<<<<<<<< - * if type(value) is date: - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') - */ - __pyx_v_format_ok = 1; - - /* "pyrfc/_cyrfc.pyx":2519 - * if value: - * format_ok = True - * if type(value) is date: # <<<<<<<<<<<<<< - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') - * else: - */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2519, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2520 - * format_ok = True - * if type(value) is date: - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') # <<<<<<<<<<<<<< - * else: - * try: - */ - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = 0; - __pyx_t_30 = 127; - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_year); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_18, __pyx_kp_u_04); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_month); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_18 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_kp_u_02); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_18) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_18); - __Pyx_GIVEREF(__pyx_t_18); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_18); - __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_day); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_18, __pyx_kp_u_02); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, __pyx_t_8, __pyx_t_30); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_6); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2520, __pyx_L3_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2519 - * if value: - * format_ok = True - * if type(value) is date: # <<<<<<<<<<<<<< - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') - * else: - */ - goto __pyx_L60; - } - - /* "pyrfc/_cyrfc.pyx":2522 - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') - * else: - * try: # <<<<<<<<<<<<<< - * if len(value) != 8: - * format_ok = False - */ - /*else*/ { - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_16); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2523 - * else: - * try: - * if len(value) != 8: # <<<<<<<<<<<<<< - * format_ok = False - * else: - */ - __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2523, __pyx_L61_error) - __pyx_t_4 = (__pyx_t_8 != 8); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2524 - * try: - * if len(value) != 8: - * format_ok = False # <<<<<<<<<<<<<< - * else: - * if len(value.rstrip()) > 0: - */ - __pyx_v_format_ok = 0; - - /* "pyrfc/_cyrfc.pyx":2523 - * else: - * try: - * if len(value) != 8: # <<<<<<<<<<<<<< - * format_ok = False - * else: - */ - goto __pyx_L67; - } - - /* "pyrfc/_cyrfc.pyx":2526 - * 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2526, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_18)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_18); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_18, }; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2526, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2526, __pyx_L61_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = (__pyx_t_8 > 0); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2527 - * else: - * if len(value.rstrip()) > 0: - * date(int(value[:4]), int(value[4:6]), int(value[6:8])) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * except Exception as ex: - */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 4, NULL, NULL, &__pyx_slice__30, 0, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = __Pyx_PyNumber_Int(__pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 6, NULL, NULL, &__pyx_slice__31, 1, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_18); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyObject_GetSlice(__pyx_v_value, 6, 8, NULL, NULL, &__pyx_slice__32, 1, 1, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_31 = __Pyx_PyNumber_Int(__pyx_t_18); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_31); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_18)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_18); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[4] = {__pyx_t_18, __pyx_t_17, __pyx_t_5, __pyx_t_31}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2527, __pyx_L61_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2526 - * format_ok = False - * else: - * if len(value.rstrip()) > 0: # <<<<<<<<<<<<<< - * date(int(value[:4]), int(value[4:6]), int(value[6:8])) - * cValue = fillString(value) - */ - } - - /* "pyrfc/_cyrfc.pyx":2528 - * if len(value.rstrip()) > 0: - * date(int(value[:4]), int(value[4:6]), int(value[6:8])) - * cValue = fillString(value) # <<<<<<<<<<<<<< - * except Exception as ex: - * format_ok = False - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2528, __pyx_L61_error) - __pyx_v_cValue = __pyx_t_13; - } - __pyx_L67:; - - /* "pyrfc/_cyrfc.pyx":2522 - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') - * else: - * try: # <<<<<<<<<<<<<< - * if len(value) != 8: - * format_ok = False - */ - } - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - goto __pyx_L66_try_end; - __pyx_L61_error:; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2529 - * date(int(value[:4]), int(value[4:6]), int(value[6:8])) - * cValue = fillString(value) - * except Exception as ex: # <<<<<<<<<<<<<< - * format_ok = False - * if not format_ok: - */ - __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_9) { - __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_31) < 0) __PYX_ERR(0, 2529, __pyx_L63_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_31); - __Pyx_INCREF(__pyx_t_10); - __pyx_v_ex = __pyx_t_10; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2530 - * cValue = fillString(value) - * except Exception as ex: - * format_ok = False # <<<<<<<<<<<<<< - * if not format_ok: - * raise TypeError('date value required, received', value, 'of type', type(value)) - */ - __pyx_v_format_ok = 0; - } - - /* "pyrfc/_cyrfc.pyx":2529 - * date(int(value[:4]), int(value[4:6]), int(value[6:8])) - * cValue = fillString(value) - * except Exception as ex: # <<<<<<<<<<<<<< - * format_ok = False - * if not format_ok: - */ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - goto __pyx_L75; - } - __pyx_L75:; - } - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - goto __pyx_L62_exception_handled; - } - goto __pyx_L63_except_error; - - /* "pyrfc/_cyrfc.pyx":2522 - * cValue = fillString(f'{value.year:04}{value.month:02}{value.day:02}') - * else: - * try: # <<<<<<<<<<<<<< - * if len(value) != 8: - * format_ok = False - */ - __pyx_L63_except_error:; - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); - goto __pyx_L3_error; - __pyx_L62_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); - __pyx_L66_try_end:; - } - } - __pyx_L60:; - - /* "pyrfc/_cyrfc.pyx":2531 - * except Exception as ex: - * format_ok = False - * if not format_ok: # <<<<<<<<<<<<<< - * raise TypeError('date value required, received', value, 'of type', type(value)) - * rc = RfcSetDate(container, cName, cValue, &errorInfo) - */ - __pyx_t_4 = (!__pyx_v_format_ok); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2532 - * 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_31 = PyTuple_New(4); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2532, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_31); - __Pyx_INCREF(__pyx_kp_u_date_value_required_received); - __Pyx_GIVEREF(__pyx_kp_u_date_value_required_received); - PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_kp_u_date_value_required_received); - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_31, 1, __pyx_v_value); - __Pyx_INCREF(__pyx_kp_u_of_type); - __Pyx_GIVEREF(__pyx_kp_u_of_type); - PyTuple_SET_ITEM(__pyx_t_31, 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_31, 3, ((PyObject *)Py_TYPE(__pyx_v_value))); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_31, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2532, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2532, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2531 - * except Exception as ex: - * format_ok = False - * if not format_ok: # <<<<<<<<<<<<<< - * raise TypeError('date value required, received', value, 'of type', type(value)) - * rc = RfcSetDate(container, cName, cValue, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2533 - * if not format_ok: - * raise TypeError('date value required, received', value, 'of type', type(value)) - * rc = RfcSetDate(container, cName, cValue, &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * else: - */ - __pyx_v_rc = RfcSetDate(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2534 - * raise TypeError('date value required, received', value, 'of type', type(value)) - * rc = RfcSetDate(container, cName, cValue, &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * else: - * rc = RFC_OK - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2517 - * free(cValue) - * elif typ == RFCTYPE_DATE: - * if value: # <<<<<<<<<<<<<< - * format_ok = True - * if type(value) is date: - */ - goto __pyx_L59; - } - - /* "pyrfc/_cyrfc.pyx":2536 - * free(cValue) - * else: - * rc = RFC_OK # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_TIME: - * if value: - */ - /*else*/ { - __pyx_v_rc = RFC_OK; - } - __pyx_L59:; - - /* "pyrfc/_cyrfc.pyx":2516 - * rc = RfcSetString(container, cName, cValue, strlenU(cValue), &errorInfo) - * free(cValue) - * elif typ == RFCTYPE_DATE: # <<<<<<<<<<<<<< - * if value: - * format_ok = True - */ - break; - case RFCTYPE_TIME: - - /* "pyrfc/_cyrfc.pyx":2538 - * 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, 2538, __pyx_L3_error) - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2539 - * elif typ == RFCTYPE_TIME: - * if value: - * format_ok = True # <<<<<<<<<<<<<< - * if type(value) is time: - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') - */ - __pyx_v_format_ok = 1; - - /* "pyrfc/_cyrfc.pyx":2540 - * if value: - * format_ok = True - * if type(value) is time: # <<<<<<<<<<<<<< - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') - * else: - */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2540, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = (((PyObject *)Py_TYPE(__pyx_v_value)) == __pyx_t_10); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2541 - * format_ok = True - * if type(value) is time: - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') # <<<<<<<<<<<<<< - * else: - * try: - */ - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = 0; - __pyx_t_30 = 127; - __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_hour); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_31); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_31, __pyx_kp_u_02); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_minute); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_31 = __Pyx_PyObject_Format(__pyx_t_6, __pyx_kp_u_02); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_31); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_31) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_31) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_31); - __Pyx_GIVEREF(__pyx_t_31); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_31); - __pyx_t_31 = 0; - __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_second); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_31); - __pyx_t_6 = __Pyx_PyObject_Format(__pyx_t_31, __pyx_kp_u_02); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, __pyx_t_8, __pyx_t_30); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_6); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2541, __pyx_L3_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_cValue = __pyx_t_13; - - /* "pyrfc/_cyrfc.pyx":2540 - * if value: - * format_ok = True - * if type(value) is time: # <<<<<<<<<<<<<< - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') - * else: - */ - goto __pyx_L78; - } - - /* "pyrfc/_cyrfc.pyx":2543 - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') - * else: - * try: # <<<<<<<<<<<<<< - * if len(value) != 6: - * format_ok = False - */ - /*else*/ { - { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_16); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_14); - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2544 - * else: - * try: - * if len(value) != 6: # <<<<<<<<<<<<<< - * format_ok = False - * else: - */ - __pyx_t_8 = PyObject_Length(__pyx_v_value); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2544, __pyx_L79_error) - __pyx_t_4 = (__pyx_t_8 != 6); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2545 - * try: - * if len(value) != 6: - * format_ok = False # <<<<<<<<<<<<<< - * else: - * if len(value.rstrip()) > 0: - */ - __pyx_v_format_ok = 0; - - /* "pyrfc/_cyrfc.pyx":2544 - * else: - * try: - * if len(value) != 6: # <<<<<<<<<<<<<< - * format_ok = False - * else: - */ - goto __pyx_L85; - } - - /* "pyrfc/_cyrfc.pyx":2547 - * 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_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2547, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_31 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_31)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_31); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_31, }; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2547, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2547, __pyx_L79_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = (__pyx_t_8 > 0); - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2548 - * else: - * if len(value.rstrip()) > 0: - * time(int(value[:2]), int(value[2:4]), int(value[4:6])) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * except Exception as ex: - */ - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_31 = __Pyx_PyObject_GetSlice(__pyx_v_value, 0, 2, NULL, NULL, &__pyx_slice__26, 0, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_31); - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_31); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - __pyx_t_31 = __Pyx_PyObject_GetSlice(__pyx_v_value, 2, 4, NULL, NULL, &__pyx_slice__33, 1, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_31); - __pyx_t_17 = __Pyx_PyNumber_Int(__pyx_t_31); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - __pyx_t_31 = __Pyx_PyObject_GetSlice(__pyx_v_value, 4, 6, NULL, NULL, &__pyx_slice__31, 1, 1, 1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_31); - __pyx_t_18 = __Pyx_PyNumber_Int(__pyx_t_31); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - __pyx_t_31 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { - __pyx_t_31 = PyMethod_GET_SELF(__pyx_t_10); - if (likely(__pyx_t_31)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); - __Pyx_INCREF(__pyx_t_31); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_10, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[4] = {__pyx_t_31, __pyx_t_5, __pyx_t_17, __pyx_t_18}; - __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_9, 3+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2548, __pyx_L79_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2547 - * format_ok = False - * else: - * if len(value.rstrip()) > 0: # <<<<<<<<<<<<<< - * time(int(value[:2]), int(value[2:4]), int(value[4:6])) - * cValue = fillString(value) - */ - } - - /* "pyrfc/_cyrfc.pyx":2549 - * if len(value.rstrip()) > 0: - * time(int(value[:2]), int(value[2:4]), int(value[4:6])) - * cValue = fillString(value) # <<<<<<<<<<<<<< - * except Exception as ex: - * format_ok = False - */ - __pyx_t_13 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_value); if (unlikely(__pyx_t_13 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2549, __pyx_L79_error) - __pyx_v_cValue = __pyx_t_13; - } - __pyx_L85:; - - /* "pyrfc/_cyrfc.pyx":2543 - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') - * else: - * try: # <<<<<<<<<<<<<< - * if len(value) != 6: - * format_ok = False - */ - } - __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - goto __pyx_L84_try_end; - __pyx_L79_error:; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2550 - * time(int(value[:2]), int(value[2:4]), int(value[4:6])) - * cValue = fillString(value) - * except Exception as ex: # <<<<<<<<<<<<<< - * format_ok = False - * - */ - __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_9) { - __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_10, &__pyx_t_18) < 0) __PYX_ERR(0, 2550, __pyx_L81_except_error) - __Pyx_XGOTREF(__pyx_t_6); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_INCREF(__pyx_t_10); - __pyx_v_ex = __pyx_t_10; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2551 - * cValue = fillString(value) - * except Exception as ex: - * format_ok = False # <<<<<<<<<<<<<< - * - * if not format_ok: - */ - __pyx_v_format_ok = 0; - } - - /* "pyrfc/_cyrfc.pyx":2550 - * time(int(value[:2]), int(value[2:4]), int(value[4:6])) - * cValue = fillString(value) - * except Exception as ex: # <<<<<<<<<<<<<< - * format_ok = False - * - */ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_DECREF(__pyx_v_ex); __pyx_v_ex = 0; - goto __pyx_L93; - } - __pyx_L93:; - } - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - goto __pyx_L80_exception_handled; - } - goto __pyx_L81_except_error; - - /* "pyrfc/_cyrfc.pyx":2543 - * cValue = fillString(f'{value.hour:02}{value.minute:02}{value.second:02}') - * else: - * try: # <<<<<<<<<<<<<< - * if len(value) != 6: - * format_ok = False - */ - __pyx_L81_except_error:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); - goto __pyx_L3_error; - __pyx_L80_exception_handled:; - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14); - __pyx_L84_try_end:; - } - } - __pyx_L78:; - - /* "pyrfc/_cyrfc.pyx":2553 - * 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_4 = (!__pyx_v_format_ok); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2554 - * - * 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_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2554, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __Pyx_INCREF(__pyx_kp_u_time_value_required_received); - __Pyx_GIVEREF(__pyx_kp_u_time_value_required_received); - PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_time_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_10 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2554, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2554, __pyx_L3_error) - - /* "pyrfc/_cyrfc.pyx":2553 - * format_ok = False - * - * if not format_ok: # <<<<<<<<<<<<<< - * raise TypeError('time value required, received', value, 'of type', type(value)) - * rc = RfcSetTime(container, cName, cValue, &errorInfo) - */ - } - - /* "pyrfc/_cyrfc.pyx":2555 - * if not format_ok: - * raise TypeError('time value required, received', value, 'of type', type(value)) - * rc = RfcSetTime(container, cName, cValue, &errorInfo) # <<<<<<<<<<<<<< - * free(cValue) - * else: - */ - __pyx_v_rc = RfcSetTime(__pyx_v_container, __pyx_v_cName, __pyx_v_cValue, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2556 - * raise TypeError('time value required, received', value, 'of type', type(value)) - * rc = RfcSetTime(container, cName, cValue, &errorInfo) - * free(cValue) # <<<<<<<<<<<<<< - * else: - * rc = RFC_OK - */ - free(__pyx_v_cValue); - - /* "pyrfc/_cyrfc.pyx":2538 - * rc = RFC_OK - * elif typ == RFCTYPE_TIME: - * if value: # <<<<<<<<<<<<<< - * format_ok = True - * if type(value) is time: - */ - goto __pyx_L77; - } - - /* "pyrfc/_cyrfc.pyx":2558 - * free(cValue) - * else: - * rc = RFC_OK # <<<<<<<<<<<<<< - * else: - * raise RFCError('Unknown RFC type %d when filling %s' % (typ, wrapString(cName))) - */ - /*else*/ { - __pyx_v_rc = RFC_OK; - } - __pyx_L77:; - - /* "pyrfc/_cyrfc.pyx":2537 - * else: - * rc = RFC_OK - * elif typ == RFCTYPE_TIME: # <<<<<<<<<<<<<< - * if value: - * format_ok = True - */ - break; - default: - - /* "pyrfc/_cyrfc.pyx":2560 - * 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_18, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_18); - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = 0; - __pyx_t_30 = 127; - __Pyx_INCREF(__pyx_kp_u_Unknown_RFC_type); - __pyx_t_8 += 17; - __Pyx_GIVEREF(__pyx_kp_u_Unknown_RFC_type); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_Unknown_RFC_type); - __pyx_t_17 = __Pyx_PyUnicode_From_RFCTYPE(__pyx_v_typ, 0, ' ', 'd'); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_17); - __pyx_t_17 = 0; - __Pyx_INCREF(__pyx_kp_u_when_filling); - __pyx_t_8 += 14; - __Pyx_GIVEREF(__pyx_kp_u_when_filling); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_when_filling); - __pyx_t_17 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_17), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_30 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_30) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_30; - __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_8, __pyx_t_30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_9 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_18))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_18); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_18); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_18, function); - __pyx_t_9 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2560, __pyx_L3_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - } - __Pyx_Raise(__pyx_t_10, 0, 0, 0); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 2560, __pyx_L3_error) - break; - } - - /* "pyrfc/_cyrfc.pyx":2437 - * global _LOCALE_RADIX - * # print ("fill", wrapString(cName), value, type(value)) - * try: # <<<<<<<<<<<<<< - * if typ == RFCTYPE_STRUCTURE: - * if type(value) is not dict: - */ - } - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - goto __pyx_L8_try_end; - __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "pyrfc/_cyrfc.pyx":2561 - * 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_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError); - if (__pyx_t_9) { - __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_18, &__pyx_t_5) < 0) __PYX_ERR(0, 2561, __pyx_L5_except_error) - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_18); - __Pyx_XGOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_t_18); - __pyx_v_e = __pyx_t_18; - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2565 - * # 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, 2565, __pyx_L100_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_17 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2565, __pyx_L100_error) - __Pyx_GOTREF(__pyx_t_17); - __pyx_t_31 = PyTuple_New(1); if (unlikely(!__pyx_t_31)) __PYX_ERR(0, 2565, __pyx_L100_error) - __Pyx_GOTREF(__pyx_t_31); - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_31, 0, __pyx_t_17); - __pyx_t_17 = 0; - __pyx_t_17 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_31); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2565, __pyx_L100_error) - __Pyx_GOTREF(__pyx_t_17); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_31); __pyx_t_31 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_e, __pyx_n_s_args, __pyx_t_17) < 0) __PYX_ERR(0, 2565, __pyx_L100_error) - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - - /* "pyrfc/_cyrfc.pyx":2566 - * # mistakes easier in complex mapping scenarios. - * e.args += (wrapString(cName), ) - * raise # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __Pyx_GIVEREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_18); - __Pyx_XGIVEREF(__pyx_t_5); - __Pyx_ErrRestoreWithState(__pyx_t_10, __pyx_t_18, __pyx_t_5); - __pyx_t_10 = 0; __pyx_t_18 = 0; __pyx_t_5 = 0; - __PYX_ERR(0, 2566, __pyx_L100_error) - } - - /* "pyrfc/_cyrfc.pyx":2561 - * else: - * raise RFCError('Unknown RFC type %d when filling %s' % (typ, wrapString(cName))) - * except TypeError as e: # <<<<<<<<<<<<<< - * # This way the field name will be attached in reverse direction - * # to the argument list of the exception. This helps users to find - */ - /*finally:*/ { - __pyx_L100_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; - __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_XDECREF(__pyx_t_31); __pyx_t_31 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_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_20); - __Pyx_XGOTREF(__pyx_t_21); - __Pyx_XGOTREF(__pyx_t_22); - __pyx_t_9 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_32 = __pyx_filename; - { - __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_20); - __Pyx_XGIVEREF(__pyx_t_21); - __Pyx_XGIVEREF(__pyx_t_22); - __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22); - } - __Pyx_XGIVEREF(__pyx_t_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_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; - __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_32; - goto __pyx_L5_except_error; - } - } - } - goto __pyx_L5_except_error; - - /* "pyrfc/_cyrfc.pyx":2437 - * global _LOCALE_RADIX - * # print ("fill", wrapString(cName), value, type(value)) - * try: # <<<<<<<<<<<<<< - * if typ == RFCTYPE_STRUCTURE: - * if type(value) is not dict: - */ - __pyx_L5_except_error:; - __Pyx_XGIVEREF(__pyx_t_1); - __Pyx_XGIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); - goto __pyx_L1_error; - __pyx_L8_try_end:; - } - - /* "pyrfc/_cyrfc.pyx":2567 - * e.args += (wrapString(cName), ) - * raise - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - __pyx_t_4 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2568 - * raise - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * - * cdef SAP_RAW* fillBytes(pystr) except NULL: - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 2568, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2567 - * e.args += (wrapString(cName), ) - * raise - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * - */ - } - - /* "pyrfc/_cyrfc.pyx":2428 - * i += 1 - * - * cdef fillVariable(RFCTYPE typ, RFC_FUNCTION_HANDLE container, SAP_UC* cName, value, RFC_TYPE_DESC_HANDLE typeDesc): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_17); - __Pyx_XDECREF(__pyx_t_18); - __Pyx_XDECREF(__pyx_t_31); - __Pyx_AddTraceback("pyrfc._cyrfc.fillVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_ex); - __Pyx_XDECREF(__pyx_v_svalue); - __Pyx_XDECREF(__pyx_v_locale_radix); - __Pyx_XDECREF(__pyx_v_e); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2570 - * raise wrapError(&errorInfo) - * - * cdef SAP_RAW* fillBytes(pystr) except NULL: # <<<<<<<<<<<<<< - * cdef size_t size = len(pystr) - * cdef SAP_RAW* bytes = malloc(size) - */ - -static SAP_RAW *__pyx_f_5pyrfc_6_cyrfc_fillBytes(PyObject *__pyx_v_pystr) { - size_t __pyx_v_size; - SAP_RAW *__pyx_v_bytes; - SAP_RAW *__pyx_r; - __Pyx_RefNannyDeclarations - Py_ssize_t __pyx_t_1; - char *__pyx_t_2; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillBytes", 0); - - /* "pyrfc/_cyrfc.pyx":2571 - * - * cdef SAP_RAW* fillBytes(pystr) except NULL: - * cdef size_t size = len(pystr) # <<<<<<<<<<<<<< - * cdef SAP_RAW* bytes = malloc(size) - * memcpy(bytes, pystr, size) - */ - __pyx_t_1 = PyObject_Length(__pyx_v_pystr); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2571, __pyx_L1_error) - __pyx_v_size = __pyx_t_1; - - /* "pyrfc/_cyrfc.pyx":2572 - * cdef SAP_RAW* fillBytes(pystr) except NULL: - * cdef size_t size = len(pystr) - * cdef SAP_RAW* bytes = malloc(size) # <<<<<<<<<<<<<< - * memcpy(bytes, pystr, size) - * return bytes - */ - __pyx_v_bytes = ((SAP_RAW *)malloc(__pyx_v_size)); - - /* "pyrfc/_cyrfc.pyx":2573 - * cdef size_t size = len(pystr) - * cdef SAP_RAW* bytes = malloc(size) - * memcpy(bytes, pystr, size) # <<<<<<<<<<<<<< - * return bytes - * - */ - __pyx_t_2 = __Pyx_PyObject_AsWritableString(__pyx_v_pystr); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2573, __pyx_L1_error) - (void)(memcpy(__pyx_v_bytes, ((char *)__pyx_t_2), __pyx_v_size)); - - /* "pyrfc/_cyrfc.pyx":2574 - * cdef SAP_RAW* bytes = malloc(size) - * memcpy(bytes, pystr, size) - * return bytes # <<<<<<<<<<<<<< - * - * cdef fillError(exception, RFC_ERROR_INFO* errorInfo): - */ - __pyx_r = __pyx_v_bytes; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2570 - * raise wrapError(&errorInfo) - * - * cdef SAP_RAW* fillBytes(pystr) except NULL: # <<<<<<<<<<<<<< - * cdef size_t size = len(pystr) - * cdef SAP_RAW* bytes = malloc(size) - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("pyrfc._cyrfc.fillBytes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2576 - * return bytes - * - * cdef fillError(exception, RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * group2error = { - * ABAPApplicationError: ABAP_APPLICATION_FAILURE, - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_fillError(PyObject *__pyx_v_exception, RFC_ERROR_INFO *__pyx_v_errorInfo) { - PyObject *__pyx_v_group2error = NULL; - PyObject *__pyx_v_str = NULL; - SAP_UC *__pyx_v_sapuc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - int __pyx_t_5; - RFC_ERROR_GROUP __pyx_t_6; - SAP_UC *__pyx_t_7; - long __pyx_t_8; - Py_ssize_t __pyx_t_9; - Py_ssize_t __pyx_t_10; - RFC_RC __pyx_t_11; - RFC_RC __pyx_t_12; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillError", 0); - - /* "pyrfc/_cyrfc.pyx":2578 - * 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, 2578, __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, 2578, __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, 2578, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2579 - * 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, 2579, __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, 2579, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2580 - * 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, 2580, __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, 2580, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2581 - * 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, 2581, __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, 2581, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2582 - * 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, 2582, __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, 2582, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2583 - * 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, 2583, __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, 2583, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2584 - * 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, 2584, __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, 2584, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 2578, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_group2error = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2586 - * 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, 2586, __pyx_L1_error) - if (unlikely(__pyx_t_4)) { - - /* "pyrfc/_cyrfc.pyx":2587 - * } - * 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, 2587, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_Not_a_valid_error_group}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __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, 2587, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2586 - * ExternalAuthorizationError: EXTERNAL_AUTHORIZATION_FAILURE - * } - * if type(exception) not in group2error: # <<<<<<<<<<<<<< - * raise RFCError("Not a valid error group.") - * - */ - } - - /* "pyrfc/_cyrfc.pyx":2589 - * 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, 2589, __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, 2589, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_errorInfo->group = __pyx_t_6; - - /* "pyrfc/_cyrfc.pyx":2591 - * 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, 2591, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2591, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2593 - * 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, 2593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 0x200, NULL, NULL, &__pyx_slice__34, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_str = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2594 - * # str = exception.message[0:512].ljust(512) - * str = exception.message[0:512] - * sapuc = fillString(str) # <<<<<<<<<<<<<< - * strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512)) - * free(sapuc) - */ - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_str); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2594, __pyx_L1_error) - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2595 - * 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, 2595, __pyx_L1_error) - __pyx_t_10 = (__pyx_t_9 + 1); - if ((__pyx_t_8 < __pyx_t_10)) { - __pyx_t_9 = __pyx_t_8; - } else { - __pyx_t_9 = __pyx_t_10; - } - strncpyU(__pyx_v_errorInfo->message, __pyx_v_sapuc, __pyx_t_9); - - /* "pyrfc/_cyrfc.pyx":2596 - * sapuc = fillString(str) - * strncpyU(errorInfo.message, sapuc, min(len(str)+1, 512)) - * free(sapuc) # <<<<<<<<<<<<<< - * errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR - * if exception.key: # fixed length, exactly 128 chars - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2591 - * errorInfo.group = group2error.get(type(exception)) - * - * if exception.message: # fixed length, exactly 512 chars # <<<<<<<<<<<<<< - * # str = exception.message[0:512].ljust(512) - * str = exception.message[0:512] - */ - } - - /* "pyrfc/_cyrfc.pyx":2597 - * 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, 2597, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2597, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exception, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __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, 2597, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = __pyx_t_12; - } else { - __pyx_t_11 = RFC_UNKNOWN_ERROR; - } - __pyx_v_errorInfo->code = __pyx_t_11; - - /* "pyrfc/_cyrfc.pyx":2598 - * 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, 2598, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2598, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2599 - * 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, 2599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 0x80, NULL, NULL, &__pyx_slice__35, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_str, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2600 - * if exception.key: # fixed length, exactly 128 chars - * str = exception.key[0:128] - * sapuc = fillString(str) # <<<<<<<<<<<<<< - * strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128)) - * free(sapuc) - */ - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_v_str); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2600, __pyx_L1_error) - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2601 - * 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, 2601, __pyx_L1_error) - __pyx_t_10 = (__pyx_t_9 + 1); - if ((__pyx_t_8 < __pyx_t_10)) { - __pyx_t_9 = __pyx_t_8; - } else { - __pyx_t_9 = __pyx_t_10; - } - strncpyU(__pyx_v_errorInfo->key, __pyx_v_sapuc, __pyx_t_9); - - /* "pyrfc/_cyrfc.pyx":2602 - * sapuc = fillString(str) - * strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128)) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_class: - * sapuc = fillString(exception.msg_class[0:20]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2598 - * free(sapuc) - * errorInfo.code = exception.code if exception.code else RFC_UNKNOWN_ERROR - * if exception.key: # fixed length, exactly 128 chars # <<<<<<<<<<<<<< - * str = exception.key[0:128] - * sapuc = fillString(str) - */ - } - - /* "pyrfc/_cyrfc.pyx":2603 - * 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, 2603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2603, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2604 - * 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, 2604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2604, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2605 - * 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, 2605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 20, NULL, NULL, &__pyx_slice__14, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2605, __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, 2605, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgClass, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2606 - * sapuc = fillString(exception.msg_class[0:20]) - * strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_type: - * sapuc = fillString(exception.msg_type[0:1]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2603 - * strncpyU(errorInfo.key, sapuc, min(len(str)+1, 128)) - * free(sapuc) - * if exception.msg_class: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_class[0:20]) - * strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2607 - * 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, 2607, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2607, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2608 - * 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, 2608, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 1, NULL, NULL, &__pyx_slice__36, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2608, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2608, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2609 - * 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, 2609, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 1, NULL, NULL, &__pyx_slice__36, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2609, __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, 2609, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgType, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2610 - * sapuc = fillString(exception.msg_type[0:1]) - * strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_number: - * sapuc = fillString(exception.msg_number[0:3]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2607 - * strncpyU(errorInfo.abapMsgClass, sapuc, len(exception.msg_class[0:20]) + 1) - * free(sapuc) - * if exception.msg_type: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_type[0:1]) - * strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2611 - * 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, 2611, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2611, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2612 - * 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, 2612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2612, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2613 - * 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, 2613, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 3, NULL, NULL, &__pyx_slice__13, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __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, 2613, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgNumber, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2614 - * sapuc = fillString(exception.msg_number[0:3]) - * strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_v1: - * sapuc = fillString(exception.msg_v1[0:50]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2611 - * strncpyU(errorInfo.abapMsgType, sapuc, len(exception.msg_type[0:1]) + 1) - * free(sapuc) - * if exception.msg_number: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_number[0:3]) - * strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2615 - * 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, 2615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2615, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2616 - * 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, 2616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2616, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2617 - * 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, 2617, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __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, 2617, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgV1, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2618 - * sapuc = fillString(exception.msg_v1[0:50]) - * strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_v2: - * sapuc = fillString(exception.msg_v2[0:50]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2615 - * strncpyU(errorInfo.abapMsgNumber, sapuc, len(exception.msg_number[0:3]) + 1) - * free(sapuc) - * if exception.msg_v1: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_v1[0:50]) - * strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2619 - * 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, 2619, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2619, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2620 - * 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, 2620, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2620, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2620, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2621 - * 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, 2621, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __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, 2621, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgV2, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2622 - * sapuc = fillString(exception.msg_v2[0:50]) - * strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_v3: - * sapuc = fillString(exception.msg_v3[0:50]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2619 - * strncpyU(errorInfo.abapMsgV1, sapuc, len(exception.msg_v1[0:50]) + 1) - * free(sapuc) - * if exception.msg_v2: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_v2[0:50]) - * strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2623 - * 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, 2623, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2623, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2624 - * 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, 2624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2624, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2625 - * 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, 2625, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __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, 2625, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgV3, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2626 - * sapuc = fillString(exception.msg_v3[0:50]) - * strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * if exception.msg_v4: - * sapuc = fillString(exception.msg_v4[0:50]) - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2623 - * strncpyU(errorInfo.abapMsgV2, sapuc, len(exception.msg_v2[0:50]) + 1) - * free(sapuc) - * if exception.msg_v3: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_v3[0:50]) - * strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2627 - * 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, 2627, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 2627, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_4) { - - /* "pyrfc/_cyrfc.pyx":2628 - * 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, 2628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2628, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_fillString(__pyx_t_3); if (unlikely(__pyx_t_7 == ((SAP_UC *)NULL))) __PYX_ERR(0, 2628, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_sapuc = __pyx_t_7; - - /* "pyrfc/_cyrfc.pyx":2629 - * 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, 2629, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, 50, NULL, NULL, &__pyx_slice__37, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2629, __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, 2629, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - strncpyU(__pyx_v_errorInfo->abapMsgV4, __pyx_v_sapuc, (__pyx_t_9 + 1)); - - /* "pyrfc/_cyrfc.pyx":2630 - * sapuc = fillString(exception.msg_v4[0:50]) - * strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1) - * free(sapuc) # <<<<<<<<<<<<<< - * - * cdef SAP_UC* fillString(pyuc) except NULL: - */ - free(__pyx_v_sapuc); - - /* "pyrfc/_cyrfc.pyx":2627 - * strncpyU(errorInfo.abapMsgV3, sapuc, len(exception.msg_v3[0:50]) + 1) - * free(sapuc) - * if exception.msg_v4: # <<<<<<<<<<<<<< - * sapuc = fillString(exception.msg_v4[0:50]) - * strncpyU(errorInfo.abapMsgV4, sapuc, len(exception.msg_v4[0:50]) + 1) - */ - } - - /* "pyrfc/_cyrfc.pyx":2576 - * return bytes - * - * cdef fillError(exception, RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * group2error = { - * ABAPApplicationError: ABAP_APPLICATION_FAILURE, - */ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.fillError", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_group2error); - __Pyx_XDECREF(__pyx_v_str); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2632 - * free(sapuc) - * - * cdef SAP_UC* fillString(pyuc) except NULL: # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static SAP_UC *__pyx_f_5pyrfc_6_cyrfc_fillString(PyObject *__pyx_v_pyuc) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - PyObject *__pyx_v_ucbytes = NULL; - unsigned int __pyx_v_ucbytes_len; - unsigned int __pyx_v_sapuc_size; - SAP_UC *__pyx_v_sapuc; - unsigned int __pyx_v_result_len; - SAP_UC *__pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - Py_ssize_t __pyx_t_5; - int __pyx_t_6; - unsigned char const *__pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("fillString", 0); - - /* "pyrfc/_cyrfc.pyx":2635 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * ucbytes = pyuc.encode() # <<<<<<<<<<<<<< - * cdef unsigned ucbytes_len = 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, 2635, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - __pyx_t_4 = 0; - 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_4 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_3, }; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2635, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_v_ucbytes = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2636 - * cdef RFC_ERROR_INFO errorInfo - * ucbytes = pyuc.encode() - * cdef unsigned ucbytes_len = len(ucbytes) # <<<<<<<<<<<<<< - * cdef unsigned sapuc_size = ucbytes_len + 1 - * cdef SAP_UC* sapuc = mallocU(sapuc_size) - */ - __pyx_t_5 = PyObject_Length(__pyx_v_ucbytes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2636, __pyx_L1_error) - __pyx_v_ucbytes_len = ((unsigned int)__pyx_t_5); - - /* "pyrfc/_cyrfc.pyx":2637 - * ucbytes = pyuc.encode() - * cdef unsigned ucbytes_len = len(ucbytes) - * cdef unsigned sapuc_size = ucbytes_len + 1 # <<<<<<<<<<<<<< - * cdef SAP_UC* sapuc = mallocU(sapuc_size) - * sapuc[0] = 0 - */ - __pyx_v_sapuc_size = (__pyx_v_ucbytes_len + 1); - - /* "pyrfc/_cyrfc.pyx":2638 - * cdef unsigned ucbytes_len = len(ucbytes) - * cdef unsigned sapuc_size = ucbytes_len + 1 - * cdef SAP_UC* sapuc = mallocU(sapuc_size) # <<<<<<<<<<<<<< - * sapuc[0] = 0 - * cdef unsigned result_len = 0 - */ - __pyx_v_sapuc = mallocU(__pyx_v_sapuc_size); - - /* "pyrfc/_cyrfc.pyx":2639 - * cdef unsigned sapuc_size = ucbytes_len + 1 - * cdef SAP_UC* sapuc = mallocU(sapuc_size) - * sapuc[0] = 0 # <<<<<<<<<<<<<< - * cdef unsigned result_len = 0 - * if ucbytes_len > 0: - */ - (__pyx_v_sapuc[0]) = 0; - - /* "pyrfc/_cyrfc.pyx":2640 - * cdef SAP_UC* sapuc = mallocU(sapuc_size) - * sapuc[0] = 0 - * cdef unsigned result_len = 0 # <<<<<<<<<<<<<< - * if ucbytes_len > 0: - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) - */ - __pyx_v_result_len = 0; - - /* "pyrfc/_cyrfc.pyx":2641 - * sapuc[0] = 0 - * cdef unsigned result_len = 0 - * if ucbytes_len > 0: # <<<<<<<<<<<<<< - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_6 = (__pyx_v_ucbytes_len > 0); - if (__pyx_t_6) { - - /* "pyrfc/_cyrfc.pyx":2642 - * cdef unsigned result_len = 0 - * if ucbytes_len > 0: - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_t_7 = __Pyx_PyObject_AsUString(__pyx_v_ucbytes); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 2642, __pyx_L1_error) - __pyx_v_rc = RfcUTF8ToSAPUC(__pyx_t_7, __pyx_v_ucbytes_len, __pyx_v_sapuc, (&__pyx_v_sapuc_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2643 - * if ucbytes_len > 0: - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return sapuc - */ - __pyx_t_6 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_6)) { - - /* "pyrfc/_cyrfc.pyx":2644 - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return sapuc - * - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2644, __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, 2644, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2643 - * if ucbytes_len > 0: - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return sapuc - */ - } - - /* "pyrfc/_cyrfc.pyx":2641 - * sapuc[0] = 0 - * cdef unsigned result_len = 0 - * if ucbytes_len > 0: # <<<<<<<<<<<<<< - * rc = RfcUTF8ToSAPUC(ucbytes, ucbytes_len, sapuc, &sapuc_size, &result_len, &errorInfo) - * if rc != RFC_OK: - */ - } - - /* "pyrfc/_cyrfc.pyx":2645 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * return sapuc # <<<<<<<<<<<<<< - * - * ################################################################################ - */ - __pyx_r = __pyx_v_sapuc; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2632 - * free(sapuc) - * - * cdef SAP_UC* fillString(pyuc) except NULL: # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("pyrfc._cyrfc.fillString", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_ucbytes); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2652 - * # wrapper functions take C values and returns Python values - * - * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes): # <<<<<<<<<<<<<< - * return { - * 'dest': wrapString(attributes.dest, 64, True).rstrip('\0') - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapConnectionAttributes(RFC_ATTRIBUTES __pyx_v_attributes) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapConnectionAttributes", 0); - - /* "pyrfc/_cyrfc.pyx":2653 - * - * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes): - * return { # <<<<<<<<<<<<<< - * 'dest': wrapString(attributes.dest, 64, True).rstrip('\0') - * , 'host': wrapString(attributes.host, 100, True).rstrip('\0') - */ - __Pyx_XDECREF(__pyx_r); - - /* "pyrfc/_cyrfc.pyx":2654 - * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes): - * return { - * 'dest': wrapString(attributes.dest, 64, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'host': wrapString(attributes.host, 100, True).rstrip('\0') - * , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0') - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(25); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_64; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.dest, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __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, 2654, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2655 - * return { - * 'dest': wrapString(attributes.dest, 64, True).rstrip('\0') - * , 'host': wrapString(attributes.host, 100, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0') - * , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_100; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.host, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2655, __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, 2655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2655, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2656 - * 'dest': wrapString(attributes.dest, 64, True).rstrip('\0') - * , 'host': wrapString(attributes.host, 100, True).rstrip('\0') - * , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0') - * , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_100; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerHost, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2656, __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, 2656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2656, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2657 - * , 'host': wrapString(attributes.host, 100, True).rstrip('\0') - * , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0') - * , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0') - * , 'client': wrapString(attributes.client, 3, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_2; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.sysNumber, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __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, 2657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2658 - * , 'partnerHost': wrapString(attributes.partnerHost, 100, True).rstrip('\0') - * , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0') - * , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'client': wrapString(attributes.client, 3, True).rstrip('\0') - * , 'user': wrapString(attributes.user, 12, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_8; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.sysId, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2658, __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, 2658, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2658, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2659 - * , 'sysNumber': wrapString(attributes.sysNumber, 2, True).rstrip('\0') - * , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0') - * , 'client': wrapString(attributes.client, 3, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'user': wrapString(attributes.user, 12, True).rstrip('\0') - * , 'language': wrapString(attributes.language, 2, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_3; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.client, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2659, __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, 2659, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2659, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2660 - * , 'sysId': wrapString(attributes.sysId, 8, True).rstrip('\0') - * , 'client': wrapString(attributes.client, 3, True).rstrip('\0') - * , 'user': wrapString(attributes.user, 12, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'language': wrapString(attributes.language, 2, True).rstrip('\0') - * , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_12; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.user, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2660, __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, 2660, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2660, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2661 - * , 'client': wrapString(attributes.client, 3, True).rstrip('\0') - * , 'user': wrapString(attributes.user, 12, True).rstrip('\0') - * , 'language': wrapString(attributes.language, 2, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0') - * , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_2; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.language, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2661, __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, 2661, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2662 - * , 'user': wrapString(attributes.user, 12, True).rstrip('\0') - * , 'language': wrapString(attributes.language, 2, True).rstrip('\0') - * , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0') - * , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_1; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.trace, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2662, __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, 2662, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2662, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2663 - * , 'language': wrapString(attributes.language, 2, True).rstrip('\0') - * , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0') - * , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0') - * , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_2; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.isoLanguage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2663, __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, 2663, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2663, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2664 - * , 'trace': wrapString(attributes.trace, 1, True).rstrip('\0') - * , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0') - * , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0') - * , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_4; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.codepage, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __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, 2664, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2664, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2665 - * , 'isoLanguage': wrapString(attributes.isoLanguage, 2, True).rstrip('\0') - * , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0') - * , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0') - * , 'type': wrapString(attributes.type, 1).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_4; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerCodepage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2665, __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, 2665, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2665, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2666 - * , 'codepage': wrapString(attributes.codepage, 4, True).rstrip('\0') - * , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0') - * , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'type': wrapString(attributes.type, 1).rstrip('\0') - * , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_1; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.rfcRole, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2666, __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, 2666, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2666, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2667 - * , 'partnerCodepage': wrapString(attributes.partnerCodepage, 4, True).rstrip('\0') - * , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0') - * , 'type': wrapString(attributes.type, 1).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0') - * , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 1; - __pyx_t_4.uclen = __pyx_int_1; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.type, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2667, __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, 2667, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2667, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2668 - * , 'rfcRole': wrapString(attributes.rfcRole, 1, True).rstrip('\0') - * , 'type': wrapString(attributes.type, 1).rstrip('\0') - * , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0') - * , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_1; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerType, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2668, __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, 2668, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2668, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2669 - * , 'type': wrapString(attributes.type, 1).rstrip('\0') - * , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0') - * , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0') - * , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_4; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.rel, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2669, __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, 2669, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2669, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2670 - * , 'partnerType': wrapString(attributes.partnerType, 1, True).rstrip('\0') - * , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0') - * , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0') - * , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_4; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerRel, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2670, __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, 2670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2670, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2671 - * , 'rel': wrapString(attributes.rel, 4, True).rstrip('\0') - * , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0') - * , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0') - * , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_4; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.kernelRel, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2671, __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, 2671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2671, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2672 - * , 'partnerRel': wrapString(attributes.partnerRel, 4, True).rstrip('\0') - * , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0') - * , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0') - * , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_8; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.cpicConvId, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2672, __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, 2672, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2672, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2673 - * , 'kernelRel': wrapString(attributes.kernelRel, 4, True).rstrip('\0') - * , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0') - * , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0') - * , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_128; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.progName, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2673, __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, 2673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2673, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2674 - * , 'cpicConvId': wrapString(attributes.cpicConvId, 8, True).rstrip('\0') - * , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0') - * , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0') - * , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_1; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerBytesPerChar, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2674, __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, 2674, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2674, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2675 - * , 'progName': wrapString(attributes.progName, 128, True).rstrip('\0') - * , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0') - * , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0') - * , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_4; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerSystemCodepage, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2675, __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, 2675, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2675, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2676 - * , 'partnerBytesPerChar': wrapString(attributes.partnerBytesPerChar, 1, True).rstrip('\0') - * , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0') - * , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0') - * , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0') - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_15; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerIP, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2676, __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, 2676, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2676, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2677 - * , 'partnerSystemCodepage': wrapString(attributes.partnerSystemCodepage, 4, True).rstrip('\0') - * , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0') - * , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0') # <<<<<<<<<<<<<< - * , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0') - * } - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_45; - __pyx_t_4.rstrip = Py_True; - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.partnerIPv6, &__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2677, __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, 2677, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2677, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2678 - * , 'partnerIP': wrapString(attributes.partnerIP, 15, True).rstrip('\0') - * , 'partnerIPv6': wrapString(attributes.partnerIPv6, 45, True).rstrip('\0') - * , 'reserved': wrapString(attributes.reserved, 17, True).rstrip('\0') # <<<<<<<<<<<<<< - * } - * - */ - __pyx_t_4.__pyx_n = 2; - __pyx_t_4.uclen = __pyx_int_17; - __pyx_t_4.rstrip = Py_True; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_attributes.reserved, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2678, __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, 2678, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_u__38}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2678, __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, 2654, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2652 - * # wrapper functions take C values and returns Python values - * - * cdef wrapConnectionAttributes(RFC_ATTRIBUTES attributes): # <<<<<<<<<<<<<< - * return { - * 'dest': wrapString(attributes.dest, 64, True).rstrip('\0') - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapConnectionAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2682 - * - * - * cdef wrapTypeDescription(RFC_TYPE_DESC_HANDLE typeDesc): # <<<<<<<<<<<<<< - * """ Parses a RFC_TYPE_DESC_HANDLE - * - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_FIELD_DESC __pyx_v_fieldDesc; - RFC_ABAP_NAME __pyx_v_typeName; - unsigned int __pyx_v_nuc_length; - unsigned int __pyx_v_uc_length; - unsigned int __pyx_v_i; - unsigned int __pyx_v_fieldCount; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_type_desc = NULL; - PyObject *__pyx_v_field_description = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - unsigned int __pyx_t_8; - unsigned int __pyx_t_9; - unsigned int __pyx_t_10; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapTypeDescription", 0); - - /* "pyrfc/_cyrfc.pyx":2695 - * cdef unsigned i, fieldCount - * - * rc = RfcGetTypeName(typeDesc, typeName, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetTypeName(__pyx_v_typeDesc, __pyx_v_typeName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2696 - * - * rc = RfcGetTypeName(typeDesc, typeName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * name = wrapString(typeName) - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2697 - * rc = RfcGetTypeName(typeDesc, typeName, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * name = wrapString(typeName) - * rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo) - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2697, __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, 2697, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2696 - * - * rc = RfcGetTypeName(typeDesc, typeName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * name = wrapString(typeName) - */ - } - - /* "pyrfc/_cyrfc.pyx":2698 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * name = wrapString(typeName) # <<<<<<<<<<<<<< - * rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_typeName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_name = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2699 - * raise wrapError(&errorInfo) - * name = wrapString(typeName) - * rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetTypeLength(__pyx_v_typeDesc, (&__pyx_v_nuc_length), (&__pyx_v_uc_length), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2700 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2701 - * rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * type_desc = TypeDescription(name, nuc_length, uc_length) - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2701, __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, 2701, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2700 - * name = wrapString(typeName) - * rc = RfcGetTypeLength(typeDesc, &nuc_length, &uc_length, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * type_desc = TypeDescription(name, nuc_length, uc_length) - */ - } - - /* "pyrfc/_cyrfc.pyx":2702 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * type_desc = TypeDescription(name, nuc_length, uc_length) # <<<<<<<<<<<<<< - * - * rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo) - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_TypeDescription_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2702, __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, 2702, __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, 2702, __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; - } - } - { - PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_v_name, __pyx_t_4, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_v_type_desc = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2704 - * type_desc = TypeDescription(name, nuc_length, uc_length) - * - * rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetFieldCount(__pyx_v_typeDesc, (&__pyx_v_fieldCount), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2705 - * - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2706 - * rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * for i in range(fieldCount): - * rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo) - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2706, __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, 2706, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2705 - * - * rc = RfcGetFieldCount(typeDesc, &fieldCount, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * for i in range(fieldCount): - */ - } - - /* "pyrfc/_cyrfc.pyx":2707 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * for i in range(fieldCount): # <<<<<<<<<<<<<< - * rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_8 = __pyx_v_fieldCount; - __pyx_t_9 = __pyx_t_8; - for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { - __pyx_v_i = __pyx_t_10; - - /* "pyrfc/_cyrfc.pyx":2708 - * raise wrapError(&errorInfo) - * for i in range(fieldCount): - * rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetFieldDescByIndex(__pyx_v_typeDesc, __pyx_v_i, (&__pyx_v_fieldDesc), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2709 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2710 - * rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * field_description = { - * 'name': wrapString(fieldDesc.name), - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2710, __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, 2710, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2709 - * for i in range(fieldCount): - * rc = RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * field_description = { - */ - } - - /* "pyrfc/_cyrfc.pyx":2712 - * raise wrapError(&errorInfo) - * field_description = { - * 'name': wrapString(fieldDesc.name), # <<<<<<<<<<<<<< - * 'field_type': RfcFieldType(fieldDesc.type).name, - * 'nuc_length': fieldDesc.nucLength, - */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_fieldDesc.name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2712, __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, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2713 - * field_description = { - * 'name': wrapString(fieldDesc.name), - * 'field_type': RfcFieldType(fieldDesc.type).name, # <<<<<<<<<<<<<< - * 'nuc_length': fieldDesc.nucLength, - * 'nuc_offset': fieldDesc.nucOffset, - */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(__pyx_v_fieldDesc.type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - __pyx_t_7 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_field_type, __pyx_t_5) < 0) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2714 - * 'name': wrapString(fieldDesc.name), - * 'field_type': RfcFieldType(fieldDesc.type).name, - * 'nuc_length': fieldDesc.nucLength, # <<<<<<<<<<<<<< - * 'nuc_offset': fieldDesc.nucOffset, - * 'uc_length': fieldDesc.ucLength, - */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.nucLength); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2714, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nuc_length, __pyx_t_5) < 0) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2715 - * 'field_type': RfcFieldType(fieldDesc.type).name, - * 'nuc_length': fieldDesc.nucLength, - * 'nuc_offset': fieldDesc.nucOffset, # <<<<<<<<<<<<<< - * 'uc_length': fieldDesc.ucLength, - * 'uc_offset': fieldDesc.ucOffset, - */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.nucOffset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2715, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_nuc_offset, __pyx_t_5) < 0) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2716 - * 'nuc_length': fieldDesc.nucLength, - * 'nuc_offset': fieldDesc.nucOffset, - * 'uc_length': fieldDesc.ucLength, # <<<<<<<<<<<<<< - * 'uc_offset': fieldDesc.ucOffset, - * 'decimals': fieldDesc.decimals - */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.ucLength); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2716, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_uc_length, __pyx_t_5) < 0) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2717 - * 'nuc_offset': fieldDesc.nucOffset, - * 'uc_length': fieldDesc.ucLength, - * 'uc_offset': fieldDesc.ucOffset, # <<<<<<<<<<<<<< - * 'decimals': fieldDesc.decimals - * } - */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.ucOffset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2717, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_uc_offset, __pyx_t_5) < 0) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":2718 - * 'uc_length': fieldDesc.ucLength, - * 'uc_offset': fieldDesc.ucOffset, - * 'decimals': fieldDesc.decimals # <<<<<<<<<<<<<< - * } - * if fieldDesc.typeDescHandle is NULL: - */ - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_fieldDesc.decimals); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2718, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_decimals, __pyx_t_5) < 0) __PYX_ERR(0, 2712, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF_SET(__pyx_v_field_description, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2720 - * 'decimals': fieldDesc.decimals - * } - * if fieldDesc.typeDescHandle is NULL: # <<<<<<<<<<<<<< - * field_description['type_description'] = None - * else: - */ - __pyx_t_1 = (__pyx_v_fieldDesc.typeDescHandle == NULL); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":2721 - * } - * 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, 2721, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2720 - * 'decimals': fieldDesc.decimals - * } - * if fieldDesc.typeDescHandle is NULL: # <<<<<<<<<<<<<< - * field_description['type_description'] = None - * else: - */ - goto __pyx_L9; - } - - /* "pyrfc/_cyrfc.pyx":2723 - * field_description['type_description'] = None - * else: - * field_description['type_description'] = wrapTypeDescription(fieldDesc.typeDescHandle) # <<<<<<<<<<<<<< - * # Add field to object - * type_desc.add_field(**field_description) - */ - /*else*/ { - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(__pyx_v_fieldDesc.typeDescHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2723, __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, 2723, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_L9:; - - /* "pyrfc/_cyrfc.pyx":2725 - * 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, 2725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyDict_Copy(__pyx_v_field_description); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2725, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - - /* "pyrfc/_cyrfc.pyx":2727 - * type_desc.add_field(**field_description) - * - * return type_desc # <<<<<<<<<<<<<< - * - * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_type_desc); - __pyx_r = __pyx_v_type_desc; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2682 - * - * - * 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_AddTraceback("pyrfc._cyrfc.wrapTypeDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_type_desc); - __Pyx_XDECREF(__pyx_v_field_description); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2729 - * return type_desc - * - * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_ABAP_NAME __pyx_v_functionName; - unsigned int __pyx_v_i; - unsigned int __pyx_v_paramCount; - RFC_PARAMETER_DESC __pyx_v_paramDesc; - PyObject *__pyx_v_name = NULL; - PyObject *__pyx_v_func_desc = NULL; - PyObject *__pyx_v_parameter_description = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - unsigned int __pyx_t_6; - unsigned int __pyx_t_7; - unsigned int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapFunctionDescription", 0); - - /* "pyrfc/_cyrfc.pyx":2736 - * cdef RFC_PARAMETER_DESC paramDesc - * - * rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetFunctionName(__pyx_v_funcDesc, __pyx_v_functionName, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2737 - * - * rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * name = wrapString(functionName) - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2738 - * rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * name = wrapString(functionName) - * func_desc = FunctionDescription(name) - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2738, __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, 2738, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2737 - * - * rc = RfcGetFunctionName(funcDesc, functionName, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * name = wrapString(functionName) - */ - } - - /* "pyrfc/_cyrfc.pyx":2739 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * name = wrapString(functionName) # <<<<<<<<<<<<<< - * func_desc = FunctionDescription(name) - * - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_functionName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_name = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2740 - * raise wrapError(&errorInfo) - * name = wrapString(functionName) - * func_desc = FunctionDescription(name) # <<<<<<<<<<<<<< - * - * rc = RfcGetParameterCount(funcDesc, ¶mCount, &errorInfo) - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_FunctionDescription_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2740, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - __pyx_t_5 = 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_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_name}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2740, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_v_func_desc = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2742 - * func_desc = FunctionDescription(name) - * - * rc = RfcGetParameterCount(funcDesc, ¶mCount, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetParameterCount(__pyx_v_funcDesc, (&__pyx_v_paramCount), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2743 - * - * rc = RfcGetParameterCount(funcDesc, ¶mCount, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * for i in range(paramCount): - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2744 - * rc = RfcGetParameterCount(funcDesc, ¶mCount, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * for i in range(paramCount): - * rc = RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, &errorInfo) - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2744, __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, 2744, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2743 - * - * rc = RfcGetParameterCount(funcDesc, ¶mCount, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * for i in range(paramCount): - */ - } - - /* "pyrfc/_cyrfc.pyx":2745 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * for i in range(paramCount): # <<<<<<<<<<<<<< - * rc = RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_t_6 = __pyx_v_paramCount; - __pyx_t_7 = __pyx_t_6; - for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { - __pyx_v_i = __pyx_t_8; - - /* "pyrfc/_cyrfc.pyx":2746 - * raise wrapError(&errorInfo) - * for i in range(paramCount): - * rc = RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetParameterDescByIndex(__pyx_v_funcDesc, __pyx_v_i, (&__pyx_v_paramDesc), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2747 - * for i in range(paramCount): - * rc = RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * parameter_description = { - */ - __pyx_t_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2748 - * rc = RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * parameter_description = { - * 'name': wrapString(paramDesc.name), - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2748, __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, 2748, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2747 - * for i in range(paramCount): - * rc = RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * parameter_description = { - */ - } - - /* "pyrfc/_cyrfc.pyx":2750 - * raise wrapError(&errorInfo) - * parameter_description = { - * 'name': wrapString(paramDesc.name), # <<<<<<<<<<<<<< - * 'parameter_type': RfcFieldType(paramDesc.type).name, - * 'direction': RfcParameterDirection(paramDesc.direction).name, - */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.name, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2750, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2751 - * parameter_description = { - * 'name': wrapString(paramDesc.name), - * 'parameter_type': RfcFieldType(paramDesc.type).name, # <<<<<<<<<<<<<< - * 'direction': RfcParameterDirection(paramDesc.direction).name, - * 'nuc_length': paramDesc.nucLength, - */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_RfcFieldType); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2751, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_From_RFCTYPE(__pyx_v_paramDesc.type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2751, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_10); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2751, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_parameter_type, __pyx_t_4) < 0) __PYX_ERR(0, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":2752 - * 'name': wrapString(paramDesc.name), - * 'parameter_type': RfcFieldType(paramDesc.type).name, - * 'direction': RfcParameterDirection(paramDesc.direction).name, # <<<<<<<<<<<<<< - * 'nuc_length': paramDesc.nucLength, - * 'uc_length': paramDesc.ucLength, - */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_RfcParameterDirection); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyInt_From_RFC_DIRECTION(__pyx_v_paramDesc.direction); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = NULL; - __pyx_t_5 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_10); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - __pyx_t_5 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); - __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_direction, __pyx_t_3) < 0) __PYX_ERR(0, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2753 - * 'parameter_type': RfcFieldType(paramDesc.type).name, - * 'direction': RfcParameterDirection(paramDesc.direction).name, - * 'nuc_length': paramDesc.nucLength, # <<<<<<<<<<<<<< - * 'uc_length': paramDesc.ucLength, - * 'decimals': paramDesc.decimals, - */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_paramDesc.nucLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2753, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2754 - * 'direction': RfcParameterDirection(paramDesc.direction).name, - * 'nuc_length': paramDesc.nucLength, - * 'uc_length': paramDesc.ucLength, # <<<<<<<<<<<<<< - * 'decimals': paramDesc.decimals, - * 'default_value': wrapString(paramDesc.defaultValue), - */ - __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_paramDesc.ucLength); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2754, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2755 - * '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, 2755, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2756 - * 'uc_length': paramDesc.ucLength, - * 'decimals': paramDesc.decimals, - * 'default_value': wrapString(paramDesc.defaultValue), # <<<<<<<<<<<<<< - * 'parameter_text': wrapString(paramDesc.parameterText), - * 'optional': bool(paramDesc.optional) - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.defaultValue, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2756, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2757 - * 'decimals': paramDesc.decimals, - * 'default_value': wrapString(paramDesc.defaultValue), - * 'parameter_text': wrapString(paramDesc.parameterText), # <<<<<<<<<<<<<< - * 'optional': bool(paramDesc.optional) - * # skip: void* extendedDescription; - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.parameterText, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2757, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":2758 - * '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, 2758, __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, 2758, __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, 2758, __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, 2750, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_parameter_description, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2762 - * # 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); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":2763 - * } - * 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, 2763, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2762 - * # This field can be used by the application programmer (i.e. you) to store arbitrary extra information. - * } - * if paramDesc.typeDescHandle is NULL: # <<<<<<<<<<<<<< - * parameter_description['type_description'] = None - * else: - */ - goto __pyx_L8; - } - - /* "pyrfc/_cyrfc.pyx":2765 - * parameter_description['type_description'] = None - * else: - * parameter_description['type_description'] = wrapTypeDescription(paramDesc.typeDescHandle) # <<<<<<<<<<<<<< - * func_desc.add_parameter(**parameter_description) - * - */ - /*else*/ { - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapTypeDescription(__pyx_v_paramDesc.typeDescHandle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2765, __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, 2765, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __pyx_L8:; - - /* "pyrfc/_cyrfc.pyx":2766 - * 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, 2766, __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, 2766, __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, 2766, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - - /* "pyrfc/_cyrfc.pyx":2768 - * func_desc.add_parameter(**parameter_description) - * - * return func_desc # <<<<<<<<<<<<<< - * - * - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_func_desc); - __pyx_r = __pyx_v_func_desc; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2729 - * return type_desc - * - * cdef wrapFunctionDescription(RFC_FUNCTION_DESC_HANDLE funcDesc): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapFunctionDescription", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_name); - __Pyx_XDECREF(__pyx_v_func_desc); - __Pyx_XDECREF(__pyx_v_parameter_description); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2771 - * - * - * cdef wrapResult( # <<<<<<<<<<<<<< - * RFC_FUNCTION_DESC_HANDLE funcDesc, - * RFC_FUNCTION_HANDLE container, - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapResult(RFC_FUNCTION_DESC_HANDLE __pyx_v_funcDesc, RFC_FUNCTION_HANDLE __pyx_v_container, RFC_DIRECTION __pyx_v_filter_parameter_direction, PyObject *__pyx_v_config) { - unsigned int __pyx_v_i; - unsigned int __pyx_v_paramCount; - RFC_PARAMETER_DESC __pyx_v_paramDesc; - PyObject *__pyx_v_result = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - unsigned int __pyx_t_2; - unsigned int __pyx_t_3; - unsigned int __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapResult", 0); - - /* "pyrfc/_cyrfc.pyx":2787 - * cdef unsigned i, paramCount - * cdef RFC_PARAMETER_DESC paramDesc - * RfcGetParameterCount(funcDesc, ¶mCount, NULL) # <<<<<<<<<<<<<< - * result = {} - * for i in range(paramCount): - */ - (void)(RfcGetParameterCount(__pyx_v_funcDesc, (&__pyx_v_paramCount), NULL)); - - /* "pyrfc/_cyrfc.pyx":2788 - * cdef RFC_PARAMETER_DESC paramDesc - * RfcGetParameterCount(funcDesc, ¶mCount, NULL) - * result = {} # <<<<<<<<<<<<<< - * for i in range(paramCount): - * RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, NULL) - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2788, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_result = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2789 - * RfcGetParameterCount(funcDesc, ¶mCount, NULL) - * result = {} - * for i in range(paramCount): # <<<<<<<<<<<<<< - * RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, NULL) - * if paramDesc.direction != filter_parameter_direction: - */ - __pyx_t_2 = __pyx_v_paramCount; - __pyx_t_3 = __pyx_t_2; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":2790 - * result = {} - * for i in range(paramCount): - * RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, NULL) # <<<<<<<<<<<<<< - * if paramDesc.direction != filter_parameter_direction: - * result[wrapString(paramDesc.name)] = wrapVariable( - */ - (void)(RfcGetParameterDescByIndex(__pyx_v_funcDesc, __pyx_v_i, (&__pyx_v_paramDesc), NULL)); - - /* "pyrfc/_cyrfc.pyx":2791 - * for i in range(paramCount): - * RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, NULL) - * if paramDesc.direction != filter_parameter_direction: # <<<<<<<<<<<<<< - * result[wrapString(paramDesc.name)] = wrapVariable( - * paramDesc.type, - */ - __pyx_t_5 = (__pyx_v_paramDesc.direction != __pyx_v_filter_parameter_direction); - if (__pyx_t_5) { - - /* "pyrfc/_cyrfc.pyx":2792 - * RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, NULL) - * if paramDesc.direction != filter_parameter_direction: - * result[wrapString(paramDesc.name)] = wrapVariable( # <<<<<<<<<<<<<< - * paramDesc.type, - * container, - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapVariable(__pyx_v_paramDesc.type, __pyx_v_container, __pyx_v_paramDesc.name, __pyx_v_paramDesc.nucLength, __pyx_v_paramDesc.typeDescHandle, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2792, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_paramDesc.name, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2792, __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, 2792, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2791 - * for i in range(paramCount): - * RfcGetParameterDescByIndex(funcDesc, i, ¶mDesc, NULL) - * if paramDesc.direction != filter_parameter_direction: # <<<<<<<<<<<<<< - * result[wrapString(paramDesc.name)] = wrapVariable( - * paramDesc.type, - */ - } - } - - /* "pyrfc/_cyrfc.pyx":2800 - * config - * ) - * return result # <<<<<<<<<<<<<< - * - * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_result); - __pyx_r = __pyx_v_result; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2771 - * - * - * cdef wrapResult( # <<<<<<<<<<<<<< - * RFC_FUNCTION_DESC_HANDLE funcDesc, - * RFC_FUNCTION_HANDLE container, - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapResult", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2802 - * return result - * - * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier): # <<<<<<<<<<<<<< - * return { - * 'queued': "Q" == wrapString(&uIdentifier.unitType, 1), - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitIdentifier(RFC_UNIT_IDENTIFIER __pyx_v_uIdentifier) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapUnitIdentifier", 0); - - /* "pyrfc/_cyrfc.pyx":2803 - * - * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier): - * return { # <<<<<<<<<<<<<< - * 'queued': "Q" == wrapString(&uIdentifier.unitType, 1), - * 'id': wrapString(uIdentifier.unitID) - */ - __Pyx_XDECREF(__pyx_r); - - /* "pyrfc/_cyrfc.pyx":2804 - * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier): - * return { - * 'queued': "Q" == wrapString(&uIdentifier.unitType, 1), # <<<<<<<<<<<<<< - * 'id': wrapString(uIdentifier.unitID) - * } - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3.__pyx_n = 1; - __pyx_t_3.uclen = __pyx_int_1; - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString((&__pyx_v_uIdentifier.unitType), &__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __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, 2804, __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, 2804, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":2805 - * return { - * 'queued': "Q" == wrapString(&uIdentifier.unitType, 1), - * 'id': wrapString(uIdentifier.unitID) # <<<<<<<<<<<<<< - * } - * - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uIdentifier.unitID, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2805, __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, 2804, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2802 - * return result - * - * cdef wrapUnitIdentifier(RFC_UNIT_IDENTIFIER uIdentifier): # <<<<<<<<<<<<<< - * return { - * 'queued': "Q" == wrapString(&uIdentifier.unitType, 1), - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapUnitIdentifier", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2808 - * } - * - * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr): # <<<<<<<<<<<<<< - * unit_attributes = {} - * unit_attributes['kernel_trace'] = uattr.kernelTrace != 0 - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *__pyx_v_uattr) { - PyObject *__pyx_v_unit_attributes = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_2; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapUnitAttributes", 0); - - /* "pyrfc/_cyrfc.pyx":2809 - * - * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr): - * unit_attributes = {} # <<<<<<<<<<<<<< - * unit_attributes['kernel_trace'] = uattr.kernelTrace != 0 - * unit_attributes['sat_trace'] = uattr.satTrace != 0 - */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2809, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_unit_attributes = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2810 - * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr): - * unit_attributes = {} - * unit_attributes['kernel_trace'] = uattr.kernelTrace != 0 # <<<<<<<<<<<<<< - * unit_attributes['sat_trace'] = uattr.satTrace != 0 - * unit_attributes['unit_history'] = uattr.unitHistory != 0 - */ - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->kernelTrace != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2810, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_kernel_trace, __pyx_t_1) < 0))) __PYX_ERR(0, 2810, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2811 - * unit_attributes = {} - * unit_attributes['kernel_trace'] = uattr.kernelTrace != 0 - * unit_attributes['sat_trace'] = uattr.satTrace != 0 # <<<<<<<<<<<<<< - * unit_attributes['unit_history'] = uattr.unitHistory != 0 - * unit_attributes['lock'] = uattr.lock != 0 - */ - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->satTrace != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2811, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_sat_trace, __pyx_t_1) < 0))) __PYX_ERR(0, 2811, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2812 - * unit_attributes['kernel_trace'] = uattr.kernelTrace != 0 - * unit_attributes['sat_trace'] = uattr.satTrace != 0 - * unit_attributes['unit_history'] = uattr.unitHistory != 0 # <<<<<<<<<<<<<< - * unit_attributes['lock'] = uattr.lock != 0 - * unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0 - */ - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->unitHistory != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2812, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_unit_history, __pyx_t_1) < 0))) __PYX_ERR(0, 2812, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2813 - * unit_attributes['sat_trace'] = uattr.satTrace != 0 - * unit_attributes['unit_history'] = uattr.unitHistory != 0 - * unit_attributes['lock'] = uattr.lock != 0 # <<<<<<<<<<<<<< - * unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0 - * unit_attributes['user'] = wrapString(uattr.user, 12, True) - */ - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->lock != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_lock, __pyx_t_1) < 0))) __PYX_ERR(0, 2813, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2814 - * unit_attributes['unit_history'] = uattr.unitHistory != 0 - * unit_attributes['lock'] = uattr.lock != 0 - * unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0 # <<<<<<<<<<<<<< - * unit_attributes['user'] = wrapString(uattr.user, 12, True) - * unit_attributes['client'] = wrapString(uattr.client, 3, True) - */ - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_uattr->noCommitCheck != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_no_commit_check, __pyx_t_1) < 0))) __PYX_ERR(0, 2814, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2815 - * unit_attributes['lock'] = uattr.lock != 0 - * unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0 - * unit_attributes['user'] = wrapString(uattr.user, 12, True) # <<<<<<<<<<<<<< - * unit_attributes['client'] = wrapString(uattr.client, 3, True) - * unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True) - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_12; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->user, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2815, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_user, __pyx_t_1) < 0))) __PYX_ERR(0, 2815, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2816 - * unit_attributes['no_commit_check'] = uattr.noCommitCheck != 0 - * unit_attributes['user'] = wrapString(uattr.user, 12, True) - * unit_attributes['client'] = wrapString(uattr.client, 3, True) # <<<<<<<<<<<<<< - * unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True) - * unit_attributes['program'] = wrapString(uattr.program, 40, True) - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_3; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->client, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_client, __pyx_t_1) < 0))) __PYX_ERR(0, 2816, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2817 - * unit_attributes['user'] = wrapString(uattr.user, 12, True) - * unit_attributes['client'] = wrapString(uattr.client, 3, True) - * unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True) # <<<<<<<<<<<<<< - * unit_attributes['program'] = wrapString(uattr.program, 40, True) - * unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True) - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_20; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->tCode, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2817, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_t_code, __pyx_t_1) < 0))) __PYX_ERR(0, 2817, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2818 - * unit_attributes['client'] = wrapString(uattr.client, 3, True) - * unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True) - * unit_attributes['program'] = wrapString(uattr.program, 40, True) # <<<<<<<<<<<<<< - * unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True) - * unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True) - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_40; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->program, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2818, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_program, __pyx_t_1) < 0))) __PYX_ERR(0, 2818, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2819 - * unit_attributes['t_code'] = wrapString(uattr.tCode, 20, True) - * unit_attributes['program'] = wrapString(uattr.program, 40, True) - * unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True) # <<<<<<<<<<<<<< - * unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True) - * unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True) - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_40; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->hostname, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2819, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_hostname, __pyx_t_1) < 0))) __PYX_ERR(0, 2819, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2820 - * unit_attributes['program'] = wrapString(uattr.program, 40, True) - * unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True) - * unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True) # <<<<<<<<<<<<<< - * unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True) - * return unit_attributes - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_8; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->sendingDate, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2820, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_sending_date, __pyx_t_1) < 0))) __PYX_ERR(0, 2820, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2821 - * unit_attributes['hostname'] = wrapString(uattr.hostname, 40, True) - * unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True) - * unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True) # <<<<<<<<<<<<<< - * return unit_attributes - * - */ - __pyx_t_2.__pyx_n = 2; - __pyx_t_2.uclen = __pyx_int_6; - __pyx_t_2.rstrip = Py_True; - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_uattr->sendingTime, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2821, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (unlikely((PyDict_SetItem(__pyx_v_unit_attributes, __pyx_n_u_sending_time, __pyx_t_1) < 0))) __PYX_ERR(0, 2821, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2822 - * unit_attributes['sending_date'] = wrapString(uattr.sendingDate, 8, True) - * unit_attributes['sending_time'] = wrapString(uattr.sendingTime, 6, True) - * return unit_attributes # <<<<<<<<<<<<<< - * - * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config): - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_unit_attributes); - __pyx_r = __pyx_v_unit_attributes; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2808 - * } - * - * cdef wrapUnitAttributes(RFC_UNIT_ATTRIBUTES *uattr): # <<<<<<<<<<<<<< - * unit_attributes = {} - * unit_attributes['kernel_trace'] = uattr.kernelTrace != 0 - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapUnitAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_unit_attributes); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2824 - * return unit_attributes - * - * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config): # <<<<<<<<<<<<<< - * cdef unsigned i, fieldCount - * cdef RFC_FIELD_DESC fieldDesc - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapStructure(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_STRUCTURE_HANDLE __pyx_v_container, PyObject *__pyx_v_config) { - unsigned int __pyx_v_i; - unsigned int __pyx_v_fieldCount; - RFC_FIELD_DESC __pyx_v_fieldDesc; - PyObject *__pyx_v_result = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - unsigned int __pyx_t_2; - unsigned int __pyx_t_3; - unsigned int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapStructure", 0); - - /* "pyrfc/_cyrfc.pyx":2827 - * cdef unsigned i, fieldCount - * cdef RFC_FIELD_DESC fieldDesc - * RfcGetFieldCount(typeDesc, &fieldCount, NULL) # <<<<<<<<<<<<<< - * result = {} - * for i in range(fieldCount): - */ - (void)(RfcGetFieldCount(__pyx_v_typeDesc, (&__pyx_v_fieldCount), NULL)); - - /* "pyrfc/_cyrfc.pyx":2828 - * 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, 2828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_result = __pyx_t_1; - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2829 - * RfcGetFieldCount(typeDesc, &fieldCount, NULL) - * result = {} - * for i in range(fieldCount): # <<<<<<<<<<<<<< - * RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL) - * result[wrapString(fieldDesc.name)] = wrapVariable( - */ - __pyx_t_2 = __pyx_v_fieldCount; - __pyx_t_3 = __pyx_t_2; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":2830 - * result = {} - * for i in range(fieldCount): - * RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL) # <<<<<<<<<<<<<< - * result[wrapString(fieldDesc.name)] = wrapVariable( - * fieldDesc.type, - */ - (void)(RfcGetFieldDescByIndex(__pyx_v_typeDesc, __pyx_v_i, (&__pyx_v_fieldDesc), NULL)); - - /* "pyrfc/_cyrfc.pyx":2831 - * for i in range(fieldCount): - * RfcGetFieldDescByIndex(typeDesc, i, &fieldDesc, NULL) - * result[wrapString(fieldDesc.name)] = wrapVariable( # <<<<<<<<<<<<<< - * fieldDesc.type, - * container, - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapVariable(__pyx_v_fieldDesc.type, __pyx_v_container, __pyx_v_fieldDesc.name, __pyx_v_fieldDesc.nucLength, __pyx_v_fieldDesc.typeDescHandle, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2831, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_fieldDesc.name, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2831, __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, 2831, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } - - /* "pyrfc/_cyrfc.pyx":2839 - * 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, 2839, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 == 1); - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":2840 - * ) - * if len(result) == 1: - * if '' in result: # <<<<<<<<<<<<<< - * result = result[''] - * return result - */ - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__5, __pyx_v_result, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2840, __pyx_L1_error) - if (__pyx_t_7) { - - /* "pyrfc/_cyrfc.pyx":2841 - * if len(result) == 1: - * if '' in result: - * result = result[''] # <<<<<<<<<<<<<< - * return result - * - */ - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_result, __pyx_kp_u__5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2840 - * ) - * if len(result) == 1: - * if '' in result: # <<<<<<<<<<<<<< - * result = result[''] - * return result - */ - } - - /* "pyrfc/_cyrfc.pyx":2839 - * config - * ) - * if len(result) == 1: # <<<<<<<<<<<<<< - * if '' in result: - * result = result[''] - */ - } - - /* "pyrfc/_cyrfc.pyx":2842 - * if '' in result: - * result = result[''] - * return result # <<<<<<<<<<<<<< - * - * # # Used for debugging tables, cf. wrapTable() - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_result); - __pyx_r = __pyx_v_result; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2824 - * return unit_attributes - * - * cdef wrapStructure(RFC_TYPE_DESC_HANDLE typeDesc, RFC_STRUCTURE_HANDLE container, config): # <<<<<<<<<<<<<< - * cdef unsigned i, fieldCount - * cdef RFC_FIELD_DESC fieldDesc - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapStructure", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_result); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2855 - * # return wrapStructure(self.typeDesc, self.container) - * - * cdef wrapTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, config): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef unsigned rowCount - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapTable(RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, RFC_TABLE_HANDLE __pyx_v_container, PyObject *__pyx_v_config) { - RFC_ERROR_INFO __pyx_v_errorInfo; - unsigned int __pyx_v_rowCount; - PyObject *__pyx_v_table = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapTable", 0); - - /* "pyrfc/_cyrfc.pyx":2863 - * # tc.container = container - * # return tc - * RfcGetRowCount(container, &rowCount, &errorInfo) # <<<<<<<<<<<<<< - * table = [None] * rowCount - * while rowCount > 0: - */ - (void)(RfcGetRowCount(__pyx_v_container, (&__pyx_v_rowCount), (&__pyx_v_errorInfo))); - - /* "pyrfc/_cyrfc.pyx":2864 - * # 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, 2864, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - { Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < __pyx_v_rowCount; __pyx_temp++) { - __Pyx_INCREF(Py_None); - __Pyx_GIVEREF(Py_None); - PyList_SET_ITEM(__pyx_t_1, __pyx_temp, Py_None); - } - } - __pyx_v_table = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2865 - * 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); - if (!__pyx_t_2) break; - - /* "pyrfc/_cyrfc.pyx":2866 - * table = [None] * rowCount - * while rowCount > 0: - * rowCount -= 1 # <<<<<<<<<<<<<< - * RfcMoveTo(container, rowCount, &errorInfo) - * table[rowCount] = wrapStructure(typeDesc, container, config) - */ - __pyx_v_rowCount = (__pyx_v_rowCount - 1); - - /* "pyrfc/_cyrfc.pyx":2867 - * while rowCount > 0: - * rowCount -= 1 - * RfcMoveTo(container, rowCount, &errorInfo) # <<<<<<<<<<<<<< - * table[rowCount] = wrapStructure(typeDesc, container, config) - * RfcDeleteCurrentRow(container, &errorInfo) - */ - (void)(RfcMoveTo(__pyx_v_container, __pyx_v_rowCount, (&__pyx_v_errorInfo))); - - /* "pyrfc/_cyrfc.pyx":2868 - * rowCount -= 1 - * RfcMoveTo(container, rowCount, &errorInfo) - * table[rowCount] = wrapStructure(typeDesc, container, config) # <<<<<<<<<<<<<< - * RfcDeleteCurrentRow(container, &errorInfo) - * return table - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapStructure(__pyx_v_typeDesc, __pyx_v_container, __pyx_v_config); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2868, __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, 2868, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":2869 - * RfcMoveTo(container, rowCount, &errorInfo) - * table[rowCount] = wrapStructure(typeDesc, container, config) - * RfcDeleteCurrentRow(container, &errorInfo) # <<<<<<<<<<<<<< - * return table - * - */ - (void)(RfcDeleteCurrentRow(__pyx_v_container, (&__pyx_v_errorInfo))); - } - - /* "pyrfc/_cyrfc.pyx":2870 - * table[rowCount] = wrapStructure(typeDesc, container, config) - * RfcDeleteCurrentRow(container, &errorInfo) - * return table # <<<<<<<<<<<<<< - * - * cdef wrapVariable( - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_table); - __pyx_r = __pyx_v_table; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2855 - * # return wrapStructure(self.typeDesc, self.container) - * - * cdef wrapTable(RFC_TYPE_DESC_HANDLE typeDesc, RFC_TABLE_HANDLE container, config): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * cdef unsigned rowCount - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapTable", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_table); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":2872 - * return table - * - * cdef wrapVariable( # <<<<<<<<<<<<<< - * RFCTYPE typ, - * RFC_FUNCTION_HANDLE container, - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapVariable(RFCTYPE __pyx_v_typ, RFC_FUNCTION_HANDLE __pyx_v_container, SAP_UC *__pyx_v_cName, unsigned int __pyx_v_cLen, RFC_TYPE_DESC_HANDLE __pyx_v_typeDesc, PyObject *__pyx_v_config) { - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - RFC_STRUCTURE_HANDLE __pyx_v_structure; - RFC_TABLE_HANDLE __pyx_v_table; - RFC_CHAR *__pyx_v_charValue; - SAP_UC *__pyx_v_stringValue; - RFC_NUM *__pyx_v_numValue; - SAP_RAW *__pyx_v_byteValue; - RFC_FLOAT __pyx_v_floatValue; - RFC_INT __pyx_v_intValue; - RFC_INT1 __pyx_v_int1Value; - RFC_INT2 __pyx_v_int2Value; - RFC_INT8 __pyx_v_int8Value; - RFC_DATE __pyx_v_dateValue; - RFC_TIME __pyx_v_timeValue; - unsigned int __pyx_v_resultLen; - unsigned int __pyx_v_strLen; - PyObject *__pyx_v_utcValue = NULL; - PyObject *__pyx_v_value = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString __pyx_t_5; - int __pyx_t_6; - int __pyx_t_7; - char const *__pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - char const *__pyx_t_15; - char const *__pyx_t_16; - char const *__pyx_t_17; - char const *__pyx_t_18; - PyObject *__pyx_t_19 = NULL; - char const *__pyx_t_20; - char const *__pyx_t_21; - char const *__pyx_t_22; - int __pyx_t_23; - int __pyx_t_24; - Py_ssize_t __pyx_t_25; - Py_UCS4 __pyx_t_26; - PyObject *__pyx_t_27 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapVariable", 0); - - /* "pyrfc/_cyrfc.pyx":2896 - * cdef RFC_TIME timeValue - * cdef unsigned resultLen, strLen - * if typ == RFCTYPE_STRUCTURE: # <<<<<<<<<<<<<< - * rc = RfcGetStructure(container, cName, &structure, &errorInfo) - * if rc != RFC_OK: - */ - switch (__pyx_v_typ) { - case RFCTYPE_STRUCTURE: - - /* "pyrfc/_cyrfc.pyx":2897 - * cdef unsigned resultLen, strLen - * if typ == RFCTYPE_STRUCTURE: - * rc = RfcGetStructure(container, cName, &structure, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetStructure(__pyx_v_container, __pyx_v_cName, (&__pyx_v_structure), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2898 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2899 - * rc = RfcGetStructure(container, cName, &structure, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapStructure(typeDesc, structure, config) - * elif typ == RFCTYPE_TABLE: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2899, __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, 2899, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2898 - * if typ == RFCTYPE_STRUCTURE: - * rc = RfcGetStructure(container, cName, &structure, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapStructure(typeDesc, structure, config) - */ - } - - /* "pyrfc/_cyrfc.pyx":2900 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * return wrapStructure(typeDesc, structure, config) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_TABLE: - * rc = RfcGetTable(container, cName, &table, &errorInfo) - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapStructure(__pyx_v_typeDesc, __pyx_v_structure, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2896 - * cdef RFC_TIME timeValue - * cdef unsigned resultLen, strLen - * if typ == RFCTYPE_STRUCTURE: # <<<<<<<<<<<<<< - * rc = RfcGetStructure(container, cName, &structure, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_TABLE: - - /* "pyrfc/_cyrfc.pyx":2902 - * return wrapStructure(typeDesc, structure, config) - * elif typ == RFCTYPE_TABLE: - * rc = RfcGetTable(container, cName, &table, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetTable(__pyx_v_container, __pyx_v_cName, (&__pyx_v_table), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2903 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2904 - * rc = RfcGetTable(container, cName, &table, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapTable(typeDesc, table, config) - * elif typ == RFCTYPE_CHAR: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __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, 2904, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2903 - * elif typ == RFCTYPE_TABLE: - * rc = RfcGetTable(container, cName, &table, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapTable(typeDesc, table, config) - */ - } - - /* "pyrfc/_cyrfc.pyx":2905 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * return wrapTable(typeDesc, table, config) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_CHAR: - * charValue = mallocU(cLen) - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapTable(__pyx_v_typeDesc, __pyx_v_table, __pyx_v_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2905, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":2901 - * raise wrapError(&errorInfo) - * return wrapStructure(typeDesc, structure, config) - * elif typ == RFCTYPE_TABLE: # <<<<<<<<<<<<<< - * rc = RfcGetTable(container, cName, &table, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_CHAR: - - /* "pyrfc/_cyrfc.pyx":2907 - * return wrapTable(typeDesc, table, config) - * elif typ == RFCTYPE_CHAR: - * charValue = mallocU(cLen) # <<<<<<<<<<<<<< - * try: - * rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo) - */ - __pyx_v_charValue = mallocU(__pyx_v_cLen); - - /* "pyrfc/_cyrfc.pyx":2908 - * elif typ == RFCTYPE_CHAR: - * charValue = mallocU(cLen) - * try: # <<<<<<<<<<<<<< - * rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo) - * if rc != RFC_OK: - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2909 - * charValue = mallocU(cLen) - * try: - * rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetChars(__pyx_v_container, __pyx_v_cName, __pyx_v_charValue, __pyx_v_cLen, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2910 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2911 - * rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(charValue, cLen, config & _MASK_RSTRIP) - * finally: - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2911, __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, 2911, __pyx_L6_error) - - /* "pyrfc/_cyrfc.pyx":2910 - * try: - * rc = RfcGetChars(container, cName, charValue, cLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(charValue, cLen, config & _MASK_RSTRIP) - */ - } - - /* "pyrfc/_cyrfc.pyx":2912 - * 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, 2912, __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, 2912, __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, 2912, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5.__pyx_n = 2; - __pyx_t_5.uclen = __pyx_t_2; - __pyx_t_5.rstrip = __pyx_t_4; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_charValue, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2912, __pyx_L6_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L5_return; - } - - /* "pyrfc/_cyrfc.pyx":2914 - * return wrapString(charValue, cLen, config & _MASK_RSTRIP) - * finally: - * free(charValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_STRING: - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - */ - /*finally:*/ { - __pyx_L6_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; - { - free(__pyx_v_charValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; - goto __pyx_L1_error; - } - __pyx_L5_return: { - __pyx_t_14 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_charValue); - __pyx_r = __pyx_t_14; - __pyx_t_14 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2906 - * raise wrapError(&errorInfo) - * return wrapTable(typeDesc, table, config) - * elif typ == RFCTYPE_CHAR: # <<<<<<<<<<<<<< - * charValue = mallocU(cLen) - * try: - */ - break; - case RFCTYPE_STRING: - - /* "pyrfc/_cyrfc.pyx":2916 - * free(charValue) - * elif typ == RFCTYPE_STRING: - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) # <<<<<<<<<<<<<< - * try: - * stringValue = mallocU(strLen+1) - */ - __pyx_v_rc = RfcGetStringLength(__pyx_v_container, __pyx_v_cName, (&__pyx_v_strLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2917 - * elif typ == RFCTYPE_STRING: - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * try: # <<<<<<<<<<<<<< - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2918 - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * try: - * stringValue = mallocU(strLen+1) # <<<<<<<<<<<<<< - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1)); - - /* "pyrfc/_cyrfc.pyx":2919 - * try: - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2920 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2921 - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(stringValue, resultLen) - * finally: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2921, __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, 2921, __pyx_L12_error) - - /* "pyrfc/_cyrfc.pyx":2920 - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(stringValue, resultLen) - */ - } - - /* "pyrfc/_cyrfc.pyx":2922 - * 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, 2922, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_t_3; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2922, __pyx_L12_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L11_return; - } - - /* "pyrfc/_cyrfc.pyx":2924 - * return wrapString(stringValue, resultLen) - * finally: - * free(stringValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_NUM: - * numValue = mallocU(cLen) - */ - /*finally:*/ { - __pyx_L12_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_9); - __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_15 = __pyx_filename; - { - free(__pyx_v_stringValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); - } - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12); - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_15; - goto __pyx_L1_error; - } - __pyx_L11_return: { - __pyx_t_9 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_stringValue); - __pyx_r = __pyx_t_9; - __pyx_t_9 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2915 - * finally: - * free(charValue) - * elif typ == RFCTYPE_STRING: # <<<<<<<<<<<<<< - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * try: - */ - break; - case RFCTYPE_NUM: - - /* "pyrfc/_cyrfc.pyx":2926 - * free(stringValue) - * elif typ == RFCTYPE_NUM: - * numValue = mallocU(cLen) # <<<<<<<<<<<<<< - * try: - * rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo) - */ - __pyx_v_numValue = mallocU(__pyx_v_cLen); - - /* "pyrfc/_cyrfc.pyx":2927 - * elif typ == RFCTYPE_NUM: - * numValue = mallocU(cLen) - * try: # <<<<<<<<<<<<<< - * rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo) - * if rc != RFC_OK: - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2928 - * numValue = mallocU(cLen) - * try: - * rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetNum(__pyx_v_container, __pyx_v_cName, __pyx_v_numValue, __pyx_v_cLen, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2929 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2930 - * rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return wrapString(numValue, cLen) - * finally: - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2930, __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, 2930, __pyx_L18_error) - - /* "pyrfc/_cyrfc.pyx":2929 - * try: - * rc = RfcGetNum(container, cName, numValue, cLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return wrapString(numValue, cLen) - */ - } - - /* "pyrfc/_cyrfc.pyx":2931 - * 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, 2931, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_t_4; - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_numValue, &__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2931, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L17_return; - } - - /* "pyrfc/_cyrfc.pyx":2933 - * return wrapString(numValue, cLen) - * finally: - * free(numValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_BYTE: - * byteValue = malloc(cLen) - */ - /*finally:*/ { - __pyx_L18_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_16 = __pyx_filename; - { - free(__pyx_v_numValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_16; - goto __pyx_L1_error; - } - __pyx_L17_return: { - __pyx_t_14 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_numValue); - __pyx_r = __pyx_t_14; - __pyx_t_14 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2925 - * finally: - * free(stringValue) - * elif typ == RFCTYPE_NUM: # <<<<<<<<<<<<<< - * numValue = mallocU(cLen) - * try: - */ - break; - case RFCTYPE_BYTE: - - /* "pyrfc/_cyrfc.pyx":2935 - * free(numValue) - * elif typ == RFCTYPE_BYTE: - * byteValue = malloc(cLen) # <<<<<<<<<<<<<< - * try: - * rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo) - */ - __pyx_v_byteValue = ((SAP_RAW *)malloc(__pyx_v_cLen)); - - /* "pyrfc/_cyrfc.pyx":2936 - * elif typ == RFCTYPE_BYTE: - * byteValue = malloc(cLen) - * try: # <<<<<<<<<<<<<< - * rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo) - * if rc != RFC_OK: - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2937 - * byteValue = malloc(cLen) - * try: - * rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetBytes(__pyx_v_container, __pyx_v_cName, __pyx_v_byteValue, __pyx_v_cLen, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2938 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2939 - * rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return byteValue[:cLen] - * finally: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2939, __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, 2939, __pyx_L24_error) - - /* "pyrfc/_cyrfc.pyx":2938 - * try: - * rc = RfcGetBytes(container, cName, byteValue, cLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return byteValue[:cLen] - */ - } - - /* "pyrfc/_cyrfc.pyx":2940 - * 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, 2940, __pyx_L24_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L23_return; - } - - /* "pyrfc/_cyrfc.pyx":2942 - * return byteValue[:cLen] - * finally: - * free(byteValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_XSTRING: - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - */ - /*finally:*/ { - __pyx_L24_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_9); - __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_17 = __pyx_filename; - { - free(__pyx_v_byteValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); - } - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12); - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_17; - goto __pyx_L1_error; - } - __pyx_L23_return: { - __pyx_t_9 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_byteValue); - __pyx_r = __pyx_t_9; - __pyx_t_9 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2934 - * finally: - * free(numValue) - * elif typ == RFCTYPE_BYTE: # <<<<<<<<<<<<<< - * byteValue = malloc(cLen) - * try: - */ - break; - case RFCTYPE_XSTRING: - - /* "pyrfc/_cyrfc.pyx":2944 - * free(byteValue) - * elif typ == RFCTYPE_XSTRING: - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) # <<<<<<<<<<<<<< - * try: - * byteValue = malloc(strLen+1) - */ - __pyx_v_rc = RfcGetStringLength(__pyx_v_container, __pyx_v_cName, (&__pyx_v_strLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2945 - * elif typ == RFCTYPE_XSTRING: - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * try: # <<<<<<<<<<<<<< - * byteValue = malloc(strLen+1) - * byteValue[strLen] = 0 - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2946 - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * try: - * byteValue = malloc(strLen+1) # <<<<<<<<<<<<<< - * byteValue[strLen] = 0 - * rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo) - */ - __pyx_v_byteValue = ((SAP_RAW *)malloc((__pyx_v_strLen + 1))); - - /* "pyrfc/_cyrfc.pyx":2947 - * try: - * byteValue = malloc(strLen+1) - * byteValue[strLen] = 0 # <<<<<<<<<<<<<< - * rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo) - * if rc != RFC_OK: - */ - (__pyx_v_byteValue[__pyx_v_strLen]) = 0; - - /* "pyrfc/_cyrfc.pyx":2948 - * byteValue = malloc(strLen+1) - * byteValue[strLen] = 0 - * rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetXString(__pyx_v_container, __pyx_v_cName, __pyx_v_byteValue, __pyx_v_strLen, (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2949 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2950 - * rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return byteValue[:resultLen] - * finally: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2950, __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, 2950, __pyx_L30_error) - - /* "pyrfc/_cyrfc.pyx":2949 - * byteValue[strLen] = 0 - * rc = RfcGetXString(container, cName, byteValue, strLen, &resultLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return byteValue[:resultLen] - */ - } - - /* "pyrfc/_cyrfc.pyx":2951 - * 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, 2951, __pyx_L30_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L29_return; - } - - /* "pyrfc/_cyrfc.pyx":2953 - * return byteValue[:resultLen] - * finally: - * free(byteValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_BCD: - * # An upper bound for the length of the _string representation_ - */ - /*finally:*/ { - __pyx_L30_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_18 = __pyx_filename; - { - free(__pyx_v_byteValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_18; - goto __pyx_L1_error; - } - __pyx_L29_return: { - __pyx_t_14 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_byteValue); - __pyx_r = __pyx_t_14; - __pyx_t_14 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2943 - * finally: - * free(byteValue) - * elif typ == RFCTYPE_XSTRING: # <<<<<<<<<<<<<< - * rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * try: - */ - break; - case RFCTYPE_BCD: - - /* "pyrfc/_cyrfc.pyx":2960 - * # Furthermore, a sign char, a decimal separator char may be present - * # => (2*cLen)+1 - * strLen = 2*cLen + 1 # <<<<<<<<<<<<<< - * try: - * stringValue = mallocU(strLen+1) - */ - __pyx_v_strLen = ((2 * __pyx_v_cLen) + 1); - - /* "pyrfc/_cyrfc.pyx":2961 - * # => (2*cLen)+1 - * strLen = 2*cLen + 1 - * try: # <<<<<<<<<<<<<< - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2962 - * strLen = 2*cLen + 1 - * try: - * stringValue = mallocU(strLen+1) # <<<<<<<<<<<<<< - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc == 23: # Buffer too small, use returned requried result length - */ - __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1)); - - /* "pyrfc/_cyrfc.pyx":2963 - * try: - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc == 23: # Buffer too small, use returned requried result length - * # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: " - */ - __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2964 - * 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); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":2967 - * # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: " - * # "trying with {}".format(cLen, strLen, resultLen)) - * free(stringValue) # <<<<<<<<<<<<<< - * strLen = resultLen - * stringValue = mallocU(strLen+1) - */ - free(__pyx_v_stringValue); - - /* "pyrfc/_cyrfc.pyx":2968 - * # "trying with {}".format(cLen, strLen, resultLen)) - * free(stringValue) - * strLen = resultLen # <<<<<<<<<<<<<< - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - */ - __pyx_v_strLen = __pyx_v_resultLen; - - /* "pyrfc/_cyrfc.pyx":2969 - * free(stringValue) - * strLen = resultLen - * stringValue = mallocU(strLen+1) # <<<<<<<<<<<<<< - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1)); - - /* "pyrfc/_cyrfc.pyx":2970 - * strLen = resultLen - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2964 - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc == 23: # Buffer too small, use returned requried result length # <<<<<<<<<<<<<< - * # print("Warning: Buffer for BCD (cLen={}, buffer={}) too small: " - * # "trying with {}".format(cLen, strLen, resultLen)) - */ - } - - /* "pyrfc/_cyrfc.pyx":2971 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2972 - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP)) - * finally: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2972, __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, 2972, __pyx_L36_error) - - /* "pyrfc/_cyrfc.pyx":2971 - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP)) - */ - } - - /* "pyrfc/_cyrfc.pyx":2973 - * 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, 2973, __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, 2973, __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, 2973, __pyx_L36_error) - __Pyx_GOTREF(__pyx_t_19); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5.__pyx_n = 2; - __pyx_t_5.uclen = __pyx_int_neg_1; - __pyx_t_5.rstrip = __pyx_t_19; - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2973, __pyx_L36_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - __pyx_t_19 = NULL; - __pyx_t_7 = 0; - 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_7 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_2}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); - __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, 2973, __pyx_L36_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L35_return; - } - - /* "pyrfc/_cyrfc.pyx":2975 - * return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP)) - * finally: - * free(stringValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: - * # An upper bound for the length of the _string representation_ - */ - /*finally:*/ { - __pyx_L36_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_9); - __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_20 = __pyx_filename; - { - free(__pyx_v_stringValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); - } - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12); - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_20; - goto __pyx_L1_error; - } - __pyx_L35_return: { - __pyx_t_9 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_stringValue); - __pyx_r = __pyx_t_9; - __pyx_t_9 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2954 - * finally: - * free(byteValue) - * elif typ == RFCTYPE_BCD: # <<<<<<<<<<<<<< - * # An upper bound for the length of the _string representation_ - * # of the BCD is given by (2*cLen)-1 (each digit is encoded in 4bit, - */ - break; - case RFCTYPE_DECF16: - - /* "pyrfc/_cyrfc.pyx":2976 - * finally: - * free(stringValue) - * elif typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: # <<<<<<<<<<<<<< - * # An upper bound for the length of the _string representation_ - * # of the DECF is given by (2*cLen)-1 (each digit is encoded in 4bit, - */ - case RFCTYPE_DECF34: - - /* "pyrfc/_cyrfc.pyx":2984 - * # and exponent char, sign and exponent - * # => +9 - * strLen = 2*cLen + 10 # <<<<<<<<<<<<<< - * try: - * stringValue = mallocU(strLen+1) - */ - __pyx_v_strLen = ((2 * __pyx_v_cLen) + 10); - - /* "pyrfc/_cyrfc.pyx":2985 - * # => +9 - * strLen = 2*cLen + 10 - * try: # <<<<<<<<<<<<<< - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":2986 - * strLen = 2*cLen + 10 - * try: - * stringValue = mallocU(strLen+1) # <<<<<<<<<<<<<< - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc == 23: # Buffer too small, use returned requried result length - */ - __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1)); - - /* "pyrfc/_cyrfc.pyx":2987 - * try: - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc == 23: # Buffer too small, use returned requried result length - * # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: " - */ - __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2988 - * 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); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":2991 - * # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: " - * # "trying with {}".format(cLen, strLen, resultLen)) - * free(stringValue) # <<<<<<<<<<<<<< - * strLen = resultLen - * stringValue = mallocU(strLen+1) - */ - free(__pyx_v_stringValue); - - /* "pyrfc/_cyrfc.pyx":2992 - * # "trying with {}".format(cLen, strLen, resultLen)) - * free(stringValue) - * strLen = resultLen # <<<<<<<<<<<<<< - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - */ - __pyx_v_strLen = __pyx_v_resultLen; - - /* "pyrfc/_cyrfc.pyx":2993 - * free(stringValue) - * strLen = resultLen - * stringValue = mallocU(strLen+1) # <<<<<<<<<<<<<< - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1)); - - /* "pyrfc/_cyrfc.pyx":2994 - * strLen = resultLen - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":2988 - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc == 23: # Buffer too small, use returned requried result length # <<<<<<<<<<<<<< - * # print("Warning: Buffer for DECF (cLen={}, buffer={}) too small: " - * # "trying with {}".format(cLen, strLen, resultLen)) - */ - } - - /* "pyrfc/_cyrfc.pyx":2995 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":2996 - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP)) - * finally: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2996, __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, 2996, __pyx_L43_error) - - /* "pyrfc/_cyrfc.pyx":2995 - * stringValue = mallocU(strLen+1) - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP)) - */ - } - - /* "pyrfc/_cyrfc.pyx":2997 - * 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, 2997, __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, 2997, __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, 2997, __pyx_L43_error) - __Pyx_GOTREF(__pyx_t_19); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5.__pyx_n = 2; - __pyx_t_5.uclen = __pyx_int_neg_1; - __pyx_t_5.rstrip = __pyx_t_19; - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2997, __pyx_L43_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - __pyx_t_19 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_2}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __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, 2997, __pyx_L43_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L42_return; - } - - /* "pyrfc/_cyrfc.pyx":2999 - * return Decimal(wrapString(stringValue, -1, config & _MASK_RSTRIP)) - * finally: - * free(stringValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_FLOAT: - * rc = RfcGetFloat(container, cName, &floatValue, &errorInfo) - */ - /*finally:*/ { - __pyx_L43_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_21 = __pyx_filename; - { - free(__pyx_v_stringValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_21; - goto __pyx_L1_error; - } - __pyx_L42_return: { - __pyx_t_14 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_stringValue); - __pyx_r = __pyx_t_14; - __pyx_t_14 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":2976 - * finally: - * free(stringValue) - * elif typ == RFCTYPE_DECF16 or typ == RFCTYPE_DECF34: # <<<<<<<<<<<<<< - * # An upper bound for the length of the _string representation_ - * # of the DECF is given by (2*cLen)-1 (each digit is encoded in 4bit, - */ - break; - case RFCTYPE_FLOAT: - - /* "pyrfc/_cyrfc.pyx":3001 - * free(stringValue) - * elif typ == RFCTYPE_FLOAT: - * rc = RfcGetFloat(container, cName, &floatValue, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetFloat(__pyx_v_container, __pyx_v_cName, (&__pyx_v_floatValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3002 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3003 - * rc = RfcGetFloat(container, cName, &floatValue, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return floatValue - * elif typ == RFCTYPE_INT: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3003, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3003, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3002 - * elif typ == RFCTYPE_FLOAT: - * rc = RfcGetFloat(container, cName, &floatValue, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return floatValue - */ - } - - /* "pyrfc/_cyrfc.pyx":3004 - * 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, 3004, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3000 - * finally: - * free(stringValue) - * elif typ == RFCTYPE_FLOAT: # <<<<<<<<<<<<<< - * rc = RfcGetFloat(container, cName, &floatValue, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_INT: - - /* "pyrfc/_cyrfc.pyx":3006 - * return floatValue - * elif typ == RFCTYPE_INT: - * rc = RfcGetInt(container, cName, &intValue, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetInt(__pyx_v_container, __pyx_v_cName, (&__pyx_v_intValue), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3007 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3008 - * rc = RfcGetInt(container, cName, &intValue, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return intValue - * elif typ == RFCTYPE_INT1: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3008, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3008, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3007 - * elif typ == RFCTYPE_INT: - * rc = RfcGetInt(container, cName, &intValue, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return intValue - */ - } - - /* "pyrfc/_cyrfc.pyx":3009 - * 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, 3009, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3005 - * raise wrapError(&errorInfo) - * return floatValue - * elif typ == RFCTYPE_INT: # <<<<<<<<<<<<<< - * rc = RfcGetInt(container, cName, &intValue, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_INT1: - - /* "pyrfc/_cyrfc.pyx":3011 - * return intValue - * elif typ == RFCTYPE_INT1: - * rc = RfcGetInt1(container, cName, &int1Value, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetInt1(__pyx_v_container, __pyx_v_cName, (&__pyx_v_int1Value), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3012 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3013 - * rc = RfcGetInt1(container, cName, &int1Value, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return int1Value - * elif typ == RFCTYPE_INT2: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3013, __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, 3013, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3012 - * elif typ == RFCTYPE_INT1: - * rc = RfcGetInt1(container, cName, &int1Value, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return int1Value - */ - } - - /* "pyrfc/_cyrfc.pyx":3014 - * 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, 3014, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3010 - * raise wrapError(&errorInfo) - * return intValue - * elif typ == RFCTYPE_INT1: # <<<<<<<<<<<<<< - * rc = RfcGetInt1(container, cName, &int1Value, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_INT2: - - /* "pyrfc/_cyrfc.pyx":3016 - * return int1Value - * elif typ == RFCTYPE_INT2: - * rc = RfcGetInt2(container, cName, &int2Value, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetInt2(__pyx_v_container, __pyx_v_cName, (&__pyx_v_int2Value), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3017 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3018 - * rc = RfcGetInt2(container, cName, &int2Value, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return int2Value - * elif typ == RFCTYPE_INT8: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __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, 3018, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3017 - * elif typ == RFCTYPE_INT2: - * rc = RfcGetInt2(container, cName, &int2Value, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return int2Value - */ - } - - /* "pyrfc/_cyrfc.pyx":3019 - * 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, 3019, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3015 - * raise wrapError(&errorInfo) - * return int1Value - * elif typ == RFCTYPE_INT2: # <<<<<<<<<<<<<< - * rc = RfcGetInt2(container, cName, &int2Value, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_INT8: - - /* "pyrfc/_cyrfc.pyx":3021 - * return int2Value - * elif typ == RFCTYPE_INT8: - * rc = RfcGetInt8(container, cName, &int8Value, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetInt8(__pyx_v_container, __pyx_v_cName, (&__pyx_v_int8Value), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3022 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3023 - * rc = RfcGetInt8(container, cName, &int8Value, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * return int8Value - * elif typ == RFCTYPE_UTCLONG: - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3023, __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, 3023, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3022 - * elif typ == RFCTYPE_INT8: - * rc = RfcGetInt8(container, cName, &int8Value, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * return int8Value - */ - } - - /* "pyrfc/_cyrfc.pyx":3024 - * 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, 3024, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3020 - * raise wrapError(&errorInfo) - * return int2Value - * elif typ == RFCTYPE_INT8: # <<<<<<<<<<<<<< - * rc = RfcGetInt8(container, cName, &int8Value, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_UTCLONG: - - /* "pyrfc/_cyrfc.pyx":3027 - * elif typ == RFCTYPE_UTCLONG: - * # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * strLen = 27 # is fixed # <<<<<<<<<<<<<< - * try: - * stringValue = mallocU(strLen+1) - */ - __pyx_v_strLen = 27; - - /* "pyrfc/_cyrfc.pyx":3028 - * # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * strLen = 27 # is fixed - * try: # <<<<<<<<<<<<<< - * stringValue = mallocU(strLen+1) - * # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":3029 - * strLen = 27 # is fixed - * try: - * stringValue = mallocU(strLen+1) # <<<<<<<<<<<<<< - * # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - */ - __pyx_v_stringValue = mallocU((__pyx_v_strLen + 1)); - - /* "pyrfc/_cyrfc.pyx":3031 - * stringValue = mallocU(strLen+1) - * # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetString(__pyx_v_container, __pyx_v_cName, __pyx_v_stringValue, (__pyx_v_strLen + 1), (&__pyx_v_resultLen), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3032 - * # 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3033 - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * utcValue = wrapString(stringValue, resultLen) - * # replace the "," separator with "." - */ - __pyx_t_3 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3033, __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, 3033, __pyx_L55_error) - - /* "pyrfc/_cyrfc.pyx":3032 - * # textual representation from NWRFC SDK because clients' systems unlikely support nanoseconds - * rc = RfcGetString(container, cName, stringValue, strLen+1, &resultLen, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * utcValue = wrapString(stringValue, resultLen) - */ - } - - /* "pyrfc/_cyrfc.pyx":3034 - * 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, 3034, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_t_3; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_stringValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3034, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_utcValue = __pyx_t_4; - __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":3036 - * 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__39, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_u__21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __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__40, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3036, __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, 3036, __pyx_L55_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L54_return; - } - - /* "pyrfc/_cyrfc.pyx":3038 - * return utcValue[:19]+'.'+utcValue[20:] - * finally: - * free(stringValue) # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_DATE: - * rc = RfcGetDate(container, cName, dateValue, &errorInfo) - */ - /*finally:*/ { - __pyx_L55_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_13, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_9); - __pyx_t_7 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_22 = __pyx_filename; - { - free(__pyx_v_stringValue); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9); - } - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_14, __pyx_t_13, __pyx_t_12); - __pyx_t_14 = 0; __pyx_t_13 = 0; __pyx_t_12 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_22; - goto __pyx_L1_error; - } - __pyx_L54_return: { - __pyx_t_9 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_stringValue); - __pyx_r = __pyx_t_9; - __pyx_t_9 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":3025 - * raise wrapError(&errorInfo) - * return int8Value - * elif typ == RFCTYPE_UTCLONG: # <<<<<<<<<<<<<< - * # rc = RfcGetStringLength(container, cName, &strLen, &errorInfo) - * strLen = 27 # is fixed - */ - break; - case RFCTYPE_DATE: - - /* "pyrfc/_cyrfc.pyx":3040 - * free(stringValue) - * elif typ == RFCTYPE_DATE: - * rc = RfcGetDate(container, cName, dateValue, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetDate(__pyx_v_container, __pyx_v_cName, __pyx_v_dateValue, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3041 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3042 - * rc = RfcGetDate(container, cName, dateValue, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * value = wrapString(dateValue, 8) - * # return date or None - */ - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3042, __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, 3042, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3041 - * elif typ == RFCTYPE_DATE: - * rc = RfcGetDate(container, cName, dateValue, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * value = wrapString(dateValue, 8) - */ - } - - /* "pyrfc/_cyrfc.pyx":3043 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * value = wrapString(dateValue, 8) # <<<<<<<<<<<<<< - * # return date or None - * if config & _MASK_DTIME: - */ - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_int_8; - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_dateValue, &__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_value = __pyx_t_2; - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":3045 - * 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, 3045, __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, 3045, __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, 3045, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3046 - * # 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, 3046, __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, 3046, __pyx_L1_error) - __pyx_t_24 = (!__pyx_t_23); - __pyx_t_1 = __pyx_t_24; - __pyx_L63_bool_binop_done:; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3047 - * if config & _MASK_DTIME: - * if (value == '00000000') or not value: - * return None # <<<<<<<<<<<<<< - * return datetime.strptime(value, '%Y%m%d').date() - * # return date string or '' - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3046 - * # return date or None - * if config & _MASK_DTIME: - * if (value == '00000000') or not value: # <<<<<<<<<<<<<< - * return None - * return datetime.strptime(value, '%Y%m%d').date() - */ - } - - /* "pyrfc/_cyrfc.pyx":3048 - * 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, 3048, __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, 3048, __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; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_value, __pyx_kp_u_Y_m_d}; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3048, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __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, 3048, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_19); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_2, }; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_19, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3048, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - } - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3045 - * value = wrapString(dateValue, 8) - * # return date or None - * if config & _MASK_DTIME: # <<<<<<<<<<<<<< - * if (value == '00000000') or not value: - * return None - */ - } - - /* "pyrfc/_cyrfc.pyx":3050 - * 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, 3050, __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, 3050, __pyx_L1_error) - __pyx_t_23 = (!__pyx_t_24); - __pyx_t_1 = __pyx_t_23; - __pyx_L66_bool_binop_done:; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3051 - * # return date string or '' - * if (value == '00000000') or not value: - * return '' # <<<<<<<<<<<<<< - * return value - * elif typ == RFCTYPE_TIME: - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__5); - __pyx_r = __pyx_kp_u__5; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3050 - * return datetime.strptime(value, '%Y%m%d').date() - * # return date string or '' - * if (value == '00000000') or not value: # <<<<<<<<<<<<<< - * return '' - * return value - */ - } - - /* "pyrfc/_cyrfc.pyx":3052 - * if (value == '00000000') or not value: - * return '' - * return value # <<<<<<<<<<<<<< - * elif typ == RFCTYPE_TIME: - * rc = RfcGetTime(container, cName, timeValue, &errorInfo) - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_value); - __pyx_r = __pyx_v_value; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3039 - * finally: - * free(stringValue) - * elif typ == RFCTYPE_DATE: # <<<<<<<<<<<<<< - * rc = RfcGetDate(container, cName, dateValue, &errorInfo) - * if rc != RFC_OK: - */ - break; - case RFCTYPE_TIME: - - /* "pyrfc/_cyrfc.pyx":3054 - * return value - * elif typ == RFCTYPE_TIME: - * rc = RfcGetTime(container, cName, timeValue, &errorInfo) # <<<<<<<<<<<<<< - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - */ - __pyx_v_rc = RfcGetTime(__pyx_v_container, __pyx_v_cName, __pyx_v_timeValue, (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3055 - * 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); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3056 - * rc = RfcGetTime(container, cName, timeValue, &errorInfo) - * if rc != RFC_OK: - * raise wrapError(&errorInfo) # <<<<<<<<<<<<<< - * value = wrapString(timeValue, 6) - * # return time or None - */ - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapError((&__pyx_v_errorInfo)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3056, __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, 3056, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3055 - * elif typ == RFCTYPE_TIME: - * rc = RfcGetTime(container, cName, timeValue, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * raise wrapError(&errorInfo) - * value = wrapString(timeValue, 6) - */ - } - - /* "pyrfc/_cyrfc.pyx":3057 - * if rc != RFC_OK: - * raise wrapError(&errorInfo) - * value = wrapString(timeValue, 6) # <<<<<<<<<<<<<< - * # return time or None - * if config & _MASK_DTIME: - */ - __pyx_t_5.__pyx_n = 1; - __pyx_t_5.uclen = __pyx_int_6; - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_timeValue, &__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3057, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_value = __pyx_t_4; - __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":3059 - * 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, 3059, __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, 3059, __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, 3059, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3060 - * # 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, 3060, __pyx_L1_error) - __pyx_t_23 = (!__pyx_t_1); - if (__pyx_t_23) { - - /* "pyrfc/_cyrfc.pyx":3061 - * if config & _MASK_DTIME: - * if not value: - * return None # <<<<<<<<<<<<<< - * return datetime.strptime(value, '%H%M%S').time() - * # return time string or '' - */ - __Pyx_XDECREF(__pyx_r); - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3060 - * # return time or None - * if config & _MASK_DTIME: - * if not value: # <<<<<<<<<<<<<< - * return None - * return datetime.strptime(value, '%H%M%S').time() - */ - } - - /* "pyrfc/_cyrfc.pyx":3062 - * 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, 3062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strptime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __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_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_6 = 1; - } - } - { - PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_value, __pyx_kp_u_H_M_S}; - __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; - __pyx_t_6 = 0; - 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_6 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_4, }; - __pyx_t_19 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3062, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_19); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __pyx_r = __pyx_t_19; - __pyx_t_19 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3059 - * value = wrapString(timeValue, 6) - * # return time or None - * if config & _MASK_DTIME: # <<<<<<<<<<<<<< - * if not value: - * return None - */ - } - - /* "pyrfc/_cyrfc.pyx":3064 - * 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, 3064, __pyx_L1_error) - __pyx_t_1 = (!__pyx_t_23); - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3065 - * # return time string or '' - * if not value: - * return '' # <<<<<<<<<<<<<< - * return value - * else: - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__5); - __pyx_r = __pyx_kp_u__5; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3064 - * return datetime.strptime(value, '%H%M%S').time() - * # return time string or '' - * if not value: # <<<<<<<<<<<<<< - * return '' - * return value - */ - } - - /* "pyrfc/_cyrfc.pyx":3066 - * if not value: - * return '' - * return value # <<<<<<<<<<<<<< - * else: - * raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName))) - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_value); - __pyx_r = __pyx_v_value; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3053 - * return '' - * return value - * elif typ == RFCTYPE_TIME: # <<<<<<<<<<<<<< - * rc = RfcGetTime(container, cName, timeValue, &errorInfo) - * if rc != RFC_OK: - */ - break; - default: - - /* "pyrfc/_cyrfc.pyx":3068 - * 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_3, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_25 = 0; - __pyx_t_26 = 127; - __Pyx_INCREF(__pyx_kp_u_Unknown_RFC_type); - __pyx_t_25 += 17; - __Pyx_GIVEREF(__pyx_kp_u_Unknown_RFC_type); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Unknown_RFC_type); - __pyx_t_2 = __Pyx_PyUnicode_From_RFCTYPE(__pyx_v_typ, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_26 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_26) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_26; - __pyx_t_25 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __pyx_t_2 = 0; - __Pyx_INCREF(__pyx_kp_u_when_wrapping); - __pyx_t_25 += 15; - __Pyx_GIVEREF(__pyx_kp_u_when_wrapping); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_when_wrapping); - __pyx_t_2 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_cName, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_27 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_27); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_26 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27) > __pyx_t_26) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27) : __pyx_t_26; - __pyx_t_25 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_27); - __Pyx_GIVEREF(__pyx_t_27); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_27); - __pyx_t_27 = 0; - __pyx_t_27 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_25, __pyx_t_26); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_27); - __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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_27}; - __pyx_t_19 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0; - if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 3068, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_19); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - __Pyx_Raise(__pyx_t_19, 0, 0, 0); - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - __PYX_ERR(0, 3068, __pyx_L1_error) - break; - } - - /* "pyrfc/_cyrfc.pyx":2872 - * return table - * - * cdef wrapVariable( # <<<<<<<<<<<<<< - * RFCTYPE typ, - * RFC_FUNCTION_HANDLE container, - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_19); - __Pyx_XDECREF(__pyx_t_27); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapVariable", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_utcValue); - __Pyx_XDECREF(__pyx_v_value); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":3070 - * raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName))) - * - * cdef wrapError(RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * group2error = { - * ABAP_APPLICATION_FAILURE: ABAPApplicationError, - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapError(RFC_ERROR_INFO *__pyx_v_errorInfo) { - PyObject *__pyx_v_group2error = NULL; - PyObject *__pyx_v_error = NULL; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - int __pyx_t_14; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapError", 0); - - /* "pyrfc/_cyrfc.pyx":3072 - * 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, 3072, __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, 3072, __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, 3072, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":3073 - * 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, 3073, __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, 3073, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":3074 - * 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, 3074, __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, 3074, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":3075 - * 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, 3075, __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, 3075, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":3076 - * 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, 3076, __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, 3076, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":3077 - * 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, 3077, __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, 3077, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_2) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":3078 - * 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, 3078, __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, 3078, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_3) < 0) __PYX_ERR(0, 3072, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_group2error = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "pyrfc/_cyrfc.pyx":3080 - * EXTERNAL_AUTHORIZATION_FAILURE: ExternalAuthorizationError - * } - * error = group2error[errorInfo.group] # <<<<<<<<<<<<<< - * return error( - * wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key), - */ - __pyx_t_1 = __Pyx_PyInt_From_RFC_ERROR_GROUP(__pyx_v_errorInfo->group); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3080, __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, 3080, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_error = __pyx_t_3; - __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":3081 - * } - * error = group2error[errorInfo.group] - * return error( # <<<<<<<<<<<<<< - * wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key), - * wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber), - */ - __Pyx_XDECREF(__pyx_r); - - /* "pyrfc/_cyrfc.pyx":3082 - * error = group2error[errorInfo.group] - * return error( - * wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key), # <<<<<<<<<<<<<< - * wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber), - * wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2), - */ - __pyx_t_1 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->message, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __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, 3082, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->key, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3082, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - - /* "pyrfc/_cyrfc.pyx":3083 - * return error( - * wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key), - * wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber), # <<<<<<<<<<<<<< - * wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2), - * wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4) - */ - __pyx_t_5 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgClass, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3083, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgType, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3083, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgNumber, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3083, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - - /* "pyrfc/_cyrfc.pyx":3084 - * wrapString(errorInfo.message), errorInfo.code, wrapString(errorInfo.key), - * wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber), - * wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2), # <<<<<<<<<<<<<< - * wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4) - * ) - */ - __pyx_t_8 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3084, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV2, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3084, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - - /* "pyrfc/_cyrfc.pyx":3085 - * wrapString(errorInfo.abapMsgClass), wrapString(errorInfo.abapMsgType), wrapString(errorInfo.abapMsgNumber), - * wrapString(errorInfo.abapMsgV1), wrapString(errorInfo.abapMsgV2), - * wrapString(errorInfo.abapMsgV3), wrapString(errorInfo.abapMsgV4) # <<<<<<<<<<<<<< - * ) - * - */ - __pyx_t_10 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3085, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __pyx_f_5pyrfc_6_cyrfc_wrapString(__pyx_v_errorInfo->abapMsgV4, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3085, __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; - } - } - { - PyObject *__pyx_callargs[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_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_14, 10+__pyx_t_14); - __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - __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; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3081, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3070 - * raise RFCError('Unknown RFC type %d when wrapping %s' % (typ, wrapString(cName))) - * - * cdef wrapError(RFC_ERROR_INFO* errorInfo): # <<<<<<<<<<<<<< - * group2error = { - * ABAP_APPLICATION_FAILURE: ABAPApplicationError, - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); - __Pyx_XDECREF(__pyx_t_11); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapError", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_group2error); - __Pyx_XDECREF(__pyx_v_error); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":3088 - * ) - * - * cdef wrapString(const SAP_UC* uc, uclen=-1, rstrip=False): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapString(SAP_UC const *__pyx_v_uc, struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString *__pyx_optional_args) { - PyObject *__pyx_v_uclen = ((PyObject *)__pyx_int_neg_1); - PyObject *__pyx_v_rstrip = ((PyObject *)Py_False); - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - unsigned int __pyx_v_utf8_size; - char *__pyx_v_utf8; - unsigned int __pyx_v_result_len; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - unsigned int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - int __pyx_t_8; - char const *__pyx_t_9; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapString", 0); - if (__pyx_optional_args) { - if (__pyx_optional_args->__pyx_n > 0) { - __pyx_v_uclen = __pyx_optional_args->uclen; - if (__pyx_optional_args->__pyx_n > 1) { - __pyx_v_rstrip = __pyx_optional_args->rstrip; - } - } - } - __Pyx_INCREF(__pyx_v_uclen); - - /* "pyrfc/_cyrfc.pyx":3091 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if uclen == -1: # <<<<<<<<<<<<<< - * uclen = strlenU(uc) - * if uclen == 0: - */ - __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_uclen, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3091, __pyx_L1_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3092 - * cdef RFC_ERROR_INFO errorInfo - * if uclen == -1: - * uclen = strlenU(uc) # <<<<<<<<<<<<<< - * if uclen == 0: - * return '' - */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(strlenU(__pyx_v_uc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3092, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF_SET(__pyx_v_uclen, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":3091 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if uclen == -1: # <<<<<<<<<<<<<< - * uclen = strlenU(uc) - * if uclen == 0: - */ - } - - /* "pyrfc/_cyrfc.pyx":3093 - * if uclen == -1: - * uclen = strlenU(uc) - * if uclen == 0: # <<<<<<<<<<<<<< - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 - */ - __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_uclen, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3093, __pyx_L1_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3094 - * uclen = strlenU(uc) - * if uclen == 0: - * return '' # <<<<<<<<<<<<<< - * cdef unsigned utf8_size = uclen * 5 + 1 - * cdef char *utf8 = malloc(utf8_size) - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__5); - __pyx_r = __pyx_kp_u__5; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3093 - * if uclen == -1: - * uclen = strlenU(uc) - * if uclen == 0: # <<<<<<<<<<<<<< - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 - */ - } - - /* "pyrfc/_cyrfc.pyx":3095 - * if uclen == 0: - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 # <<<<<<<<<<<<<< - * cdef char *utf8 = malloc(utf8_size) - * utf8[0] = 0 - */ - __pyx_t_2 = __Pyx_PyInt_MultiplyObjC(__pyx_v_uclen, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3095, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3095, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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, 3095, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_utf8_size = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":3096 - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 - * cdef char *utf8 = malloc(utf8_size) # <<<<<<<<<<<<<< - * utf8[0] = 0 - * cdef unsigned result_len = 0 - */ - __pyx_v_utf8 = ((char *)malloc(__pyx_v_utf8_size)); - - /* "pyrfc/_cyrfc.pyx":3097 - * cdef unsigned utf8_size = uclen * 5 + 1 - * cdef char *utf8 = malloc(utf8_size) - * utf8[0] = 0 # <<<<<<<<<<<<<< - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, utf8, &utf8_size, &result_len, &errorInfo) - */ - (__pyx_v_utf8[0]) = 0; - - /* "pyrfc/_cyrfc.pyx":3098 - * cdef char *utf8 = malloc(utf8_size) - * utf8[0] = 0 - * cdef unsigned result_len = 0 # <<<<<<<<<<<<<< - * rc = RfcSAPUCToUTF8(uc, uclen, utf8, &utf8_size, &result_len, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_result_len = 0; - - /* "pyrfc/_cyrfc.pyx":3099 - * utf8[0] = 0 - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, 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, 3099, __pyx_L1_error) - __pyx_v_rc = RfcSAPUCToUTF8(__pyx_v_uc, __pyx_t_4, ((RFC_BYTE *)__pyx_v_utf8), (&__pyx_v_utf8_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3100 - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, 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_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3102 - * 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_2, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_utf8_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3102, __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, 3102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); - __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, 3102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3102, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3100 - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, utf8, &utf8_size, &result_len, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * # raise wrapError(&errorInfo) - * raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size)) - */ - } - - /* "pyrfc/_cyrfc.pyx":3103 - * # raise wrapError(&errorInfo) - * raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size)) - * utf8[result_len] = 0 # <<<<<<<<<<<<<< - * try: - * if rstrip: - */ - (__pyx_v_utf8[__pyx_v_result_len]) = 0; - - /* "pyrfc/_cyrfc.pyx":3104 - * raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size)) - * utf8[result_len] = 0 - * try: # <<<<<<<<<<<<<< - * if rstrip: - * return utf8[:result_len].rstrip().decode() - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":3105 - * utf8[result_len] = 0 - * try: - * if rstrip: # <<<<<<<<<<<<<< - * return utf8[:result_len].rstrip().decode() - * else: - */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_rstrip); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3105, __pyx_L7_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3106 - * try: - * if rstrip: - * return utf8[:result_len].rstrip().decode() # <<<<<<<<<<<<<< - * else: - * return utf8[:result_len].decode() - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_utf8 + 0, __pyx_v_result_len - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3106, __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, 3106, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_7 = 0; - if (CYTHON_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_7 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_5, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3106, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3106, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_7 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_2, }; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3106, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L6_return; - - /* "pyrfc/_cyrfc.pyx":3105 - * utf8[result_len] = 0 - * try: - * if rstrip: # <<<<<<<<<<<<<< - * return utf8[:result_len].rstrip().decode() - * else: - */ - } - - /* "pyrfc/_cyrfc.pyx":3108 - * return utf8[:result_len].rstrip().decode() - * else: - * return utf8[:result_len].decode() # <<<<<<<<<<<<<< - * finally: - * free(utf8) - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_utf8, 0, __pyx_v_result_len, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3108, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L6_return; - } - } - - /* "pyrfc/_cyrfc.pyx":3110 - * return utf8[:result_len].decode() - * finally: - * free(utf8) # <<<<<<<<<<<<<< - * - * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=True): - */ - /*finally:*/ { - __pyx_L7_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename; - { - free(__pyx_v_utf8); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); - } - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9; - goto __pyx_L1_error; - } - __pyx_L6_return: { - __pyx_t_15 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_utf8); - __pyx_r = __pyx_t_15; - __pyx_t_15 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":3088 - * ) - * - * 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_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapString", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_uclen); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "pyrfc/_cyrfc.pyx":3112 - * free(utf8) - * - * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=True): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - -static PyObject *__pyx_f_5pyrfc_6_cyrfc_wrapString(SAP_UC *__pyx_v_uc, struct __pyx_opt_args_5pyrfc_6_cyrfc_wrapString *__pyx_optional_args) { - PyObject *__pyx_v_uclen = ((PyObject *)__pyx_int_neg_1); - PyObject *__pyx_v_rstrip = ((PyObject *)Py_True); - RFC_RC __pyx_v_rc; - RFC_ERROR_INFO __pyx_v_errorInfo; - unsigned int __pyx_v_utf8_size; - char *__pyx_v_utf8; - unsigned int __pyx_v_result_len; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - unsigned int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; - int __pyx_t_8; - char const *__pyx_t_9; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("wrapString", 0); - if (__pyx_optional_args) { - if (__pyx_optional_args->__pyx_n > 0) { - __pyx_v_uclen = __pyx_optional_args->uclen; - if (__pyx_optional_args->__pyx_n > 1) { - __pyx_v_rstrip = __pyx_optional_args->rstrip; - } - } - } - __Pyx_INCREF(__pyx_v_uclen); - - /* "pyrfc/_cyrfc.pyx":3115 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if uclen == -1: # <<<<<<<<<<<<<< - * uclen = strlenU(uc) - * if uclen == 0: - */ - __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_uclen, __pyx_int_neg_1, -1L, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3115, __pyx_L1_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3116 - * cdef RFC_ERROR_INFO errorInfo - * if uclen == -1: - * uclen = strlenU(uc) # <<<<<<<<<<<<<< - * if uclen == 0: - * return '' - */ - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(strlenU(__pyx_v_uc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3116, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF_SET(__pyx_v_uclen, __pyx_t_2); - __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":3115 - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - * if uclen == -1: # <<<<<<<<<<<<<< - * uclen = strlenU(uc) - * if uclen == 0: - */ - } - - /* "pyrfc/_cyrfc.pyx":3117 - * if uclen == -1: - * uclen = strlenU(uc) - * if uclen == 0: # <<<<<<<<<<<<<< - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 - */ - __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_uclen, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3117, __pyx_L1_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3118 - * uclen = strlenU(uc) - * if uclen == 0: - * return '' # <<<<<<<<<<<<<< - * cdef unsigned utf8_size = uclen * 5 + 1 - * cdef char *utf8 = malloc(utf8_size) - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_kp_u__5); - __pyx_r = __pyx_kp_u__5; - goto __pyx_L0; - - /* "pyrfc/_cyrfc.pyx":3117 - * if uclen == -1: - * uclen = strlenU(uc) - * if uclen == 0: # <<<<<<<<<<<<<< - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 - */ - } - - /* "pyrfc/_cyrfc.pyx":3119 - * if uclen == 0: - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 # <<<<<<<<<<<<<< - * cdef char *utf8 = malloc(utf8_size) - * utf8[0] = 0 - */ - __pyx_t_2 = __Pyx_PyInt_MultiplyObjC(__pyx_v_uclen, __pyx_int_5, 5, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3119, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 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, 3119, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_utf8_size = __pyx_t_4; - - /* "pyrfc/_cyrfc.pyx":3120 - * return '' - * cdef unsigned utf8_size = uclen * 5 + 1 - * cdef char *utf8 = malloc(utf8_size) # <<<<<<<<<<<<<< - * utf8[0] = 0 - * cdef unsigned result_len = 0 - */ - __pyx_v_utf8 = ((char *)malloc(__pyx_v_utf8_size)); - - /* "pyrfc/_cyrfc.pyx":3121 - * cdef unsigned utf8_size = uclen * 5 + 1 - * cdef char *utf8 = malloc(utf8_size) - * utf8[0] = 0 # <<<<<<<<<<<<<< - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, utf8, &utf8_size, &result_len, &errorInfo) - */ - (__pyx_v_utf8[0]) = 0; - - /* "pyrfc/_cyrfc.pyx":3122 - * cdef char *utf8 = malloc(utf8_size) - * utf8[0] = 0 - * cdef unsigned result_len = 0 # <<<<<<<<<<<<<< - * rc = RfcSAPUCToUTF8(uc, uclen, utf8, &utf8_size, &result_len, &errorInfo) - * if rc != RFC_OK: - */ - __pyx_v_result_len = 0; - - /* "pyrfc/_cyrfc.pyx":3123 - * utf8[0] = 0 - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, 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, 3123, __pyx_L1_error) - __pyx_v_rc = RfcSAPUCToUTF8(__pyx_v_uc, __pyx_t_4, ((RFC_BYTE *)__pyx_v_utf8), (&__pyx_v_utf8_size), (&__pyx_v_result_len), (&__pyx_v_errorInfo)); - - /* "pyrfc/_cyrfc.pyx":3124 - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, 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_1 = (__pyx_v_rc != RFC_OK); - if (unlikely(__pyx_t_1)) { - - /* "pyrfc/_cyrfc.pyx":3126 - * 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_2, __pyx_n_s_RFCError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_utf8_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3126, __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, 3126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_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; - } - } - { - PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7); - __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, 3126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } - __Pyx_Raise(__pyx_t_3, 0, 0, 0); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3126, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":3124 - * cdef unsigned result_len = 0 - * rc = RfcSAPUCToUTF8(uc, uclen, utf8, &utf8_size, &result_len, &errorInfo) - * if rc != RFC_OK: # <<<<<<<<<<<<<< - * # raise wrapError(&errorInfo) - * raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size)) - */ - } - - /* "pyrfc/_cyrfc.pyx":3127 - * # raise wrapError(&errorInfo) - * raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size)) - * utf8[result_len] = 0 # <<<<<<<<<<<<<< - * try: - * if rstrip: - */ - (__pyx_v_utf8[__pyx_v_result_len]) = 0; - - /* "pyrfc/_cyrfc.pyx":3128 - * raise RFCError('wrapString uclen: %u utf8_size: %u' % (uclen, utf8_size)) - * utf8[result_len] = 0 - * try: # <<<<<<<<<<<<<< - * if rstrip: - * return utf8[:result_len].rstrip().decode() - */ - /*try:*/ { - - /* "pyrfc/_cyrfc.pyx":3129 - * utf8[result_len] = 0 - * try: - * if rstrip: # <<<<<<<<<<<<<< - * return utf8[:result_len].rstrip().decode() - * else: - */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_rstrip); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 3129, __pyx_L7_error) - if (__pyx_t_1) { - - /* "pyrfc/_cyrfc.pyx":3130 - * try: - * if rstrip: - * return utf8[:result_len].rstrip().decode() # <<<<<<<<<<<<<< - * else: - * return utf8[:result_len].decode() - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_utf8 + 0, __pyx_v_result_len - 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3130, __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, 3130, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - __pyx_t_7 = 0; - if (CYTHON_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_7 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_5, }; - __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3130, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3130, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = NULL; - __pyx_t_7 = 0; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_7 = 1; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_2, }; - __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3130, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L6_return; - - /* "pyrfc/_cyrfc.pyx":3129 - * utf8[result_len] = 0 - * try: - * if rstrip: # <<<<<<<<<<<<<< - * return utf8[:result_len].rstrip().decode() - * else: - */ - } - - /* "pyrfc/_cyrfc.pyx":3132 - * return utf8[:result_len].rstrip().decode() - * else: - * return utf8[:result_len].decode() # <<<<<<<<<<<<<< - * finally: - * free(utf8) - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_utf8, 0, __pyx_v_result_len, NULL, NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3132, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L6_return; - } - } - - /* "pyrfc/_cyrfc.pyx":3134 - * return utf8[:result_len].decode() - * finally: - * free(utf8) # <<<<<<<<<<<<<< - */ - /*finally:*/ { - __pyx_L7_error:; - /*exception exit:*/{ - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename; - { - free(__pyx_v_utf8); - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15); - } - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12); - __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; - __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9; - goto __pyx_L1_error; - } - __pyx_L6_return: { - __pyx_t_15 = __pyx_r; - __pyx_r = 0; - free(__pyx_v_utf8); - __pyx_r = __pyx_t_15; - __pyx_t_15 = 0; - goto __pyx_L0; - } - } - - /* "pyrfc/_cyrfc.pyx":3112 - * free(utf8) - * - * cdef wrapString(SAP_UC* uc, uclen=-1, rstrip=True): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_AddTraceback("pyrfc._cyrfc.wrapString", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_uclen); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_ConnectionParameters(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o; - #if CYTHON_COMPILING_IN_LIMITED_API - allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); - o = alloc_func(t, 0); - #else - if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { - o = (*t->tp_alloc)(t, 0); - } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - #endif - if (unlikely(__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_1__cinit__(o, a, k) < 0)) goto bad; - return o; - bad: - Py_DECREF(o); o = 0; - return NULL; -} - -static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_ConnectionParameters(PyObject *o) { - #if CYTHON_USE_TP_FINALIZE - if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pyrfc_6_cyrfc_ConnectionParameters) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_3__dealloc__(o); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - (*Py_TYPE(o)->tp_free)(o); -} - -static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_ConnectionParameters[] = { - {"_free", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_5_free, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"free", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_7free, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_9__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_20ConnectionParameters_11__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; -#if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pyrfc_6_cyrfc_ConnectionParameters}, - {Py_tp_doc, (void *)PyDoc_STR("Connection parameters instance in SAP unicode format\n\n :param args: Connection parameters like ASHOST=\"ABC\" etc\n :type args: positional\n\n :returns: Nothing\n ")}, - {Py_tp_methods, (void *)__pyx_methods_5pyrfc_6_cyrfc_ConnectionParameters}, - {Py_tp_new, (void *)__pyx_tp_new_5pyrfc_6_cyrfc_ConnectionParameters}, - {0, 0}, -}; -static PyType_Spec __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters_spec = { - "pyrfc._cyrfc.ConnectionParameters", - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters), - 0, - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, - __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters_slots, -}; -#else - -static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_ConnectionParameters = { - PyVarObject_HEAD_INIT(0, 0) - "pyrfc._cyrfc.""ConnectionParameters", /*tp_name*/ - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5pyrfc_6_cyrfc_ConnectionParameters, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #endif - #if PY_MAJOR_VERSION >= 3 - 0, /*tp_as_async*/ - #endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ - PyDoc_STR("Connection parameters instance in SAP unicode format\n\n :param args: Connection parameters like ASHOST=\"ABC\" etc\n :type args: positional\n\n :returns: Nothing\n "), /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_5pyrfc_6_cyrfc_ConnectionParameters, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - #if !CYTHON_USE_TYPE_SPECS - 0, /*tp_dictoffset*/ - #endif - 0, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_5pyrfc_6_cyrfc_ConnectionParameters, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ - #if PY_VERSION_HEX >= 0x030400a1 - #if CYTHON_USE_TP_FINALIZE - 0, /*tp_finalize*/ - #else - NULL, /*tp_finalize*/ - #endif - #endif - #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if __PYX_NEED_TP_PRINT_SLOT == 1 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030C0000 - 0, /*tp_watched*/ - #endif - #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 - 0, /*tp_pypy_flags*/ - #endif -}; -#endif -static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Connection __pyx_vtable_5pyrfc_6_cyrfc_Connection; - -static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p; - PyObject *o; - #if CYTHON_COMPILING_IN_LIMITED_API - allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); - o = alloc_func(t, 0); - #else - if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { - o = (*t->tp_alloc)(t, 0); - } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - #endif - p = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o); - p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_Connection; - p->_Connection__config = ((PyObject*)Py_None); Py_INCREF(Py_None); - p->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_Connection(PyObject *o) { - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o; - #if CYTHON_USE_TP_FINALIZE - if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pyrfc_6_cyrfc_Connection) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - } - #endif - PyObject_GC_UnTrack(o); - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_5pyrfc_6_cyrfc_10Connection_5__dealloc__(o); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->_Connection__config); - Py_CLEAR(p->_connection); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_5pyrfc_6_cyrfc_Connection(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o; - if (p->_Connection__config) { - e = (*v)(p->_Connection__config, a); if (e) return e; - } - if (p->_connection) { - e = (*v)(((PyObject *)p->_connection), a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5pyrfc_6_cyrfc_Connection(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_5pyrfc_6_cyrfc_Connection *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)o; - tmp = ((PyObject*)p->_Connection__config); - p->_Connection__config = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_connection); - p->_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_version(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_7version_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_options(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_7options_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_handle(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_6handle_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection_alive(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_5alive_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Connection__Connection__config(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_1__get__(o); -} - -static int __pyx_setprop_5pyrfc_6_cyrfc_10Connection__Connection__config(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_3__set__(o, v); - } - else { - return __pyx_pw_5pyrfc_6_cyrfc_10Connection_19_Connection__config_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_Connection[] = { - {"free", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_3free, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_2free}, - {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_7__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_9__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_11open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_10open}, - {"reopen", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_13reopen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_12reopen}, - {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_15close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_14close}, - {"cancel", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_17cancel, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_16cancel}, - {"_close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_21_close, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"ping", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_23ping, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_22ping}, - {"reset_server_context", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_25reset_server_context, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_24reset_server_context}, - {"get_connection_attributes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_26get_connection_attributes}, - {"is_valid", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_29is_valid, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_28is_valid}, - {"get_function_description", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_31get_function_description, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_30get_function_description}, - {"call", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_33call, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_32call}, - {"type_desc_get", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_35type_desc_get, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_34type_desc_get}, - {"type_desc_remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_37type_desc_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_36type_desc_remove}, - {"func_desc_remove", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_39func_desc_remove, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_38func_desc_remove}, - {"_get_transaction_id", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_40_get_transaction_id}, - {"_create_and_submit_transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"_destroy_transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"_confirm_transaction", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"_get_unit_id", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_49_get_unit_id, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_48_get_unit_id}, - {"_create_and_submit_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"_get_unit_state", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_53_get_unit_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"_destroy_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_55_destroy_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"_confirm_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_57_confirm_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"initialize_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_59initialize_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_58initialize_unit}, - {"fill_and_submit_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_60fill_and_submit_unit}, - {"get_unit_state", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_63get_unit_state, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_62get_unit_state}, - {"destroy_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_65destroy_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_64destroy_unit}, - {"confirm_unit", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_67confirm_unit, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Connection_66confirm_unit}, - {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_Connection[] = { - {(char *)"version", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_version, 0, (char *)PyDoc_STR("Get SAP NW RFC SDK and PyRFC binding versions\n :returns: SAP NW RFC SDK major, minor, patch level and PyRFC binding version\n "), 0}, - {(char *)"options", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_options, 0, (char *)PyDoc_STR("Client connection configuration\n\n :getter: Client connection options\n :setter: Set when new connection object created\n :type: dict\n "), 0}, - {(char *)"handle", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_handle, 0, (char *)PyDoc_STR("Get client connection handle\n\n :getter: Client connection handle\n :type: uintptr_t\n "), 0}, - {(char *)"alive", __pyx_getprop_5pyrfc_6_cyrfc_10Connection_alive, 0, (char *)PyDoc_STR("Conection alive property\n\n :getter: True when alive\n :type: boolean\n "), 0}, - {(char *)"_Connection__config", __pyx_getprop_5pyrfc_6_cyrfc_10Connection__Connection__config, __pyx_setprop_5pyrfc_6_cyrfc_10Connection__Connection__config, (char *)0, 0}, - {0, 0, 0, 0, 0} -}; -#if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_5pyrfc_6_cyrfc_Connection_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pyrfc_6_cyrfc_Connection}, - {Py_nb_bool, (void *)__pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__}, - {Py_tp_doc, (void *)PyDoc_STR(" A connection to an SAP backend system\n\n Instantiating an :class:`pyrfc.Connection` object will\n automatically attempt to open a connection the SAP backend.\n\n :param config: Configuration of the client connection, valid for all RFC calls of given connection. Allowed keys are:\n\n * ``dtime``\n ABAP DATE and TIME strings are returned as Python datetime date and time objects,\n instead of ABAP date and time strings (default is False)\n\n * ``rstrip``\n right strips strings returned from RFC call (default is True)\n\n * ``return_import_params``\n importing parameters are returned by the RFC call (default is False)\n\n * ``timeout``\n Cancel connection if ongoing RFC calls takes longer than ``timeout`` seconds.\n Timeout can be also set as option for particular RFC call, overriding timeout set at connection level.\n\n Examples: https://github.com/SAP/PyRFC/tree/main/examples/timeout\n\n\n :type config: dict or None (default)\n\n :param params: SAP connection parameters. The parameters consist of\n ``client``, ``user``, ``passwd``, ``lang``, ``trace``\n and additionally one of\n\n * Direct application server logon: ``ashost``, ``sysnr``.\n * Logon with load balancing: ``mshost``, ``msserv``, ``sysid``,\n ``group``.\n ``msserv`` is needed only, if the service of the message server\n is not defined as sapms in /etc/services.\n * When logging on with SNC, ``user`` and ``passwd`` are to be replaced by\n ``snc_qop``, ``snc_myname``, ``snc_partnername``, and optionally\n ``snc_lib``.\n (If ``snc_lib`` is not specified, the RFC library uses the \"global\" GSS library\n defined via environment variable SNC_LIB.)\n :type params: Keyword parameters\n\n :raises: :exc:`~pyrfc.RFCError` or a subcla""ss\n thereof if the connection attempt fails.\n ")}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_5pyrfc_6_cyrfc_Connection}, - {Py_tp_clear, (void *)__pyx_tp_clear_5pyrfc_6_cyrfc_Connection}, - {Py_tp_methods, (void *)__pyx_methods_5pyrfc_6_cyrfc_Connection}, - {Py_tp_getset, (void *)__pyx_getsets_5pyrfc_6_cyrfc_Connection}, - {Py_tp_init, (void *)__pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__}, - {Py_tp_new, (void *)__pyx_tp_new_5pyrfc_6_cyrfc_Connection}, - {0, 0}, -}; -static PyType_Spec __pyx_type_5pyrfc_6_cyrfc_Connection_spec = { - "pyrfc._cyrfc.Connection", - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Connection), - 0, - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, - __pyx_type_5pyrfc_6_cyrfc_Connection_slots, -}; -#else - -static PyNumberMethods __pyx_tp_as_number_Connection = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - __pyx_pw_5pyrfc_6_cyrfc_10Connection_19__bool__, /*nb_bool*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - 0, /*nb_index*/ - #if PY_VERSION_HEX >= 0x03050000 - 0, /*nb_matrix_multiply*/ - #endif - #if PY_VERSION_HEX >= 0x03050000 - 0, /*nb_inplace_matrix_multiply*/ - #endif -}; - -static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_Connection = { - PyVarObject_HEAD_INIT(0, 0) - "pyrfc._cyrfc.""Connection", /*tp_name*/ - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Connection), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5pyrfc_6_cyrfc_Connection, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #endif - #if PY_MAJOR_VERSION >= 3 - 0, /*tp_as_async*/ - #endif - 0, /*tp_repr*/ - &__pyx_tp_as_number_Connection, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - PyDoc_STR(" A connection to an SAP backend system\n\n Instantiating an :class:`pyrfc.Connection` object will\n automatically attempt to open a connection the SAP backend.\n\n :param config: Configuration of the client connection, valid for all RFC calls of given connection. Allowed keys are:\n\n * ``dtime``\n ABAP DATE and TIME strings are returned as Python datetime date and time objects,\n instead of ABAP date and time strings (default is False)\n\n * ``rstrip``\n right strips strings returned from RFC call (default is True)\n\n * ``return_import_params``\n importing parameters are returned by the RFC call (default is False)\n\n * ``timeout``\n Cancel connection if ongoing RFC calls takes longer than ``timeout`` seconds.\n Timeout can be also set as option for particular RFC call, overriding timeout set at connection level.\n\n Examples: https://github.com/SAP/PyRFC/tree/main/examples/timeout\n\n\n :type config: dict or None (default)\n\n :param params: SAP connection parameters. The parameters consist of\n ``client``, ``user``, ``passwd``, ``lang``, ``trace``\n and additionally one of\n\n * Direct application server logon: ``ashost``, ``sysnr``.\n * Logon with load balancing: ``mshost``, ``msserv``, ``sysid``,\n ``group``.\n ``msserv`` is needed only, if the service of the message server\n is not defined as sapms in /etc/services.\n * When logging on with SNC, ``user`` and ``passwd`` are to be replaced by\n ``snc_qop``, ``snc_myname``, ``snc_partnername``, and optionally\n ``snc_lib``.\n (If ``snc_lib`` is not specified, the RFC library uses the \"global\" GSS library\n defined via environment variable SNC_LIB.)\n :type params: Keyword parameters\n\n :raises: :exc:`~pyrfc.RFCError` or a subcla""ss\n thereof if the connection attempt fails.\n "), /*tp_doc*/ - __pyx_tp_traverse_5pyrfc_6_cyrfc_Connection, /*tp_traverse*/ - __pyx_tp_clear_5pyrfc_6_cyrfc_Connection, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_5pyrfc_6_cyrfc_Connection, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_5pyrfc_6_cyrfc_Connection, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - #if !CYTHON_USE_TYPE_SPECS - 0, /*tp_dictoffset*/ - #endif - __pyx_pw_5pyrfc_6_cyrfc_10Connection_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_5pyrfc_6_cyrfc_Connection, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ - #if PY_VERSION_HEX >= 0x030400a1 - #if CYTHON_USE_TP_FINALIZE - 0, /*tp_finalize*/ - #else - NULL, /*tp_finalize*/ - #endif - #endif - #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if __PYX_NEED_TP_PRINT_SLOT == 1 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030C0000 - 0, /*tp_watched*/ - #endif - #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 - 0, /*tp_pypy_flags*/ - #endif -}; -#endif -static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Server __pyx_vtable_5pyrfc_6_cyrfc_Server; - -static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Server(PyTypeObject *t, PyObject *a, PyObject *k) { - struct __pyx_obj_5pyrfc_6_cyrfc_Server *p; - PyObject *o; - #if CYTHON_COMPILING_IN_LIMITED_API - allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); - o = alloc_func(t, 0); - #else - if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { - o = (*t->tp_alloc)(t, 0); - } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - #endif - p = ((struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o); - p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_Server; - p->_client_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)Py_None); Py_INCREF(Py_None); - p->_server_handle_params = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None); - p->_server_thread = Py_None; Py_INCREF(Py_None); - if (unlikely(__pyx_pw_5pyrfc_6_cyrfc_6Server_3__cinit__(o, a, k) < 0)) goto bad; - return o; - bad: - Py_DECREF(o); o = 0; - return NULL; -} - -static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_Server(PyObject *o) { - struct __pyx_obj_5pyrfc_6_cyrfc_Server *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o; - #if CYTHON_USE_TP_FINALIZE - if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pyrfc_6_cyrfc_Server) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - } - #endif - PyObject_GC_UnTrack(o); - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_5pyrfc_6_cyrfc_6Server_17__dealloc__(o); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->_client_connection); - Py_CLEAR(p->_server_handle_params); - Py_CLEAR(p->_server_thread); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_5pyrfc_6_cyrfc_Server(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5pyrfc_6_cyrfc_Server *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o; - if (p->_client_connection) { - e = (*v)(((PyObject *)p->_client_connection), a); if (e) return e; - } - if (p->_server_handle_params) { - e = (*v)(((PyObject *)p->_server_handle_params), a); if (e) return e; - } - if (p->_server_thread) { - e = (*v)(p->_server_thread, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5pyrfc_6_cyrfc_Server(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_5pyrfc_6_cyrfc_Server *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Server *)o; - tmp = ((PyObject*)p->_client_connection); - p->_client_connection = ((struct __pyx_obj_5pyrfc_6_cyrfc_Connection *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_server_handle_params); - p->_server_handle_params = ((struct __pyx_obj_5pyrfc_6_cyrfc_ConnectionParameters *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->_server_thread); - p->_server_thread = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_bgrfc_handlers(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_14bgrfc_handlers_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_bgrfc_handlers_count(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_20bgrfc_handlers_count_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_server_handle(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_13server_handle_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_alive(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_5alive_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_debug(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_1__get__(o); -} - -static int __pyx_setprop_5pyrfc_6_cyrfc_6Server_debug(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_5debug_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_6Server_rstrip(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_1__get__(o); -} - -static int __pyx_setprop_5pyrfc_6_cyrfc_6Server_rstrip(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_5pyrfc_6_cyrfc_6Server_6rstrip_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_Server[] = { - {"bgrfc_init", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_5bgrfc_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_4bgrfc_init}, - {"add_function", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_7add_function, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_6add_function}, - {"serve", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_9serve, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_8serve}, - {"start", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_11start, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_10start}, - {"stop", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_13stop, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_12stop}, - {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_15close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_14close}, - {"get_server_attributes", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_19get_server_attributes, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_6Server_18get_server_attributes}, - {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_21__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_6Server_23__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_Server[] = { - {(char *)"bgrfc_handlers", __pyx_getprop_5pyrfc_6_cyrfc_6Server_bgrfc_handlers, 0, (char *)PyDoc_STR("Server bgRFC handlers\n\n :getter: Returns server bgRFC handlers implemented by application\n :type: dict(str,function)\n "), 0}, - {(char *)"bgrfc_handlers_count", __pyx_getprop_5pyrfc_6_cyrfc_6Server_bgrfc_handlers_count, 0, (char *)PyDoc_STR("Server bgRFC handlers initialized\n\n :getter: Returns the number of bgRFC handlers implemented by application\n :type: int\n "), 0}, - {(char *)"server_handle", __pyx_getprop_5pyrfc_6_cyrfc_6Server_server_handle, 0, (char *)PyDoc_STR("Server connection handle\n\n :getter: Returns server connection handle\n :type: uitptr_t\n "), 0}, - {(char *)"alive", __pyx_getprop_5pyrfc_6_cyrfc_6Server_alive, 0, (char *)PyDoc_STR("Server conection alive property\n\n :getter: Returns True when alive\n :type: boolean\n "), 0}, - {(char *)"debug", __pyx_getprop_5pyrfc_6_cyrfc_6Server_debug, __pyx_setprop_5pyrfc_6_cyrfc_6Server_debug, (char *)0, 0}, - {(char *)"rstrip", __pyx_getprop_5pyrfc_6_cyrfc_6Server_rstrip, __pyx_setprop_5pyrfc_6_cyrfc_6Server_rstrip, (char *)0, 0}, - {0, 0, 0, 0, 0} -}; -#if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_5pyrfc_6_cyrfc_Server_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pyrfc_6_cyrfc_Server}, - {Py_nb_bool, (void *)__pyx_pw_5pyrfc_6_cyrfc_6Server_1__bool__}, - {Py_tp_doc, (void *)PyDoc_STR(" An ABAP server\n\n An instance of :class:`~pyrfc.Server` allows for installing\n Python callback functions and serve requests from SAP systems.\n\n :param server_params: Parameters for registering Python server.\n The parameters may contain the following keywords:\n ``GWHOST`, ``GWSERV``, ``PROGRAM_ID``, ``TRACE``,\n and ``SAPROUTER``.\n\n :type server_params: dict\n\n :param client_params: Parameters for Python client connection.\n The parameters may contain the following keywords:\n ``GWHOST`, ``GWSERV``, ``PROGRAM_ID``, ``TRACE``,\n and ``SAPROUTER``.\n\n :type server_params: dict\n\n :param config: Configuration of the instance. Allowed keys are:\n\n ``debug``\n For testing/debugging operations. If True, the server\n behaves more permissive, e.g. allows incoming calls without a\n valid connection handle. (default is False)\n\n :type config: dict or None (default)\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection attempt fails.\n ")}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_5pyrfc_6_cyrfc_Server}, - {Py_tp_clear, (void *)__pyx_tp_clear_5pyrfc_6_cyrfc_Server}, - {Py_tp_methods, (void *)__pyx_methods_5pyrfc_6_cyrfc_Server}, - {Py_tp_getset, (void *)__pyx_getsets_5pyrfc_6_cyrfc_Server}, - {Py_tp_new, (void *)__pyx_tp_new_5pyrfc_6_cyrfc_Server}, - {0, 0}, -}; -static PyType_Spec __pyx_type_5pyrfc_6_cyrfc_Server_spec = { - "pyrfc._cyrfc.Server", - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Server), - 0, - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, - __pyx_type_5pyrfc_6_cyrfc_Server_slots, -}; -#else - -static PyNumberMethods __pyx_tp_as_number_Server = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - __pyx_pw_5pyrfc_6_cyrfc_6Server_1__bool__, /*nb_bool*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000) - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - 0, /*nb_index*/ - #if PY_VERSION_HEX >= 0x03050000 - 0, /*nb_matrix_multiply*/ - #endif - #if PY_VERSION_HEX >= 0x03050000 - 0, /*nb_inplace_matrix_multiply*/ - #endif -}; - -static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_Server = { - PyVarObject_HEAD_INIT(0, 0) - "pyrfc._cyrfc.""Server", /*tp_name*/ - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Server), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5pyrfc_6_cyrfc_Server, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #endif - #if PY_MAJOR_VERSION >= 3 - 0, /*tp_as_async*/ - #endif - 0, /*tp_repr*/ - &__pyx_tp_as_number_Server, /*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*/ - PyDoc_STR(" An ABAP server\n\n An instance of :class:`~pyrfc.Server` allows for installing\n Python callback functions and serve requests from SAP systems.\n\n :param server_params: Parameters for registering Python server.\n The parameters may contain the following keywords:\n ``GWHOST`, ``GWSERV``, ``PROGRAM_ID``, ``TRACE``,\n and ``SAPROUTER``.\n\n :type server_params: dict\n\n :param client_params: Parameters for Python client connection.\n The parameters may contain the following keywords:\n ``GWHOST`, ``GWSERV``, ``PROGRAM_ID``, ``TRACE``,\n and ``SAPROUTER``.\n\n :type server_params: dict\n\n :param config: Configuration of the instance. Allowed keys are:\n\n ``debug``\n For testing/debugging operations. If True, the server\n behaves more permissive, e.g. allows incoming calls without a\n valid connection handle. (default is False)\n\n :type config: dict or None (default)\n\n :raises: :exc:`~pyrfc.RFCError` or a subclass\n thereof if the connection attempt fails.\n "), /*tp_doc*/ - __pyx_tp_traverse_5pyrfc_6_cyrfc_Server, /*tp_traverse*/ - __pyx_tp_clear_5pyrfc_6_cyrfc_Server, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_5pyrfc_6_cyrfc_Server, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_5pyrfc_6_cyrfc_Server, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - #if !CYTHON_USE_TYPE_SPECS - 0, /*tp_dictoffset*/ - #endif - 0, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_5pyrfc_6_cyrfc_Server, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ - #if PY_VERSION_HEX >= 0x030400a1 - #if CYTHON_USE_TP_FINALIZE - 0, /*tp_finalize*/ - #else - NULL, /*tp_finalize*/ - #endif - #endif - #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if __PYX_NEED_TP_PRINT_SLOT == 1 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030C0000 - 0, /*tp_watched*/ - #endif - #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 - 0, /*tp_pypy_flags*/ - #endif -}; -#endif -static struct __pyx_vtabstruct_5pyrfc_6_cyrfc_Throughput __pyx_vtable_5pyrfc_6_cyrfc_Throughput; - -static PyObject *__pyx_tp_new_5pyrfc_6_cyrfc_Throughput(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p; - PyObject *o; - #if CYTHON_COMPILING_IN_LIMITED_API - allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); - o = alloc_func(t, 0); - #else - if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { - o = (*t->tp_alloc)(t, 0); - } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - #endif - p = ((struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o); - p->__pyx_vtab = __pyx_vtabptr_5pyrfc_6_cyrfc_Throughput; - p->_connections = Py_None; Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_5pyrfc_6_cyrfc_Throughput(PyObject *o) { - struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o; - #if CYTHON_USE_TP_FINALIZE - if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pyrfc_6_cyrfc_Throughput) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - } - #endif - PyObject_GC_UnTrack(o); - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_5pyrfc_6_cyrfc_10Throughput_11__dealloc__(o); - __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->_connections); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_5pyrfc_6_cyrfc_Throughput(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o; - if (p->_connections) { - e = (*v)(p->_connections, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5pyrfc_6_cyrfc_Throughput(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *p = (struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *)o; - tmp = ((PyObject*)p->_connections); - p->_connections = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Throughput_connections(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Throughput_11connections_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Throughput__handle(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Throughput_7_handle_1__get__(o); -} - -static PyObject *__pyx_getprop_5pyrfc_6_cyrfc_10Throughput_stats(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_5pyrfc_6_cyrfc_10Throughput_5stats_1__get__(o); -} - -static PyMethodDef __pyx_methods_5pyrfc_6_cyrfc_Throughput[] = { - {"setOnConnection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_3setOnConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_2setOnConnection}, - {"getFromConnection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_5getFromConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_4getFromConnection}, - {"removeFromConnection", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_6removeFromConnection}, - {"reset", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_9reset, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pyrfc_6_cyrfc_10Throughput_8reset}, - {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_13__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_15__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_5pyrfc_6_cyrfc_Throughput[] = { - {(char *)"connections", __pyx_getprop_5pyrfc_6_cyrfc_10Throughput_connections, 0, (char *)PyDoc_STR("Get connections attached to throughput monitoring\n\n :getter: Connections' instances\n :type: set of Connection\n "), 0}, - {(char *)"_handle", __pyx_getprop_5pyrfc_6_cyrfc_10Throughput__handle, 0, (char *)PyDoc_STR("Get throughput object handle\n\n :getter: Throughput object handle\n :type: uintptr_t\n "), 0}, - {(char *)"stats", __pyx_getprop_5pyrfc_6_cyrfc_10Throughput_stats, 0, (char *)PyDoc_STR("Get throughput monitor statistics\n\n :getter: Throughput monitor counters\n :type: dict(str,int)\n\n * numberOfCalls\n * sentBytes\n * receivedBytes\n * applicationTime\n * totalTime\n * serializationTime\n * deserializationTime\n "), 0}, - {0, 0, 0, 0, 0} -}; -#if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_5pyrfc_6_cyrfc_Throughput_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pyrfc_6_cyrfc_Throughput}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_5pyrfc_6_cyrfc_Throughput}, - {Py_tp_clear, (void *)__pyx_tp_clear_5pyrfc_6_cyrfc_Throughput}, - {Py_tp_methods, (void *)__pyx_methods_5pyrfc_6_cyrfc_Throughput}, - {Py_tp_getset, (void *)__pyx_getsets_5pyrfc_6_cyrfc_Throughput}, - {Py_tp_init, (void *)__pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__}, - {Py_tp_new, (void *)__pyx_tp_new_5pyrfc_6_cyrfc_Throughput}, - {0, 0}, -}; -static PyType_Spec __pyx_type_5pyrfc_6_cyrfc_Throughput_spec = { - "pyrfc._cyrfc.Throughput", - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput), - 0, - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, - __pyx_type_5pyrfc_6_cyrfc_Throughput_slots, -}; -#else - -static PyTypeObject __pyx_type_5pyrfc_6_cyrfc_Throughput = { - PyVarObject_HEAD_INIT(0, 0) - "pyrfc._cyrfc.""Throughput", /*tp_name*/ - sizeof(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5pyrfc_6_cyrfc_Throughput, /*tp_dealloc*/ - #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 - 0, /*tp_vectorcall_offset*/ - #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #endif - #if PY_MAJOR_VERSION >= 3 - 0, /*tp_as_async*/ - #endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_5pyrfc_6_cyrfc_Throughput, /*tp_traverse*/ - __pyx_tp_clear_5pyrfc_6_cyrfc_Throughput, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_methods_5pyrfc_6_cyrfc_Throughput, /*tp_methods*/ - 0, /*tp_members*/ - __pyx_getsets_5pyrfc_6_cyrfc_Throughput, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - #if !CYTHON_USE_TYPE_SPECS - 0, /*tp_dictoffset*/ - #endif - __pyx_pw_5pyrfc_6_cyrfc_10Throughput_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_5pyrfc_6_cyrfc_Throughput, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ - #if PY_VERSION_HEX >= 0x030400a1 - #if CYTHON_USE_TP_FINALIZE - 0, /*tp_finalize*/ - #else - NULL, /*tp_finalize*/ - #endif - #endif - #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if __PYX_NEED_TP_PRINT_SLOT == 1 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030C0000 - 0, /*tp_watched*/ - #endif - #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 - 0, /*tp_pypy_flags*/ - #endif -}; -#endif - -static struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection[8]; -static int __pyx_freecount___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection = 0; - -static PyObject *__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - #if CYTHON_COMPILING_IN_LIMITED_API - allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); - o = alloc_func(t, 0); - #else - if (CYTHON_COMPILING_IN_CPYTHON && likely((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection)))) { - o = (PyObject*)__pyx_freelist___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection[--__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection]; - memset(o, 0, sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection)); - (void) PyObject_INIT(o, t); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - #endif - return o; -} - -static void __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(PyObject *o) { - #if CYTHON_USE_TP_FINALIZE - if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - } - #endif - if (CYTHON_COMPILING_IN_CPYTHON && ((int)(__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection)))) { - __pyx_freelist___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection[__pyx_freecount___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection++] = ((struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} -#if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection}, - {Py_tp_new, (void *)__pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection}, - {0, 0}, -}; -static PyType_Spec __pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_spec = { - "pyrfc._cyrfc.__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection", - sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection), - 0, - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_slots, -}; -#else - -static PyTypeObject __pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection = { - PyVarObject_HEAD_INIT(0, 0) - "pyrfc._cyrfc.""__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection", /*tp_name*/ - sizeof(struct __pyx_obj___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_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*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - #if !CYTHON_USE_TYPE_SPECS - 0, /*tp_dictoffset*/ - #endif - 0, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_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 - #if CYTHON_USE_TP_FINALIZE - 0, /*tp_finalize*/ - #else - NULL, /*tp_finalize*/ - #endif - #endif - #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if __PYX_NEED_TP_PRINT_SLOT == 1 - 0, /*tp_print*/ - #endif - #if PY_VERSION_HEX >= 0x030C0000 - 0, /*tp_watched*/ - #endif - #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 - 0, /*tp_pypy_flags*/ - #endif -}; -#endif - -static PyMethodDef __pyx_methods[] = { - {0, 0, 0, 0} -}; - -static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) { - static const char* internal_type_names[] = { - "Connection", - "ConnectionParameters", - "DATA_CONTAINER_HANDLE", - "RFCTYPE", - "RFC_ABAP_NAME", - "RFC_ATTRIBUTES", - "RFC_BYTE", - "RFC_CALL_TYPE", - "RFC_CHAR", - "RFC_CONNECTION_HANDLE", - "RFC_CONNECTION_PARAMETER", - "RFC_DATE", - "RFC_DIRECTION", - "RFC_ERROR_GROUP", - "RFC_ERROR_INFO", - "RFC_FIELD_DESC", - "RFC_FLOAT", - "RFC_FUNCTION_DESC_HANDLE", - "RFC_FUNCTION_HANDLE", - "RFC_FUNC_DESC_CALLBACK", - "RFC_INT", - "RFC_INT1", - "RFC_INT2", - "RFC_INT8", - "RFC_METADATA_QUERY_RESULT_HANDLE", - "RFC_NUM", - "RFC_ON_CHECK_UNIT", - "RFC_ON_COMMIT_UNIT", - "RFC_ON_CONFIRM_UNIT", - "RFC_ON_GET_UNIT_STATE", - "RFC_ON_ROLLBACK_UNIT", - "RFC_PARAMETER_DEFVALUE", - "RFC_PARAMETER_DESC", - "RFC_PARAMETER_TEXT", - "RFC_PROTOCOL_TYPE", - "RFC_RC", - "RFC_SERVER_ATTRIBUTES", - "RFC_SERVER_CONTEXT", - "RFC_SERVER_FUNCTION", - "RFC_SERVER_HANDLE", - "RFC_SERVER_STATE", - "RFC_STRUCTURE_HANDLE", - "RFC_TABLE_HANDLE", - "RFC_THROUGHPUT_HANDLE", - "RFC_TID", - "RFC_TIME", - "RFC_TRANSACTION_HANDLE", - "RFC_TYPE_DESC_HANDLE", - "RFC_UNITID", - "RFC_UNIT_ATTRIBUTES", - "RFC_UNIT_HANDLE", - "RFC_UNIT_IDENTIFIER", - "RFC_UNIT_STATE", - "SAP_CHAR", - "SAP_RAW", - "SAP_UC", - "SAP_ULLONG", - "SAP_USHORT", - "SAP_UTF16", - "Server", - "Throughput", - "__pyx_ctuple_Py_ssize_t", - "__pyx_ctuple_Py_ssize_t_struct", - "__pyx_ctuple_RFCTYPE", - "__pyx_ctuple_RFCTYPE_struct", - "__pyx_ctuple_RFC_BYTE", - "__pyx_ctuple_RFC_BYTE_struct", - "__pyx_ctuple_RFC_CALL_TYPE", - "__pyx_ctuple_RFC_CALL_TYPE_struct", - "__pyx_ctuple_RFC_DIRECTION", - "__pyx_ctuple_RFC_DIRECTION_struct", - "__pyx_ctuple_RFC_UNIT_STATE", - "__pyx_ctuple_RFC_UNIT_STATE_struct", - "__pyx_ctuple_unsigned__space_int", - "__pyx_ctuple_unsigned__space_int_struct", - "__pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers", - "__pyx_opt_args_5pyrfc_6_cyrfc_wrapString", - "__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection", - "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= 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; -} - - -#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 -/* #### Code section: pystring_table ### */ - -static int __Pyx_CreateStringTabAndInitStrings(void) { - __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_u_00000000, __pyx_k_00000000, sizeof(__pyx_k_00000000), 0, 1, 0, 0}, - {&__pyx_kp_u_02, __pyx_k_02, sizeof(__pyx_k_02), 0, 1, 0, 0}, - {&__pyx_kp_u_04, __pyx_k_04, sizeof(__pyx_k_04), 0, 1, 0, 0}, - {&__pyx_n_s_ABAPApplicationError, __pyx_k_ABAPApplicationError, sizeof(__pyx_k_ABAPApplicationError), 0, 0, 1, 1}, - {&__pyx_n_s_ABAPRuntimeError, __pyx_k_ABAPRuntimeError, sizeof(__pyx_k_ABAPRuntimeError), 0, 0, 1, 1}, - {&__pyx_kp_s_A_function_description_This_cla, __pyx_k_A_function_description_This_cla, sizeof(__pyx_k_A_function_description_This_cla), 0, 0, 1, 0}, - {&__pyx_kp_s_A_type_description_This_class_w, __pyx_k_A_type_description_This_class_w, sizeof(__pyx_k_A_type_description_This_class_w), 0, 0, 1, 0}, - {&__pyx_kp_u_Argument_attributes_not_valid_t, __pyx_k_Argument_attributes_not_valid_t, sizeof(__pyx_k_Argument_attributes_not_valid_t), 0, 1, 0, 0}, - {&__pyx_kp_u_Argument_background_must_be_a_bo, __pyx_k_Argument_background_must_be_a_bo, sizeof(__pyx_k_Argument_background_must_be_a_bo), 0, 1, 0, 0}, - {&__pyx_kp_u_Argument_queue_names_not_valid_t, __pyx_k_Argument_queue_names_not_valid_t, sizeof(__pyx_k_Argument_queue_names_not_valid_t), 0, 1, 0, 0}, - {&__pyx_kp_u_Argument_unit_not_valid_Is_unit, __pyx_k_Argument_unit_not_valid_Is_unit, sizeof(__pyx_k_Argument_unit_not_valid_Is_unit), 0, 1, 0, 0}, - {&__pyx_kp_u_Authentication_exception_raised, __pyx_k_Authentication_exception_raised, sizeof(__pyx_k_Authentication_exception_raised), 0, 1, 0, 0}, - {&__pyx_kp_u_BgRfc_callback_function_key_not, __pyx_k_BgRfc_callback_function_key_not, sizeof(__pyx_k_BgRfc_callback_function_key_not), 0, 1, 0, 0}, - {&__pyx_kp_u_BgRfc_callback_function_referenc, __pyx_k_BgRfc_callback_function_referenc, sizeof(__pyx_k_BgRfc_callback_function_referenc), 0, 1, 0, 0}, - {&__pyx_kp_u_Callback_functions_may_only_rai, __pyx_k_Callback_functions_may_only_rai, sizeof(__pyx_k_Callback_functions_may_only_rai), 0, 1, 0, 0}, - {&__pyx_n_s_CommunicationError, __pyx_k_CommunicationError, sizeof(__pyx_k_CommunicationError), 0, 0, 1, 1}, - {&__pyx_n_s_Connection, __pyx_k_Connection, sizeof(__pyx_k_Connection), 0, 0, 1, 1}, - {&__pyx_n_u_Connection, __pyx_k_Connection, sizeof(__pyx_k_Connection), 0, 1, 0, 1}, - {&__pyx_n_s_ConnectionParameters, __pyx_k_ConnectionParameters, sizeof(__pyx_k_ConnectionParameters), 0, 0, 1, 1}, - {&__pyx_n_s_ConnectionParameters___reduce_cy, __pyx_k_ConnectionParameters___reduce_cy, sizeof(__pyx_k_ConnectionParameters___reduce_cy), 0, 0, 1, 1}, - {&__pyx_n_s_ConnectionParameters___setstate, __pyx_k_ConnectionParameters___setstate, sizeof(__pyx_k_ConnectionParameters___setstate), 0, 0, 1, 1}, - {&__pyx_n_s_ConnectionParameters__free, __pyx_k_ConnectionParameters__free, sizeof(__pyx_k_ConnectionParameters__free), 0, 0, 1, 1}, - {&__pyx_n_s_ConnectionParameters_free, __pyx_k_ConnectionParameters_free, sizeof(__pyx_k_ConnectionParameters_free), 0, 0, 1, 1}, - {&__pyx_n_s_Connection___enter, __pyx_k_Connection___enter, sizeof(__pyx_k_Connection___enter), 0, 0, 1, 1}, - {&__pyx_n_s_Connection___exit, __pyx_k_Connection___exit, sizeof(__pyx_k_Connection___exit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection___reduce_cython, __pyx_k_Connection___reduce_cython, sizeof(__pyx_k_Connection___reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_Connection___setstate_cython, __pyx_k_Connection___setstate_cython, sizeof(__pyx_k_Connection___setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__close, __pyx_k_Connection__close, sizeof(__pyx_k_Connection__close), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__confirm_transaction, __pyx_k_Connection__confirm_transaction, sizeof(__pyx_k_Connection__confirm_transaction), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__confirm_unit, __pyx_k_Connection__confirm_unit, sizeof(__pyx_k_Connection__confirm_unit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__create_and_submit_tr, __pyx_k_Connection__create_and_submit_tr, sizeof(__pyx_k_Connection__create_and_submit_tr), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__create_and_submit_un, __pyx_k_Connection__create_and_submit_un, sizeof(__pyx_k_Connection__create_and_submit_un), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__destroy_transaction, __pyx_k_Connection__destroy_transaction, sizeof(__pyx_k_Connection__destroy_transaction), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__destroy_unit, __pyx_k_Connection__destroy_unit, sizeof(__pyx_k_Connection__destroy_unit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__get_transaction_id, __pyx_k_Connection__get_transaction_id, sizeof(__pyx_k_Connection__get_transaction_id), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__get_unit_id, __pyx_k_Connection__get_unit_id, sizeof(__pyx_k_Connection__get_unit_id), 0, 0, 1, 1}, - {&__pyx_n_s_Connection__get_unit_state, __pyx_k_Connection__get_unit_state, sizeof(__pyx_k_Connection__get_unit_state), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_call, __pyx_k_Connection_call, sizeof(__pyx_k_Connection_call), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_cancel, __pyx_k_Connection_cancel, sizeof(__pyx_k_Connection_cancel), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_close, __pyx_k_Connection_close, sizeof(__pyx_k_Connection_close), 0, 0, 1, 1}, - {&__pyx_kp_u_Connection_configuration_option, __pyx_k_Connection_configuration_option, sizeof(__pyx_k_Connection_configuration_option), 0, 1, 0, 0}, - {&__pyx_n_s_Connection_confirm_unit, __pyx_k_Connection_confirm_unit, sizeof(__pyx_k_Connection_confirm_unit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_destroy_unit, __pyx_k_Connection_destroy_unit, sizeof(__pyx_k_Connection_destroy_unit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_fill_and_submit_unit, __pyx_k_Connection_fill_and_submit_unit, sizeof(__pyx_k_Connection_fill_and_submit_unit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_free, __pyx_k_Connection_free, sizeof(__pyx_k_Connection_free), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_func_desc_remove, __pyx_k_Connection_func_desc_remove, sizeof(__pyx_k_Connection_func_desc_remove), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_get_connection_attrib, __pyx_k_Connection_get_connection_attrib, sizeof(__pyx_k_Connection_get_connection_attrib), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_get_function_descript, __pyx_k_Connection_get_function_descript, sizeof(__pyx_k_Connection_get_function_descript), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_get_unit_state, __pyx_k_Connection_get_unit_state, sizeof(__pyx_k_Connection_get_unit_state), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_initialize_unit, __pyx_k_Connection_initialize_unit, sizeof(__pyx_k_Connection_initialize_unit), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_is_valid, __pyx_k_Connection_is_valid, sizeof(__pyx_k_Connection_is_valid), 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_n_s_Connection_open, __pyx_k_Connection_open, sizeof(__pyx_k_Connection_open), 0, 0, 1, 1}, - {&__pyx_kp_u_Connection_parameters_missing, __pyx_k_Connection_parameters_missing, sizeof(__pyx_k_Connection_parameters_missing), 0, 1, 0, 0}, - {&__pyx_n_s_Connection_ping, __pyx_k_Connection_ping, sizeof(__pyx_k_Connection_ping), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_reopen, __pyx_k_Connection_reopen, sizeof(__pyx_k_Connection_reopen), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_reset_server_context, __pyx_k_Connection_reset_server_context, sizeof(__pyx_k_Connection_reset_server_context), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_type_desc_get, __pyx_k_Connection_type_desc_get, sizeof(__pyx_k_Connection_type_desc_get), 0, 0, 1, 1}, - {&__pyx_n_s_Connection_type_desc_remove, __pyx_k_Connection_type_desc_remove, sizeof(__pyx_k_Connection_type_desc_remove), 0, 0, 1, 1}, - {&__pyx_kp_u_Connection_was_canceled, __pyx_k_Connection_was_canceled, sizeof(__pyx_k_Connection_was_canceled), 0, 1, 0, 0}, - {&__pyx_kp_u_Crypto_library_not_found, __pyx_k_Crypto_library_not_found, sizeof(__pyx_k_Crypto_library_not_found), 0, 1, 0, 0}, - {&__pyx_n_s_Decimal, __pyx_k_Decimal, sizeof(__pyx_k_Decimal), 0, 0, 1, 1}, - {&__pyx_n_s_Enum, __pyx_k_Enum, sizeof(__pyx_k_Enum), 0, 0, 1, 1}, - {&__pyx_kp_u_Error_code, __pyx_k_Error_code, sizeof(__pyx_k_Error_code), 0, 1, 0, 0}, - {&__pyx_kp_u_Error_in_bgRFC_handler_onCheck, __pyx_k_Error_in_bgRFC_handler_onCheck, sizeof(__pyx_k_Error_in_bgRFC_handler_onCheck), 0, 1, 0, 0}, - {&__pyx_kp_u_Error_in_bgRFC_handler_onCommit, __pyx_k_Error_in_bgRFC_handler_onCommit, sizeof(__pyx_k_Error_in_bgRFC_handler_onCommit), 0, 1, 0, 0}, - {&__pyx_kp_u_Error_in_bgRFC_handler_onConfirm, __pyx_k_Error_in_bgRFC_handler_onConfirm, sizeof(__pyx_k_Error_in_bgRFC_handler_onConfirm), 0, 1, 0, 0}, - {&__pyx_kp_u_Error_in_bgRFC_handler_onGetStat, __pyx_k_Error_in_bgRFC_handler_onGetStat, sizeof(__pyx_k_Error_in_bgRFC_handler_onGetStat), 0, 1, 0, 0}, - {&__pyx_kp_u_Error_in_bgRFC_handler_onRollbac, __pyx_k_Error_in_bgRFC_handler_onRollbac, sizeof(__pyx_k_Error_in_bgRFC_handler_onRollbac), 0, 1, 0, 0}, - {&__pyx_kp_u_Error_while_retrieving_connecti, __pyx_k_Error_while_retrieving_connecti, sizeof(__pyx_k_Error_while_retrieving_connecti), 0, 1, 0, 0}, - {&__pyx_n_s_ExternalApplicationError, __pyx_k_ExternalApplicationError, sizeof(__pyx_k_ExternalApplicationError), 0, 0, 1, 1}, - {&__pyx_n_s_ExternalAuthorizationError, __pyx_k_ExternalAuthorizationError, sizeof(__pyx_k_ExternalAuthorizationError), 0, 0, 1, 1}, - {&__pyx_n_s_ExternalRuntimeError, __pyx_k_ExternalRuntimeError, sizeof(__pyx_k_ExternalRuntimeError), 0, 0, 1, 1}, - {&__pyx_kp_u_Function, __pyx_k_Function, sizeof(__pyx_k_Function), 0, 1, 0, 0}, - {&__pyx_kp_u_FunctionDescription, __pyx_k_FunctionDescription, sizeof(__pyx_k_FunctionDescription), 0, 1, 0, 0}, - {&__pyx_n_s_FunctionDescription_2, __pyx_k_FunctionDescription_2, sizeof(__pyx_k_FunctionDescription_2), 0, 0, 1, 1}, - {&__pyx_n_s_FunctionDescription___init, __pyx_k_FunctionDescription___init, sizeof(__pyx_k_FunctionDescription___init), 0, 0, 1, 1}, - {&__pyx_n_s_FunctionDescription___repr, __pyx_k_FunctionDescription___repr, sizeof(__pyx_k_FunctionDescription___repr), 0, 0, 1, 1}, - {&__pyx_n_s_FunctionDescription_add_paramete, __pyx_k_FunctionDescription_add_paramete, sizeof(__pyx_k_FunctionDescription_add_paramete), 0, 0, 1, 1}, - {&__pyx_kp_u_H_M_S, __pyx_k_H_M_S, sizeof(__pyx_k_H_M_S), 0, 1, 0, 0}, - {&__pyx_kp_u_Invalid_connection_handle, __pyx_k_Invalid_connection_handle, sizeof(__pyx_k_Invalid_connection_handle), 0, 1, 0, 0}, - {&__pyx_kp_u_Invalid_exception_raised_by_call, __pyx_k_Invalid_exception_raised_by_call, sizeof(__pyx_k_Invalid_exception_raised_by_call), 0, 1, 0, 0}, - {&__pyx_kp_u_Invalid_length_of_unit_id_should, __pyx_k_Invalid_length_of_unit_id_should, sizeof(__pyx_k_Invalid_length_of_unit_id_should), 0, 1, 0, 0}, - {&__pyx_kp_u_Invocation_finished_submitting_u, __pyx_k_Invocation_finished_submitting_u, sizeof(__pyx_k_Invocation_finished_submitting_u), 0, 1, 0, 0}, - {&__pyx_n_s_Iterable, __pyx_k_Iterable, sizeof(__pyx_k_Iterable), 0, 0, 1, 1}, - {&__pyx_n_s_LOCALE_RADIX, __pyx_k_LOCALE_RADIX, sizeof(__pyx_k_LOCALE_RADIX), 0, 0, 1, 1}, - {&__pyx_kp_u_Length_of_parameter_unit_id_must, __pyx_k_Length_of_parameter_unit_id_must, sizeof(__pyx_k_Length_of_parameter_unit_id_must), 0, 1, 0, 0}, - {&__pyx_n_s_LogonError, __pyx_k_LogonError, sizeof(__pyx_k_LogonError), 0, 0, 1, 1}, - {&__pyx_n_s_MASK_DTIME, __pyx_k_MASK_DTIME, sizeof(__pyx_k_MASK_DTIME), 0, 0, 1, 1}, - {&__pyx_n_s_MASK_RETURN_IMPORT_PARAMS, __pyx_k_MASK_RETURN_IMPORT_PARAMS, sizeof(__pyx_k_MASK_RETURN_IMPORT_PARAMS), 0, 0, 1, 1}, - {&__pyx_n_s_MASK_RSTRIP, __pyx_k_MASK_RSTRIP, sizeof(__pyx_k_MASK_RSTRIP), 0, 0, 1, 1}, - {&__pyx_kp_u_New_handle, __pyx_k_New_handle, sizeof(__pyx_k_New_handle), 0, 1, 0, 0}, - {&__pyx_kp_u_No_connections_assigned, __pyx_k_No_connections_assigned, sizeof(__pyx_k_No_connections_assigned), 0, 1, 0, 0}, - {&__pyx_kp_u_No_metadata_found_for_function, __pyx_k_No_metadata_found_for_function, sizeof(__pyx_k_No_metadata_found_for_function), 0, 1, 0, 0}, - {&__pyx_kp_u_No_state_check_possible_of_non_b, __pyx_k_No_state_check_possible_of_non_b, sizeof(__pyx_k_No_state_check_possible_of_non_b), 0, 1, 0, 0}, - {&__pyx_kp_u_No_transaction_handle_for_this_c, __pyx_k_No_transaction_handle_for_this_c, sizeof(__pyx_k_No_transaction_handle_for_this_c), 0, 1, 0, 0}, - {&__pyx_kp_u_No_unit_handle_for_this_connecti, __pyx_k_No_unit_handle_for_this_connecti, sizeof(__pyx_k_No_unit_handle_for_this_connecti), 0, 1, 0, 0}, - {&__pyx_kp_u_Not_a_valid_error_group, __pyx_k_Not_a_valid_error_group, sizeof(__pyx_k_Not_a_valid_error_group), 0, 1, 0, 0}, - {&__pyx_n_s_OK, __pyx_k_OK, sizeof(__pyx_k_OK), 0, 0, 1, 1}, - {&__pyx_kp_u_Parameter_calls_must_be_iterable, __pyx_k_Parameter_calls_must_be_iterable, sizeof(__pyx_k_Parameter_calls_must_be_iterable), 0, 1, 0, 0}, - {&__pyx_kp_u_Parameter_calls_must_contain_at, __pyx_k_Parameter_calls_must_contain_at, sizeof(__pyx_k_Parameter_calls_must_contain_at), 0, 1, 0, 0}, - {&__pyx_kp_u_Parameter_calls_must_contain_val, __pyx_k_Parameter_calls_must_contain_val, sizeof(__pyx_k_Parameter_calls_must_contain_val), 0, 1, 0, 0}, - {&__pyx_kp_u_Parameter_unit_not_valid_Please, __pyx_k_Parameter_unit_not_valid_Please, sizeof(__pyx_k_Parameter_unit_not_valid_Please), 0, 1, 0, 0}, - {&__pyx_n_s_Pyx_CFunc_object__lParenobject, __pyx_k_Pyx_CFunc_object__lParenobject, sizeof(__pyx_k_Pyx_CFunc_object__lParenobject), 0, 0, 1, 1}, - {&__pyx_n_u_Q, __pyx_k_Q, sizeof(__pyx_k_Q), 0, 1, 0, 1}, - {&__pyx_n_s_RCStatus, __pyx_k_RCStatus, sizeof(__pyx_k_RCStatus), 0, 0, 1, 1}, - {&__pyx_n_s_RFCError, __pyx_k_RFCError, sizeof(__pyx_k_RFCError), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_ABAPOBJECT, __pyx_k_RFCTYPE_ABAPOBJECT, sizeof(__pyx_k_RFCTYPE_ABAPOBJECT), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_BCD, __pyx_k_RFCTYPE_BCD, sizeof(__pyx_k_RFCTYPE_BCD), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_BYTE, __pyx_k_RFCTYPE_BYTE, sizeof(__pyx_k_RFCTYPE_BYTE), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_CDAY, __pyx_k_RFCTYPE_CDAY, sizeof(__pyx_k_RFCTYPE_CDAY), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_CHAR, __pyx_k_RFCTYPE_CHAR, sizeof(__pyx_k_RFCTYPE_CHAR), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_DATE, __pyx_k_RFCTYPE_DATE, sizeof(__pyx_k_RFCTYPE_DATE), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_DECF16, __pyx_k_RFCTYPE_DECF16, sizeof(__pyx_k_RFCTYPE_DECF16), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_DECF34, __pyx_k_RFCTYPE_DECF34, sizeof(__pyx_k_RFCTYPE_DECF34), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_DTDAY, __pyx_k_RFCTYPE_DTDAY, sizeof(__pyx_k_RFCTYPE_DTDAY), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_DTMONTH, __pyx_k_RFCTYPE_DTMONTH, sizeof(__pyx_k_RFCTYPE_DTMONTH), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_DTWEEK, __pyx_k_RFCTYPE_DTWEEK, sizeof(__pyx_k_RFCTYPE_DTWEEK), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_FLOAT, __pyx_k_RFCTYPE_FLOAT, sizeof(__pyx_k_RFCTYPE_FLOAT), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_INT, __pyx_k_RFCTYPE_INT, sizeof(__pyx_k_RFCTYPE_INT), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_INT1, __pyx_k_RFCTYPE_INT1, sizeof(__pyx_k_RFCTYPE_INT1), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_INT2, __pyx_k_RFCTYPE_INT2, sizeof(__pyx_k_RFCTYPE_INT2), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_INT8, __pyx_k_RFCTYPE_INT8, sizeof(__pyx_k_RFCTYPE_INT8), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_NULL, __pyx_k_RFCTYPE_NULL, sizeof(__pyx_k_RFCTYPE_NULL), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_NUM, __pyx_k_RFCTYPE_NUM, sizeof(__pyx_k_RFCTYPE_NUM), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_STRING, __pyx_k_RFCTYPE_STRING, sizeof(__pyx_k_RFCTYPE_STRING), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_STRUCTURE, __pyx_k_RFCTYPE_STRUCTURE, sizeof(__pyx_k_RFCTYPE_STRUCTURE), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_TABLE, __pyx_k_RFCTYPE_TABLE, sizeof(__pyx_k_RFCTYPE_TABLE), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_TIME, __pyx_k_RFCTYPE_TIME, sizeof(__pyx_k_RFCTYPE_TIME), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_TMINUTE, __pyx_k_RFCTYPE_TMINUTE, sizeof(__pyx_k_RFCTYPE_TMINUTE), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_TSECOND, __pyx_k_RFCTYPE_TSECOND, sizeof(__pyx_k_RFCTYPE_TSECOND), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_UTCLONG, __pyx_k_RFCTYPE_UTCLONG, sizeof(__pyx_k_RFCTYPE_UTCLONG), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_UTCMINUTE, __pyx_k_RFCTYPE_UTCMINUTE, sizeof(__pyx_k_RFCTYPE_UTCMINUTE), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_UTCSECOND, __pyx_k_RFCTYPE_UTCSECOND, sizeof(__pyx_k_RFCTYPE_UTCSECOND), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_XMLDATA, __pyx_k_RFCTYPE_XMLDATA, sizeof(__pyx_k_RFCTYPE_XMLDATA), 0, 0, 1, 1}, - {&__pyx_n_s_RFCTYPE_XSTRING, __pyx_k_RFCTYPE_XSTRING, sizeof(__pyx_k_RFCTYPE_XSTRING), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_CHANGING, __pyx_k_RFC_CHANGING, sizeof(__pyx_k_RFC_CHANGING), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_EXECUTED, __pyx_k_RFC_EXECUTED, sizeof(__pyx_k_RFC_EXECUTED), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_EXPORT, __pyx_k_RFC_EXPORT, sizeof(__pyx_k_RFC_EXPORT), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_EXTERNAL_FAILURE, __pyx_k_RFC_EXTERNAL_FAILURE, sizeof(__pyx_k_RFC_EXTERNAL_FAILURE), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_IMPORT, __pyx_k_RFC_IMPORT, sizeof(__pyx_k_RFC_IMPORT), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_NOT_FOUND, __pyx_k_RFC_NOT_FOUND, sizeof(__pyx_k_RFC_NOT_FOUND), 0, 0, 1, 1}, - {&__pyx_n_s_RFC_TABLES, __pyx_k_RFC_TABLES, sizeof(__pyx_k_RFC_TABLES), 0, 0, 1, 1}, - {&__pyx_kp_u_Remote_function_module, __pyx_k_Remote_function_module, sizeof(__pyx_k_Remote_function_module), 0, 1, 0, 0}, - {&__pyx_kp_u_Remote_function_module_name_must, __pyx_k_Remote_function_module_name_must, sizeof(__pyx_k_Remote_function_module_name_must), 0, 1, 0, 0}, - {&__pyx_kp_u_Request_for, __pyx_k_Request_for, sizeof(__pyx_k_Request_for), 0, 1, 0, 0}, - {&__pyx_n_s_RfcFieldType, __pyx_k_RfcFieldType, sizeof(__pyx_k_RfcFieldType), 0, 0, 1, 1}, - {&__pyx_n_s_RfcParameterDirection, __pyx_k_RfcParameterDirection, sizeof(__pyx_k_RfcParameterDirection), 0, 0, 1, 1}, - {&__pyx_n_s_Server, __pyx_k_Server, sizeof(__pyx_k_Server), 0, 0, 1, 1}, - {&__pyx_n_u_Server, __pyx_k_Server, sizeof(__pyx_k_Server), 0, 1, 0, 1}, - {&__pyx_kp_u_Server_2, __pyx_k_Server_2, sizeof(__pyx_k_Server_2), 0, 1, 0, 0}, - {&__pyx_n_s_Server___reduce_cython, __pyx_k_Server___reduce_cython, sizeof(__pyx_k_Server___reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_Server___setstate_cython, __pyx_k_Server___setstate_cython, sizeof(__pyx_k_Server___setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_Server__bgRfcFunction, __pyx_k_Server__bgRfcFunction, sizeof(__pyx_k_Server__bgRfcFunction), 0, 0, 1, 1}, - {&__pyx_n_s_Server_add_function, __pyx_k_Server_add_function, sizeof(__pyx_k_Server_add_function), 0, 0, 1, 1}, - {&__pyx_n_s_Server_bgrfc_init, __pyx_k_Server_bgrfc_init, sizeof(__pyx_k_Server_bgrfc_init), 0, 0, 1, 1}, - {&__pyx_n_s_Server_close, __pyx_k_Server_close, sizeof(__pyx_k_Server_close), 0, 0, 1, 1}, - {&__pyx_kp_u_Server_function, __pyx_k_Server_function, sizeof(__pyx_k_Server_function), 0, 1, 0, 0}, - {&__pyx_kp_u_Server_function_2, __pyx_k_Server_function_2, sizeof(__pyx_k_Server_function_2), 0, 1, 0, 0}, - {&__pyx_n_s_Server_get_server_attributes, __pyx_k_Server_get_server_attributes, sizeof(__pyx_k_Server_get_server_attributes), 0, 0, 1, 1}, - {&__pyx_n_s_Server_serve, __pyx_k_Server_serve, sizeof(__pyx_k_Server_serve), 0, 0, 1, 1}, - {&__pyx_n_s_Server_start, __pyx_k_Server_start, sizeof(__pyx_k_Server_start), 0, 0, 1, 1}, - {&__pyx_n_s_Server_stop, __pyx_k_Server_stop, sizeof(__pyx_k_Server_stop), 0, 0, 1, 1}, - {&__pyx_n_u_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 1, 0, 1}, - {&__pyx_kp_u_TID, __pyx_k_TID, sizeof(__pyx_k_TID), 0, 1, 0, 0}, - {&__pyx_kp_u_There_is_an_active_unit_for_this, __pyx_k_There_is_an_active_unit_for_this, sizeof(__pyx_k_There_is_an_active_unit_for_this), 0, 1, 0, 0}, - {&__pyx_n_s_Thread, __pyx_k_Thread, sizeof(__pyx_k_Thread), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput, __pyx_k_Throughput, sizeof(__pyx_k_Throughput), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput___enter, __pyx_k_Throughput___enter, sizeof(__pyx_k_Throughput___enter), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput___exit, __pyx_k_Throughput___exit, sizeof(__pyx_k_Throughput___exit), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput___reduce_cython, __pyx_k_Throughput___reduce_cython, sizeof(__pyx_k_Throughput___reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput___setstate_cython, __pyx_k_Throughput___setstate_cython, sizeof(__pyx_k_Throughput___setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput_getFromConnection, __pyx_k_Throughput_getFromConnection, sizeof(__pyx_k_Throughput_getFromConnection), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput_removeFromConnection, __pyx_k_Throughput_removeFromConnection, sizeof(__pyx_k_Throughput_removeFromConnection), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput_reset, __pyx_k_Throughput_reset, sizeof(__pyx_k_Throughput_reset), 0, 0, 1, 1}, - {&__pyx_n_s_Throughput_setOnConnection, __pyx_k_Throughput_setOnConnection, sizeof(__pyx_k_Throughput_setOnConnection), 0, 0, 1, 1}, - {&__pyx_n_s_Timer, __pyx_k_Timer, sizeof(__pyx_k_Timer), 0, 0, 1, 1}, - {&__pyx_kp_u_TypeDescription, __pyx_k_TypeDescription, sizeof(__pyx_k_TypeDescription), 0, 1, 0, 0}, - {&__pyx_n_s_TypeDescription_2, __pyx_k_TypeDescription_2, sizeof(__pyx_k_TypeDescription_2), 0, 0, 1, 1}, - {&__pyx_n_s_TypeDescription___init, __pyx_k_TypeDescription___init, sizeof(__pyx_k_TypeDescription___init), 0, 0, 1, 1}, - {&__pyx_n_s_TypeDescription___repr, __pyx_k_TypeDescription___repr, sizeof(__pyx_k_TypeDescription___repr), 0, 0, 1, 1}, - {&__pyx_n_s_TypeDescription_add_field, __pyx_k_TypeDescription_add_field, sizeof(__pyx_k_TypeDescription_add_field), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, - {&__pyx_kp_u_UTC, __pyx_k_UTC, sizeof(__pyx_k_UTC), 0, 1, 0, 0}, - {&__pyx_kp_u_Unit, __pyx_k_Unit, sizeof(__pyx_k_Unit), 0, 1, 0, 0}, - {&__pyx_n_s_UnitCallType, __pyx_k_UnitCallType, sizeof(__pyx_k_UnitCallType), 0, 0, 1, 1}, - {&__pyx_n_s_UnitState, __pyx_k_UnitState, sizeof(__pyx_k_UnitState), 0, 0, 1, 1}, - {&__pyx_kp_u_Unknown_RFC_type, __pyx_k_Unknown_RFC_type, sizeof(__pyx_k_Unknown_RFC_type), 0, 1, 0, 0}, - {&__pyx_kp_u_User_user_from_system_sysId_clie, __pyx_k_User_user_from_system_sysId_clie, sizeof(__pyx_k_User_user_from_system_sysId_clie), 0, 1, 0, 0}, - {&__pyx_kp_u_Values, __pyx_k_Values, sizeof(__pyx_k_Values), 0, 1, 0, 0}, - {&__pyx_kp_u_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 1, 0, 0}, - {&__pyx_n_s__164, __pyx_k__164, sizeof(__pyx_k__164), 0, 0, 1, 1}, - {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0}, - {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0}, - {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, - {&__pyx_kp_u__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 1, 0, 0}, - {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0}, - {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, - {&__pyx_kp_u__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 1, 0, 0}, - {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, - {&__pyx_n_s__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 1, 1}, - {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, - {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, - {&__pyx_kp_u_a_decimal_value_required_receive, __pyx_k_a_decimal_value_required_receive, sizeof(__pyx_k_a_decimal_value_required_receive), 0, 1, 0, 0}, - {&__pyx_kp_u_a_numeric_string_is_required_rec, __pyx_k_a_numeric_string_is_required_rec, sizeof(__pyx_k_a_numeric_string_is_required_rec), 0, 1, 0, 0}, - {&__pyx_n_u_active_unit, __pyx_k_active_unit, sizeof(__pyx_k_active_unit), 0, 1, 0, 1}, - {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1}, - {&__pyx_n_s_add_field, __pyx_k_add_field, sizeof(__pyx_k_add_field), 0, 0, 1, 1}, - {&__pyx_n_s_add_function, __pyx_k_add_function, sizeof(__pyx_k_add_function), 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_after_remove, __pyx_k_after_remove, sizeof(__pyx_k_after_remove), 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_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1}, - {&__pyx_n_s_attributes, __pyx_k_attributes, sizeof(__pyx_k_attributes), 0, 0, 1, 1}, - {&__pyx_n_u_auth_check, __pyx_k_auth_check, sizeof(__pyx_k_auth_check), 0, 1, 0, 1}, - {&__pyx_kp_u_authorization_check_for, __pyx_k_authorization_check_for, sizeof(__pyx_k_authorization_check_for), 0, 1, 0, 0}, - {&__pyx_n_s_auto, __pyx_k_auto, sizeof(__pyx_k_auto), 0, 0, 1, 1}, - {&__pyx_n_s_background, __pyx_k_background, sizeof(__pyx_k_background), 0, 0, 1, 1}, - {&__pyx_n_u_background, __pyx_k_background, sizeof(__pyx_k_background), 0, 1, 0, 1}, - {&__pyx_n_s_background_unit, __pyx_k_background_unit, sizeof(__pyx_k_background_unit), 0, 0, 1, 1}, - {&__pyx_n_s_bg, __pyx_k_bg, sizeof(__pyx_k_bg), 0, 0, 1, 1}, - {&__pyx_n_u_bgRFC, __pyx_k_bgRFC, sizeof(__pyx_k_bgRFC), 0, 1, 0, 1}, - {&__pyx_kp_u_bgRFC_handler, __pyx_k_bgRFC_handler, sizeof(__pyx_k_bgRFC_handler), 0, 1, 0, 0}, - {&__pyx_kp_u_bgRFC_handler_onCheck_is_not_reg, __pyx_k_bgRFC_handler_onCheck_is_not_reg, sizeof(__pyx_k_bgRFC_handler_onCheck_is_not_reg), 0, 1, 0, 0}, - {&__pyx_kp_u_bgRFC_handler_onCommit_is_not_re, __pyx_k_bgRFC_handler_onCommit_is_not_re, sizeof(__pyx_k_bgRFC_handler_onCommit_is_not_re), 0, 1, 0, 0}, - {&__pyx_kp_u_bgRFC_handler_onConfirm_is_not_r, __pyx_k_bgRFC_handler_onConfirm_is_not_r, sizeof(__pyx_k_bgRFC_handler_onConfirm_is_not_r), 0, 1, 0, 0}, - {&__pyx_kp_u_bgRFC_handler_onGetState_is_not, __pyx_k_bgRFC_handler_onGetState_is_not, sizeof(__pyx_k_bgRFC_handler_onGetState_is_not), 0, 1, 0, 0}, - {&__pyx_kp_u_bgRFC_handler_onRollback_is_not, __pyx_k_bgRFC_handler_onRollback_is_not, sizeof(__pyx_k_bgRFC_handler_onRollback_is_not), 0, 1, 0, 0}, - {&__pyx_kp_u_bgRFC_handlers_installed, __pyx_k_bgRFC_handlers_installed, sizeof(__pyx_k_bgRFC_handlers_installed), 0, 1, 0, 0}, - {&__pyx_n_s_bgRfcFunction, __pyx_k_bgRfcFunction, sizeof(__pyx_k_bgRfcFunction), 0, 0, 1, 1}, - {&__pyx_n_s_bgrfc_handlers_count, __pyx_k_bgrfc_handlers_count, sizeof(__pyx_k_bgrfc_handlers_count), 0, 0, 1, 1}, - {&__pyx_n_s_bgrfc_init, __pyx_k_bgrfc_init, sizeof(__pyx_k_bgrfc_init), 0, 0, 1, 1}, - {&__pyx_kp_u_but_found, __pyx_k_but_found, sizeof(__pyx_k_but_found), 0, 1, 0, 0}, - {&__pyx_n_s_cName, __pyx_k_cName, sizeof(__pyx_k_cName), 0, 0, 1, 1}, - {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1}, - {&__pyx_n_u_call_type, __pyx_k_call_type, sizeof(__pyx_k_call_type), 0, 1, 0, 1}, - {&__pyx_n_s_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 0, 1, 1}, - {&__pyx_n_u_callback, __pyx_k_callback, sizeof(__pyx_k_callback), 0, 1, 0, 1}, - {&__pyx_n_s_calls, __pyx_k_calls, sizeof(__pyx_k_calls), 0, 0, 1, 1}, - {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1}, - {&__pyx_n_s_cancel_connection, __pyx_k_cancel_connection, sizeof(__pyx_k_cancel_connection), 0, 0, 1, 1}, - {&__pyx_n_s_cancel_timer, __pyx_k_cancel_timer, sizeof(__pyx_k_cancel_timer), 0, 0, 1, 1}, - {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1}, - {&__pyx_kp_u_chars_found, __pyx_k_chars_found, sizeof(__pyx_k_chars_found), 0, 1, 0, 0}, - {&__pyx_n_u_check, __pyx_k_check, sizeof(__pyx_k_check), 0, 1, 0, 1}, - {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 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_connection, __pyx_k_client_connection, sizeof(__pyx_k_client_connection), 0, 0, 1, 1}, - {&__pyx_n_s_client_params, __pyx_k_client_params, sizeof(__pyx_k_client_params), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, - {&__pyx_n_s_close_2, __pyx_k_close_2, sizeof(__pyx_k_close_2), 0, 0, 1, 1}, - {&__pyx_kp_u_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 1, 0, 0}, - {&__pyx_n_s_closed_handle, __pyx_k_closed_handle, sizeof(__pyx_k_closed_handle), 0, 0, 1, 1}, - {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, - {&__pyx_kp_u_code_set_to_RFC_ABAP_EXCEPTION, __pyx_k_code_set_to_RFC_ABAP_EXCEPTION, sizeof(__pyx_k_code_set_to_RFC_ABAP_EXCEPTION), 0, 1, 0, 0}, - {&__pyx_kp_u_code_set_to_RFC_ABAP_MESSAGE, __pyx_k_code_set_to_RFC_ABAP_MESSAGE, sizeof(__pyx_k_code_set_to_RFC_ABAP_MESSAGE), 0, 1, 0, 0}, - {&__pyx_kp_u_code_set_to_RFC_EXTERNAL_FAILUR, __pyx_k_code_set_to_RFC_EXTERNAL_FAILUR, sizeof(__pyx_k_code_set_to_RFC_EXTERNAL_FAILUR), 0, 1, 0, 0}, - {&__pyx_n_u_codepage, __pyx_k_codepage, sizeof(__pyx_k_codepage), 0, 1, 0, 1}, - {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1}, - {&__pyx_n_u_commit, __pyx_k_commit, sizeof(__pyx_k_commit), 0, 1, 0, 1}, - {&__pyx_n_s_committed, __pyx_k_committed, sizeof(__pyx_k_committed), 0, 0, 1, 1}, - {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1}, - {&__pyx_n_u_confirm, __pyx_k_confirm, sizeof(__pyx_k_confirm), 0, 1, 0, 1}, - {&__pyx_n_s_confirm_transaction, __pyx_k_confirm_transaction, sizeof(__pyx_k_confirm_transaction), 0, 0, 1, 1}, - {&__pyx_n_s_confirm_unit, __pyx_k_confirm_unit, sizeof(__pyx_k_confirm_unit), 0, 0, 1, 1}, - {&__pyx_n_s_confirm_unit_2, __pyx_k_confirm_unit_2, sizeof(__pyx_k_confirm_unit_2), 0, 0, 1, 1}, - {&__pyx_n_s_confirmed, __pyx_k_confirmed, sizeof(__pyx_k_confirmed), 0, 0, 1, 1}, - {&__pyx_n_s_connection, __pyx_k_connection, sizeof(__pyx_k_connection), 0, 0, 1, 1}, - {&__pyx_n_u_connection_attributes, __pyx_k_connection_attributes, sizeof(__pyx_k_connection_attributes), 0, 1, 0, 1}, - {&__pyx_n_s_connections, __pyx_k_connections, sizeof(__pyx_k_connections), 0, 0, 1, 1}, - {&__pyx_n_u_cpicConvId, __pyx_k_cpicConvId, sizeof(__pyx_k_cpicConvId), 0, 1, 0, 1}, - {&__pyx_n_s_create_and_submit_transaction, __pyx_k_create_and_submit_transaction, sizeof(__pyx_k_create_and_submit_transaction), 0, 0, 1, 1}, - {&__pyx_n_s_create_and_submit_unit, __pyx_k_create_and_submit_unit, sizeof(__pyx_k_create_and_submit_unit), 0, 0, 1, 1}, - {&__pyx_kp_u_created, __pyx_k_created, sizeof(__pyx_k_created), 0, 1, 0, 0}, - {&__pyx_n_s_created_2, __pyx_k_created_2, sizeof(__pyx_k_created_2), 0, 0, 1, 1}, - {&__pyx_n_u_currentBusyCount, __pyx_k_currentBusyCount, sizeof(__pyx_k_currentBusyCount), 0, 1, 0, 1}, - {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1}, - {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1}, - {&__pyx_kp_u_date_value_required_received, __pyx_k_date_value_required_received, sizeof(__pyx_k_date_value_required_received), 0, 1, 0, 0}, - {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1}, - {&__pyx_n_s_day, __pyx_k_day, sizeof(__pyx_k_day), 0, 0, 1, 1}, - {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1}, - {&__pyx_n_u_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 1, 0, 1}, - {&__pyx_n_s_decimal, __pyx_k_decimal, sizeof(__pyx_k_decimal), 0, 0, 1, 1}, - {&__pyx_n_u_decimal_point, __pyx_k_decimal_point, sizeof(__pyx_k_decimal_point), 0, 1, 0, 1}, - {&__pyx_n_s_decimals, __pyx_k_decimals, sizeof(__pyx_k_decimals), 0, 0, 1, 1}, - {&__pyx_n_u_decimals, __pyx_k_decimals, sizeof(__pyx_k_decimals), 0, 1, 0, 1}, - {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1}, - {&__pyx_n_s_default_auth_check, __pyx_k_default_auth_check, sizeof(__pyx_k_default_auth_check), 0, 0, 1, 1}, - {&__pyx_n_s_default_value, __pyx_k_default_value, sizeof(__pyx_k_default_value), 0, 0, 1, 1}, - {&__pyx_n_u_default_value, __pyx_k_default_value, sizeof(__pyx_k_default_value), 0, 1, 0, 1}, - {&__pyx_kp_u_default_value_string, __pyx_k_default_value_string, sizeof(__pyx_k_default_value_string), 0, 1, 0, 0}, - {&__pyx_n_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_destroy_unit_2, __pyx_k_destroy_unit_2, sizeof(__pyx_k_destroy_unit_2), 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_kp_u_direction_string, __pyx_k_direction_string, sizeof(__pyx_k_direction_string), 0, 1, 0, 0}, - {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0}, - {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, - {&__pyx_n_u_dtime, __pyx_k_dtime, sizeof(__pyx_k_dtime), 0, 1, 0, 1}, - {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, - {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0}, - {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, - {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, - {&__pyx_n_s_enum, __pyx_k_enum, sizeof(__pyx_k_enum), 0, 0, 1, 1}, - {&__pyx_n_s_enum_names, __pyx_k_enum_names, sizeof(__pyx_k_enum_names), 0, 0, 1, 1}, - {&__pyx_n_s_enum_values, __pyx_k_enum_values, sizeof(__pyx_k_enum_values), 0, 0, 1, 1}, - {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, - {&__pyx_n_s_errorInfo, __pyx_k_errorInfo, sizeof(__pyx_k_errorInfo), 0, 0, 1, 1}, - {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1}, - {&__pyx_n_s_executed, __pyx_k_executed, sizeof(__pyx_k_executed), 0, 0, 1, 1}, - {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, - {&__pyx_kp_u_field, __pyx_k_field, sizeof(__pyx_k_field), 0, 1, 0, 0}, - {&__pyx_kp_u_field_name_string, __pyx_k_field_name_string, sizeof(__pyx_k_field_name_string), 0, 1, 0, 0}, - {&__pyx_kp_u_field_name_string_2, __pyx_k_field_name_string_2, sizeof(__pyx_k_field_name_string_2), 0, 1, 0, 0}, - {&__pyx_n_s_field_type, __pyx_k_field_type, sizeof(__pyx_k_field_type), 0, 0, 1, 1}, - {&__pyx_n_u_field_type, __pyx_k_field_type, sizeof(__pyx_k_field_type), 0, 1, 0, 1}, - {&__pyx_kp_u_field_type_string, __pyx_k_field_type_string, sizeof(__pyx_k_field_type_string), 0, 1, 0, 0}, - {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1}, - {&__pyx_kp_u_fields_n_uclength, __pyx_k_fields_n_uclength, sizeof(__pyx_k_fields_n_uclength), 0, 1, 0, 0}, - {&__pyx_n_s_fill_and_submit_unit, __pyx_k_fill_and_submit_unit, sizeof(__pyx_k_fill_and_submit_unit), 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_kp_u_free_2, __pyx_k_free_2, sizeof(__pyx_k_free_2), 0, 1, 0, 0}, - {&__pyx_n_s_free_3, __pyx_k_free_3, sizeof(__pyx_k_free_3), 0, 0, 1, 1}, - {&__pyx_n_s_funcCont, __pyx_k_funcCont, sizeof(__pyx_k_funcCont), 0, 0, 1, 1}, - {&__pyx_n_s_funcDesc, __pyx_k_funcDesc, sizeof(__pyx_k_funcDesc), 0, 0, 1, 1}, - {&__pyx_n_s_funcName, __pyx_k_funcName, sizeof(__pyx_k_funcName), 0, 0, 1, 1}, - {&__pyx_n_s_func_data, __pyx_k_func_data, sizeof(__pyx_k_func_data), 0, 0, 1, 1}, - {&__pyx_n_s_func_desc_handle, __pyx_k_func_desc_handle, sizeof(__pyx_k_func_desc_handle), 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_desc_remove, __pyx_k_func_desc_remove, sizeof(__pyx_k_func_desc_remove), 0, 0, 1, 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_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0}, - {&__pyx_n_u_genericHandler, __pyx_k_genericHandler, sizeof(__pyx_k_genericHandler), 0, 1, 0, 1}, - {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, - {&__pyx_n_s_getFromConnection, __pyx_k_getFromConnection, sizeof(__pyx_k_getFromConnection), 0, 0, 1, 1}, - {&__pyx_n_u_getState, __pyx_k_getState, sizeof(__pyx_k_getState), 0, 1, 0, 1}, - {&__pyx_n_s_get_connection_attributes, __pyx_k_get_connection_attributes, sizeof(__pyx_k_get_connection_attributes), 0, 0, 1, 1}, - {&__pyx_n_s_get_function_description, __pyx_k_get_function_description, sizeof(__pyx_k_get_function_description), 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_server_attributes, __pyx_k_get_server_attributes, sizeof(__pyx_k_get_server_attributes), 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_get_unit_state_2, __pyx_k_get_unit_state_2, sizeof(__pyx_k_get_unit_state_2), 0, 0, 1, 1}, - {&__pyx_n_s_gethostname, __pyx_k_gethostname, sizeof(__pyx_k_gethostname), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_handle, __pyx_k_handle, sizeof(__pyx_k_handle), 0, 0, 1, 1}, - {&__pyx_kp_u_handle_2, __pyx_k_handle_2, sizeof(__pyx_k_handle_2), 0, 1, 0, 0}, - {&__pyx_n_s_handle_3, __pyx_k_handle_3, sizeof(__pyx_k_handle_3), 0, 0, 1, 1}, - {&__pyx_kp_u_has_invalid_state, __pyx_k_has_invalid_state, sizeof(__pyx_k_has_invalid_state), 0, 1, 0, 0}, - {&__pyx_n_u_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 1, 0, 1}, - {&__pyx_n_u_hostname, __pyx_k_hostname, sizeof(__pyx_k_hostname), 0, 1, 0, 1}, - {&__pyx_n_s_hour, __pyx_k_hour, sizeof(__pyx_k_hour), 0, 0, 1, 1}, - {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, - {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1}, - {&__pyx_n_u_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 1, 0, 1}, - {&__pyx_n_s_idunitStateentifier, __pyx_k_idunitStateentifier, sizeof(__pyx_k_idunitStateentifier), 0, 0, 1, 1}, - {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, - {&__pyx_n_s_in_process, __pyx_k_in_process, sizeof(__pyx_k_in_process), 0, 0, 1, 1}, - {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, - {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1}, - {&__pyx_n_s_initialize_unit, __pyx_k_initialize_unit, sizeof(__pyx_k_initialize_unit), 0, 0, 1, 1}, - {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1}, - {&__pyx_n_u_installed, __pyx_k_installed, sizeof(__pyx_k_installed), 0, 1, 0, 1}, - {&__pyx_n_s_int_field, __pyx_k_int_field, sizeof(__pyx_k_int_field), 0, 0, 1, 1}, - {&__pyx_kp_u_invalid_state, __pyx_k_invalid_state, sizeof(__pyx_k_invalid_state), 0, 1, 0, 0}, - {&__pyx_kp_u_invocation_rejected_because_the, __pyx_k_invocation_rejected_because_the, sizeof(__pyx_k_invocation_rejected_because_the), 0, 1, 0, 0}, - {&__pyx_n_s_isActive, __pyx_k_isActive, sizeof(__pyx_k_isActive), 0, 0, 1, 1}, - {&__pyx_n_s_isValid, __pyx_k_isValid, sizeof(__pyx_k_isValid), 0, 0, 1, 1}, - {&__pyx_n_s_is_alive, __pyx_k_is_alive, sizeof(__pyx_k_is_alive), 0, 0, 1, 1}, - {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1}, - {&__pyx_kp_u_is_not_callable, __pyx_k_is_not_callable, sizeof(__pyx_k_is_not_callable), 0, 1, 0, 0}, - {&__pyx_kp_u_is_not_supported, __pyx_k_is_not_supported, sizeof(__pyx_k_is_not_supported), 0, 1, 0, 0}, - {&__pyx_n_u_is_stateful, __pyx_k_is_stateful, sizeof(__pyx_k_is_stateful), 0, 1, 0, 1}, - {&__pyx_n_s_is_valid, __pyx_k_is_valid, sizeof(__pyx_k_is_valid), 0, 0, 1, 1}, - {&__pyx_n_s_isdigit, __pyx_k_isdigit, sizeof(__pyx_k_isdigit), 0, 0, 1, 1}, - {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0}, - {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1}, - {&__pyx_n_u_isoLanguage, __pyx_k_isoLanguage, sizeof(__pyx_k_isoLanguage), 0, 1, 0, 1}, - {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, - {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1}, - {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, - {&__pyx_n_u_kernelRel, __pyx_k_kernelRel, sizeof(__pyx_k_kernelRel), 0, 1, 0, 1}, - {&__pyx_n_u_kernel_trace, __pyx_k_kernel_trace, sizeof(__pyx_k_kernel_trace), 0, 1, 0, 1}, - {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, - {&__pyx_n_s_lang_iso, __pyx_k_lang_iso, sizeof(__pyx_k_lang_iso), 0, 0, 1, 1}, - {&__pyx_n_s_lang_sap, __pyx_k_lang_sap, sizeof(__pyx_k_lang_sap), 0, 0, 1, 1}, - {&__pyx_n_u_language, __pyx_k_language, sizeof(__pyx_k_language), 0, 1, 0, 1}, - {&__pyx_n_s_language_iso_to_sap, __pyx_k_language_iso_to_sap, sizeof(__pyx_k_language_iso_to_sap), 0, 0, 1, 1}, - {&__pyx_n_s_language_sap_to_iso, __pyx_k_language_sap_to_iso, sizeof(__pyx_k_language_sap_to_iso), 0, 0, 1, 1}, - {&__pyx_kp_u_launched, __pyx_k_launched, sizeof(__pyx_k_launched), 0, 1, 0, 0}, - {&__pyx_kp_u_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 1, 0, 0}, - {&__pyx_kp_u_list_required_for_table_paramete, __pyx_k_list_required_for_table_paramete, sizeof(__pyx_k_list_required_for_table_paramete), 0, 1, 0, 0}, - {&__pyx_n_s_locale, __pyx_k_locale, sizeof(__pyx_k_locale), 0, 0, 1, 1}, - {&__pyx_n_s_localeconv, __pyx_k_localeconv, sizeof(__pyx_k_localeconv), 0, 0, 1, 1}, - {&__pyx_n_u_lock, __pyx_k_lock, sizeof(__pyx_k_lock), 0, 1, 0, 1}, - {&__pyx_n_s_log_message, __pyx_k_log_message, sizeof(__pyx_k_log_message), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 0, 1, 1}, - {&__pyx_n_u_major, __pyx_k_major, sizeof(__pyx_k_major), 0, 1, 0, 1}, - {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1}, - {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, - {&__pyx_n_u_metadataLookup, __pyx_k_metadataLookup, sizeof(__pyx_k_metadataLookup), 0, 1, 0, 1}, - {&__pyx_n_s_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 0, 1, 1}, - {&__pyx_n_u_minor, __pyx_k_minor, sizeof(__pyx_k_minor), 0, 1, 0, 1}, - {&__pyx_n_s_minute, __pyx_k_minute, sizeof(__pyx_k_minute), 0, 0, 1, 1}, - {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, - {&__pyx_n_s_month, __pyx_k_month, sizeof(__pyx_k_month), 0, 0, 1, 1}, - {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1}, - {&__pyx_n_s_msg_class, __pyx_k_msg_class, sizeof(__pyx_k_msg_class), 0, 0, 1, 1}, - {&__pyx_n_s_msg_number, __pyx_k_msg_number, sizeof(__pyx_k_msg_number), 0, 0, 1, 1}, - {&__pyx_n_s_msg_type, __pyx_k_msg_type, sizeof(__pyx_k_msg_type), 0, 0, 1, 1}, - {&__pyx_n_s_msg_v1, __pyx_k_msg_v1, sizeof(__pyx_k_msg_v1), 0, 0, 1, 1}, - {&__pyx_n_s_msg_v2, __pyx_k_msg_v2, sizeof(__pyx_k_msg_v2), 0, 0, 1, 1}, - {&__pyx_n_s_msg_v3, __pyx_k_msg_v3, sizeof(__pyx_k_msg_v3), 0, 0, 1, 1}, - {&__pyx_n_s_msg_v4, __pyx_k_msg_v4, sizeof(__pyx_k_msg_v4), 0, 0, 1, 1}, - {&__pyx_kp_u_multi_count, __pyx_k_multi_count, sizeof(__pyx_k_multi_count), 0, 1, 0, 0}, - {&__pyx_kp_u_must_be_in, __pyx_k_must_be_in, sizeof(__pyx_k_must_be_in), 0, 1, 0, 0}, - {&__pyx_kp_u_must_be_in_2, __pyx_k_must_be_in_2, sizeof(__pyx_k_must_be_in_2), 0, 1, 0, 0}, - {&__pyx_kp_u_must_be_of_type_integer, __pyx_k_must_be_of_type_integer, sizeof(__pyx_k_must_be_of_type_integer), 0, 1, 0, 0}, - {&__pyx_kp_u_must_not_exceed_30_chars, __pyx_k_must_not_exceed_30_chars, sizeof(__pyx_k_must_not_exceed_30_chars), 0, 1, 0, 0}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_u_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 1, 0, 1}, - {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, - {&__pyx_n_u_no_commit_check, __pyx_k_no_commit_check, sizeof(__pyx_k_no_commit_check), 0, 1, 0, 1}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_n_s_not_found, __pyx_k_not_found, sizeof(__pyx_k_not_found), 0, 0, 1, 1}, - {&__pyx_n_u_not_requested, __pyx_k_not_requested, sizeof(__pyx_k_not_requested), 0, 1, 0, 1}, - {&__pyx_n_s_nuc_length, __pyx_k_nuc_length, sizeof(__pyx_k_nuc_length), 0, 0, 1, 1}, - {&__pyx_n_u_nuc_length, __pyx_k_nuc_length, sizeof(__pyx_k_nuc_length), 0, 1, 0, 1}, - {&__pyx_n_s_nuc_offset, __pyx_k_nuc_offset, sizeof(__pyx_k_nuc_offset), 0, 0, 1, 1}, - {&__pyx_n_u_nuc_offset, __pyx_k_nuc_offset, sizeof(__pyx_k_nuc_offset), 0, 1, 0, 1}, - {&__pyx_n_u_numberOfCalls, __pyx_k_numberOfCalls, sizeof(__pyx_k_numberOfCalls), 0, 1, 0, 1}, - {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, - {&__pyx_kp_u_of_type, __pyx_k_of_type, sizeof(__pyx_k_of_type), 0, 1, 0, 0}, - {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, - {&__pyx_n_s_openErrorInfo, __pyx_k_openErrorInfo, sizeof(__pyx_k_openErrorInfo), 0, 0, 1, 1}, - {&__pyx_n_s_optional, __pyx_k_optional, sizeof(__pyx_k_optional), 0, 0, 1, 1}, - {&__pyx_n_u_optional, __pyx_k_optional, sizeof(__pyx_k_optional), 0, 1, 0, 1}, - {&__pyx_n_s_options, __pyx_k_options, sizeof(__pyx_k_options), 0, 0, 1, 1}, - {&__pyx_n_s_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1}, - {&__pyx_n_s_os_path, __pyx_k_os_path, sizeof(__pyx_k_os_path), 0, 0, 1, 1}, - {&__pyx_n_s_parameter_text, __pyx_k_parameter_text, sizeof(__pyx_k_parameter_text), 0, 0, 1, 1}, - {&__pyx_n_u_parameter_text, __pyx_k_parameter_text, sizeof(__pyx_k_parameter_text), 0, 1, 0, 1}, - {&__pyx_kp_u_parameter_text_string_parameter, __pyx_k_parameter_text_string_parameter, sizeof(__pyx_k_parameter_text_string_parameter), 0, 1, 0, 0}, - {&__pyx_n_s_parameter_type, __pyx_k_parameter_type, sizeof(__pyx_k_parameter_type), 0, 0, 1, 1}, - {&__pyx_n_u_parameter_type, __pyx_k_parameter_type, sizeof(__pyx_k_parameter_type), 0, 1, 0, 1}, - {&__pyx_kp_u_parameter_type_string, __pyx_k_parameter_type_string, sizeof(__pyx_k_parameter_type_string), 0, 1, 0, 0}, - {&__pyx_n_s_parameters, __pyx_k_parameters, sizeof(__pyx_k_parameters), 0, 0, 1, 1}, - {&__pyx_kp_u_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 1, 0, 0}, - {&__pyx_n_s_params_2, __pyx_k_params_2, sizeof(__pyx_k_params_2), 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_u_peakBusyCount, __pyx_k_peakBusyCount, sizeof(__pyx_k_peakBusyCount), 0, 1, 0, 1}, - {&__pyx_n_s_ping, __pyx_k_ping, sizeof(__pyx_k_ping), 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_u_protocolType, __pyx_k_protocolType, sizeof(__pyx_k_protocolType), 0, 1, 0, 1}, - {&__pyx_n_s_protocol_type, __pyx_k_protocol_type, sizeof(__pyx_k_protocol_type), 0, 0, 1, 1}, - {&__pyx_n_s_pyrfc__cyrfc, __pyx_k_pyrfc__cyrfc, sizeof(__pyx_k_pyrfc__cyrfc), 0, 0, 1, 1}, - {&__pyx_n_s_pyrfc__exception, __pyx_k_pyrfc__exception, sizeof(__pyx_k_pyrfc__exception), 0, 0, 1, 1}, - {&__pyx_n_s_pyrfc__utils, __pyx_k_pyrfc__utils, sizeof(__pyx_k_pyrfc__utils), 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_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_queueName, __pyx_k_queueName, sizeof(__pyx_k_queueName), 0, 0, 1, 1}, - {&__pyx_n_s_queueNameCount, __pyx_k_queueNameCount, sizeof(__pyx_k_queueNameCount), 0, 0, 1, 1}, - {&__pyx_n_s_queueNames, __pyx_k_queueNames, sizeof(__pyx_k_queueNames), 0, 0, 1, 1}, - {&__pyx_n_s_queue_name, __pyx_k_queue_name, sizeof(__pyx_k_queue_name), 0, 0, 1, 1}, - {&__pyx_n_s_queue_names, __pyx_k_queue_names, sizeof(__pyx_k_queue_names), 0, 0, 1, 1}, - {&__pyx_n_s_queued, __pyx_k_queued, sizeof(__pyx_k_queued), 0, 0, 1, 1}, - {&__pyx_n_u_queued, __pyx_k_queued, sizeof(__pyx_k_queued), 0, 1, 0, 1}, - {&__pyx_kp_u_raises_ABAPApplicationError, __pyx_k_raises_ABAPApplicationError, sizeof(__pyx_k_raises_ABAPApplicationError), 0, 1, 0, 0}, - {&__pyx_kp_u_raises_ABAPRuntimeError, __pyx_k_raises_ABAPRuntimeError, sizeof(__pyx_k_raises_ABAPRuntimeError), 0, 1, 0, 0}, - {&__pyx_kp_u_raises_ExternalRuntimeError, __pyx_k_raises_ExternalRuntimeError, sizeof(__pyx_k_raises_ExternalRuntimeError), 0, 1, 0, 0}, - {&__pyx_kp_u_raises_an_invalid_exception_Exc, __pyx_k_raises_an_invalid_exception_Exc, sizeof(__pyx_k_raises_an_invalid_exception_Exc), 0, 1, 0, 0}, - {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_rc, __pyx_k_rc, sizeof(__pyx_k_rc), 0, 0, 1, 1}, - {&__pyx_n_u_receivedBytes, __pyx_k_receivedBytes, sizeof(__pyx_k_receivedBytes), 0, 1, 0, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, - {&__pyx_n_u_registrationCount, __pyx_k_registrationCount, sizeof(__pyx_k_registrationCount), 0, 1, 0, 1}, - {&__pyx_n_s_registry, __pyx_k_registry, sizeof(__pyx_k_registry), 0, 0, 1, 1}, - {&__pyx_n_u_rel, __pyx_k_rel, sizeof(__pyx_k_rel), 0, 1, 0, 1}, - {&__pyx_n_s_reload_ini_file, __pyx_k_reload_ini_file, sizeof(__pyx_k_reload_ini_file), 0, 0, 1, 1}, - {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1}, - {&__pyx_n_s_removeFromConnection, __pyx_k_removeFromConnection, sizeof(__pyx_k_removeFromConnection), 0, 0, 1, 1}, - {&__pyx_n_s_reopen, __pyx_k_reopen, sizeof(__pyx_k_reopen), 0, 0, 1, 1}, - {&__pyx_n_s_repr, __pyx_k_repr, sizeof(__pyx_k_repr), 0, 0, 1, 1}, - {&__pyx_n_s_request_context, __pyx_k_request_context, sizeof(__pyx_k_request_context), 0, 0, 1, 1}, - {&__pyx_kp_u_request_context_2, __pyx_k_request_context_2, sizeof(__pyx_k_request_context_2), 0, 1, 0, 0}, - {&__pyx_n_u_reserved, __pyx_k_reserved, sizeof(__pyx_k_reserved), 0, 1, 0, 1}, - {&__pyx_n_s_reset, __pyx_k_reset, sizeof(__pyx_k_reset), 0, 0, 1, 1}, - {&__pyx_n_s_reset_server_context, __pyx_k_reset_server_context, sizeof(__pyx_k_reset_server_context), 0, 0, 1, 1}, - {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 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_rfcServerState, __pyx_k_rfcServerState, sizeof(__pyx_k_rfcServerState), 0, 0, 1, 1}, - {&__pyx_n_u_rollback, __pyx_k_rollback, sizeof(__pyx_k_rollback), 0, 1, 0, 1}, - {&__pyx_n_s_rolled_back, __pyx_k_rolled_back, sizeof(__pyx_k_rolled_back), 0, 0, 1, 1}, - {&__pyx_n_s_rsplit, __pyx_k_rsplit, sizeof(__pyx_k_rsplit), 0, 0, 1, 1}, - {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1}, - {&__pyx_n_u_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 1, 0, 1}, - {&__pyx_kp_u_sapnwrfc_ini, __pyx_k_sapnwrfc_ini, sizeof(__pyx_k_sapnwrfc_ini), 0, 1, 0, 0}, - {&__pyx_kp_u_sapnwrfc_ini_not_found_in, __pyx_k_sapnwrfc_ini_not_found_in, sizeof(__pyx_k_sapnwrfc_ini_not_found_in), 0, 1, 0, 0}, - {&__pyx_kp_u_sapnwrfc_ini_path_is_not_a_strin, __pyx_k_sapnwrfc_ini_path_is_not_a_strin, sizeof(__pyx_k_sapnwrfc_ini_path_is_not_a_strin), 0, 1, 0, 0}, - {&__pyx_n_s_sapuc, __pyx_k_sapuc, sizeof(__pyx_k_sapuc), 0, 0, 1, 1}, - {&__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_self__tHandle_self, __pyx_k_self__handle_self__tHandle_self, sizeof(__pyx_k_self__handle_self__tHandle_self), 0, 0, 1, 0}, - {&__pyx_kp_s_self__throughput_handle_cannot_b, __pyx_k_self__throughput_handle_cannot_b, sizeof(__pyx_k_self__throughput_handle_cannot_b), 0, 0, 1, 0}, - {&__pyx_n_u_sending_date, __pyx_k_sending_date, sizeof(__pyx_k_sending_date), 0, 1, 0, 1}, - {&__pyx_n_u_sending_time, __pyx_k_sending_time, sizeof(__pyx_k_sending_time), 0, 1, 0, 1}, - {&__pyx_n_u_sentBytes, __pyx_k_sentBytes, sizeof(__pyx_k_sentBytes), 0, 1, 0, 1}, - {&__pyx_n_u_serializationTime, __pyx_k_serializationTime, sizeof(__pyx_k_serializationTime), 0, 1, 0, 1}, - {&__pyx_n_s_serve, __pyx_k_serve, sizeof(__pyx_k_serve), 0, 0, 1, 1}, - {&__pyx_n_u_server, __pyx_k_server, sizeof(__pyx_k_server), 0, 1, 0, 1}, - {&__pyx_n_u_serverName, __pyx_k_serverName, sizeof(__pyx_k_serverName), 0, 1, 0, 1}, - {&__pyx_n_s_server_context, __pyx_k_server_context, sizeof(__pyx_k_server_context), 0, 0, 1, 1}, - {&__pyx_n_u_server_context, __pyx_k_server_context, sizeof(__pyx_k_server_context), 0, 1, 0, 1}, - {&__pyx_n_s_server_functions, __pyx_k_server_functions, sizeof(__pyx_k_server_functions), 0, 0, 1, 1}, - {&__pyx_n_s_server_handle, __pyx_k_server_handle, sizeof(__pyx_k_server_handle), 0, 0, 1, 1}, - {&__pyx_n_s_server_log, __pyx_k_server_log, sizeof(__pyx_k_server_log), 0, 0, 1, 1}, - {&__pyx_n_u_server_log_2, __pyx_k_server_log_2, sizeof(__pyx_k_server_log_2), 0, 1, 0, 1}, - {&__pyx_n_s_server_params, __pyx_k_server_params, sizeof(__pyx_k_server_params), 0, 0, 1, 1}, - {&__pyx_n_s_setOnConnection, __pyx_k_setOnConnection, sizeof(__pyx_k_setOnConnection), 0, 0, 1, 1}, - {&__pyx_n_s_set_cryptolib_path, __pyx_k_set_cryptolib_path, sizeof(__pyx_k_set_cryptolib_path), 0, 0, 1, 1}, - {&__pyx_n_s_set_ini_file_directory, __pyx_k_set_ini_file_directory, sizeof(__pyx_k_set_ini_file_directory), 0, 0, 1, 1}, - {&__pyx_n_s_set_locale_radix, __pyx_k_set_locale_radix, sizeof(__pyx_k_set_locale_radix), 0, 0, 1, 1}, - {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1}, - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_kp_u_should_be_from_1_30_chars, __pyx_k_should_be_from_1_30_chars, sizeof(__pyx_k_should_be_from_1_30_chars), 0, 1, 0, 0}, - {&__pyx_kp_u_should_be_from_1_30_chars_2, __pyx_k_should_be_from_1_30_chars_2, sizeof(__pyx_k_should_be_from_1_30_chars_2), 0, 1, 0, 0}, - {&__pyx_n_s_skip_parameters, __pyx_k_skip_parameters, sizeof(__pyx_k_skip_parameters), 0, 0, 1, 1}, - {&__pyx_n_s_socket, __pyx_k_socket, sizeof(__pyx_k_socket), 0, 0, 1, 1}, - {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1}, - {&__pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_k_src_pyrfc__cyrfc_pyx, sizeof(__pyx_k_src_pyrfc__cyrfc_pyx), 0, 0, 1, 0}, - {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, - {&__pyx_kp_u_started, __pyx_k_started, sizeof(__pyx_k_started), 0, 1, 0, 0}, - {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1}, - {&__pyx_n_u_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 1, 0, 1}, - {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, - {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, - {&__pyx_kp_u_stopped, __pyx_k_stopped, sizeof(__pyx_k_stopped), 0, 1, 0, 0}, - {&__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_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, - {&__pyx_n_s_synchronous, __pyx_k_synchronous, sizeof(__pyx_k_synchronous), 0, 0, 1, 1}, - {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, - {&__pyx_n_s_sysId, __pyx_k_sysId, sizeof(__pyx_k_sysId), 0, 0, 1, 1}, - {&__pyx_n_u_sysId, __pyx_k_sysId, sizeof(__pyx_k_sysId), 0, 1, 0, 1}, - {&__pyx_n_u_sysNumber, __pyx_k_sysNumber, sizeof(__pyx_k_sysNumber), 0, 1, 0, 1}, - {&__pyx_n_s_sysid, __pyx_k_sysid, sizeof(__pyx_k_sysid), 0, 0, 1, 1}, - {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, - {&__pyx_n_u_t_code, __pyx_k_t_code, sizeof(__pyx_k_t_code), 0, 1, 0, 1}, - {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_threading, __pyx_k_threading, sizeof(__pyx_k_threading), 0, 0, 1, 1}, - {&__pyx_n_s_throughput, __pyx_k_throughput, sizeof(__pyx_k_throughput), 0, 0, 1, 1}, - {&__pyx_n_s_tid, __pyx_k_tid, sizeof(__pyx_k_tid), 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_timeout, __pyx_k_timeout, sizeof(__pyx_k_timeout), 0, 1, 0, 1}, - {&__pyx_n_u_totalTime, __pyx_k_totalTime, sizeof(__pyx_k_totalTime), 0, 1, 0, 1}, - {&__pyx_n_u_trace, __pyx_k_trace, sizeof(__pyx_k_trace), 0, 1, 0, 1}, - {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_transaction_id, __pyx_k_transaction_id, sizeof(__pyx_k_transaction_id), 0, 0, 1, 1}, - {&__pyx_n_s_transactional, __pyx_k_transactional, sizeof(__pyx_k_transactional), 0, 0, 1, 1}, - {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1}, - {&__pyx_n_u_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 1, 0, 1}, - {&__pyx_n_s_typeDesc, __pyx_k_typeDesc, sizeof(__pyx_k_typeDesc), 0, 0, 1, 1}, - {&__pyx_n_s_typeName, __pyx_k_typeName, sizeof(__pyx_k_typeName), 0, 0, 1, 1}, - {&__pyx_n_s_type_desc_get, __pyx_k_type_desc_get, sizeof(__pyx_k_type_desc_get), 0, 0, 1, 1}, - {&__pyx_n_s_type_desc_remove, __pyx_k_type_desc_remove, sizeof(__pyx_k_type_desc_remove), 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_uIdentifier, __pyx_k_uIdentifier, sizeof(__pyx_k_uIdentifier), 0, 0, 1, 1}, - {&__pyx_n_s_uc_length, __pyx_k_uc_length, sizeof(__pyx_k_uc_length), 0, 0, 1, 1}, - {&__pyx_n_u_uc_length, __pyx_k_uc_length, sizeof(__pyx_k_uc_length), 0, 1, 0, 1}, - {&__pyx_n_s_uc_offset, __pyx_k_uc_offset, sizeof(__pyx_k_uc_offset), 0, 0, 1, 1}, - {&__pyx_n_u_uc_offset, __pyx_k_uc_offset, sizeof(__pyx_k_uc_offset), 0, 1, 0, 1}, - {&__pyx_n_s_uclang_iso, __pyx_k_uclang_iso, sizeof(__pyx_k_uclang_iso), 0, 0, 1, 1}, - {&__pyx_n_s_uclang_sap, __pyx_k_uclang_sap, sizeof(__pyx_k_uclang_sap), 0, 0, 1, 1}, - {&__pyx_n_s_uid, __pyx_k_uid, sizeof(__pyx_k_uid), 0, 0, 1, 1}, - {&__pyx_n_s_unit, __pyx_k_unit, sizeof(__pyx_k_unit), 0, 0, 1, 1}, - {&__pyx_n_s_unitAttr, __pyx_k_unitAttr, sizeof(__pyx_k_unitAttr), 0, 0, 1, 1}, - {&__pyx_n_u_unit_attributes, __pyx_k_unit_attributes, sizeof(__pyx_k_unit_attributes), 0, 1, 0, 1}, - {&__pyx_n_u_unit_history, __pyx_k_unit_history, sizeof(__pyx_k_unit_history), 0, 1, 0, 1}, - {&__pyx_n_s_unit_id, __pyx_k_unit_id, sizeof(__pyx_k_unit_id), 0, 0, 1, 1}, - {&__pyx_n_s_unit_identifier, __pyx_k_unit_identifier, sizeof(__pyx_k_unit_identifier), 0, 0, 1, 1}, - {&__pyx_n_u_unit_identifier, __pyx_k_unit_identifier, sizeof(__pyx_k_unit_identifier), 0, 1, 0, 1}, - {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, - {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1}, - {&__pyx_n_u_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 1, 0, 1}, - {&__pyx_n_s_utcnow, __pyx_k_utcnow, sizeof(__pyx_k_utcnow), 0, 0, 1, 1}, - {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, - {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, - {&__pyx_kp_u_when_filling, __pyx_k_when_filling, sizeof(__pyx_k_when_filling), 0, 1, 0, 0}, - {&__pyx_kp_u_when_getting_server_context_for, __pyx_k_when_getting_server_context_for, sizeof(__pyx_k_when_getting_server_context_for), 0, 1, 0, 0}, - {&__pyx_kp_u_when_wrapping, __pyx_k_when_wrapping, sizeof(__pyx_k_when_wrapping), 0, 1, 0, 0}, - {&__pyx_kp_u_with, __pyx_k_with, sizeof(__pyx_k_with), 0, 1, 0, 0}, - {&__pyx_n_s_wrap, __pyx_k_wrap, sizeof(__pyx_k_wrap), 0, 0, 1, 1}, - {&__pyx_kp_u_wrapString_uclen_u_utf8_size_u, __pyx_k_wrapString_uclen_u_utf8_size_u, sizeof(__pyx_k_wrapString_uclen_u_utf8_size_u), 0, 1, 0, 0}, - {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1}, - {0, 0, 0, 0, 0, 0, 0} - }; - return __Pyx_InitStrings(__pyx_string_tab); -} -/* #### Code section: cached_builtins ### */ -static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 317, __pyx_L1_error) - __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 2246, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 134, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 303, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1150, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1514, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -} -/* #### Code section: cached_constants ### */ - -static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - - /* "cfunc.to_py":67 - * @cname("__Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection") - * cdef object __Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection(object (*f)(object) ): - * def wrap(object client_connection): # <<<<<<<<<<<<<< - * """wrap(client_connection)""" - * return f(client_connection) - */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_client_connection); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 67, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple_); - __Pyx_GIVEREF(__pyx_tuple_); - __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_wrap, 67, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) __PYX_ERR(1, 67, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":465 - * raise TypeError(f"'default_value' (string) '{default_value}' must not exceed 30 chars.") - * if len(parameter_text)>79: - * raise TypeError("'parameter_text' (string) '{parameter_text}' must not exceed 79 chars.") # <<<<<<<<<<<<<< - * self.parameters.append({ - * 'name': name, - */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_parameter_text_string_parameter); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); - - /* "pyrfc/_cyrfc.pyx":604 - * raise RFCError(f"Connection configuration option '{k}' is not supported") - * self.__config = {} - * self.__config['dtime'] = config.get('dtime', False) # <<<<<<<<<<<<<< - * self.__config['return_import_params'] = config.get('return_import_params', False) - * self.__config['rstrip'] = config.get('rstrip', True) - */ - __pyx_tuple__8 = PyTuple_Pack(2, __pyx_n_u_dtime, Py_False); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__8); - __Pyx_GIVEREF(__pyx_tuple__8); - - /* "pyrfc/_cyrfc.pyx":605 - * self.__config = {} - * self.__config['dtime'] = config.get('dtime', False) - * self.__config['return_import_params'] = config.get('return_import_params', False) # <<<<<<<<<<<<<< - * self.__config['rstrip'] = config.get('rstrip', True) - * self.__config['timeout'] = config.get('timeout', None) - */ - __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_u_return_import_params, Py_False); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 605, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); - - /* "pyrfc/_cyrfc.pyx":606 - * self.__config['dtime'] = config.get('dtime', False) - * self.__config['return_import_params'] = config.get('return_import_params', False) - * self.__config['rstrip'] = config.get('rstrip', True) # <<<<<<<<<<<<<< - * self.__config['timeout'] = config.get('timeout', None) - * - */ - __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_u_rstrip, Py_True); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); - - /* "pyrfc/_cyrfc.pyx":607 - * self.__config['return_import_params'] = config.get('return_import_params', False) - * self.__config['rstrip'] = config.get('rstrip', True) - * self.__config['timeout'] = config.get('timeout', None) # <<<<<<<<<<<<<< - * - * # set internal configuration - */ - __pyx_tuple__11 = PyTuple_Pack(2, __pyx_n_u_timeout, Py_None); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 607, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__11); - __Pyx_GIVEREF(__pyx_tuple__11); - - /* "pyrfc/_cyrfc.pyx":1195 - * if 'user' in attributes and attributes['user'] is not None: - * # (SAP_UC[12+1]) Sender User (optional). Default is current operating system User. - * sapuc = fillString(attributes['user'][0:12]) # <<<<<<<<<<<<<< - * strncpyU(unitAttr.user, sapuc, len(attributes['user'][0:12]) + 1) - * free(sapuc) - */ - __pyx_slice__12 = PySlice_New(__pyx_int_0, __pyx_int_12, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 1195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__12); - __Pyx_GIVEREF(__pyx_slice__12); - - /* "pyrfc/_cyrfc.pyx":1200 - * if 'client' in attributes: - * # (SAP_UC[3+1]) Sender Client ("Mandant") (optional). Default is "000". - * sapuc = fillString(attributes['client'][0:3]) # <<<<<<<<<<<<<< - * strncpyU(unitAttr.client, sapuc, len(attributes['client'][0:3]) + 1) - * free(sapuc) - */ - __pyx_slice__13 = PySlice_New(__pyx_int_0, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 1200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__13); - __Pyx_GIVEREF(__pyx_slice__13); - - /* "pyrfc/_cyrfc.pyx":1205 - * if 't_code' in attributes: - * # (SAP_UC[20+1]) Sender Transaction Code (optional). Default is "". - * sapuc = fillString(attributes['t_code'][0:20]) # <<<<<<<<<<<<<< - * strncpyU(unitAttr.tCode, sapuc, len(attributes['t_code'][0:20]) + 1) - * free(sapuc) - */ - __pyx_slice__14 = PySlice_New(__pyx_int_0, __pyx_int_20, Py_None); if (unlikely(!__pyx_slice__14)) __PYX_ERR(0, 1205, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__14); - __Pyx_GIVEREF(__pyx_slice__14); - - /* "pyrfc/_cyrfc.pyx":1210 - * if 'program' in attributes and attributes['program'] is not None: - * # (SAP_UC[40+1]) Sender Program (optional). Default is current executable name. - * sapuc = fillString(attributes['program'][0:40]) # <<<<<<<<<<<<<< - * strncpyU(unitAttr.program, sapuc, len(attributes['program'][0:40]) + 1) - * free(sapuc) - */ - __pyx_slice__15 = PySlice_New(__pyx_int_0, __pyx_int_40, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 1210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__15); - __Pyx_GIVEREF(__pyx_slice__15); - - /* "pyrfc/_cyrfc.pyx":1248 - * RfcDestroyFunction(funcCont, NULL) - * # execute - * _server_log("bgRFC", "Invocation finished. submitting unit.") # <<<<<<<<<<<<<< - * with nogil: - * rc = RfcSubmitUnit(self._uHandle, &errorInfo) - */ - __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_u_bgRFC, __pyx_kp_u_Invocation_finished_submitting_u); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1248, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__16); - __Pyx_GIVEREF(__pyx_tuple__16); - - /* "pyrfc/_cyrfc.pyx":1393 - * - * if type(unit) is not dict or 'id' not in unit or 'background' not in unit: - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") # <<<<<<<<<<<<<< - * if not isinstance(calls, Iterable): - * raise TypeError("Parameter 'calls' must be iterable.") - */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_u_Parameter_unit_not_valid_Please); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1393, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); - - /* "pyrfc/_cyrfc.pyx":1395 - * raise TypeError("Parameter 'unit' not valid. Please use initialize_unit() to retrieve a valid unit.") - * if not isinstance(calls, Iterable): - * raise TypeError("Parameter 'calls' must be iterable.") # <<<<<<<<<<<<<< - * if len(calls)==0: - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") - */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_be_iterable); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1395, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); - - /* "pyrfc/_cyrfc.pyx":1397 - * raise TypeError("Parameter 'calls' must be iterable.") - * if len(calls)==0: - * raise TypeError("Parameter 'calls' must contain at least on call description (func_name, params).") # <<<<<<<<<<<<<< - * for func_name, params in calls: - * if type(func_name) is not str or type(params) is not dict: - */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_contain_at); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1397, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); - - /* "pyrfc/_cyrfc.pyx":1400 - * for func_name, params in calls: - * if type(func_name) is not str or type(params) is not dict: - * raise TypeError("Parameter 'calls' must contain valid call descriptions (func_name, params dict).") # <<<<<<<<<<<<<< - * if self.active_unit: - * raise RFCError("There is an active unit for this connection. " - */ - __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_u_Parameter_calls_must_contain_val); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1400, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__20); - __Pyx_GIVEREF(__pyx_tuple__20); - - /* "pyrfc/_cyrfc.pyx":1651 - * return RFC_ABAP_EXCEPTION - * except Exception as ex: - * exctype, value = exc_info()[:2] # <<<<<<<<<<<<<< - * _server_log( - * "genericHandler", - */ - __pyx_slice__26 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__26)) __PYX_ERR(0, 1651, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__26); - __Pyx_GIVEREF(__pyx_slice__26); - - /* "pyrfc/_cyrfc.pyx":1750 - * # config parsing - * config = config or {} - * self.debug = config.get('debug', False) # <<<<<<<<<<<<<< - * self.rstrip = config.get('rstrip', True) - * server_context["server_log"] = config.get("server_log", False) - */ - __pyx_tuple__27 = PyTuple_Pack(2, __pyx_n_u_debug, Py_False); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1750, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); - - /* "pyrfc/_cyrfc.pyx":1752 - * 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__28 = PyTuple_Pack(2, __pyx_n_u_server_log_2, Py_False); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1752, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); - - /* "pyrfc/_cyrfc.pyx":1754 - * 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._server_handle_params = ConnectionParameters(**server_params) - */ - __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_u_port, __pyx_int_8080); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1754, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); - - /* "pyrfc/_cyrfc.pyx":2527 - * else: - * if len(value.rstrip()) > 0: - * date(int(value[:4]), int(value[4:6]), int(value[6:8])) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * except Exception as ex: - */ - __pyx_slice__30 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 2527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__30); - __Pyx_GIVEREF(__pyx_slice__30); - __pyx_slice__31 = PySlice_New(__pyx_int_4, __pyx_int_6, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 2527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__31); - __Pyx_GIVEREF(__pyx_slice__31); - __pyx_slice__32 = PySlice_New(__pyx_int_6, __pyx_int_8, Py_None); if (unlikely(!__pyx_slice__32)) __PYX_ERR(0, 2527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__32); - __Pyx_GIVEREF(__pyx_slice__32); - - /* "pyrfc/_cyrfc.pyx":2548 - * else: - * if len(value.rstrip()) > 0: - * time(int(value[:2]), int(value[2:4]), int(value[4:6])) # <<<<<<<<<<<<<< - * cValue = fillString(value) - * except Exception as ex: - */ - __pyx_slice__33 = PySlice_New(__pyx_int_2, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__33)) __PYX_ERR(0, 2548, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__33); - __Pyx_GIVEREF(__pyx_slice__33); - - /* "pyrfc/_cyrfc.pyx":2593 - * 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__34 = PySlice_New(__pyx_int_0, __pyx_int_512, Py_None); if (unlikely(!__pyx_slice__34)) __PYX_ERR(0, 2593, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__34); - __Pyx_GIVEREF(__pyx_slice__34); - - /* "pyrfc/_cyrfc.pyx":2599 - * 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__35 = PySlice_New(__pyx_int_0, __pyx_int_128, Py_None); if (unlikely(!__pyx_slice__35)) __PYX_ERR(0, 2599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__35); - __Pyx_GIVEREF(__pyx_slice__35); - - /* "pyrfc/_cyrfc.pyx":2608 - * 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__36 = PySlice_New(__pyx_int_0, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__36)) __PYX_ERR(0, 2608, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__36); - __Pyx_GIVEREF(__pyx_slice__36); - - /* "pyrfc/_cyrfc.pyx":2616 - * 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__37 = PySlice_New(__pyx_int_0, __pyx_int_50, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 2616, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__37); - __Pyx_GIVEREF(__pyx_slice__37); - - /* "pyrfc/_cyrfc.pyx":3036 - * utcValue = wrapString(stringValue, resultLen) - * # replace the "," separator with "." - * return utcValue[:19]+'.'+utcValue[20:] # <<<<<<<<<<<<<< - * finally: - * free(stringValue) - */ - __pyx_slice__39 = PySlice_New(Py_None, __pyx_int_19, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 3036, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__39); - __Pyx_GIVEREF(__pyx_slice__39); - __pyx_slice__40 = PySlice_New(__pyx_int_20, Py_None, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 3036, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__40); - __Pyx_GIVEREF(__pyx_slice__40); - - /* "pyrfc/_cyrfc.pyx":114 - * - * - * def get_nwrfclib_version(): # <<<<<<<<<<<<<< - * """Get SAP NW RFC Lib version - * :returns: tuple of major, minor and patch level and OS platform - */ - __pyx_tuple__42 = PyTuple_Pack(3, __pyx_n_s_major, __pyx_n_s_minor, __pyx_n_s_patchlevel); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 114, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); - __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_nwrfclib_version, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 114, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":125 - * - * - * def set_ini_file_directory(path_name): # <<<<<<<<<<<<<< - * """Sets the directory in which to search for the sapnwrfc.ini file - * - */ - __pyx_tuple__44 = PyTuple_Pack(4, __pyx_n_s_path_name, __pyx_n_s_errorInfo, __pyx_n_s_pathName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 125, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__44); - __Pyx_GIVEREF(__pyx_tuple__44); - __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_set_ini_file_directory, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 125, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":145 - * - * - * def reload_ini_file(): # <<<<<<<<<<<<<< - * """Reloads the contents of the sapnwrfc.ini file into memory. - * - */ - __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__46); - __Pyx_GIVEREF(__pyx_tuple__46); - __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_reload_ini_file, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 145, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":164 - * - * - * def language_iso_to_sap(lang_iso): # <<<<<<<<<<<<<< - * """Language code conversion of ISO code to SAP code. - * - */ - __pyx_tuple__48 = PyTuple_Pack(5, __pyx_n_s_lang_iso, __pyx_n_s_uclang_iso, __pyx_n_s_uclang_sap, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__48); - __Pyx_GIVEREF(__pyx_tuple__48); - __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_language_iso_to_sap, 164, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 164, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":185 - * - * - * def language_sap_to_iso(lang_sap): # <<<<<<<<<<<<<< - * """Language code conversion of SAP code to ISO code. - * - */ - __pyx_tuple__50 = PyTuple_Pack(5, __pyx_n_s_lang_sap, __pyx_n_s_uclang_sap, __pyx_n_s_uclang_iso, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_language_sap_to_iso, 185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 185, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":206 - * - * - * def set_cryptolib_path(path_name): # <<<<<<<<<<<<<< - * """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc. - * - */ - __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_set_cryptolib_path, 206, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 206, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":230 - * - * - * def set_locale_radix(value=None): # <<<<<<<<<<<<<< - * """Sets the locale radix for decimal conversions. - * - */ - __pyx_tuple__53 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__53); - __Pyx_GIVEREF(__pyx_tuple__53); - __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_set_locale_radix, 230, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 230, __pyx_L1_error) - __pyx_tuple__55 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__55); - __Pyx_GIVEREF(__pyx_tuple__55); - - /* "pyrfc/_cyrfc.pyx":254 - * - * - * def cancel_connection(client_connection): # <<<<<<<<<<<<<< - * """Immediately cancels the RFC call which is currently being called over the given RFC connection - * and closes the connection. Can be used only on an RFC client connection. - */ - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_cancel_connection, 254, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 254, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":301 - * self._free() - * - * def _free(self): # <<<<<<<<<<<<<< - * if self._params_count > 0: - * for i in range(self._params_count): - */ - __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_i); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 301, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__57); - __Pyx_GIVEREF(__pyx_tuple__57); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_free, 301, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 301, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":309 - * self._params_count = 0 - * - * def free(self): # <<<<<<<<<<<<<< - * self._free() - * - */ - __pyx_tuple__59 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__59); - __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_free_3, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 309, __pyx_L1_error) - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(1, 1, __pyx_L1_error) - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - __pyx_tuple__62 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(1, 3, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":317 - * - * - * class TypeDescription(object): # <<<<<<<<<<<<<< - * """ A type description - * - */ - __pyx_tuple__64 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__64); - __Pyx_GIVEREF(__pyx_tuple__64); - __pyx_tuple__65 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__65); - __Pyx_GIVEREF(__pyx_tuple__65); - - /* "pyrfc/_cyrfc.pyx":342 - * - * """ - * def __init__(self, name, nuc_length, uc_length): # <<<<<<<<<<<<<< - * self.fields = [] - * if len(name)<1 or len(name)>30: - */ - __pyx_tuple__66 = 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__66)) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__66); - __Pyx_GIVEREF(__pyx_tuple__66); - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_init, 342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 342, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":353 - * 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__68 = 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__68)) __PYX_ERR(0, 353, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__68); - __Pyx_GIVEREF(__pyx_tuple__68); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(9, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_add_field, 353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 353, __pyx_L1_error) - __pyx_tuple__70 = PyTuple_Pack(2, ((PyObject *)__pyx_int_0), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 353, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__70); - __Pyx_GIVEREF(__pyx_tuple__70); - - /* "pyrfc/_cyrfc.pyx":394 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - */ - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_repr, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 394, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":403 - * - * - * class FunctionDescription(object): # <<<<<<<<<<<<<< - * """ A function description - * - */ - __pyx_tuple__72 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__72); - __Pyx_GIVEREF(__pyx_tuple__72); - __pyx_tuple__73 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__73); - __Pyx_GIVEREF(__pyx_tuple__73); - - /* "pyrfc/_cyrfc.pyx":426 - * - * """ - * def __init__(self, name): # <<<<<<<<<<<<<< - * self.name = name - * self.parameters = [] - */ - __pyx_tuple__74 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 426, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__74); - __Pyx_GIVEREF(__pyx_tuple__74); - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_init, 426, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 426, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":430 - * 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__76 = 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__76)) __PYX_ERR(0, 430, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__76); - __Pyx_GIVEREF(__pyx_tuple__76); - __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(11, 0, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_add_parameter, 430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 430, __pyx_L1_error) - __pyx_tuple__78 = PyTuple_Pack(5, ((PyObject *)__pyx_int_0), ((PyObject*)__pyx_kp_u__5), ((PyObject*)__pyx_kp_u__5), ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 430, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__78); - __Pyx_GIVEREF(__pyx_tuple__78); - - /* "pyrfc/_cyrfc.pyx":479 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - * - */ - __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_repr, 479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 479, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":624 - * self._open() - * - * def free(self): # <<<<<<<<<<<<<< - * """ Explicitly free connection parameters and close the connection. - * - */ - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_free_3, 624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 624, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":639 - * self.free() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_enter, 639, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 639, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":642 - * return self - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * # Although the _close() method is also called in the destructor, the - * # explicit call assures the immediate closing to the connection. - */ - __pyx_tuple__82 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_type, __pyx_n_s_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 642, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__82); - __Pyx_GIVEREF(__pyx_tuple__82); - __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_exit, 642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 642, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":647 - * self._close() - * - * def open(self): # <<<<<<<<<<<<<< - * """ Open client the connection - * - */ - __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_open, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 647, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":655 - * self._open() - * - * def reopen(self): # <<<<<<<<<<<<<< - * """ Re-open client the connection - * - */ - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_reopen, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 655, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":663 - * self._reopen() - * - * def close(self): # <<<<<<<<<<<<<< - * """ Close the connection - * - */ - __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_close_2, 663, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 663, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":671 - * self._close() - * - * def cancel(self): # <<<<<<<<<<<<<< - * """ Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function - * - */ - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_cancel, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 671, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":693 - * self._error(&errorInfo) - * - * def _close(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: - */ - __pyx_tuple__88 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_errorInfo); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__88); - __Pyx_GIVEREF(__pyx_tuple__88); - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_close, 693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 693, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":717 - * raise wrapError(errorInfo) - * - * def ping(self): # <<<<<<<<<<<<<< - * """ Send a RFC Ping through the current connection - * - */ - __pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_rc, __pyx_n_s_errorInfo); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 717, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__90); - __Pyx_GIVEREF(__pyx_tuple__90); - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 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__cyrfc_pyx, __pyx_n_s_ping, 717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 717, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":731 - * 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 - */ - __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 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__cyrfc_pyx, __pyx_n_s_reset_server_context, 731, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 731, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":748 - * self._error(&errorInfo) - * - * def get_connection_attributes(self): # <<<<<<<<<<<<<< - * """ Get connection details - * - */ - __pyx_tuple__93 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_attributes, __pyx_n_s_result); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__93); - __Pyx_GIVEREF(__pyx_tuple__93); - __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_connection_attributes, 748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 748, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":799 - * return result - * - * def is_valid(self): # <<<<<<<<<<<<<< - * """Checks an RFC connection. Can be used to check whether a client/server connection - * has already been closed, or whether the NW RFC library still "considers" the connection - */ - __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_errorInfo, __pyx_n_s_isValid, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 799, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__95); - __Pyx_GIVEREF(__pyx_tuple__95); - __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_is_valid, 799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 799, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":828 - * # print("c:handle", "ok" if c_handle - self._handle == 0 else "error") - * - * def get_function_description(self, func_name): # <<<<<<<<<<<<<< - * """ Returns a function description of a function module. - * - */ - __pyx_tuple__97 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_func_name, __pyx_n_s_errorInfo, __pyx_n_s_funcName, __pyx_n_s_funcDesc); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__97); - __Pyx_GIVEREF(__pyx_tuple__97); - __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_function_description, 828, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 828, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":845 - * return wrapFunctionDescription(funcDesc) - * - * def call(self, func_name, options=None, **params): # <<<<<<<<<<<<<< - * """ Invokes a remote-enabled function module via RFC. - * - */ - __pyx_tuple__99 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_func_name, __pyx_n_s_options, __pyx_n_s_params_2, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_openErrorInfo, __pyx_n_s_cName, __pyx_n_s_funcName, __pyx_n_s_funcDesc, __pyx_n_s_funcCont, __pyx_n_s_isActive, __pyx_n_s_skip_parameters, __pyx_n_s_name, __pyx_n_s_cancel_timer, __pyx_n_s_timeout, __pyx_n_s_value, __pyx_n_s_closed_handle); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__99); - __Pyx_GIVEREF(__pyx_tuple__99); - __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_call, 845, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 845, __pyx_L1_error) - __pyx_tuple__101 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__101); - __Pyx_GIVEREF(__pyx_tuple__101); - - /* "pyrfc/_cyrfc.pyx":953 - * # HELPER METHODS - * - * def type_desc_get(self, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - __pyx_tuple__102 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_type_name, __pyx_n_s_errorInfo, __pyx_n_s_typeName, __pyx_n_s_typeDesc); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 953, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__102); - __Pyx_GIVEREF(__pyx_tuple__102); - __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_type_desc_get, 953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 953, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":969 - * return wrapTypeDescription(typeDesc) - * - * def type_desc_remove(self, sysid, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - __pyx_tuple__104 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_sysid, __pyx_n_s_type_name, __pyx_n_s_errorInfo, __pyx_n_s_sysId, __pyx_n_s_typeName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__104); - __Pyx_GIVEREF(__pyx_tuple__104); - __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_type_desc_remove, 969, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 969, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":990 - * return rc - * - * def func_desc_remove(self, sysid, func_name): # <<<<<<<<<<<<<< - * """Removes the Function Description from SAP NW RFC Lib cache - * - */ - __pyx_tuple__106 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_sysid, __pyx_n_s_func_name, __pyx_n_s_errorInfo, __pyx_n_s_sysId, __pyx_n_s_funcName, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 990, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__106); - __Pyx_GIVEREF(__pyx_tuple__106); - __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_func_desc_remove, 990, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 990, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1014 - * # TRANSACTIONAL / QUEUED RFC - * - * def _get_transaction_id(self): # <<<<<<<<<<<<<< - * """ Returns a unique 24 char transaction ID (GUID).""" - * cdef RFC_RC rc - */ - __pyx_tuple__108 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_tid); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 1014, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__108); - __Pyx_GIVEREF(__pyx_tuple__108); - __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_transaction_id, 1014, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1014, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1027 - * 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 - */ - __pyx_tuple__110 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_transaction_id, __pyx_n_s_calls, __pyx_n_s_queue_name, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_queueName, __pyx_n_s_funcDesc, __pyx_n_s_funcCont, __pyx_n_s_tid, __pyx_n_s_func_name, __pyx_n_s_params_2, __pyx_n_s_funcName, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_e); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 1027, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__110); - __Pyx_GIVEREF(__pyx_tuple__110); - __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_create_and_submit_transaction, 1027, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1027, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1081 - * raise - * - * def _destroy_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 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__cyrfc_pyx, __pyx_n_s_destroy_transaction, 1081, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 1081, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1093 - * self._error(&errorInfo) - * - * def _confirm_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 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__cyrfc_pyx, __pyx_n_s_confirm_transaction, 1093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1093, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1111 - * # BACKGROUND RFC - * - * def _get_unit_id(self): # <<<<<<<<<<<<<< - * """Returns a unique 32 char bgRFC unit ID (GUID).""" - * cdef RFC_RC rc - */ - __pyx_tuple__114 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_uid); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 1111, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__114); - __Pyx_GIVEREF(__pyx_tuple__114); - __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_unit_id, 1111, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 1111, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1124 - * 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 - */ - __pyx_tuple__116 = PyTuple_Pack(24, __pyx_n_s_self, __pyx_n_s_unit_id, __pyx_n_s_calls, __pyx_n_s_queue_names, __pyx_n_s_attributes, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_queueNameCount, __pyx_n_s_queueNames, __pyx_n_s_unitAttr, __pyx_n_s_uIdentifier, __pyx_n_s_funcDesc, __pyx_n_s_funcCont, __pyx_n_s_sapuc, __pyx_n_s_uid, __pyx_n_s_i, __pyx_n_s_queue_name, __pyx_n_s_func_name, __pyx_n_s_params_2, __pyx_n_s_funcName, __pyx_n_s_name, __pyx_n_s_value, __pyx_n_s_e, __pyx_n_s_unit_identifier); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1124, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__116); - __Pyx_GIVEREF(__pyx_tuple__116); - __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_create_and_submit_unit, 1124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1124, __pyx_L1_error) - __pyx_tuple__118 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 1124, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__118); - __Pyx_GIVEREF(__pyx_tuple__118); - - /* "pyrfc/_cyrfc.pyx":1262 - * return unit_identifier["queued"] - * - * def _get_unit_state(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_tuple__119 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_unit, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_uIdentifier, __pyx_n_s_state); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 1262, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__119); - __Pyx_GIVEREF(__pyx_tuple__119); - __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_unit_state, 1262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1262, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1279 - * return UnitState(state).name - * - * def _destroy_unit(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 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__cyrfc_pyx, __pyx_n_s_destroy_unit, 1279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1279, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1291 - * self._error(&errorInfo) - * - * def _confirm_unit(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_tuple__122 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_unit, __pyx_n_s_rc, __pyx_n_s_errorInfo, __pyx_n_s_uIdentifier); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__122); - __Pyx_GIVEREF(__pyx_tuple__122); - __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_confirm_unit, 1291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1291, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1316 - * # * queued - boolean, set on fill_and_submit_unit() call - * - * def initialize_unit(self, background=True): # <<<<<<<<<<<<<< - * """ Initializes a logical unit of work (LUW), shorthand: unit - * - */ - __pyx_tuple__124 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_background, __pyx_n_s_id); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 1316, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__124); - __Pyx_GIVEREF(__pyx_tuple__124); - __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_initialize_unit, 1316, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 1316, __pyx_L1_error) - __pyx_tuple__126 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 1316, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__126); - __Pyx_GIVEREF(__pyx_tuple__126); - - /* "pyrfc/_cyrfc.pyx":1339 - * return {'background': background, 'id': id, "queued": False} - * - * def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None): # <<<<<<<<<<<<<< - * """ Fills a unit with one or more RFC and submits it to the backend. - * - */ - __pyx_tuple__127 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_unit, __pyx_n_s_calls, __pyx_n_s_queue_names, __pyx_n_s_attributes, __pyx_n_s_func_name, __pyx_n_s_params_2, __pyx_n_s_bg, __pyx_n_s_unit_id, __pyx_n_s_queue_name); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 1339, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__127); - __Pyx_GIVEREF(__pyx_tuple__127); - __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_fill_and_submit_unit, 1339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1339, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1430 - * return unit - * - * def get_unit_state(self, unit): # <<<<<<<<<<<<<< - * """Retrieves the processing status of the given background unit. - * - */ - __pyx_tuple__129 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_unit, __pyx_n_s_bg); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 1430, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__129); - __Pyx_GIVEREF(__pyx_tuple__129); - __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_unit_state_2, 1430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 1430, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1453 - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * - * def destroy_unit(self, unit): # <<<<<<<<<<<<<< - * """ Destroy the current unit. - * - */ - __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_destroy_unit_2, 1453, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 1453, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1471 - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * - * def confirm_unit(self, unit): # <<<<<<<<<<<<<< - * """ Confirm the current unit in the backend. - * - */ - __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_confirm_unit_2, 1471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 1471, __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): - */ - __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(1, 1, __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" - */ - __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(1, 3, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1506 - * - * - * def default_auth_check(func_name=False, request_context = None): # <<<<<<<<<<<<<< - * request_context = request_context or {} - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) - */ - __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_func_name, __pyx_n_s_request_context); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(0, 1506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__135); - __Pyx_GIVEREF(__pyx_tuple__135); - __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_default_auth_check, 1506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 1506, __pyx_L1_error) - __pyx_tuple__137 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 1506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__137); - __Pyx_GIVEREF(__pyx_tuple__137); - - /* "pyrfc/_cyrfc.pyx":1512 - * - * - * def _server_log(origin, log_message): # <<<<<<<<<<<<<< - * if server_context["server_log"]: - * print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'") - */ - __pyx_tuple__138 = PyTuple_Pack(2, __pyx_n_s_origin, __pyx_n_s_log_message); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 1512, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__138); - __Pyx_GIVEREF(__pyx_tuple__138); - __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_server_log, 1512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 1512, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1862 - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - * def bgrfc_init(self, sysId=None, bgRfcFunction=None): # <<<<<<<<<<<<<< - * """Installs the necessary callback functions for processing incoming bgRFC calls. - * - */ - __pyx_tuple__140 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_sysId, __pyx_n_s_bgRfcFunction, __pyx_n_s_func_name); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 1862, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__140); - __Pyx_GIVEREF(__pyx_tuple__140); - __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_bgrfc_init, 1862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 1862, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1917 - * return rc - * - * def add_function(self, func_name, callback): # <<<<<<<<<<<<<< - * """ - * Installs a function in the server. - */ - __pyx_tuple__142 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_func_name, __pyx_n_s_callback, __pyx_n_s_errorInfo, __pyx_n_s_funcName, __pyx_n_s_func_desc_handle); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 1917, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__142); - __Pyx_GIVEREF(__pyx_tuple__142); - __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_add_function, 1917, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1917, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1952 - * _server_log(f"Server function {func_name}", server_functions[func_name]) - * - * def serve(self): # <<<<<<<<<<<<<< - * """ - * Starts the RFC server, waiting for incoming requests and processes them. - */ - __pyx_tuple__144 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 1952, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__144); - __Pyx_GIVEREF(__pyx_tuple__144); - __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_serve, 1952, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 1952, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1973 - * return rc - * - * def start(self): # <<<<<<<<<<<<<< - * """ - * Start the RFC server in new thread, waiting for incoming requests and processes them. - */ - __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_start, 1973, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 1973, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1980 - * _server_log("Server", f"{self.server_handle} started") - * - * def stop(self): # <<<<<<<<<<<<<< - * """ - * Stop the RFC server thread. - */ - __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_stop, 1980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1980, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1990 - * _server_log("Server", f"{self.server_handle} stopped") - * - * def close(self): # <<<<<<<<<<<<<< - * """ Explicitly close the registration. - * Note that this is usually not necessary as the registration will be closed - */ - __pyx_tuple__148 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_after_remove, __pyx_n_s_func_name, __pyx_n_s_func_data); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1990, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__148); - __Pyx_GIVEREF(__pyx_tuple__148); - __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_close_2, 1990, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1990, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2017 - * self.close() - * - * def get_server_attributes(self): # <<<<<<<<<<<<<< - * """Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server. - * - */ - __pyx_tuple__150 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_rc, __pyx_n_s_attributes, __pyx_n_s_errorInfo, __pyx_n_s_rfcServerState, __pyx_n_s_protocol_type); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 2017, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__150); - __Pyx_GIVEREF(__pyx_tuple__150); - __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_get_server_attributes, 2017, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 2017, __pyx_L1_error) - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(1, 1, __pyx_L1_error) - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(1, 3, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2227 - * return self._throughput_handle - * - * def setOnConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Attaches a throughput object to a connection to be monitored by the throughput object. - * Once attached to a connection, the throughput object collects the data statistics of - */ - __pyx_tuple__154 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_connection, __pyx_n_s_errorInfo, __pyx_n_s_rc); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 2227, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__154); - __Pyx_GIVEREF(__pyx_tuple__154); - __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_setOnConnection, 2227, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2227, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2246 - * self._connections.add(connection) - * - * @staticmethod # <<<<<<<<<<<<<< - * def getFromConnection(Connection connection): - * """Returns the currently attached throughput object from a connection, if any. - */ - __pyx_tuple__156 = PyTuple_Pack(4, __pyx_n_s_connection, __pyx_n_s_errorInfo, __pyx_n_s_throughput, __pyx_n_s_t); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 2246, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__156); - __Pyx_GIVEREF(__pyx_tuple__156); - __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_getFromConnection, 2246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2246, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2270 - * return None - * - * def removeFromConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Removes the throughput object from a connection. - * The connection will no longer be monitored. - */ - __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_removeFromConnection, 2270, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 2270, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2285 - * self._connections.remove(connection) - * - * def reset(self): # <<<<<<<<<<<<<< - * """Resets the data so far collected and aggregated by the throughput object. - * - */ - __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_reset, 2285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2285, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2311 - * self.destroy() - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * self._destroy() - * - */ - __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_exit, 2311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 2311, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":2314 - * self._destroy() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_pyrfc__cyrfc_pyx, __pyx_n_s_enter, 2314, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 2314, __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): - */ - __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(1, 1, __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" - */ - __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 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_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; - __Pyx_RefNannyFinishContext(); - return -1; -} -/* #### Code section: init_constants ### */ - -static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) { - __pyx_umethod_PyDict_Type_get.type = (PyObject*)&PyDict_Type; - __pyx_umethod_PyDict_Type_get.method_name = &__pyx_n_s_get; - if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error); - __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_19 = PyInt_FromLong(19); if (unlikely(!__pyx_int_19)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_20 = PyInt_FromLong(20); if (unlikely(!__pyx_int_20)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_40 = PyInt_FromLong(40); if (unlikely(!__pyx_int_40)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_128 = PyInt_FromLong(128); if (unlikely(!__pyx_int_128)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_512 = PyInt_FromLong(512); if (unlikely(!__pyx_int_512)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_8080 = PyInt_FromLong(8080); if (unlikely(!__pyx_int_8080)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -} -/* #### Code section: init_globals ### */ - -static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { - return 0; -} -/* #### Code section: init_module ### */ - -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 CYTHON_USE_TYPE_SPECS - __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters_spec, NULL); if (unlikely(!__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters)) __PYX_ERR(0, 276, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters_spec, __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 276, __pyx_L1_error) - #else - __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters = &__pyx_type_5pyrfc_6_cyrfc_ConnectionParameters; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - #endif - #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 276, __pyx_L1_error) - #endif - #if PY_MAJOR_VERSION < 3 - __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters->tp_print = 0; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters->tp_dictoffset && __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters->tp_getattro = __Pyx_PyObject_GenericGetAttr; - } - #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ConnectionParameters, (PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 276, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters) < 0) __PYX_ERR(0, 276, __pyx_L1_error) - #endif - __pyx_vtabptr_5pyrfc_6_cyrfc_Connection = &__pyx_vtable_5pyrfc_6_cyrfc_Connection; - __pyx_vtable_5pyrfc_6_cyrfc_Connection._reopen = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *))__pyx_f_5pyrfc_6_cyrfc_10Connection__reopen; - __pyx_vtable_5pyrfc_6_cyrfc_Connection._open = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *))__pyx_f_5pyrfc_6_cyrfc_10Connection__open; - __pyx_vtable_5pyrfc_6_cyrfc_Connection._error = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Connection *, RFC_ERROR_INFO *))__pyx_f_5pyrfc_6_cyrfc_10Connection__error; - #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_5pyrfc_6_cyrfc_Connection = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pyrfc_6_cyrfc_Connection_spec, NULL); if (unlikely(!__pyx_ptype_5pyrfc_6_cyrfc_Connection)) __PYX_ERR(0, 503, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pyrfc_6_cyrfc_Connection_spec, __pyx_ptype_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 503, __pyx_L1_error) - #else - __pyx_ptype_5pyrfc_6_cyrfc_Connection = &__pyx_type_5pyrfc_6_cyrfc_Connection; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - #endif - #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 503, __pyx_L1_error) - #endif - #if PY_MAJOR_VERSION < 3 - __pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_print = 0; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dictoffset && __pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_getattro = __Pyx_PyObject_GenericGetAttr; - } - #endif - if (__Pyx_SetVtable(__pyx_ptype_5pyrfc_6_cyrfc_Connection, __pyx_vtabptr_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 503, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 503, __pyx_L1_error) - #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Connection, (PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 503, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_Connection) < 0) __PYX_ERR(0, 503, __pyx_L1_error) - #endif - __pyx_vtabptr_5pyrfc_6_cyrfc_Server = &__pyx_vtable_5pyrfc_6_cyrfc_Server; - __pyx_vtable_5pyrfc_6_cyrfc_Server._Server__onCheckFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCheckFunction; - __pyx_vtable_5pyrfc_6_cyrfc_Server._Server__onCommitFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server__Server__onCommitFunction; - __pyx_vtable_5pyrfc_6_cyrfc_Server._Server__onRollbackFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server__Server__onRollbackFunction; - __pyx_vtable_5pyrfc_6_cyrfc_Server._Server__onConfirmFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *))__pyx_f_5pyrfc_6_cyrfc_6Server__Server__onConfirmFunction; - __pyx_vtable_5pyrfc_6_cyrfc_Server._Server__onGetStateFunction = (RFC_RC (*)(RFC_CONNECTION_HANDLE, RFC_UNIT_IDENTIFIER const *, RFC_UNIT_STATE *))__pyx_f_5pyrfc_6_cyrfc_6Server__Server__onGetStateFunction; - __pyx_vtable_5pyrfc_6_cyrfc_Server.install_bgrfc_handlers = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Server *, struct __pyx_opt_args_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers *__pyx_optional_args))__pyx_f_5pyrfc_6_cyrfc_6Server_install_bgrfc_handlers; - __pyx_vtable_5pyrfc_6_cyrfc_Server._error = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Server *, RFC_ERROR_INFO *))__pyx_f_5pyrfc_6_cyrfc_6Server__error; - #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_5pyrfc_6_cyrfc_Server = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pyrfc_6_cyrfc_Server_spec, NULL); if (unlikely(!__pyx_ptype_5pyrfc_6_cyrfc_Server)) __PYX_ERR(0, 1669, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pyrfc_6_cyrfc_Server_spec, __pyx_ptype_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - #else - __pyx_ptype_5pyrfc_6_cyrfc_Server = &__pyx_type_5pyrfc_6_cyrfc_Server; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - #endif - #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - #endif - #if PY_MAJOR_VERSION < 3 - __pyx_ptype_5pyrfc_6_cyrfc_Server->tp_print = 0; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dictoffset && __pyx_ptype_5pyrfc_6_cyrfc_Server->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_ptype_5pyrfc_6_cyrfc_Server->tp_getattro = __Pyx_PyObject_GenericGetAttr; - } - #endif - if (__Pyx_SetVtable(__pyx_ptype_5pyrfc_6_cyrfc_Server, __pyx_vtabptr_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Server, (PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_Server) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - #endif - __pyx_vtabptr_5pyrfc_6_cyrfc_Throughput = &__pyx_vtable_5pyrfc_6_cyrfc_Throughput; - __pyx_vtable_5pyrfc_6_cyrfc_Throughput._destroy = (PyObject *(*)(struct __pyx_obj_5pyrfc_6_cyrfc_Throughput *))__pyx_f_5pyrfc_6_cyrfc_10Throughput__destroy; - #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_5pyrfc_6_cyrfc_Throughput = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pyrfc_6_cyrfc_Throughput_spec, NULL); if (unlikely(!__pyx_ptype_5pyrfc_6_cyrfc_Throughput)) __PYX_ERR(0, 2187, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pyrfc_6_cyrfc_Throughput_spec, __pyx_ptype_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2187, __pyx_L1_error) - #else - __pyx_ptype_5pyrfc_6_cyrfc_Throughput = &__pyx_type_5pyrfc_6_cyrfc_Throughput; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - #endif - #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2187, __pyx_L1_error) - #endif - #if PY_MAJOR_VERSION < 3 - __pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_print = 0; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dictoffset && __pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_getattro = __Pyx_PyObject_GenericGetAttr; - } - #endif - if (__Pyx_SetVtable(__pyx_ptype_5pyrfc_6_cyrfc_Throughput, __pyx_vtabptr_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2187, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_MergeVtables(__pyx_ptype_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2187, __pyx_L1_error) - #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Throughput, (PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2187, __pyx_L1_error) - #if !CYTHON_COMPILING_IN_LIMITED_API - if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pyrfc_6_cyrfc_Throughput) < 0) __PYX_ERR(0, 2187, __pyx_L1_error) - #endif - #if CYTHON_USE_TYPE_SPECS - __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_spec, NULL); if (unlikely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection)) __PYX_ERR(1, 66, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection_spec, __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection) < 0) __PYX_ERR(1, 66, __pyx_L1_error) - #else - __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection = &__pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - #endif - #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection) < 0) __PYX_ERR(1, 66, __pyx_L1_error) - #endif - #if PY_MAJOR_VERSION < 3 - __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection->tp_print = 0; - #endif - #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection->tp_dictoffset && __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_ptype___pyx_scope_struct____Pyx_CFunc_object__lParenobject__rParen_to_py_17client_connection->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - } - #endif - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; - __Pyx_RefNannyFinishContext(); - return -1; -} - -static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_variable_import_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); - /*--- Variable import code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - -static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __Pyx_RefNannyFinishContext(); - return 0; -} - - -#if PY_MAJOR_VERSION >= 3 -#if CYTHON_PEP489_MULTI_PHASE_INIT -static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ -static int __pyx_pymod_exec__cyrfc(PyObject* module); /*proto*/ -static PyModuleDef_Slot __pyx_moduledef_slots[] = { - {Py_mod_create, (void*)__pyx_pymod_create}, - {Py_mod_exec, (void*)__pyx_pymod_exec__cyrfc}, - {0, NULL} -}; -#endif - -#ifdef __cplusplus -namespace { - struct PyModuleDef __pyx_moduledef = - #else - static struct PyModuleDef __pyx_moduledef = - #endif - { - PyModuleDef_HEAD_INIT, - "_cyrfc", - __pyx_k_The__pyrfc_C_extension_module, /* m_doc */ - #if CYTHON_PEP489_MULTI_PHASE_INIT - 0, /* m_size */ - #elif CYTHON_USE_MODULE_STATE - sizeof(__pyx_mstate), /* 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 - #if CYTHON_USE_MODULE_STATE - __pyx_m_traverse, /* m_traverse */ - __pyx_m_clear, /* m_clear */ - NULL /* m_free */ - #else - NULL, /* m_traverse */ - NULL, /* m_clear */ - NULL /* m_free */ - #endif - }; - #ifdef __cplusplus -} /* anonymous namespace */ -#endif -#endif - -#ifndef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -#elif PY_MAJOR_VERSION < 3 -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" void -#else -#define __Pyx_PyMODINIT_FUNC void -#endif -#else -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * -#else -#define __Pyx_PyMODINIT_FUNC PyObject * -#endif -#endif - - -#if PY_MAJOR_VERSION < 3 -__Pyx_PyMODINIT_FUNC init_cyrfc(void) CYTHON_SMALL_CODE; /*proto*/ -__Pyx_PyMODINIT_FUNC init_cyrfc(void) -#else -__Pyx_PyMODINIT_FUNC PyInit__cyrfc(void) CYTHON_SMALL_CODE; /*proto*/ -__Pyx_PyMODINIT_FUNC PyInit__cyrfc(void) -#if CYTHON_PEP489_MULTI_PHASE_INIT -{ - return PyModuleDef_Init(&__pyx_moduledef); -} -static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { - #if PY_VERSION_HEX >= 0x030700A1 - static PY_INT64_T main_interpreter_id = -1; - PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); - if (main_interpreter_id == -1) { - main_interpreter_id = current_id; - return (unlikely(current_id == -1)) ? -1 : 0; - } else if (unlikely(main_interpreter_id != current_id)) - #else - static PyInterpreterState *main_interpreter = NULL; - PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; - if (!main_interpreter) { - main_interpreter = current_interpreter; - } else if (unlikely(main_interpreter != current_interpreter)) - #endif - { - PyErr_SetString( - PyExc_ImportError, - "Interpreter change detected - this module can only be loaded into one interpreter per process."); - return -1; - } - return 0; -} -#if CYTHON_COMPILING_IN_LIMITED_API -static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) -#else -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) -#endif -{ - PyObject *value = PyObject_GetAttrString(spec, from_name); - int result = 0; - if (likely(value)) { - if (allow_none || value != Py_None) { -#if CYTHON_COMPILING_IN_LIMITED_API - result = PyModule_AddObject(module, to_name, value); -#else - result = PyDict_SetItemString(moddict, to_name, value); -#endif - } - Py_DECREF(value); - } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Clear(); - } else { - result = -1; - } - return result; -} -static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { - PyObject *module = NULL, *moddict, *modname; - CYTHON_UNUSED_VAR(def); - if (__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; -#if CYTHON_COMPILING_IN_LIMITED_API - moddict = module; -#else - moddict = PyModule_GetDict(module); - if (unlikely(!moddict)) goto bad; -#endif - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; - return module; -bad: - Py_XDECREF(module); - return NULL; -} - - -static CYTHON_SMALL_CODE int __pyx_pymod_exec__cyrfc(PyObject *__pyx_pyinit_module) -#endif -#endif -{ - int stringtab_initialized = 0; - #if CYTHON_USE_MODULE_STATE - int pystate_addmodule_run = 0; - #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; - int __pyx_t_8; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { - if (__pyx_m == __pyx_pyinit_module) return 0; - PyErr_SetString(PyExc_RuntimeError, "Module '_cyrfc' has already been imported. Re-initialisation is not supported."); - return -1; - } - #elif PY_MAJOR_VERSION >= 3 - if (__pyx_m) return __Pyx_NewRef(__pyx_m); - #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; - Py_INCREF(__pyx_m); - #else - #if PY_MAJOR_VERSION < 3 - __pyx_m = Py_InitModule4("_cyrfc", __pyx_methods, __pyx_k_The__pyrfc_C_extension_module, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); - if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) - #elif CYTHON_USE_MODULE_STATE - __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) - { - int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); - __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to _cyrfc pseudovariable */ - if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) - pystate_addmodule_run = 1; - } - #else - __pyx_m = PyModule_Create(&__pyx_moduledef); - if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #endif - CYTHON_UNUSED_VAR(__pyx_t_1); - __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) - #if CYTHON_REFNANNY -__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); -if (!__Pyx_RefNanny) { - PyErr_Clear(); - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); - if (!__Pyx_RefNanny) - Py_FatalError("failed to import 'refnanny' module"); -} -#endif - __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__cyrfc(void)", 0); - if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #ifdef __Pxy_PyFrame_Initialize_Offsets - __Pxy_PyFrame_Initialize_Offsets(); - #endif - __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) - __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) - #ifdef __Pyx_CyFunction_USED - if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_FusedFunction_USED - if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Coroutine_USED - if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_Generator_USED - if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_AsyncGen_USED - if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - #ifdef __Pyx_StopAsyncIteration_USED - if (__pyx_StopAsyncIteration_init(__pyx_m) < 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 - /*--- Initialize various global constants etc. ---*/ - if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - stringtab_initialized = 1; - if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) - if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - if (__pyx_module_is_main_pyrfc___cyrfc) { - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - } - #if PY_MAJOR_VERSION >= 3 - { - PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) - if (!PyDict_GetItemString(modules, "pyrfc._cyrfc")) { - if (unlikely((PyDict_SetItemString(modules, "pyrfc._cyrfc", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) - } - } - #endif - /*--- Builtin init code ---*/ - if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Constants init code ---*/ - if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); - if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error) - (void)__Pyx_modinit_type_import_code(); - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - #endif - - /* "pyrfc/_cyrfc.pyx":10 - * from libc.stdlib cimport free, malloc - * - * import socket # <<<<<<<<<<<<<< - * from collections.abc import Iterable - * from datetime import date, datetime, time - */ - __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_socket, NULL); 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_socket, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":11 - * - * import socket - * from collections.abc import Iterable # <<<<<<<<<<<<<< - * from datetime import date, datetime, time - * from decimal import Decimal - */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_n_s_Iterable); - __Pyx_GIVEREF(__pyx_n_s_Iterable); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Iterable); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_collections_abc, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 11, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Iterable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Iterable, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":12 - * import socket - * from collections.abc import Iterable - * from datetime import date, datetime, time # <<<<<<<<<<<<<< - * from decimal import Decimal - * from enum import Enum, auto - */ - __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_n_s_date); - __Pyx_GIVEREF(__pyx_n_s_date); - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_date); - __Pyx_INCREF(__pyx_n_s_datetime); - __Pyx_GIVEREF(__pyx_n_s_datetime); - PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_datetime); - __Pyx_INCREF(__pyx_n_s_time); - __Pyx_GIVEREF(__pyx_n_s_time); - PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_time); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_date, __pyx_t_3) < 0) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_3) < 0) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_3) < 0) __PYX_ERR(0, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":13 - * from collections.abc import Iterable - * from datetime import date, datetime, time - * from decimal import Decimal # <<<<<<<<<<<<<< - * from enum import Enum, auto - * from locale import localeconv - */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __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_3 = __Pyx_Import(__pyx_n_s_decimal, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_Decimal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Decimal, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":14 - * from datetime import date, datetime, time - * from decimal import Decimal - * from enum import Enum, auto # <<<<<<<<<<<<<< - * from locale import localeconv - * from os.path import isfile, join - */ - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_n_s_Enum); - __Pyx_GIVEREF(__pyx_n_s_Enum); - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Enum); - __Pyx_INCREF(__pyx_n_s_auto); - __Pyx_GIVEREF(__pyx_n_s_auto); - PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_auto); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_enum, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Enum, __pyx_t_3) < 0) __PYX_ERR(0, 14, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_auto); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_auto, __pyx_t_3) < 0) __PYX_ERR(0, 14, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":15 - * from decimal import Decimal - * from enum import Enum, auto - * from locale import localeconv # <<<<<<<<<<<<<< - * from os.path import isfile, join - * from sys import exc_info, platform - */ - __pyx_t_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_localeconv); - __Pyx_GIVEREF(__pyx_n_s_localeconv); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_localeconv); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_locale, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_localeconv); 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_localeconv, __pyx_t_2) < 0) __PYX_ERR(0, 15, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":16 - * from enum import Enum, auto - * from locale import localeconv - * from os.path import isfile, join # <<<<<<<<<<<<<< - * from sys import exc_info, platform - * from threading import Thread, Timer - */ - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_n_s_isfile); - __Pyx_GIVEREF(__pyx_n_s_isfile); - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_isfile); - __Pyx_INCREF(__pyx_n_s_join); - __Pyx_GIVEREF(__pyx_n_s_join); - PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_join); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_isfile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_isfile, __pyx_t_3) < 0) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_join, __pyx_t_3) < 0) __PYX_ERR(0, 16, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":17 - * from locale import localeconv - * from os.path import isfile, join - * from sys import exc_info, platform # <<<<<<<<<<<<<< - * from threading import Thread, Timer - * - */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_n_s_exc_info); - __Pyx_GIVEREF(__pyx_n_s_exc_info); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_exc_info); - __Pyx_INCREF(__pyx_n_s_platform); - __Pyx_GIVEREF(__pyx_n_s_platform); - PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_platform); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_sys, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_exc_info, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_platform, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":18 - * from os.path import isfile, join - * from sys import exc_info, platform - * from threading import Thread, Timer # <<<<<<<<<<<<<< - * - * from pyrfc.csapnwrfc cimport * - */ - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_n_s_Thread); - __Pyx_GIVEREF(__pyx_n_s_Thread); - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_Thread); - __Pyx_INCREF(__pyx_n_s_Timer); - __Pyx_GIVEREF(__pyx_n_s_Timer); - PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_Timer); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_threading, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Thread); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Thread, __pyx_t_3) < 0) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Timer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Timer, __pyx_t_3) < 0) __PYX_ERR(0, 18, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":22 - * from pyrfc.csapnwrfc cimport * - * - * from pyrfc._exception import * # <<<<<<<<<<<<<< - * from pyrfc._utils import enum_names, enum_values - * - */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_n_s__41); - __Pyx_GIVEREF(__pyx_n_s__41); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__41); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pyrfc__exception, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_import_star(__pyx_t_3) < 0) __PYX_ERR(0, 22, __pyx_L1_error); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":23 - * - * from pyrfc._exception import * - * from pyrfc._utils import enum_names, enum_values # <<<<<<<<<<<<<< - * - * ################################################################################ - */ - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_n_s_enum_names); - __Pyx_GIVEREF(__pyx_n_s_enum_names); - PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_enum_names); - __Pyx_INCREF(__pyx_n_s_enum_values); - __Pyx_GIVEREF(__pyx_n_s_enum_values); - PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_enum_values); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyrfc__utils, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_enum_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum_names, __pyx_t_3) < 0) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_enum_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_enum_values, __pyx_t_3) < 0) __PYX_ERR(0, 23, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":30 - * - * # configuration bitmasks, internal use - * _MASK_DTIME = 0x01 # <<<<<<<<<<<<<< - * _MASK_RETURN_IMPORT_PARAMS = 0x02 - * _MASK_RSTRIP = 0x04 - */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MASK_DTIME, __pyx_int_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":31 - * # 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, 31, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":32 - * _MASK_DTIME = 0x01 - * _MASK_RETURN_IMPORT_PARAMS = 0x02 - * _MASK_RSTRIP = 0x04 # <<<<<<<<<<<<<< - * - * _LOCALE_RADIX = localeconv()["decimal_point"] - */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_MASK_RSTRIP, __pyx_int_4) < 0) __PYX_ERR(0, 32, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":34 - * _MASK_RSTRIP = 0x04 - * - * _LOCALE_RADIX = localeconv()["decimal_point"] # <<<<<<<<<<<<<< - * - * ################################################################################ - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_localeconv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_u_decimal_point); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOCALE_RADIX, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":42 - * - * # RFC parameter direction - * class RfcParameterDirection(Enum): # <<<<<<<<<<<<<< - * RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT - * RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_RfcParameterDirection, __pyx_n_s_RfcParameterDirection, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_2 != __pyx_t_3) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 42, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":43 - * # RFC parameter direction - * class RfcParameterDirection(Enum): - * RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT # <<<<<<<<<<<<<< - * RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT - * RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_IMPORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_IMPORT, __pyx_t_3) < 0) __PYX_ERR(0, 43, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":44 - * class RfcParameterDirection(Enum): - * RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT - * RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT # <<<<<<<<<<<<<< - * RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING - * RFC_TABLES = RFC_DIRECTION.RFC_TABLES - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_EXPORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 44, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_EXPORT, __pyx_t_3) < 0) __PYX_ERR(0, 44, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":45 - * RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT - * RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT - * RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING # <<<<<<<<<<<<<< - * RFC_TABLES = RFC_DIRECTION.RFC_TABLES - * - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_CHANGING); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_CHANGING, __pyx_t_3) < 0) __PYX_ERR(0, 45, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":46 - * RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT - * RFC_CHANGING = RFC_DIRECTION.RFC_CHANGING - * RFC_TABLES = RFC_DIRECTION.RFC_TABLES # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_DIRECTION(RFC_TABLES); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_TABLES, __pyx_t_3) < 0) __PYX_ERR(0, 46, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":42 - * - * # RFC parameter direction - * class RfcParameterDirection(Enum): # <<<<<<<<<<<<<< - * RFC_IMPORT = RFC_DIRECTION.RFC_IMPORT - * RFC_EXPORT = RFC_DIRECTION.RFC_EXPORT - */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_RfcParameterDirection, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RfcParameterDirection, __pyx_t_3) < 0) __PYX_ERR(0, 42, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":50 - * - * # RFC field type - * class RfcFieldType(Enum): # <<<<<<<<<<<<<< - * RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR - * RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_RfcFieldType, __pyx_n_s_RfcFieldType, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_2 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 50, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":51 - * # RFC field type - * class RfcFieldType(Enum): - * RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR # <<<<<<<<<<<<<< - * RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE - * RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_CHAR); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_CHAR, __pyx_t_4) < 0) __PYX_ERR(0, 51, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":52 - * class RfcFieldType(Enum): - * RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR - * RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE # <<<<<<<<<<<<<< - * RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD - * RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DATE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DATE, __pyx_t_4) < 0) __PYX_ERR(0, 52, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":53 - * RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR - * RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE - * RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD # <<<<<<<<<<<<<< - * RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME - * RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_BCD); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_BCD, __pyx_t_4) < 0) __PYX_ERR(0, 53, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":54 - * RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE - * RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD - * RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME # <<<<<<<<<<<<<< - * RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE - * RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TIME); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TIME, __pyx_t_4) < 0) __PYX_ERR(0, 54, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":55 - * RFCTYPE_BCD = RFCTYPE.RFCTYPE_BCD - * RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME - * RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE # <<<<<<<<<<<<<< - * RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE - * RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_BYTE, __pyx_t_4) < 0) __PYX_ERR(0, 55, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":56 - * RFCTYPE_TIME = RFCTYPE.RFCTYPE_TIME - * RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE - * RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE # <<<<<<<<<<<<<< - * RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM - * RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TABLE, __pyx_t_4) < 0) __PYX_ERR(0, 56, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":57 - * RFCTYPE_BYTE = RFCTYPE.RFCTYPE_BYTE - * RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE - * RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM # <<<<<<<<<<<<<< - * RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT - * RFCTYPE_INT = RFCTYPE.RFCTYPE_INT - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_NUM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_NUM, __pyx_t_4) < 0) __PYX_ERR(0, 57, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":58 - * RFCTYPE_TABLE = RFCTYPE.RFCTYPE_TABLE - * RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM - * RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT # <<<<<<<<<<<<<< - * RFCTYPE_INT = RFCTYPE.RFCTYPE_INT - * RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2 - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_FLOAT, __pyx_t_4) < 0) __PYX_ERR(0, 58, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":59 - * RFCTYPE_NUM = RFCTYPE.RFCTYPE_NUM - * RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT - * RFCTYPE_INT = RFCTYPE.RFCTYPE_INT # <<<<<<<<<<<<<< - * RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2 - * RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1 - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT, __pyx_t_4) < 0) __PYX_ERR(0, 59, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":60 - * RFCTYPE_FLOAT = RFCTYPE.RFCTYPE_FLOAT - * RFCTYPE_INT = RFCTYPE.RFCTYPE_INT - * RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2 # <<<<<<<<<<<<<< - * RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1 - * RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT2, __pyx_t_4) < 0) __PYX_ERR(0, 60, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":61 - * RFCTYPE_INT = RFCTYPE.RFCTYPE_INT - * RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2 - * RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1 # <<<<<<<<<<<<<< - * RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL - * RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT1, __pyx_t_4) < 0) __PYX_ERR(0, 61, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":62 - * RFCTYPE_INT2 = RFCTYPE.RFCTYPE_INT2 - * RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1 - * RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL # <<<<<<<<<<<<<< - * RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT - * RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_NULL, __pyx_t_4) < 0) __PYX_ERR(0, 62, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":63 - * RFCTYPE_INT1 = RFCTYPE.RFCTYPE_INT1 - * RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL - * RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT # <<<<<<<<<<<<<< - * RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE - * RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16 - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_ABAPOBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_ABAPOBJECT, __pyx_t_4) < 0) __PYX_ERR(0, 63, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":64 - * RFCTYPE_NULL = RFCTYPE.RFCTYPE_NULL - * RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT - * RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE # <<<<<<<<<<<<<< - * RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16 - * RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34 - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_STRUCTURE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_STRUCTURE, __pyx_t_4) < 0) __PYX_ERR(0, 64, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":65 - * RFCTYPE_ABAPOBJECT = RFCTYPE.RFCTYPE_ABAPOBJECT - * RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE - * RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16 # <<<<<<<<<<<<<< - * RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34 - * RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DECF16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DECF16, __pyx_t_4) < 0) __PYX_ERR(0, 65, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":66 - * RFCTYPE_STRUCTURE = RFCTYPE.RFCTYPE_STRUCTURE - * RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16 - * RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34 # <<<<<<<<<<<<<< - * RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA - * RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DECF34); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DECF34, __pyx_t_4) < 0) __PYX_ERR(0, 66, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":67 - * RFCTYPE_DECF16 = RFCTYPE.RFCTYPE_DECF16 - * RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34 - * RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA # <<<<<<<<<<<<<< - * RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING - * RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_XMLDATA); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 67, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_XMLDATA, __pyx_t_4) < 0) __PYX_ERR(0, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":68 - * RFCTYPE_DECF34 = RFCTYPE.RFCTYPE_DECF34 - * RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA - * RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING # <<<<<<<<<<<<<< - * RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING - * RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8 - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_STRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 68, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_STRING, __pyx_t_4) < 0) __PYX_ERR(0, 68, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":69 - * RFCTYPE_XMLDATA = RFCTYPE.RFCTYPE_XMLDATA - * RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING - * RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING # <<<<<<<<<<<<<< - * RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8 - * RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_XSTRING); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 69, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_XSTRING, __pyx_t_4) < 0) __PYX_ERR(0, 69, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":70 - * RFCTYPE_STRING = RFCTYPE.RFCTYPE_STRING - * RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING - * RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8 # <<<<<<<<<<<<<< - * RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG - * RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_INT8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_INT8, __pyx_t_4) < 0) __PYX_ERR(0, 70, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":71 - * RFCTYPE_XSTRING = RFCTYPE.RFCTYPE_XSTRING - * RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8 - * RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG # <<<<<<<<<<<<<< - * RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND - * RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_UTCLONG, __pyx_t_4) < 0) __PYX_ERR(0, 71, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":72 - * RFCTYPE_INT8 = RFCTYPE.RFCTYPE_INT8 - * RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG - * RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND # <<<<<<<<<<<<<< - * RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE - * RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCSECOND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_UTCSECOND, __pyx_t_4) < 0) __PYX_ERR(0, 72, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":73 - * RFCTYPE_UTCLONG = RFCTYPE.RFCTYPE_UTCLONG - * RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND - * RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE # <<<<<<<<<<<<<< - * RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY - * RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_UTCMINUTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_UTCMINUTE, __pyx_t_4) < 0) __PYX_ERR(0, 73, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":74 - * RFCTYPE_UTCSECOND = RFCTYPE.RFCTYPE_UTCSECOND - * RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE - * RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY # <<<<<<<<<<<<<< - * RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK - * RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DTDAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DTDAY, __pyx_t_4) < 0) __PYX_ERR(0, 74, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":75 - * RFCTYPE_UTCMINUTE = RFCTYPE.RFCTYPE_UTCMINUTE - * RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY - * RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK # <<<<<<<<<<<<<< - * RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH - * RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DTWEEK); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DTWEEK, __pyx_t_4) < 0) __PYX_ERR(0, 75, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":76 - * RFCTYPE_DTDAY = RFCTYPE.RFCTYPE_DTDAY - * RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK - * RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH # <<<<<<<<<<<<<< - * RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND - * RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_DTMONTH); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_DTMONTH, __pyx_t_4) < 0) __PYX_ERR(0, 76, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":77 - * RFCTYPE_DTWEEK = RFCTYPE.RFCTYPE_DTWEEK - * RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH - * RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND # <<<<<<<<<<<<<< - * RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE - * RFCTYPE_CDAY = RFCTYPE.RFCTYPE_CDAY - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TSECOND); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TSECOND, __pyx_t_4) < 0) __PYX_ERR(0, 77, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":78 - * RFCTYPE_DTMONTH = RFCTYPE.RFCTYPE_DTMONTH - * RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND - * RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE # <<<<<<<<<<<<<< - * RFCTYPE_CDAY = RFCTYPE.RFCTYPE_CDAY - * - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_TMINUTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_TMINUTE, __pyx_t_4) < 0) __PYX_ERR(0, 78, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":79 - * RFCTYPE_TSECOND = RFCTYPE.RFCTYPE_TSECOND - * RFCTYPE_TMINUTE = RFCTYPE.RFCTYPE_TMINUTE - * RFCTYPE_CDAY = RFCTYPE.RFCTYPE_CDAY # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_4 = __Pyx_PyInt_From_RFCTYPE(RFCTYPE_CDAY); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_RFCTYPE_CDAY, __pyx_t_4) < 0) __PYX_ERR(0, 79, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":50 - * - * # RFC field type - * class RfcFieldType(Enum): # <<<<<<<<<<<<<< - * RFCTYPE_CHAR = RFCTYPE.RFCTYPE_CHAR - * RFCTYPE_DATE = RFCTYPE.RFCTYPE_DATE - */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_RfcFieldType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RfcFieldType, __pyx_t_4) < 0) __PYX_ERR(0, 50, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":83 - * - * # bgRFC unit state - * class UnitState(Enum): # <<<<<<<<<<<<<< - * not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND - * in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_UnitState, __pyx_n_s_UnitState, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__pyx_t_2 != __pyx_t_5) { - if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 83, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":84 - * # bgRFC unit state - * class UnitState(Enum): - * not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND # <<<<<<<<<<<<<< - * in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS - * committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED - */ - __pyx_t_5 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_NOT_FOUND); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_not_found, __pyx_t_5) < 0) __PYX_ERR(0, 84, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":85 - * class UnitState(Enum): - * not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND - * in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS # <<<<<<<<<<<<<< - * committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED - * rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK - */ - __pyx_t_5 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_IN_PROCESS); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_in_process, __pyx_t_5) < 0) __PYX_ERR(0, 85, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":86 - * not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND - * in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS - * committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED # <<<<<<<<<<<<<< - * rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK - * confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED - */ - __pyx_t_5 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_COMMITTED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_committed, __pyx_t_5) < 0) __PYX_ERR(0, 86, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":87 - * in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS - * committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED - * rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK # <<<<<<<<<<<<<< - * confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED - * created = auto() - */ - __pyx_t_5 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_ROLLED_BACK); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 87, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_rolled_back, __pyx_t_5) < 0) __PYX_ERR(0, 87, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":88 - * committed = RFC_UNIT_STATE.RFC_UNIT_COMMITTED - * rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK - * confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED # <<<<<<<<<<<<<< - * created = auto() - * executed = auto() - */ - __pyx_t_5 = __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_CONFIRMED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_confirmed, __pyx_t_5) < 0) __PYX_ERR(0, 88, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":89 - * rolled_back = RFC_UNIT_STATE.RFC_UNIT_ROLLED_BACK - * confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED - * created = auto() # <<<<<<<<<<<<<< - * executed = auto() - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_auto); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __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; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_7, }; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_created_2, __pyx_t_5) < 0) __PYX_ERR(0, 89, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":90 - * confirmed = RFC_UNIT_STATE.RFC_UNIT_CONFIRMED - * created = auto() - * executed = auto() # <<<<<<<<<<<<<< - * - * - */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_auto); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __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; - } - } - { - PyObject *__pyx_callargs[1] = {__pyx_t_7, }; - __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8); - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 90, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_executed, __pyx_t_5) < 0) __PYX_ERR(0, 90, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":83 - * - * # bgRFC unit state - * class UnitState(Enum): # <<<<<<<<<<<<<< - * not_found = RFC_UNIT_STATE.RFC_UNIT_NOT_FOUND - * in_process = RFC_UNIT_STATE.RFC_UNIT_IN_PROCESS - */ - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_UnitState, __pyx_t_2, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnitState, __pyx_t_5) < 0) __PYX_ERR(0, 83, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":94 - * - * # bgRFC status - * class RCStatus(Enum): # <<<<<<<<<<<<<< - * OK = RFC_RC.RFC_OK - * RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_2, __pyx_n_s_RCStatus, __pyx_n_s_RCStatus, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__pyx_t_2 != __pyx_t_3) { - if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 94, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":95 - * # bgRFC status - * class RCStatus(Enum): - * OK = RFC_RC.RFC_OK # <<<<<<<<<<<<<< - * RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND - * RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(RFC_OK); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_OK, __pyx_t_3) < 0) __PYX_ERR(0, 95, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":96 - * class RCStatus(Enum): - * OK = RFC_RC.RFC_OK - * RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND # <<<<<<<<<<<<<< - * RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE - * RFC_EXECUTED = RFC_RC.RFC_EXECUTED - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(RFC_NOT_FOUND); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_NOT_FOUND, __pyx_t_3) < 0) __PYX_ERR(0, 96, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":97 - * OK = RFC_RC.RFC_OK - * RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND - * RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE # <<<<<<<<<<<<<< - * RFC_EXECUTED = RFC_RC.RFC_EXECUTED - * - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(RFC_EXTERNAL_FAILURE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_EXTERNAL_FAILURE, __pyx_t_3) < 0) __PYX_ERR(0, 97, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":98 - * RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND - * RFC_EXTERNAL_FAILURE = RFC_RC.RFC_EXTERNAL_FAILURE - * RFC_EXECUTED = RFC_RC.RFC_EXECUTED # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_3 = __Pyx_PyInt_From_RFC_RC(RFC_EXECUTED); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_n_s_RFC_EXECUTED, __pyx_t_3) < 0) __PYX_ERR(0, 98, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "pyrfc/_cyrfc.pyx":94 - * - * # bgRFC status - * class RCStatus(Enum): # <<<<<<<<<<<<<< - * OK = RFC_RC.RFC_OK - * RFC_NOT_FOUND = RFC_RC.RFC_NOT_FOUND - */ - __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_n_s_RCStatus, __pyx_t_2, __pyx_t_5, NULL, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RCStatus, __pyx_t_3) < 0) __PYX_ERR(0, 94, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":102 - * - * # bgRFCunit call type - * class UnitCallType(Enum): # <<<<<<<<<<<<<< - * synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS - * transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL - */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Enum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_UnitCallType, __pyx_n_s_UnitCallType, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, (PyObject *) NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_2 != __pyx_t_4) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_t_4) < 0))) __PYX_ERR(0, 102, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":103 - * # bgRFCunit call type - * class UnitCallType(Enum): - * synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS # <<<<<<<<<<<<<< - * transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL - * queued = RFC_CALL_TYPE.RFC_QUEUED - */ - __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_SYNCHRONOUS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_synchronous, __pyx_t_4) < 0) __PYX_ERR(0, 103, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":104 - * class UnitCallType(Enum): - * synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS - * transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL # <<<<<<<<<<<<<< - * queued = RFC_CALL_TYPE.RFC_QUEUED - * background_unit = RFC_CALL_TYPE.RFC_BACKGROUND_UNIT - */ - __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_TRANSACTIONAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_transactional, __pyx_t_4) < 0) __PYX_ERR(0, 104, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":105 - * synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS - * transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL - * queued = RFC_CALL_TYPE.RFC_QUEUED # <<<<<<<<<<<<<< - * background_unit = RFC_CALL_TYPE.RFC_BACKGROUND_UNIT - * - */ - __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_QUEUED); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 105, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_queued, __pyx_t_4) < 0) __PYX_ERR(0, 105, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":106 - * transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL - * queued = RFC_CALL_TYPE.RFC_QUEUED - * background_unit = RFC_CALL_TYPE.RFC_BACKGROUND_UNIT # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_4 = __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_BACKGROUND_UNIT); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_background_unit, __pyx_t_4) < 0) __PYX_ERR(0, 106, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":102 - * - * # bgRFCunit call type - * class UnitCallType(Enum): # <<<<<<<<<<<<<< - * synchronous = RFC_CALL_TYPE.RFC_SYNCHRONOUS - * transactional = RFC_CALL_TYPE.RFC_TRANSACTIONAL - */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_UnitCallType, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnitCallType, __pyx_t_4) < 0) __PYX_ERR(0, 102, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":114 - * - * - * def get_nwrfclib_version(): # <<<<<<<<<<<<<< - * """Get SAP NW RFC Lib version - * :returns: tuple of major, minor and patch level and OS platform - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_1get_nwrfclib_version, 0, __pyx_n_s_get_nwrfclib_version, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_nwrfclib_version, __pyx_t_2) < 0) __PYX_ERR(0, 114, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":125 - * - * - * def set_ini_file_directory(path_name): # <<<<<<<<<<<<<< - * """Sets the directory in which to search for the sapnwrfc.ini file - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_3set_ini_file_directory, 0, __pyx_n_s_set_ini_file_directory, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_ini_file_directory, __pyx_t_2) < 0) __PYX_ERR(0, 125, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":145 - * - * - * def reload_ini_file(): # <<<<<<<<<<<<<< - * """Reloads the contents of the sapnwrfc.ini file into memory. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_5reload_ini_file, 0, __pyx_n_s_reload_ini_file, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__47)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 145, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reload_ini_file, __pyx_t_2) < 0) __PYX_ERR(0, 145, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":164 - * - * - * def language_iso_to_sap(lang_iso): # <<<<<<<<<<<<<< - * """Language code conversion of ISO code to SAP code. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_7language_iso_to_sap, 0, __pyx_n_s_language_iso_to_sap, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__49)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_language_iso_to_sap, __pyx_t_2) < 0) __PYX_ERR(0, 164, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":185 - * - * - * def language_sap_to_iso(lang_sap): # <<<<<<<<<<<<<< - * """Language code conversion of SAP code to ISO code. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_9language_sap_to_iso, 0, __pyx_n_s_language_sap_to_iso, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_language_sap_to_iso, __pyx_t_2) < 0) __PYX_ERR(0, 185, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":206 - * - * - * def set_cryptolib_path(path_name): # <<<<<<<<<<<<<< - * """Sets the absolute path to the sapcrypto library to enable TLS encryption via Websocket Rfc. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_11set_cryptolib_path, 0, __pyx_n_s_set_cryptolib_path, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_cryptolib_path, __pyx_t_2) < 0) __PYX_ERR(0, 206, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":230 - * - * - * def set_locale_radix(value=None): # <<<<<<<<<<<<<< - * """Sets the locale radix for decimal conversions. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_13set_locale_radix, 0, __pyx_n_s_set_locale_radix, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__55); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_locale_radix, __pyx_t_2) < 0) __PYX_ERR(0, 230, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":254 - * - * - * def cancel_connection(client_connection): # <<<<<<<<<<<<<< - * """Immediately cancels the RFC call which is currently being called over the given RFC connection - * and closes the connection. Can be used only on an RFC client connection. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15cancel_connection, 0, __pyx_n_s_cancel_connection, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cancel_connection, __pyx_t_2) < 0) __PYX_ERR(0, 254, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":301 - * self._free() - * - * def _free(self): # <<<<<<<<<<<<<< - * if self._params_count > 0: - * for i in range(self._params_count): - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_5_free, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConnectionParameters__free, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters->tp_dict, __pyx_n_s_free, __pyx_t_2) < 0) __PYX_ERR(0, 301, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters); - - /* "pyrfc/_cyrfc.pyx":309 - * self._params_count = 0 - * - * def free(self): # <<<<<<<<<<<<<< - * self._free() - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_7free, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConnectionParameters_free, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters->tp_dict, __pyx_n_s_free_3, __pyx_t_2) < 0) __PYX_ERR(0, 309, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_ConnectionParameters); - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConnectionParameters___reduce_cy, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_20ConnectionParameters_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ConnectionParameters___setstate, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":317 - * - * - * class TypeDescription(object): # <<<<<<<<<<<<<< - * """ A type description - * - */ - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_tuple__65); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_TypeDescription_2, __pyx_n_s_TypeDescription_2, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_kp_s_A_type_description_This_class_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_2 != __pyx_tuple__65) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_tuple__65) < 0))) __PYX_ERR(0, 317, __pyx_L1_error) - } - - /* "pyrfc/_cyrfc.pyx":342 - * - * """ - * def __init__(self, name, nuc_length, uc_length): # <<<<<<<<<<<<<< - * self.fields = [] - * if len(name)<1 or len(name)>30: - */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_1__init__, 0, __pyx_n_s_TypeDescription___init, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":353 - * 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_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_3add_field, 0, __pyx_n_s_TypeDescription_add_field, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 353, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__70); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_add_field, __pyx_t_4) < 0) __PYX_ERR(0, 353, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":394 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_15TypeDescription_5__repr__, 0, __pyx_n_s_TypeDescription___repr, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 394, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":317 - * - * - * class TypeDescription(object): # <<<<<<<<<<<<<< - * """ A type description - * - */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_TypeDescription_2, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TypeDescription_2, __pyx_t_4) < 0) __PYX_ERR(0, 317, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":403 - * - * - * class FunctionDescription(object): # <<<<<<<<<<<<<< - * """ A function description - * - */ - __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_tuple__73); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_5, __pyx_t_2, __pyx_n_s_FunctionDescription_2, __pyx_n_s_FunctionDescription_2, (PyObject *) NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_kp_s_A_function_description_This_cla); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__pyx_t_2 != __pyx_tuple__73) { - if (unlikely((PyDict_SetItemString(__pyx_t_3, "__orig_bases__", __pyx_tuple__73) < 0))) __PYX_ERR(0, 403, __pyx_L1_error) - } - - /* "pyrfc/_cyrfc.pyx":426 - * - * """ - * def __init__(self, name): # <<<<<<<<<<<<<< - * self.name = name - * self.parameters = [] - */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_1__init__, 0, __pyx_n_s_FunctionDescription___init, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 426, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 426, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":430 - * 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_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_3add_parameter, 0, __pyx_n_s_FunctionDescription_add_paramete, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 430, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__78); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_add_parameter, __pyx_t_4) < 0) __PYX_ERR(0, 430, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":479 - * }) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return f"" - * - */ - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19FunctionDescription_5__repr__, 0, __pyx_n_s_FunctionDescription___repr, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_repr, __pyx_t_4) < 0) __PYX_ERR(0, 479, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "pyrfc/_cyrfc.pyx":403 - * - * - * class FunctionDescription(object): # <<<<<<<<<<<<<< - * """ A function description - * - */ - __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_5, __pyx_n_s_FunctionDescription_2, __pyx_t_2, __pyx_t_3, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_FunctionDescription_2, __pyx_t_4) < 0) __PYX_ERR(0, 403, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":624 - * self._open() - * - * def free(self): # <<<<<<<<<<<<<< - * """ Explicitly free connection parameters and close the connection. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_3free, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_free, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_free_3, __pyx_t_2) < 0) __PYX_ERR(0, 624, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":639 - * self.free() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_7__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection___enter, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(0, 639, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":642 - * return self - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * # Although the _close() method is also called in the destructor, the - * # explicit call assures the immediate closing to the connection. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_9__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection___exit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(0, 642, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":647 - * self._close() - * - * def open(self): # <<<<<<<<<<<<<< - * """ Open client the connection - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_11open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_open, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 647, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":655 - * self._open() - * - * def reopen(self): # <<<<<<<<<<<<<< - * """ Re-open client the connection - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_13reopen, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_reopen, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_reopen, __pyx_t_2) < 0) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":663 - * self._reopen() - * - * def close(self): # <<<<<<<<<<<<<< - * """ Close the connection - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_15close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_close, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_close_2, __pyx_t_2) < 0) __PYX_ERR(0, 663, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":671 - * self._close() - * - * def cancel(self): # <<<<<<<<<<<<<< - * """ Cancels the ongoing RFC call using `~pyrfc.cancel_connection()` function - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_17cancel, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_cancel, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_cancel, __pyx_t_2) < 0) __PYX_ERR(0, 671, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":693 - * self._error(&errorInfo) - * - * def _close(self): # <<<<<<<<<<<<<< - * cdef RFC_ERROR_INFO errorInfo - * if self._handle != NULL: - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_21_close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__close, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":717 - * raise wrapError(errorInfo) - * - * def ping(self): # <<<<<<<<<<<<<< - * """ Send a RFC Ping through the current connection - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_23ping, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_ping, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_ping, __pyx_t_2) < 0) __PYX_ERR(0, 717, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":731 - * 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 - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_25reset_server_context, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_reset_server_context, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_reset_server_context, __pyx_t_2) < 0) __PYX_ERR(0, 731, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":748 - * self._error(&errorInfo) - * - * def get_connection_attributes(self): # <<<<<<<<<<<<<< - * """ Get connection details - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_27get_connection_attributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_get_connection_attrib, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_get_connection_attributes, __pyx_t_2) < 0) __PYX_ERR(0, 748, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":799 - * return result - * - * def is_valid(self): # <<<<<<<<<<<<<< - * """Checks an RFC connection. Can be used to check whether a client/server connection - * has already been closed, or whether the NW RFC library still "considers" the connection - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_29is_valid, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_is_valid, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_is_valid, __pyx_t_2) < 0) __PYX_ERR(0, 799, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":828 - * # print("c:handle", "ok" if c_handle - self._handle == 0 else "error") - * - * def get_function_description(self, func_name): # <<<<<<<<<<<<<< - * """ Returns a function description of a function module. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_31get_function_description, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_get_function_descript, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_get_function_description, __pyx_t_2) < 0) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":845 - * return wrapFunctionDescription(funcDesc) - * - * def call(self, func_name, options=None, **params): # <<<<<<<<<<<<<< - * """ Invokes a remote-enabled function module via RFC. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_33call, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_call, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__101); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_call, __pyx_t_2) < 0) __PYX_ERR(0, 845, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":953 - * # HELPER METHODS - * - * def type_desc_get(self, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_35type_desc_get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_type_desc_get, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_type_desc_get, __pyx_t_2) < 0) __PYX_ERR(0, 953, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":969 - * return wrapTypeDescription(typeDesc) - * - * def type_desc_remove(self, sysid, type_name): # <<<<<<<<<<<<<< - * """Removes the Type Description from SAP NW RFC Lib cache - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_37type_desc_remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_type_desc_remove, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_type_desc_remove, __pyx_t_2) < 0) __PYX_ERR(0, 969, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":990 - * return rc - * - * def func_desc_remove(self, sysid, func_name): # <<<<<<<<<<<<<< - * """Removes the Function Description from SAP NW RFC Lib cache - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_39func_desc_remove, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_func_desc_remove, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_func_desc_remove, __pyx_t_2) < 0) __PYX_ERR(0, 990, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1014 - * # TRANSACTIONAL / QUEUED RFC - * - * def _get_transaction_id(self): # <<<<<<<<<<<<<< - * """ Returns a unique 24 char transaction ID (GUID).""" - * cdef RFC_RC rc - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_41_get_transaction_id, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__get_transaction_id, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_get_transaction_id, __pyx_t_2) < 0) __PYX_ERR(0, 1014, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1027 - * 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 - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_43_create_and_submit_transaction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__create_and_submit_tr, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__101); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_create_and_submit_transaction, __pyx_t_2) < 0) __PYX_ERR(0, 1027, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1081 - * raise - * - * def _destroy_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_45_destroy_transaction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__destroy_transaction, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_destroy_transaction, __pyx_t_2) < 0) __PYX_ERR(0, 1081, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1093 - * self._error(&errorInfo) - * - * def _confirm_transaction(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_47_confirm_transaction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__confirm_transaction, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_confirm_transaction, __pyx_t_2) < 0) __PYX_ERR(0, 1093, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1111 - * # BACKGROUND RFC - * - * def _get_unit_id(self): # <<<<<<<<<<<<<< - * """Returns a unique 32 char bgRFC unit ID (GUID).""" - * cdef RFC_RC rc - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_49_get_unit_id, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__get_unit_id, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_get_unit_id, __pyx_t_2) < 0) __PYX_ERR(0, 1111, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1124 - * 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 - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_51_create_and_submit_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__create_and_submit_un, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1124, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__118); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_create_and_submit_unit, __pyx_t_2) < 0) __PYX_ERR(0, 1124, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1262 - * return unit_identifier["queued"] - * - * def _get_unit_state(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_53_get_unit_state, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__get_unit_state, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_get_unit_state, __pyx_t_2) < 0) __PYX_ERR(0, 1262, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1279 - * return UnitState(state).name - * - * def _destroy_unit(self): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_55_destroy_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__destroy_unit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_destroy_unit, __pyx_t_2) < 0) __PYX_ERR(0, 1279, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1291 - * self._error(&errorInfo) - * - * def _confirm_unit(self, unit): # <<<<<<<<<<<<<< - * cdef RFC_RC rc - * cdef RFC_ERROR_INFO errorInfo - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_57_confirm_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection__confirm_unit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_confirm_unit, __pyx_t_2) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1316 - * # * queued - boolean, set on fill_and_submit_unit() call - * - * def initialize_unit(self, background=True): # <<<<<<<<<<<<<< - * """ Initializes a logical unit of work (LUW), shorthand: unit - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_59initialize_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_initialize_unit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__126); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_initialize_unit, __pyx_t_2) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1339 - * return {'background': background, 'id': id, "queued": False} - * - * def fill_and_submit_unit(self, unit, calls, queue_names=None, attributes=None): # <<<<<<<<<<<<<< - * """ Fills a unit with one or more RFC and submits it to the backend. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_61fill_and_submit_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_fill_and_submit_unit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__118); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_fill_and_submit_unit, __pyx_t_2) < 0) __PYX_ERR(0, 1339, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1430 - * return unit - * - * def get_unit_state(self, unit): # <<<<<<<<<<<<<< - * """Retrieves the processing status of the given background unit. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_63get_unit_state, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_get_unit_state, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_get_unit_state_2, __pyx_t_2) < 0) __PYX_ERR(0, 1430, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1453 - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * - * def destroy_unit(self, unit): # <<<<<<<<<<<<<< - * """ Destroy the current unit. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_65destroy_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_destroy_unit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_destroy_unit_2, __pyx_t_2) < 0) __PYX_ERR(0, 1453, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "pyrfc/_cyrfc.pyx":1471 - * raise RFCError("Argument 'unit' not valid. (Is unit['background'] boolean?)") - * - * def confirm_unit(self, unit): # <<<<<<<<<<<<<< - * """ Confirm the current unit in the backend. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_67confirm_unit, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection_confirm_unit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Connection->tp_dict, __pyx_n_s_confirm_unit_2, __pyx_t_2) < 0) __PYX_ERR(0, 1471, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Connection); - - /* "(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): - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_69__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection___reduce_cython, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "(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" - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Connection_71__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Connection___setstate_cython, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1498 - * # "callback": Python function, - * # "server": Server object) - * server_functions = {} # <<<<<<<<<<<<<< - * - * # global information about served functions / callbacks - */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1498, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_functions, __pyx_t_2) < 0) __PYX_ERR(0, 1498, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1503 - * # "auth_check": Default authorization check function - * # "server_log": Server logging flag, default False - * server_context = {} # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_context, __pyx_t_2) < 0) __PYX_ERR(0, 1503, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1506 - * - * - * def default_auth_check(func_name=False, request_context = None): # <<<<<<<<<<<<<< - * request_context = request_context or {} - * _server_log(f"authorization check for '{func_name}'", request_context['server_context']) - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_17default_auth_check, 0, __pyx_n_s_default_auth_check, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__137); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_default_auth_check, __pyx_t_2) < 0) __PYX_ERR(0, 1506, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1512 - * - * - * def _server_log(origin, log_message): # <<<<<<<<<<<<<< - * if server_context["server_log"]: - * print (f"[{datetime.utcnow()} UTC] {origin} '{log_message}'") - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_19_server_log, 0, __pyx_n_s_server_log, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1512, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_server_log, __pyx_t_2) < 0) __PYX_ERR(0, 1512, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":1774 - * - * __bgRfcFunction = { - * "check": None, # <<<<<<<<<<<<<< - * "commit": None, - * "rollback": None, - */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1774, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_check, Py_None) < 0) __PYX_ERR(0, 1774, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1775 - * __bgRfcFunction = { - * "check": None, - * "commit": None, # <<<<<<<<<<<<<< - * "rollback": None, - * "confirm": None, - */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_commit, Py_None) < 0) __PYX_ERR(0, 1774, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1776 - * "check": None, - * "commit": None, - * "rollback": None, # <<<<<<<<<<<<<< - * "confirm": None, - * "getState": None - */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_rollback, Py_None) < 0) __PYX_ERR(0, 1774, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1777 - * "commit": None, - * "rollback": None, - * "confirm": None, # <<<<<<<<<<<<<< - * "getState": None - * } - */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_confirm, Py_None) < 0) __PYX_ERR(0, 1774, __pyx_L1_error) - - /* "pyrfc/_cyrfc.pyx":1778 - * "rollback": None, - * "confirm": None, - * "getState": None # <<<<<<<<<<<<<< - * } - * - */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_getState, Py_None) < 0) __PYX_ERR(0, 1774, __pyx_L1_error) - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_Server__bgRfcFunction, __pyx_t_2) < 0) __PYX_ERR(0, 1773, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":1862 - * return RCStatus.RFC_EXTERNAL_FAILURE.value - * - * def bgrfc_init(self, sysId=None, bgRfcFunction=None): # <<<<<<<<<<<<<< - * """Installs the necessary callback functions for processing incoming bgRFC calls. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_5bgrfc_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_bgrfc_init, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__118); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_bgrfc_init, __pyx_t_2) < 0) __PYX_ERR(0, 1862, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":1917 - * return rc - * - * def add_function(self, func_name, callback): # <<<<<<<<<<<<<< - * """ - * Installs a function in the server. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_7add_function, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_add_function, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1917, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_add_function, __pyx_t_2) < 0) __PYX_ERR(0, 1917, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":1952 - * _server_log(f"Server function {func_name}", server_functions[func_name]) - * - * def serve(self): # <<<<<<<<<<<<<< - * """ - * Starts the RFC server, waiting for incoming requests and processes them. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_9serve, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_serve, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_serve, __pyx_t_2) < 0) __PYX_ERR(0, 1952, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":1973 - * return rc - * - * def start(self): # <<<<<<<<<<<<<< - * """ - * Start the RFC server in new thread, waiting for incoming requests and processes them. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_11start, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_start, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_start, __pyx_t_2) < 0) __PYX_ERR(0, 1973, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":1980 - * _server_log("Server", f"{self.server_handle} started") - * - * def stop(self): # <<<<<<<<<<<<<< - * """ - * Stop the RFC server thread. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_13stop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_stop, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_stop, __pyx_t_2) < 0) __PYX_ERR(0, 1980, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":1990 - * _server_log("Server", f"{self.server_handle} stopped") - * - * def close(self): # <<<<<<<<<<<<<< - * """ Explicitly close the registration. - * Note that this is usually not necessary as the registration will be closed - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_15close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_close, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1990, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_close_2, __pyx_t_2) < 0) __PYX_ERR(0, 1990, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "pyrfc/_cyrfc.pyx":2017 - * self.close() - * - * def get_server_attributes(self): # <<<<<<<<<<<<<< - * """Retrieves detailed information about a multi-count Registered Server or a TCP Socket Server. - * - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_19get_server_attributes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server_get_server_attributes, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2017, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Server->tp_dict, __pyx_n_s_get_server_attributes, __pyx_t_2) < 0) __PYX_ERR(0, 2017, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Server); - - /* "(tree fragment)":1 - * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_21__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server___reduce_cython, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "(tree fragment)":3 - * def __reduce_cython__(self): - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< - * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_6Server_23__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Server___setstate_cython, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "pyrfc/_cyrfc.pyx":2188 - * - * cdef class Throughput: - * _registry = [] # <<<<<<<<<<<<<< - * - * cdef RFC_THROUGHPUT_HANDLE _throughput_handle - */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2188, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_registry, __pyx_t_2) < 0) __PYX_ERR(0, 2188, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "pyrfc/_cyrfc.pyx":2227 - * return self._throughput_handle - * - * def setOnConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Attaches a throughput object to a connection to be monitored by the throughput object. - * Once attached to a connection, the throughput object collects the data statistics of - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_3setOnConnection, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput_setOnConnection, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2227, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_setOnConnection, __pyx_t_2) < 0) __PYX_ERR(0, 2227, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "pyrfc/_cyrfc.pyx":2246 - * self._connections.add(connection) - * - * @staticmethod # <<<<<<<<<<<<<< - * def getFromConnection(Connection connection): - * """Returns the currently attached throughput object from a connection, if any. - */ - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_5getFromConnection, __Pyx_CYFUNCTION_STATICMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput_getFromConnection, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2246, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_getFromConnection, __pyx_t_2) < 0) __PYX_ERR(0, 2246, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput, __pyx_n_s_getFromConnection); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2246, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_getFromConnection, __pyx_t_5) < 0) __PYX_ERR(0, 2246, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "pyrfc/_cyrfc.pyx":2270 - * return None - * - * def removeFromConnection(self, Connection connection): # <<<<<<<<<<<<<< - * """Removes the throughput object from a connection. - * The connection will no longer be monitored. - */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_7removeFromConnection, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput_removeFromConnection, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__158)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2270, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_removeFromConnection, __pyx_t_5) < 0) __PYX_ERR(0, 2270, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "pyrfc/_cyrfc.pyx":2285 - * self._connections.remove(connection) - * - * def reset(self): # <<<<<<<<<<<<<< - * """Resets the data so far collected and aggregated by the throughput object. - * - */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_9reset, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput_reset, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_reset, __pyx_t_5) < 0) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "pyrfc/_cyrfc.pyx":2311 - * self.destroy() - * - * def __exit__(self, type, value, traceback): # <<<<<<<<<<<<<< - * self._destroy() - * - */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_13__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput___exit, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2311, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_exit, __pyx_t_5) < 0) __PYX_ERR(0, 2311, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "pyrfc/_cyrfc.pyx":2314 - * self._destroy() - * - * def __enter__(self): # <<<<<<<<<<<<<< - * return self - * - */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_15__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput___enter, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem((PyObject *)__pyx_ptype_5pyrfc_6_cyrfc_Throughput->tp_dict, __pyx_n_s_enter, __pyx_t_5) < 0) __PYX_ERR(0, 2314, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - PyType_Modified(__pyx_ptype_5pyrfc_6_cyrfc_Throughput); - - /* "(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): - */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput___reduce_cython, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_5) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "(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" - */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_5pyrfc_6_cyrfc_10Throughput_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Throughput___setstate_cython, NULL, __pyx_n_s_pyrfc__cyrfc, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_5) < 0) __PYX_ERR(1, 3, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "pyrfc/_cyrfc.pyx":1 - * # SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic # <<<<<<<<<<<<<< - * # - * # SPDX-License-Identifier: Apache-2.0 - */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_5) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /*--- Wrapped vars code ---*/ - - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); - if (__pyx_m) { - if (__pyx_d && stringtab_initialized) { - __Pyx_AddTraceback("init pyrfc._cyrfc", __pyx_clineno, __pyx_lineno, __pyx_filename); - } - #if !CYTHON_USE_MODULE_STATE - Py_CLEAR(__pyx_m); - #else - Py_DECREF(__pyx_m); - if (pystate_addmodule_run) { - PyObject *tp, *value, *tb; - PyErr_Fetch(&tp, &value, &tb); - PyState_RemoveModule(&__pyx_moduledef); - PyErr_Restore(tp, value, tb); - } - #endif - } else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_ImportError, "init pyrfc._cyrfc"); - } - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - #if CYTHON_PEP489_MULTI_PHASE_INIT - return (__pyx_m != NULL) ? 0 : -1; - #elif PY_MAJOR_VERSION >= 3 - return __pyx_m; - #else - return; - #endif -} -/* #### Code section: cleanup_globals ### */ -/* #### Code section: cleanup_module ### */ -/* #### Code section: main_method ### */ -/* #### Code section: utility_code_pragmas ### */ -#ifdef _MSC_VER -#pragma warning( push ) -/* Warning 4127: conditional expression is constant - * Cython uses constant conditional expressions to allow in inline functions to be optimized at - * compile-time, so this warning is not useful - */ -#pragma warning( disable : 4127 ) -#endif - - - -/* #### Code section: utility_code_def ### */ - -/* --- Runtime support code --- */ -/* Refnanny */ -#if CYTHON_REFNANNY -static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { - PyObject *m = NULL, *p = NULL; - void *r = NULL; - m = PyImport_ImportModule(modname); - if (!m) goto end; - p = PyObject_GetAttrString(m, "RefNannyAPI"); - if (!p) goto end; - r = PyLong_AsVoidPtr(p); -end: - Py_XDECREF(p); - Py_XDECREF(m); - return (__Pyx_RefNannyAPIStruct *)r; -} -#endif - -/* 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= 0x030C00A6 - PyObject *current_exception = tstate->current_exception; - if (unlikely(!current_exception)) return 0; - exc_type = (PyObject*) Py_TYPE(current_exception); - if (exc_type == err) return 1; -#else - exc_type = tstate->curexc_type; - if (exc_type == err) return 1; - if (unlikely(!exc_type)) return 0; -#endif - #if CYTHON_AVOID_BORROWED_REFS - Py_INCREF(exc_type); - #endif - if (unlikely(PyTuple_Check(err))) { - result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); - } else { - result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); - } - #if CYTHON_AVOID_BORROWED_REFS - Py_DECREF(exc_type); - #endif - return result; -} -#endif - -/* PyErrFetchRestore */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { -#if PY_VERSION_HEX >= 0x030C00A6 - PyObject *tmp_value; - assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); - if (value) { - #if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) - #endif - PyException_SetTraceback(value, tb); - } - tmp_value = tstate->current_exception; - tstate->current_exception = value; - Py_XDECREF(tmp_value); -#else - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#endif -} -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { -#if PY_VERSION_HEX >= 0x030C00A6 - PyObject* exc_value; - exc_value = tstate->current_exception; - tstate->current_exception = 0; - *value = exc_value; - *type = NULL; - *tb = NULL; - if (exc_value) { - *type = (PyObject*) Py_TYPE(exc_value); - Py_INCREF(*type); - #if CYTHON_COMPILING_IN_CPYTHON - *tb = ((PyBaseExceptionObject*) exc_value)->traceback; - Py_XINCREF(*tb); - #else - *tb = PyException_GetTraceback(exc_value); - #endif - } -#else - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -#endif -} -#endif - -/* 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 - -/* 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; -} - -/* GetBuiltinName */ -static PyObject *__Pyx_GetBuiltinName(PyObject *name) { - PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name); - if (unlikely(!result) && !PyErr_Occurred()) { - 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; -} - -/* TupleAndListFromArray */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { - PyObject *v; - Py_ssize_t i; - for (i = 0; i < length; i++) { - v = dest[i] = src[i]; - Py_INCREF(v); - } -} -static CYTHON_INLINE PyObject * -__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) -{ - PyObject *res; - if (n <= 0) { - Py_INCREF(__pyx_empty_tuple); - return __pyx_empty_tuple; - } - res = PyTuple_New(n); - if (unlikely(res == NULL)) return NULL; - __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); - return res; -} -static CYTHON_INLINE PyObject * -__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) -{ - PyObject *res; - if (n <= 0) { - return PyList_New(0); - } - res = PyList_New(n); - if (unlikely(res == NULL)) return NULL; - __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); - return res; -} -#endif - -/* BytesEquals */ -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API - 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 || CYTHON_COMPILING_IN_LIMITED_API - 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 -} - -/* fastcall */ -#if CYTHON_METH_FASTCALL -static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) -{ - Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames); - for (i = 0; i < n; i++) - { - if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i]; - } - for (i = 0; i < n; i++) - { - int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); - if (unlikely(eq != 0)) { - if (unlikely(eq < 0)) return NULL; // error - return kwvalues[i]; - } - } - return NULL; // not found (no exception set) -} -#endif - -/* RaiseDoubleKeywords */ -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() got multiple values for keyword argument '%U'", func_name, kw_name); - #else - "%s() got multiple values for keyword argument '%s'", func_name, - PyString_AsString(kw_name)); - #endif -} - -/* ParseKeywords */ -static int __Pyx_ParseOptionalKeywords( - PyObject *kwds, - PyObject *const *kwvalues, - 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; - int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); - while (1) { - if (kwds_is_tuple) { - if (pos >= PyTuple_GET_SIZE(kwds)) break; - key = PyTuple_GET_ITEM(kwds, pos); - value = kwvalues[pos]; - pos++; - } - else - { - if (!PyDict_Next(kwds, &pos, &key, &value)) break; - } - 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 = ( - #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: - #if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_TypeError, - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - PyErr_Format(PyExc_TypeError, - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif -bad: - return -1; -} - -/* RaiseArgTupleInvalid */ -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *more_or_less; - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; - } else { - num_expected = num_max; - more_or_less = "at most"; - } - if (exact) { - more_or_less = "exactly"; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); -} - -/* FixUpExtensionType */ -#if CYTHON_USE_TYPE_SPECS -static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { -#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API - CYTHON_UNUSED_VAR(spec); - CYTHON_UNUSED_VAR(type); -#else - const PyType_Slot *slot = spec->slots; - while (slot && slot->slot && slot->slot != Py_tp_members) - slot++; - if (slot && slot->slot == Py_tp_members) { - int changed = 0; -#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) - const -#endif - PyMemberDef *memb = (PyMemberDef*) slot->pfunc; - while (memb && memb->name) { - if (memb->name[0] == '_' && memb->name[1] == '_') { -#if PY_VERSION_HEX < 0x030900b1 - if (strcmp(memb->name, "__weaklistoffset__") == 0) { - assert(memb->type == T_PYSSIZET); - assert(memb->flags == READONLY); - type->tp_weaklistoffset = memb->offset; - changed = 1; - } - else if (strcmp(memb->name, "__dictoffset__") == 0) { - assert(memb->type == T_PYSSIZET); - assert(memb->flags == READONLY); - type->tp_dictoffset = memb->offset; - changed = 1; - } -#if CYTHON_METH_FASTCALL - else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { - assert(memb->type == T_PYSSIZET); - assert(memb->flags == READONLY); -#if PY_VERSION_HEX >= 0x030800b4 - type->tp_vectorcall_offset = memb->offset; -#else - type->tp_print = (printfunc) memb->offset; -#endif - changed = 1; - } -#endif -#else - if ((0)); -#endif -#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON - else if (strcmp(memb->name, "__module__") == 0) { - PyObject *descr; - assert(memb->type == T_OBJECT); - assert(memb->flags == 0 || memb->flags == READONLY); - descr = PyDescr_NewMember(type, memb); - if (unlikely(!descr)) - return -1; - if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { - Py_DECREF(descr); - return -1; - } - Py_DECREF(descr); - changed = 1; - } -#endif - } - memb++; - } - if (changed) - PyType_Modified(type); - } -#endif - return 0; -} -#endif - -/* FetchSharedCythonModule */ -static PyObject *__Pyx_FetchSharedCythonABIModule(void) { - PyObject *abi_module = PyImport_AddModule((char*) __PYX_ABI_MODULE_NAME); - if (unlikely(!abi_module)) return NULL; - Py_INCREF(abi_module); - return abi_module; -} - -/* FetchCommonType */ -static int __Pyx_VerifyCachedType(PyObject *cached_type, - const char *name, - Py_ssize_t basicsize, - Py_ssize_t expected_basicsize) { - if (!PyType_Check(cached_type)) { - PyErr_Format(PyExc_TypeError, - "Shared Cython type %.200s is not a type object", name); - return -1; - } - if (basicsize != expected_basicsize) { - PyErr_Format(PyExc_TypeError, - "Shared Cython type %.200s has the wrong size, try recompiling", - name); - return -1; - } - return 0; -} -#if !CYTHON_USE_TYPE_SPECS -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { - PyObject* abi_module; - const char* object_name; - PyTypeObject *cached_type = NULL; - abi_module = __Pyx_FetchSharedCythonABIModule(); - if (!abi_module) return NULL; - object_name = strrchr(type->tp_name, '.'); - object_name = object_name ? object_name+1 : type->tp_name; - cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); - if (cached_type) { - if (__Pyx_VerifyCachedType( - (PyObject *)cached_type, - object_name, - cached_type->tp_basicsize, - type->tp_basicsize) < 0) { - goto bad; - } - goto done; - } - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; - PyErr_Clear(); - if (PyType_Ready(type) < 0) goto bad; - if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) - goto bad; - Py_INCREF(type); - cached_type = type; -done: - Py_DECREF(abi_module); - return cached_type; -bad: - Py_XDECREF(cached_type); - cached_type = NULL; - goto done; -} -#else -static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { - PyObject *abi_module, *cached_type = NULL; - const char* object_name = strrchr(spec->name, '.'); - object_name = object_name ? object_name+1 : spec->name; - abi_module = __Pyx_FetchSharedCythonABIModule(); - if (!abi_module) return NULL; - cached_type = PyObject_GetAttrString(abi_module, object_name); - if (cached_type) { - Py_ssize_t basicsize; -#if CYTHON_COMPILING_IN_LIMITED_API - PyObject *py_basicsize; - py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); - if (unlikely(!py_basicsize)) goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; -#else - basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; -#endif - if (__Pyx_VerifyCachedType( - cached_type, - object_name, - basicsize, - spec->basicsize) < 0) { - goto bad; - } - goto done; - } - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; - PyErr_Clear(); - CYTHON_UNUSED_VAR(module); - cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); - if (unlikely(!cached_type)) goto bad; - if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; - if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; -done: - Py_DECREF(abi_module); - assert(cached_type == NULL || PyType_Check(cached_type)); - return (PyTypeObject *) cached_type; -bad: - Py_XDECREF(cached_type); - cached_type = NULL; - goto done; -} -#endif - -/* PyVectorcallFastCallDict */ -#if CYTHON_METH_FASTCALL -static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) -{ - PyObject *res = NULL; - PyObject *kwnames; - PyObject **newargs; - PyObject **kwvalues; - Py_ssize_t i, pos; - size_t j; - PyObject *key, *value; - unsigned long keys_are_strings; - Py_ssize_t nkw = PyDict_GET_SIZE(kw); - newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); - if (unlikely(newargs == NULL)) { - PyErr_NoMemory(); - return NULL; - } - for (j = 0; j < nargs; j++) newargs[j] = args[j]; - kwnames = PyTuple_New(nkw); - if (unlikely(kwnames == NULL)) { - PyMem_Free(newargs); - return NULL; - } - kwvalues = newargs + nargs; - pos = i = 0; - keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; - while (PyDict_Next(kw, &pos, &key, &value)) { - keys_are_strings &= Py_TYPE(key)->tp_flags; - Py_INCREF(key); - Py_INCREF(value); - PyTuple_SET_ITEM(kwnames, i, key); - kwvalues[i] = value; - i++; - } - if (unlikely(!keys_are_strings)) { - PyErr_SetString(PyExc_TypeError, "keywords must be strings"); - goto cleanup; - } - res = vc(func, newargs, nargs, kwnames); -cleanup: - Py_DECREF(kwnames); - for (i = 0; i < nkw; i++) - Py_DECREF(kwvalues[i]); - PyMem_Free(newargs); - return res; -} -static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) -{ - if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) { - return vc(func, args, nargs, NULL); - } - return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); -} -#endif - -/* CythonFunctionShared */ -static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { -#if PY_VERSION_HEX < 0x030900B1 - __Pyx_Py_XDECREF_SET( - __Pyx_CyFunction_GetClassObj(f), - ((classobj) ? __Pyx_NewRef(classobj) : NULL)); -#else - __Pyx_Py_XDECREF_SET( - ((PyCMethodObject *) (f))->mm_class, - (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); -#endif -} -static PyObject * -__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) -{ - CYTHON_UNUSED_VAR(closure); - if (unlikely(op->func_doc == NULL)) { - if (((PyCFunctionObject*)op)->m_ml->ml_doc) { -#if PY_MAJOR_VERSION >= 3 - op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); -#else - op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->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, void *context) -{ - CYTHON_UNUSED_VAR(context); - if (value == NULL) { - value = Py_None; - } - Py_INCREF(value); - __Pyx_Py_XDECREF_SET(op->func_doc, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(context); - if (unlikely(op->func_name == NULL)) { -#if PY_MAJOR_VERSION >= 3 - op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); -#else - op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); -#endif - if (unlikely(op->func_name == NULL)) - return NULL; - } - Py_INCREF(op->func_name); - return op->func_name; -} -static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) -{ - CYTHON_UNUSED_VAR(context); -#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; - } - Py_INCREF(value); - __Pyx_Py_XDECREF_SET(op->func_name, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(context); - Py_INCREF(op->func_qualname); - return op->func_qualname; -} -static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) -{ - CYTHON_UNUSED_VAR(context); -#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; - } - Py_INCREF(value); - __Pyx_Py_XDECREF_SET(op->func_qualname, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(context); - if (unlikely(op->func_dict == NULL)) { - op->func_dict = PyDict_New(); - if (unlikely(op->func_dict == NULL)) - return NULL; - } - Py_INCREF(op->func_dict); - return op->func_dict; -} -static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) -{ - CYTHON_UNUSED_VAR(context); - 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; - } - Py_INCREF(value); - __Pyx_Py_XDECREF_SET(op->func_dict, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(context); - Py_INCREF(op->func_globals); - return op->func_globals; -} -static PyObject * -__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) -{ - CYTHON_UNUSED_VAR(op); - CYTHON_UNUSED_VAR(context); - Py_INCREF(Py_None); - return Py_None; -} -static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) -{ - PyObject* result = (op->func_code) ? op->func_code : Py_None; - CYTHON_UNUSED_VAR(context); - Py_INCREF(result); - return result; -} -static int -__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { - int result = 0; - PyObject *res = op->defaults_getter((PyObject *) op); - if (unlikely(!res)) - return -1; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - op->defaults_tuple = PyTuple_GET_ITEM(res, 0); - Py_INCREF(op->defaults_tuple); - op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); - Py_INCREF(op->defaults_kwdict); - #else - op->defaults_tuple = 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, void *context) { - CYTHON_UNUSED_VAR(context); - if (!value) { - value = Py_None; - } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "__defaults__ must be set to a tuple object"); - return -1; - } - PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " - "currently affect the values used in function calls", 1); - Py_INCREF(value); - __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { - PyObject* result = op->defaults_tuple; - CYTHON_UNUSED_VAR(context); - if (unlikely(!result)) { - if (op->defaults_getter) { - if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; - result = op->defaults_tuple; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} -static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { - CYTHON_UNUSED_VAR(context); - if (!value) { - value = Py_None; - } else if (unlikely(value != Py_None && !PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "__kwdefaults__ must be set to a dict object"); - return -1; - } - PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " - "currently affect the values used in function calls", 1); - Py_INCREF(value); - __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { - PyObject* result = op->defaults_kwdict; - CYTHON_UNUSED_VAR(context); - if (unlikely(!result)) { - if (op->defaults_getter) { - if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; - result = op->defaults_kwdict; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} -static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { - CYTHON_UNUSED_VAR(context); - if (!value || value == Py_None) { - value = NULL; - } else if (unlikely(!PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "__annotations__ must be set to a dict object"); - return -1; - } - Py_XINCREF(value); - __Pyx_Py_XDECREF_SET(op->func_annotations, value); - return 0; -} -static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { - PyObject* result = op->func_annotations; - CYTHON_UNUSED_VAR(context); - if (unlikely(!result)) { - result = PyDict_New(); - if (unlikely(!result)) return NULL; - op->func_annotations = result; - } - Py_INCREF(result); - return result; -} -static PyObject * -__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { - int is_coroutine; - CYTHON_UNUSED_VAR(context); - if (op->func_is_coroutine) { - return __Pyx_NewRef(op->func_is_coroutine); - } - is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; -#if PY_VERSION_HEX >= 0x03050000 - if (is_coroutine) { - PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine; - fromlist = PyList_New(1); - if (unlikely(!fromlist)) return NULL; - Py_INCREF(marker); - PyList_SET_ITEM(fromlist, 0, marker); - module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0); - Py_DECREF(fromlist); - if (unlikely(!module)) goto ignore; - op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); - Py_DECREF(module); - if (likely(op->func_is_coroutine)) { - return __Pyx_NewRef(op->func_is_coroutine); - } -ignore: - PyErr_Clear(); - } -#endif - op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); - return __Pyx_NewRef(op->func_is_coroutine); -} -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 *) "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}, - {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; -static PyMemberDef __pyx_CyFunction_members[] = { - {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, -#if CYTHON_USE_TYPE_SPECS - {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, -#if CYTHON_METH_FASTCALL -#if CYTHON_BACKPORT_VECTORCALL - {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, -#else - {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, -#endif -#endif -#if PY_VERSION_HEX < 0x030500A0 - {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, -#else - {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, -#endif -#endif - {0, 0, 0, 0, 0} -}; -static PyObject * -__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) -{ - CYTHON_UNUSED_VAR(args); -#if PY_MAJOR_VERSION >= 3 - Py_INCREF(m->func_qualname); - return m->func_qualname; -#else - return PyString_FromString(((PyCFunctionObject*)m)->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) (((PyCFunctionObject*)cyfunc)->m_weakreflist) -#endif -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - PyCFunctionObject *cf = (PyCFunctionObject*) op; - if (unlikely(op == NULL)) - return NULL; - op->flags = flags; - __Pyx_CyFunction_weakreflist(op) = NULL; - cf->m_ml = ml; - cf->m_self = (PyObject *) op; - Py_XINCREF(closure); - op->func_closure = closure; - Py_XINCREF(module); - cf->m_module = module; - op->func_dict = NULL; - op->func_name = NULL; - Py_INCREF(qualname); - op->func_qualname = qualname; - op->func_doc = NULL; -#if PY_VERSION_HEX < 0x030900B1 - op->func_classobj = NULL; -#else - ((PyCMethodObject*)op)->mm_class = NULL; -#endif - op->func_globals = globals; - Py_INCREF(op->func_globals); - Py_XINCREF(code); - op->func_code = code; - op->defaults_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; - op->func_is_coroutine = NULL; -#if CYTHON_METH_FASTCALL - switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { - case METH_NOARGS: - __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; - break; - case METH_O: - __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; - break; - case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: - __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; - break; - case METH_FASTCALL | METH_KEYWORDS: - __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; - break; - case METH_VARARGS | METH_KEYWORDS: - __Pyx_CyFunction_func_vectorcall(op) = NULL; - break; - default: - PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); - Py_DECREF(op); - return NULL; - } -#endif - return (PyObject *) op; -} -static int -__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) -{ - Py_CLEAR(m->func_closure); - Py_CLEAR(((PyCFunctionObject*)m)->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); -#if PY_VERSION_HEX < 0x030900B1 - Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); -#else - { - PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; - ((PyCMethodObject *) (m))->mm_class = NULL; - Py_XDECREF(cls); - } -#endif - Py_CLEAR(m->defaults_tuple); - Py_CLEAR(m->defaults_kwdict); - Py_CLEAR(m->func_annotations); - Py_CLEAR(m->func_is_coroutine); - 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); - __Pyx_PyHeapTypeObject_GC_Del(m); -} -static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) -{ - PyObject_GC_UnTrack(m); - __Pyx__CyFunction_dealloc(m); -} -static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) -{ - Py_VISIT(m->func_closure); - Py_VISIT(((PyCFunctionObject*)m)->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(__Pyx_CyFunction_GetClassObj(m)); - Py_VISIT(m->defaults_tuple); - Py_VISIT(m->defaults_kwdict); - Py_VISIT(m->func_is_coroutine); - 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_repr(__pyx_CyFunctionObject *op) -{ -#if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromFormat("", - op->func_qualname, (void *)op); -#else - return PyString_FromFormat("", - 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 for CyFunction"); - 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 CYTHON_METH_FASTCALL - __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); - if (vc) { -#if CYTHON_ASSUME_SAFE_MACROS - return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); -#else - (void) &__Pyx_PyVectorcall_FastCallDict; - return PyVectorcall_Call(func, args, kw); -#endif - } -#endif - if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { - Py_ssize_t argc; - PyObject *new_args; - PyObject *self; - argc = PyTuple_GET_SIZE(args); - new_args = PyTuple_GetSlice(args, 1, argc); - if (unlikely(!new_args)) - return NULL; - self = PyTuple_GetItem(args, 0); - if (unlikely(!self)) { - Py_DECREF(new_args); -#if PY_MAJOR_VERSION > 2 - PyErr_Format(PyExc_TypeError, - "unbound method %.200S() needs an argument", - cyfunc->func_qualname); -#else - PyErr_SetString(PyExc_TypeError, - "unbound method needs an argument"); -#endif - return NULL; - } - result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); - Py_DECREF(new_args); - } else { - result = __Pyx_CyFunction_Call(func, args, kw); - } - return result; -} -#if CYTHON_METH_FASTCALL -static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) -{ - int ret = 0; - if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { - if (unlikely(nargs < 1)) { - PyErr_Format(PyExc_TypeError, "%.200s() needs an argument", - ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); - return -1; - } - ret = 1; - } - if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) { - PyErr_Format(PyExc_TypeError, - "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name); - return -1; - } - return ret; -} -static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) -{ - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; - PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else - Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif - PyObject *self; - switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { - case 1: - self = args[0]; - args += 1; - nargs -= 1; - break; - case 0: - self = ((PyCFunctionObject*)cyfunc)->m_self; - break; - default: - return NULL; - } - if (unlikely(nargs != 0)) { - PyErr_Format(PyExc_TypeError, - "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", - def->ml_name, nargs); - return NULL; - } - return def->ml_meth(self, NULL); -} -static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) -{ - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; - PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else - Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif - PyObject *self; - switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { - case 1: - self = args[0]; - args += 1; - nargs -= 1; - break; - case 0: - self = ((PyCFunctionObject*)cyfunc)->m_self; - break; - default: - return NULL; - } - if (unlikely(nargs != 1)) { - PyErr_Format(PyExc_TypeError, - "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", - def->ml_name, nargs); - return NULL; - } - return def->ml_meth(self, args[0]); -} -static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) -{ - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; - PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else - Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif - PyObject *self; - switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { - case 1: - self = args[0]; - args += 1; - nargs -= 1; - break; - case 0: - self = ((PyCFunctionObject*)cyfunc)->m_self; - break; - default: - return NULL; - } - return ((_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames); -} -static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) -{ - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; - PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml; - PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); -#if CYTHON_BACKPORT_VECTORCALL - Py_ssize_t nargs = (Py_ssize_t)nargsf; -#else - Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); -#endif - PyObject *self; - switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { - case 1: - self = args[0]; - args += 1; - nargs -= 1; - break; - case 0: - self = ((PyCFunctionObject*)cyfunc)->m_self; - break; - default: - return NULL; - } - return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames); -} -#endif -#if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_CyFunctionType_slots[] = { - {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, - {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, - {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, - {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, - {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, - {Py_tp_methods, (void *)__pyx_CyFunction_methods}, - {Py_tp_members, (void *)__pyx_CyFunction_members}, - {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, - {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, - {0, 0}, -}; -static PyType_Spec __pyx_CyFunctionType_spec = { - __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", - sizeof(__pyx_CyFunctionObject), - 0, -#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR - Py_TPFLAGS_METHOD_DESCRIPTOR | -#endif -#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL) - _Py_TPFLAGS_HAVE_VECTORCALL | -#endif - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, - __pyx_CyFunctionType_slots -}; -#else -static PyTypeObject __pyx_CyFunctionType_type = { - PyVarObject_HEAD_INIT(0, 0) - __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", - sizeof(__pyx_CyFunctionObject), - 0, - (destructor) __Pyx_CyFunction_dealloc, -#if !CYTHON_METH_FASTCALL - 0, -#elif CYTHON_BACKPORT_VECTORCALL - (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), -#else - offsetof(PyCFunctionObject, vectorcall), -#endif - 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, -#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR - Py_TPFLAGS_METHOD_DESCRIPTOR | -#endif -#ifdef _Py_TPFLAGS_HAVE_VECTORCALL - _Py_TPFLAGS_HAVE_VECTORCALL | -#endif - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, - 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_PyMethod_New, - 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 __PYX_NEED_TP_PRINT_SLOT - 0, -#endif -#if PY_VERSION_HEX >= 0x030C0000 - 0, -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 - 0, -#endif -}; -#endif -static int __pyx_CyFunction_init(PyObject *module) { -#if CYTHON_USE_TYPE_SPECS - __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); -#else - CYTHON_UNUSED_VAR(module); - __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); -#endif - 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; -} - -/* 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; - } -#elif CYTHON_COMPILING_IN_LIMITED_API - if (unlikely(!__pyx_m)) { - return NULL; - } - result = PyObject_GetAttr(__pyx_m, name); - if (likely(result)) { - return result; - } -#else - result = PyDict_GetItem(__pyx_d, name); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } -#endif -#else - result = PyObject_GetItem(__pyx_d, name); - __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } - PyErr_Clear(); -#endif - return __Pyx_GetBuiltinName(name); -} - -/* PyObjectCall */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - -/* RaiseException */ -#if PY_MAJOR_VERSION < 3 -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - __Pyx_PyThreadState_declare - CYTHON_UNUSED_VAR(cause); - 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 PY_VERSION_HEX >= 0x030C00A6 - PyException_SetTraceback(value, tb); - #elif CYTHON_FAST_THREAD_STATE - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } -#else - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); - Py_INCREF(tb); - PyErr_Restore(tmp_type, tmp_value, tb); - Py_XDECREF(tmp_tb); -#endif - } -bad: - Py_XDECREF(owned_instance); - return; -} -#endif - -/* PyFunctionFastCall */ -#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL -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; -} -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 (unlikely(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 - -/* 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 - -/* PyObjectFastCall */ -static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { - PyObject *argstuple; - PyObject *result; - size_t i; - argstuple = PyTuple_New((Py_ssize_t)nargs); - if (unlikely(!argstuple)) return NULL; - for (i = 0; i < nargs; i++) { - Py_INCREF(args[i]); - PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]); - } - result = __Pyx_PyObject_Call(func, argstuple, kwargs); - Py_DECREF(argstuple); - return result; -} -static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { - Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); -#if CYTHON_COMPILING_IN_CPYTHON - if (nargs == 0 && kwargs == NULL) { -#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG) - if (__Pyx_IsCyOrPyCFunction(func)) -#else - if (PyCFunction_Check(func)) -#endif - { - if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { - return __Pyx_PyObject_CallMethO(func, NULL); - } - } - } - else if (nargs == 1 && kwargs == NULL) { - if (PyCFunction_Check(func)) - { - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, args[0]); - } - } - } -#endif - #if PY_VERSION_HEX < 0x030800B1 - #if CYTHON_FAST_PYCCALL - if (PyCFunction_Check(func)) { - if (kwargs) { - return _PyCFunction_FastCallDict(func, args, nargs, kwargs); - } else { - return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); - } - } - #if PY_VERSION_HEX >= 0x030700A1 - if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { - return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); - } - #endif - #endif - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); - } - #endif - #endif - #if CYTHON_VECTORCALL - vectorcallfunc f = _PyVectorcall_Function(func); - if (f) { - return f(func, args, (size_t)nargs, kwargs); - } - #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL - if (__Pyx_CyFunction_CheckExact(func)) { - __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); - if (f) return f(func, args, (size_t)nargs, kwargs); - } - #endif - if (nargs == 0) { - return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs); - } - return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); -} - -/* DictGetItem */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - if (unlikely(PyTuple_Check(key))) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) { - PyErr_SetObject(PyExc_KeyError, args); - Py_DECREF(args); - } - } else { - PyErr_SetObject(PyExc_KeyError, key); - } - } - return NULL; - } - Py_INCREF(value); - return value; -} -#endif - -/* KeywordStringCheck */ -static int __Pyx_CheckKeywordStrings( - PyObject *kw, - 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(kw, &pos, &key, 0)) - goto invalid_keyword; - return 1; -#else - if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) { - if (unlikely(PyTuple_GET_SIZE(kw) == 0)) - return 1; - if (!kw_allowed) { - key = PyTuple_GET_ITEM(kw, 0); - goto invalid_keyword; - } -#if PY_VERSION_HEX < 0x03090000 - for (pos = 0; pos < PyTuple_GET_SIZE(kw); pos++) { - key = PyTuple_GET_ITEM(kw, pos); - if (unlikely(!PyUnicode_Check(key))) - goto invalid_keyword_type; - } -#endif - return 1; - } - while (PyDict_Next(kw, &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: - #if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_TypeError, - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - PyErr_Format(PyExc_TypeError, - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif - return 0; -} - -/* IterFinish */ -static CYTHON_INLINE int __Pyx_IterFinish(void) { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); - if (unlikely(exc_type)) { - if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) - return -1; - __Pyx_PyErr_Clear(); - return 0; - } - return 0; -} - -/* PyObjectCallNoArg */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { - PyObject *arg = NULL; - return __Pyx_PyObject_FastCall(func, (&arg)+1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); -} - -/* PyObjectCallOneArg */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *args[2] = {NULL, arg}; - return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); -} - -/* 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 - __Pyx_TypeName type_name; - PyTypeObject *tp = Py_TYPE(obj); - PyObject *descr; - descrgetfunc f = NULL; - PyObject **dictptr, *dict; - int meth_found = 0; - assert (*method == NULL); - if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { - attr = __Pyx_PyObject_GetAttrStr(obj, name); - goto try_unpack; - } - if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { - return 0; - } - descr = _PyType_Lookup(tp, name); - if (likely(descr != NULL)) { - Py_INCREF(descr); -#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR - if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) -#elif PY_MAJOR_VERSION >= 3 - #ifdef __Pyx_CyFunction_USED - if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) - #else - if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) - #endif -#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 (likely(descr != NULL)) { - *method = descr; - return 0; - } - type_name = __Pyx_PyType_GetName(tp); - PyErr_Format(PyExc_AttributeError, -#if PY_MAJOR_VERSION >= 3 - "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", - type_name, name); -#else - "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", - type_name, PyString_AS_STRING(name)); -#endif - __Pyx_DECREF_TypeName(type_name); - return 0; -#else - attr = __Pyx_PyObject_GetAttrStr(obj, name); - goto try_unpack; -#endif -try_unpack: -#if CYTHON_UNPACK_METHODS - if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { - PyObject *function = PyMethod_GET_FUNCTION(attr); - Py_INCREF(function); - Py_DECREF(attr); - *method = function; - return 1; - } -#endif - *method = attr; - return 0; -} - -/* PyObjectCallMethod0 */ -static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { - PyObject *method = NULL, *result = NULL; - int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); - if (likely(is_method)) { - result = __Pyx_PyObject_CallOneArg(method, obj); - Py_DECREF(method); - return result; - } - if (unlikely(!method)) goto bad; - result = __Pyx_PyObject_CallNoArg(method); - Py_DECREF(method); -bad: - return result; -} - -/* RaiseNeedMoreValuesToUnpack */ -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", - index, (index == 1) ? "" : "s"); -} - -/* RaiseTooManyValuesToUnpack */ -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { - PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); -} - -/* UnpackItemEndCheck */ -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { - if (unlikely(retval)) { - Py_DECREF(retval); - __Pyx_RaiseTooManyValuesError(expected); - return -1; - } - return __Pyx_IterFinish(); -} - -/* RaiseNoneIterError */ -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -} - -/* UnpackTupleError */ -static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { - if (t == Py_None) { - __Pyx_RaiseNoneNotIterableError(); - } else if (PyTuple_GET_SIZE(t) < index) { - __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); - } else { - __Pyx_RaiseTooManyValuesError(index); - } -} - -/* UnpackTuple2 */ -static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( - PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { - PyObject *value1 = NULL, *value2 = NULL; -#if CYTHON_COMPILING_IN_PYPY - value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; - value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; -#else - value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); - value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); -#endif - if (decref_tuple) { - Py_DECREF(tuple); - } - *pvalue1 = value1; - *pvalue2 = value2; - return 0; -#if CYTHON_COMPILING_IN_PYPY -bad: - Py_XDECREF(value1); - Py_XDECREF(value2); - if (decref_tuple) { Py_XDECREF(tuple); } - return -1; -#endif -} -static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, - int has_known_size, int decref_tuple) { - Py_ssize_t index; - PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; - iternextfunc iternext; - iter = PyObject_GetIter(tuple); - if (unlikely(!iter)) goto bad; - if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } - iternext = __Pyx_PyObject_GetIterNextFunc(iter); - 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; -} - -/* WriteUnraisableException */ -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback, int nogil) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_PyThreadState_declare -#ifdef WITH_THREAD - PyGILState_STATE state; - if (nogil) - state = PyGILState_Ensure(); - else state = (PyGILState_STATE)0; -#endif - CYTHON_UNUSED_VAR(clineno); - CYTHON_UNUSED_VAR(lineno); - CYTHON_UNUSED_VAR(filename); - CYTHON_MAYBE_UNUSED_VAR(nogil); - __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 -} - -/* PyObjectSetAttrStr */ -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_setattro)) - return tp->tp_setattro(obj, attr_name, value); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_setattr)) - return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); -#endif - return PyObject_SetAttr(obj, attr_name, value); -} -#endif - -/* JoinPyUnicode */ -static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, - Py_UCS4 max_char) { -#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyObject *result_uval; - int result_ukind, kind_shift; - Py_ssize_t i, char_pos; - void *result_udata; - CYTHON_MAYBE_UNUSED_VAR(max_char); -#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; - kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; - 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); - kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1; - result_udata = PyUnicode_AS_UNICODE(result_uval); -#endif - assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); - 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((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) - 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 << kind_shift), udata, (size_t) (ulength << kind_shift)); - } 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 - CYTHON_UNUSED_VAR(max_char); - CYTHON_UNUSED_VAR(result_ulength); - CYTHON_UNUSED_VAR(value_count); - return PyUnicode_Join(__pyx_empty_unicode, value_tuple); -#endif -} - -/* PyObjectCall2Args */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { - PyObject *args[3] = {NULL, arg1, arg2}; - return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); -} - -/* PyObjectCallMethod1 */ -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { - PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); - Py_DECREF(method); - return result; -} -static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { - PyObject *method = NULL, *result; - int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); - if (likely(is_method)) { - result = __Pyx_PyObject_Call2Args(method, obj, arg); - Py_DECREF(method); - return result; - } - if (unlikely(!method)) return NULL; - return __Pyx__PyObject_CallMethod1(method, arg); -} - -/* append */ -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; - } else { - PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); - if (unlikely(!retval)) - return -1; - Py_DECREF(retval); - } - return 0; -} - -/* CIntToDigits */ -static const char DIGIT_PAIRS_10[2*10*10+1] = { - "00010203040506070809" - "10111213141516171819" - "20212223242526272829" - "30313233343536373839" - "40414243444546474849" - "50515253545556575859" - "60616263646566676869" - "70717273747576777879" - "80818283848586878889" - "90919293949596979899" -}; -static const char DIGIT_PAIRS_8[2*8*8+1] = { - "0001020304050607" - "1011121314151617" - "2021222324252627" - "3031323334353637" - "4041424344454647" - "5051525354555657" - "6061626364656667" - "7071727374757677" -}; -static const char DIGITS_HEX[2*16+1] = { - "0123456789abcdef" - "0123456789ABCDEF" -}; - -/* BuildPyUnicode */ -static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, - int prepend_sign, char padding_char) { - PyObject *uval; - Py_ssize_t uoffset = ulength - clength; -#if CYTHON_USE_UNICODE_INTERNALS - Py_ssize_t i; -#if CYTHON_PEP393_ENABLED - void *udata; - uval = PyUnicode_New(ulength, 127); - if (unlikely(!uval)) return NULL; - udata = PyUnicode_DATA(uval); -#else - Py_UNICODE *udata; - uval = PyUnicode_FromUnicode(NULL, ulength); - if (unlikely(!uval)) return NULL; - udata = PyUnicode_AS_UNICODE(uval); -#endif - if (uoffset > 0) { - i = 0; - if (prepend_sign) { - __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); - i++; - } - for (; i < uoffset; i++) { - __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); - } - } - for (i=0; i < clength; i++) { - __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); - } -#else - { - PyObject *sign = NULL, *padding = NULL; - uval = NULL; - if (uoffset > 0) { - prepend_sign = !!prepend_sign; - if (uoffset > prepend_sign) { - padding = PyUnicode_FromOrdinal(padding_char); - if (likely(padding) && uoffset > prepend_sign + 1) { - PyObject *tmp; - PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign); - if (unlikely(!repeat)) goto done_or_error; - tmp = PyNumber_Multiply(padding, repeat); - Py_DECREF(repeat); - Py_DECREF(padding); - padding = tmp; - } - if (unlikely(!padding)) goto done_or_error; - } - if (prepend_sign) { - sign = PyUnicode_FromOrdinal('-'); - if (unlikely(!sign)) goto done_or_error; - } - } - uval = PyUnicode_DecodeASCII(chars, clength, NULL); - if (likely(uval) && padding) { - PyObject *tmp = PyNumber_Add(padding, uval); - Py_DECREF(uval); - uval = tmp; - } - if (likely(uval) && sign) { - PyObject *tmp = PyNumber_Add(sign, uval); - Py_DECREF(uval); - uval = tmp; - } -done_or_error: - Py_XDECREF(padding); - Py_XDECREF(sign); - } -#endif - return uval; -} - -/* CIntToPyUnicode */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { - char digits[sizeof(Py_ssize_t)*3+2]; - char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; - const char *hex_digits = DIGITS_HEX; - Py_ssize_t length, ulength; - int prepend_sign, last_one_off; - Py_ssize_t remaining; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (format_char == 'X') { - hex_digits += 16; - format_char = 'x'; - } - remaining = value; - last_one_off = 0; - dpos = end; - do { - int digit_pos; - switch (format_char) { - case 'o': - digit_pos = abs((int)(remaining % (8*8))); - remaining = (Py_ssize_t) (remaining / (8*8)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); - last_one_off = (digit_pos < 8); - break; - case 'd': - digit_pos = abs((int)(remaining % (10*10))); - remaining = (Py_ssize_t) (remaining / (10*10)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); - last_one_off = (digit_pos < 10); - break; - case 'x': - *(--dpos) = hex_digits[abs((int)(remaining % 16))]; - remaining = (Py_ssize_t) (remaining / 16); - break; - default: - assert(0); - break; - } - } while (unlikely(remaining != 0)); - assert(!last_one_off || *dpos == '0'); - dpos += last_one_off; - 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); -} - -/* UnicodeConcatInPlace */ -# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -static int -__Pyx_unicode_modifiable(PyObject *unicode) -{ - if (Py_REFCNT(unicode) != 1) - return 0; - if (!PyUnicode_CheckExact(unicode)) - return 0; - if (PyUnicode_CHECK_INTERNED(unicode)) - return 0; - return 1; -} -static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right - #if CYTHON_REFNANNY - , void* __pyx_refnanny - #endif - ) { - PyObject *left = *p_left; - Py_ssize_t left_len, right_len, new_len; - if (unlikely(__Pyx_PyUnicode_READY(left) == -1)) - return NULL; - if (unlikely(__Pyx_PyUnicode_READY(right) == -1)) - return NULL; - left_len = PyUnicode_GET_LENGTH(left); - if (left_len == 0) { - Py_INCREF(right); - return right; - } - right_len = PyUnicode_GET_LENGTH(right); - if (right_len == 0) { - Py_INCREF(left); - return left; - } - if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) { - PyErr_SetString(PyExc_OverflowError, - "strings are too large to concat"); - return NULL; - } - new_len = left_len + right_len; - if (__Pyx_unicode_modifiable(left) - && PyUnicode_CheckExact(right) - && PyUnicode_KIND(right) <= PyUnicode_KIND(left) - && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) { - __Pyx_GIVEREF(*p_left); - if (unlikely(PyUnicode_Resize(p_left, new_len) != 0)) { - __Pyx_GOTREF(*p_left); - return NULL; - } - __Pyx_INCREF(*p_left); - _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len); - return *p_left; - } else { - return __Pyx_PyUnicode_Concat(left, right); - } - } -#endif - -/* GetException */ -#if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) -#else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) -#endif -{ - PyObject *local_type = NULL, *local_value, *local_tb = NULL; -#if CYTHON_FAST_THREAD_STATE - PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030C00A6 - local_value = tstate->current_exception; - tstate->current_exception = 0; - if (likely(local_value)) { - local_type = (PyObject*) Py_TYPE(local_value); - Py_INCREF(local_type); - local_tb = PyException_GetTraceback(local_value); - } - #else - local_type = tstate->curexc_type; - local_value = tstate->curexc_value; - local_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; - #endif -#else - PyErr_Fetch(&local_type, &local_value, &local_tb); -#endif - PyErr_NormalizeException(&local_type, &local_value, &local_tb); -#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6 - if (unlikely(tstate->current_exception)) -#elif 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; - #if PY_VERSION_HEX >= 0x030B00a4 - tmp_value = exc_info->exc_value; - exc_info->exc_value = local_value; - tmp_type = NULL; - tmp_tb = NULL; - Py_XDECREF(local_type); - Py_XDECREF(local_tb); - #else - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = local_type; - exc_info->exc_value = local_value; - exc_info->exc_traceback = local_tb; - #endif - } - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = local_type; - tstate->exc_value = local_value; - tstate->exc_traceback = local_tb; - #endif - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#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 && PY_VERSION_HEX >= 0x030B00a4 - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_value = exc_info->exc_value; - exc_info->exc_value = *value; - if (tmp_value == NULL || tmp_value == Py_None) { - Py_XDECREF(tmp_value); - tmp_value = NULL; - tmp_type = NULL; - tmp_tb = NULL; - } else { - tmp_type = (PyObject*) Py_TYPE(tmp_value); - Py_INCREF(tmp_type); - #if CYTHON_COMPILING_IN_CPYTHON - tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; - Py_XINCREF(tmp_tb); - #else - tmp_tb = PyException_GetTraceback(tmp_value); - #endif - } - #elif CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = *type; - exc_info->exc_value = *value; - exc_info->exc_traceback = *tb; - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = *type; - tstate->exc_value = *value; - tstate->exc_traceback = *tb; - #endif - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} -#else -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); - PyErr_SetExcInfo(*type, *value, *tb); - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} -#endif - -/* GetTopmostException */ -#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE -static _PyErr_StackItem * -__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) -{ - _PyErr_StackItem *exc_info = tstate->exc_info; - while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && - exc_info->previous_item != NULL) - { - exc_info = exc_info->previous_item; - } - return exc_info; -} -#endif - -/* SaveResetException */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 - _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); - PyObject *exc_value = exc_info->exc_value; - if (exc_value == NULL || exc_value == Py_None) { - *value = NULL; - *type = NULL; - *tb = NULL; - } else { - *value = exc_value; - Py_INCREF(*value); - *type = (PyObject*) Py_TYPE(exc_value); - Py_INCREF(*type); - *tb = PyException_GetTraceback(exc_value); - } - #elif CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); - *type = exc_info->exc_type; - *value = exc_info->exc_value; - *tb = exc_info->exc_traceback; - Py_XINCREF(*type); - Py_XINCREF(*value); - Py_XINCREF(*tb); - #else - *type = tstate->exc_type; - *value = tstate->exc_value; - *tb = tstate->exc_traceback; - Py_XINCREF(*type); - Py_XINCREF(*value); - Py_XINCREF(*tb); - #endif -} -static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 - _PyErr_StackItem *exc_info = tstate->exc_info; - PyObject *tmp_value = exc_info->exc_value; - exc_info->exc_value = value; - Py_XDECREF(tmp_value); - Py_XDECREF(type); - Py_XDECREF(tb); - #else - PyObject *tmp_type, *tmp_value, *tmp_tb; - #if CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = type; - exc_info->exc_value = value; - exc_info->exc_traceback = tb; - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = type; - tstate->exc_value = value; - tstate->exc_traceback = tb; - #endif - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); - #endif -} -#endif - -/* FastTypeChecks */ -#if CYTHON_COMPILING_IN_CPYTHON -static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { - while (a) { - a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); - if (a == b) - return 1; - } - return b == &PyBaseObject_Type; -} -static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { - PyObject *mro; - if (a == b) return 1; - mro = a->tp_mro; - if (likely(mro)) { - Py_ssize_t i, n; - n = PyTuple_GET_SIZE(mro); - for (i = 0; i < n; i++) { - if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) - return 1; - } - return 0; - } - return __Pyx_InBases(a, b); -} -static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { - PyObject *mro; - if (cls == a || cls == b) return 1; - mro = cls->tp_mro; - if (likely(mro)) { - Py_ssize_t i, n; - n = PyTuple_GET_SIZE(mro); - for (i = 0; i < n; i++) { - PyObject *base = PyTuple_GET_ITEM(mro, i); - if (base == (PyObject *)a || base == (PyObject *)b) - return 1; - } - return 0; - } - return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); -} -#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) { - if (exc_type1) { - return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); - } else { - return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); - } -} -#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= 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 - if (unlikely(__Pyx_PyLong_IsZero(op1))) { - return __Pyx_NewRef(op2); - } - if (likely(__Pyx_PyLong_IsCompact(op1))) { - a = __Pyx_PyLong_CompactValue(op1); - } else { - const digit* digits = __Pyx_PyLong_Digits(op1); - const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); - 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; -#if CYTHON_COMPILING_IN_LIMITED_API - double a = __pyx_PyFloat_AsDouble(op1); -#else - double a = PyFloat_AS_DOUBLE(op1); -#endif - 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, int wraparound) { - __Pyx_TypeName obj_type_name; -#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); - } -#else - CYTHON_UNUSED_VAR(wraparound); -#endif - mp = Py_TYPE(obj)->tp_as_mapping; - if (likely(mp && mp->mp_subscript)) -#else - CYTHON_UNUSED_VAR(wraparound); -#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; - } - obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); - PyErr_Format(PyExc_TypeError, - "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name); - __Pyx_DECREF_TypeName(obj_type_name); -bad: - return NULL; -} - -/* CIntToPyUnicode */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_UNIT_STATE(RFC_UNIT_STATE value, Py_ssize_t width, char padding_char, char format_char) { - char digits[sizeof(RFC_UNIT_STATE)*3+2]; - char *dpos, *end = digits + sizeof(RFC_UNIT_STATE)*3+2; - const char *hex_digits = DIGITS_HEX; - Py_ssize_t length, ulength; - int prepend_sign, last_one_off; - RFC_UNIT_STATE remaining; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_UNIT_STATE neg_one = (RFC_UNIT_STATE) -1, const_zero = (RFC_UNIT_STATE) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (format_char == 'X') { - hex_digits += 16; - format_char = 'x'; - } - remaining = value; - last_one_off = 0; - dpos = end; - do { - int digit_pos; - switch (format_char) { - case 'o': - digit_pos = abs((int)(remaining % (8*8))); - remaining = (RFC_UNIT_STATE) (remaining / (8*8)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); - last_one_off = (digit_pos < 8); - break; - case 'd': - digit_pos = abs((int)(remaining % (10*10))); - remaining = (RFC_UNIT_STATE) (remaining / (10*10)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); - last_one_off = (digit_pos < 10); - break; - case 'x': - *(--dpos) = hex_digits[abs((int)(remaining % 16))]; - remaining = (RFC_UNIT_STATE) (remaining / 16); - break; - default: - assert(0); - break; - } - } while (unlikely(remaining != 0)); - assert(!last_one_off || *dpos == '0'); - dpos += last_one_off; - length = end - dpos; - ulength = length; - prepend_sign = 0; - if (!is_unsigned && value <= neg_one) { - if (padding_char == ' ' || width <= length + 1) { - *(--dpos) = '-'; - ++length; - } else { - prepend_sign = 1; - } - ++ulength; - } - if (width > ulength) { - ulength = width; - } - if (ulength == 1) { - return PyUnicode_FromOrdinal(*dpos); - } - return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); -} - -/* CIntToPyUnicode */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { - char digits[sizeof(int)*3+2]; - char *dpos, *end = digits + sizeof(int)*3+2; - const char *hex_digits = DIGITS_HEX; - Py_ssize_t length, ulength; - int prepend_sign, last_one_off; - int remaining; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const int neg_one = (int) -1, const_zero = (int) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (format_char == 'X') { - hex_digits += 16; - format_char = 'x'; - } - remaining = value; - last_one_off = 0; - dpos = end; - do { - int digit_pos; - switch (format_char) { - case 'o': - digit_pos = abs((int)(remaining % (8*8))); - remaining = (int) (remaining / (8*8)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); - last_one_off = (digit_pos < 8); - break; - case 'd': - digit_pos = abs((int)(remaining % (10*10))); - remaining = (int) (remaining / (10*10)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); - last_one_off = (digit_pos < 10); - break; - case 'x': - *(--dpos) = hex_digits[abs((int)(remaining % 16))]; - remaining = (int) (remaining / 16); - break; - default: - assert(0); - break; - } - } while (unlikely(remaining != 0)); - assert(!last_one_off || *dpos == '0'); - dpos += last_one_off; - length = end - dpos; - ulength = length; - prepend_sign = 0; - if (!is_unsigned && value <= neg_one) { - if (padding_char == ' ' || width <= length + 1) { - *(--dpos) = '-'; - ++length; - } else { - prepend_sign = 1; - } - ++ulength; - } - if (width > ulength) { - ulength = width; - } - if (ulength == 1) { - return PyUnicode_FromOrdinal(*dpos); - } - return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); -} - -/* GetItemInt */ -static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (unlikely(!j)) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, - 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 { - PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; - PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; - if (mm && mm->mp_subscript) { - PyObject *r, *key = PyInt_FromSsize_t(i); - if (unlikely(!key)) return NULL; - r = mm->mp_subscript(o, key); - Py_DECREF(key); - return r; - } - if (likely(sm && sm->sq_item)) { - if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { - Py_ssize_t l = sm->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - return NULL; - PyErr_Clear(); - } - } - return sm->sq_item(o, i); - } - } -#else - if (is_list || PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } -#endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} - -/* RaiseUnexpectedTypeError */ -static int -__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) -{ - __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); - PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, - expected, obj_type_name); - __Pyx_DECREF_TypeName(obj_type_name); - return 0; -} - -/* ObjectGetItem */ -#if CYTHON_USE_TYPE_SLOTS -static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) { - PyObject *runerr = NULL; - Py_ssize_t key_value; - key_value = __Pyx_PyIndex_AsSsize_t(index); - if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { - return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); - } - if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { - __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index)); - PyErr_Clear(); - PyErr_Format(PyExc_IndexError, - "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name); - __Pyx_DECREF_TypeName(index_type_name); - } - return NULL; -} -static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) { - __Pyx_TypeName obj_type_name; - if (likely(PyType_Check(obj))) { - PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem); - if (meth) { - PyObject *result = __Pyx_PyObject_CallOneArg(meth, key); - Py_DECREF(meth); - return result; - } - } - obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); - PyErr_Format(PyExc_TypeError, - "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name); - __Pyx_DECREF_TypeName(obj_type_name); - return NULL; -} -static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) { - PyTypeObject *tp = Py_TYPE(obj); - PyMappingMethods *mm = tp->tp_as_mapping; - PySequenceMethods *sm = tp->tp_as_sequence; - if (likely(mm && mm->mp_subscript)) { - return mm->mp_subscript(obj, key); - } - if (likely(sm && sm->sq_item)) { - return __Pyx_PyObject_GetIndex(obj, key); - } - return __Pyx_PyObject_GetItem_Slow(obj, key); -} -#endif - -/* CIntToPyUnicode */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFC_RC(RFC_RC value, Py_ssize_t width, char padding_char, char format_char) { - char digits[sizeof(RFC_RC)*3+2]; - char *dpos, *end = digits + sizeof(RFC_RC)*3+2; - const char *hex_digits = DIGITS_HEX; - Py_ssize_t length, ulength; - int prepend_sign, last_one_off; - RFC_RC remaining; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_RC neg_one = (RFC_RC) -1, const_zero = (RFC_RC) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (format_char == 'X') { - hex_digits += 16; - format_char = 'x'; - } - remaining = value; - last_one_off = 0; - dpos = end; - do { - int digit_pos; - switch (format_char) { - case 'o': - digit_pos = abs((int)(remaining % (8*8))); - remaining = (RFC_RC) (remaining / (8*8)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); - last_one_off = (digit_pos < 8); - break; - case 'd': - digit_pos = abs((int)(remaining % (10*10))); - remaining = (RFC_RC) (remaining / (10*10)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); - last_one_off = (digit_pos < 10); - break; - case 'x': - *(--dpos) = hex_digits[abs((int)(remaining % 16))]; - remaining = (RFC_RC) (remaining / 16); - break; - default: - assert(0); - break; - } - } while (unlikely(remaining != 0)); - assert(!last_one_off || *dpos == '0'); - dpos += last_one_off; - length = end - dpos; - ulength = length; - prepend_sign = 0; - if (!is_unsigned && value <= neg_one) { - if (padding_char == ' ' || width <= length + 1) { - *(--dpos) = '-'; - ++length; - } else { - prepend_sign = 1; - } - ++ulength; - } - if (width > ulength) { - ulength = width; - } - if (ulength == 1) { - return PyUnicode_FromOrdinal(*dpos); - } - return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); -} - -/* MergeKeywords */ -static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { - PyObject *iter, *key = NULL, *value = NULL; - int source_is_dict, result; - Py_ssize_t orig_length, ppos = 0; - iter = __Pyx_dict_iterator(source_mapping, 0, __pyx_n_s_items, &orig_length, &source_is_dict); - if (unlikely(!iter)) { - PyObject *args; - if (unlikely(!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; -} - -/* RaiseUnboundLocalError */ -static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { - PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); -} - -/* SetItemInt */ -static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { - int r; - if (unlikely(!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 { - PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; - PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; - if (mm && mm->mp_ass_subscript) { - int r; - PyObject *key = PyInt_FromSsize_t(i); - if (unlikely(!key)) return -1; - r = mm->mp_ass_subscript(o, key, v); - Py_DECREF(key); - return r; - } - if (likely(sm && sm->sq_ass_item)) { - if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { - Py_ssize_t l = sm->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - return -1; - PyErr_Clear(); - } - } - return sm->sq_ass_item(o, i, v); - } - } -#else -#if CYTHON_COMPILING_IN_PYPY - if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) -#else - if (is_list || PySequence_Check(o)) -#endif - { - return PySequence_SetItem(o, i, v); - } -#endif - return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); -} - -/* ArgTypeTest */ -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) -{ - __Pyx_TypeName type_name; - __Pyx_TypeName obj_type_name; - 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; - } - type_name = __Pyx_PyType_GetName(type); - obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj)); - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME - ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name); - __Pyx_DECREF_TypeName(type_name); - __Pyx_DECREF_TypeName(obj_type_name); - return 0; -} - -/* ReRaiseException */ -static CYTHON_INLINE void __Pyx_ReraiseException(void) { - PyObject *type = NULL, *value = NULL, *tb = NULL; -#if CYTHON_FAST_THREAD_STATE - PyThreadState *tstate = PyThreadState_GET(); - #if CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); - value = exc_info->exc_value; - #if PY_VERSION_HEX >= 0x030B00a4 - if (unlikely(value == Py_None)) { - value = NULL; - } else if (value) { - Py_INCREF(value); - type = (PyObject*) Py_TYPE(value); - Py_INCREF(type); - tb = PyException_GetTraceback(value); - } - #else - type = exc_info->exc_type; - tb = exc_info->exc_traceback; - Py_XINCREF(type); - Py_XINCREF(value); - Py_XINCREF(tb); - #endif - #else - type = tstate->exc_type; - value = tstate->exc_value; - tb = tstate->exc_traceback; - Py_XINCREF(type); - Py_XINCREF(value); - Py_XINCREF(tb); - #endif -#else - PyErr_GetExcInfo(&type, &value, &tb); -#endif - if (unlikely(!type || type == Py_None)) { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(tb); - PyErr_SetString(PyExc_RuntimeError, - "No active exception to reraise"); - } else { - PyErr_Restore(type, value, tb); - } -} - -/* PyObjectFormat */ -#if CYTHON_USE_UNICODE_WRITER -static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { - int ret; - _PyUnicodeWriter writer; - if (likely(PyFloat_CheckExact(obj))) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 - _PyUnicodeWriter_Init(&writer, 0); -#else - _PyUnicodeWriter_Init(&writer); -#endif - ret = _PyFloat_FormatAdvancedWriter( - &writer, - obj, - format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); - } else if (likely(PyLong_CheckExact(obj))) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 - _PyUnicodeWriter_Init(&writer, 0); -#else - _PyUnicodeWriter_Init(&writer); -#endif - ret = _PyLong_FormatAdvancedWriter( - &writer, - obj, - format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); - } else { - return PyObject_Format(obj, format_spec); - } - if (unlikely(ret == -1)) { - _PyUnicodeWriter_Dealloc(&writer); - return NULL; - } - return _PyUnicodeWriter_Finish(&writer); -} -#endif - -/* CIntToPyUnicode */ -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_RFCTYPE(RFCTYPE value, Py_ssize_t width, char padding_char, char format_char) { - char digits[sizeof(RFCTYPE)*3+2]; - char *dpos, *end = digits + sizeof(RFCTYPE)*3+2; - const char *hex_digits = DIGITS_HEX; - Py_ssize_t length, ulength; - int prepend_sign, last_one_off; - RFCTYPE remaining; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFCTYPE neg_one = (RFCTYPE) -1, const_zero = (RFCTYPE) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (format_char == 'X') { - hex_digits += 16; - format_char = 'x'; - } - remaining = value; - last_one_off = 0; - dpos = end; - do { - int digit_pos; - switch (format_char) { - case 'o': - digit_pos = abs((int)(remaining % (8*8))); - remaining = (RFCTYPE) (remaining / (8*8)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); - last_one_off = (digit_pos < 8); - break; - case 'd': - digit_pos = abs((int)(remaining % (10*10))); - remaining = (RFCTYPE) (remaining / (10*10)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); - last_one_off = (digit_pos < 10); - break; - case 'x': - *(--dpos) = hex_digits[abs((int)(remaining % 16))]; - remaining = (RFCTYPE) (remaining / 16); - break; - default: - assert(0); - break; - } - } while (unlikely(remaining != 0)); - assert(!last_one_off || *dpos == '0'); - dpos += last_one_off; - 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 PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { - PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); - if (unlikely(!selfless_args)) return NULL; - PyObject *result = PyObject_Call(method, selfless_args, kwargs); - Py_DECREF(selfless_args); - return result; -} -static PyMethodDef __Pyx_UnboundCMethod_Def = { - "CythonUnboundCMethod", - __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), - METH_VARARGS | METH_KEYWORDS, - NULL -}; -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))) - #else - if (likely(!PyCFunction_Check(method))) - #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); - } else -#endif -#if defined(CYTHON_COMPILING_IN_PYPY) -#elif PY_VERSION_HEX >= 0x03090000 - if (PyCFunction_CheckExact(method)) -#else - if (PyCFunction_Check(method)) -#endif - { - PyObject *self; - int self_found; -#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY - self = PyObject_GetAttrString(method, "__self__"); - if (!self) { - PyErr_Clear(); - } -#else - self = PyCFunction_GET_SELF(method); -#endif - self_found = (self && self != Py_None); -#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY - Py_XDECREF(self); -#endif - if (self_found) { - PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); - if (unlikely(!unbound_method)) return -1; - Py_DECREF(method); - target->method = unbound_method; - } - } - return 0; -} - -/* CallUnboundCMethod1 */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { - if (likely(cfunc->func)) { - int flag = cfunc->flag; - if (flag == METH_O) { - return (*(cfunc->func))(self, arg); - } else if ((PY_VERSION_HEX >= 0x030600B1) && flag == METH_FASTCALL) { - #if PY_VERSION_HEX >= 0x030700A0 - return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); - #else - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); - #endif - } else if ((PY_VERSION_HEX >= 0x030700A0) && flag == (METH_FASTCALL | METH_KEYWORDS)) { - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); - } - } - return __Pyx__CallUnboundCMethod1(cfunc, self, arg); -} -#endif -static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ - PyObject *args, *result = NULL; - if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; -#if CYTHON_COMPILING_IN_CPYTHON - if (cfunc->func && (cfunc->flag & METH_VARARGS)) { - args = PyTuple_New(1); - if (unlikely(!args)) goto bad; - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 0, arg); - if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); - else - result = (*cfunc->func)(self, args); - } else { - args = PyTuple_New(2); - if (unlikely(!args)) goto bad; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 1, arg); - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); - } -#else - args = PyTuple_Pack(2, self, arg); - if (unlikely(!args)) goto bad; - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); -#endif -bad: - Py_XDECREF(args); - return result; -} - -/* CallUnboundCMethod2 */ -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 -static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { - if (likely(cfunc->func)) { - PyObject *args[2] = {arg1, arg2}; - if (cfunc->flag == METH_FASTCALL) { - #if PY_VERSION_HEX >= 0x030700A0 - return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); - #else - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); - #endif - } - #if PY_VERSION_HEX >= 0x030700A0 - if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); - #endif - } - return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); -} -#endif -static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ - PyObject *args, *result = NULL; - if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; -#if CYTHON_COMPILING_IN_CPYTHON - if (cfunc->func && (cfunc->flag & METH_VARARGS)) { - args = PyTuple_New(2); - if (unlikely(!args)) goto bad; - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 0, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 1, arg2); - if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); - else - result = (*cfunc->func)(self, args); - } else { - args = PyTuple_New(3); - if (unlikely(!args)) goto bad; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 1, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 2, arg2); - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); - } -#else - args = PyTuple_Pack(3, self, arg1, arg2); - if (unlikely(!args)) goto bad; - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); -#endif -bad: - Py_XDECREF(args); - return result; -} - -/* dict_getitem_default */ -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { - PyObject* value; -#if PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000) - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - value = default_value; - } - Py_INCREF(value); - if ((1)); -#else - if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - value = default_value; - } - Py_INCREF(value); - } -#endif - else { - if (default_value == Py_None) - value = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyDict_Type_get, d, key); - else - value = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyDict_Type_get, d, key, default_value); - } - return value; -} - -/* PyIntCompare */ -static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) { - CYTHON_MAYBE_UNUSED_VAR(intval); - CYTHON_UNUSED_VAR(inplace); - if (op1 == op2) { - return 1; - } - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(op1))) { - const long b = intval; - long a = PyInt_AS_LONG(op1); - return (a == b); - } - #endif - #if CYTHON_USE_PYLONG_INTERNALS - if (likely(PyLong_CheckExact(op1))) { - int unequal; - unsigned long uintval; - Py_ssize_t size = __Pyx_PyLong_DigitCount(op1); - const digit* digits = __Pyx_PyLong_Digits(op1); - if (intval == 0) { - return (__Pyx_PyLong_IsZero(op1) == 1); - } else if (intval < 0) { - if (__Pyx_PyLong_IsNonNeg(op1)) - return 0; - intval = -intval; - } else { - if (__Pyx_PyLong_IsNeg(op1)) - return 0; - } - 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)); - return (unequal == 0); - } - #endif - if (PyFloat_CheckExact(op1)) { - const long b = intval; -#if CYTHON_COMPILING_IN_LIMITED_API - double a = __pyx_PyFloat_AsDouble(op1); -#else - double a = PyFloat_AS_DOUBLE(op1); -#endif - return ((double)a == (double)b); - } - return __Pyx_PyObject_IsTrueAndDecref( - PyObject_RichCompare(op1, op2, Py_EQ)); -} - -/* PyIntBinop */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) { - CYTHON_MAYBE_UNUSED_VAR(intval); - CYTHON_MAYBE_UNUSED_VAR(inplace); - CYTHON_UNUSED_VAR(zerodivision_check); - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(op1))) { - const long b = intval; - long a = PyInt_AS_LONG(op1); - -#ifdef HAVE_LONG_LONG - if (sizeof(PY_LONG_LONG) > sizeof(long)) { - PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b; - return (result >= LONG_MIN && result <= LONG_MAX) ? - PyInt_FromLong((long)result) : PyLong_FromLongLong(result); - } -#endif -#if CYTHON_USE_TYPE_SLOTS - return PyInt_Type.tp_as_number->nb_multiply(op1, op2); -#else - return PyNumber_Multiply(op1, op2); -#endif - } - #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 - if (unlikely(__Pyx_PyLong_IsZero(op1))) { - return __Pyx_NewRef(op1); - } - if (likely(__Pyx_PyLong_IsCompact(op1))) { - a = __Pyx_PyLong_CompactValue(op1); - } else { - const digit* digits = __Pyx_PyLong_Digits(op1); - const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1); - switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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+30) { - 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_multiply(op1, op2); - } - } - CYTHON_UNUSED_VAR(a); - CYTHON_UNUSED_VAR(b); - #ifdef HAVE_LONG_LONG - lla = a; - goto long_long; - #else - return PyLong_Type.tp_as_number->nb_multiply(op1, op2); - #endif - 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; -#if CYTHON_COMPILING_IN_LIMITED_API - double a = __pyx_PyFloat_AsDouble(op1); -#else - double a = PyFloat_AS_DOUBLE(op1); -#endif - double result; - - PyFPE_START_PROTECT("multiply", return NULL) - result = ((double)a) * (double)b; - PyFPE_END_PROTECT(result) - return PyFloat_FromDouble(result); - } - return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2); -} -#endif - -/* 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); - } -} - -/* ValidateBasesTuple */ -#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS -static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { - Py_ssize_t i, n = PyTuple_GET_SIZE(bases); - for (i = 1; i < n; i++) - { - PyObject *b0 = PyTuple_GET_ITEM(bases, i); - PyTypeObject *b; -#if PY_MAJOR_VERSION < 3 - if (PyClass_Check(b0)) - { - PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", - PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); - return -1; - } -#endif - b = (PyTypeObject*) b0; - if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) - { - __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); - PyErr_Format(PyExc_TypeError, - "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); - __Pyx_DECREF_TypeName(b_name); - return -1; - } - if (dictoffset == 0 && b->tp_dictoffset) - { - __Pyx_TypeName b_name = __Pyx_PyType_GetName(b); - PyErr_Format(PyExc_TypeError, - "extension type '%.200s' has no __dict__ slot, " - "but base type '" __Pyx_FMT_TYPENAME "' has: " - "either add 'cdef dict __dict__' to the extension type " - "or add '__slots__ = [...]' to the base type", - type_name, b_name); - __Pyx_DECREF_TypeName(b_name); - return -1; - } - } - return 0; -} -#endif - -/* PyType_Ready */ -static int __Pyx_PyType_Ready(PyTypeObject *t) { -#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION) - (void)__Pyx_PyObject_CallMethod0; -#if CYTHON_USE_TYPE_SPECS - (void)__Pyx_validate_bases_tuple; -#endif - return PyType_Ready(t); -#else - int r; - PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); - if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) - return -1; -#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) - { - int gc_was_enabled; - #if PY_VERSION_HEX >= 0x030A00b1 - gc_was_enabled = PyGC_Disable(); - (void)__Pyx_PyObject_CallMethod0; - #else - PyObject *ret, *py_status; - PyObject *gc = NULL; - #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) - gc = PyImport_GetModule(__pyx_kp_u_gc); - #endif - if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc); - if (unlikely(!gc)) return -1; - py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled); - if (unlikely(!py_status)) { - Py_DECREF(gc); - return -1; - } - gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); - Py_DECREF(py_status); - if (gc_was_enabled > 0) { - ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable); - if (unlikely(!ret)) { - Py_DECREF(gc); - return -1; - } - Py_DECREF(ret); - } else if (unlikely(gc_was_enabled == -1)) { - Py_DECREF(gc); - return -1; - } - #endif - t->tp_flags |= Py_TPFLAGS_HEAPTYPE; -#if PY_VERSION_HEX >= 0x030A0000 - t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; -#endif -#else - (void)__Pyx_PyObject_CallMethod0; -#endif - r = PyType_Ready(t); -#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) - t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; - #if PY_VERSION_HEX >= 0x030A00b1 - if (gc_was_enabled) - PyGC_Enable(); - #else - if (gc_was_enabled) { - PyObject *tp, *v, *tb; - PyErr_Fetch(&tp, &v, &tb); - ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable); - if (likely(ret || r == -1)) { - Py_XDECREF(ret); - PyErr_Restore(tp, v, tb); - } else { - Py_XDECREF(tp); - Py_XDECREF(v); - Py_XDECREF(tb); - r = -1; - } - } - Py_DECREF(gc); - #endif - } -#endif - return r; -#endif -} - -/* PyObject_GenericGetAttrNoDict */ -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 -static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { - __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp); - PyErr_Format(PyExc_AttributeError, -#if PY_MAJOR_VERSION >= 3 - "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", - type_name, attr_name); -#else - "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'", - type_name, PyString_AS_STRING(attr_name)); -#endif - __Pyx_DECREF_TypeName(type_name); - 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 - -/* SetupReduce */ -#if !CYTHON_COMPILING_IN_LIMITED_API -static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; - PyObject *name_attr; - name_attr = __Pyx_PyObject_GetAttrStrNoError(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_GetAttrStrNoError(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()) { - __Pyx_TypeName type_obj_name = - __Pyx_PyType_GetName((PyTypeObject*)type_obj); - PyErr_Format(PyExc_RuntimeError, - "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); - __Pyx_DECREF_TypeName(type_obj_name); - } - ret = -1; -__PYX_GOOD: -#if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); - Py_XDECREF(object_getstate); - Py_XDECREF(getstate); -#endif - Py_XDECREF(reduce); - Py_XDECREF(reduce_ex); - Py_XDECREF(reduce_cython); - Py_XDECREF(setstate); - Py_XDECREF(setstate_cython); - return ret; -} -#endif - -/* SetVTable */ -static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { - PyObject *ob = PyCapsule_New(vtable, 0, 0); - if (unlikely(!ob)) - goto bad; -#if CYTHON_COMPILING_IN_LIMITED_API - if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0)) -#else - if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0)) -#endif - goto bad; - Py_DECREF(ob); - return 0; -bad: - Py_XDECREF(ob); - return -1; -} - -/* GetVTable */ -static void* __Pyx_GetVtable(PyTypeObject *type) { - void* ptr; -#if CYTHON_COMPILING_IN_LIMITED_API - PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable); -#else - PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable); -#endif - if (!ob) - goto bad; - ptr = PyCapsule_GetPointer(ob, 0); - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} - -/* MergeVTables */ -#if !CYTHON_COMPILING_IN_LIMITED_API -static int __Pyx_MergeVtables(PyTypeObject *type) { - int i; - void** base_vtables; - __Pyx_TypeName tp_base_name; - __Pyx_TypeName base_name; - void* unknown = (void*)-1; - PyObject* bases = type->tp_bases; - int base_depth = 0; - { - PyTypeObject* base = type->tp_base; - while (base) { - base_depth += 1; - base = base->tp_base; - } - } - base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); - base_vtables[0] = unknown; - for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { - void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))); - if (base_vtable != NULL) { - int j; - PyTypeObject* base = type->tp_base; - for (j = 0; j < base_depth; j++) { - if (base_vtables[j] == unknown) { - base_vtables[j] = __Pyx_GetVtable(base); - base_vtables[j + 1] = unknown; - } - if (base_vtables[j] == base_vtable) { - break; - } else if (base_vtables[j] == NULL) { - goto bad; - } - base = base->tp_base; - } - } - } - PyErr_Clear(); - free(base_vtables); - return 0; -bad: - tp_base_name = __Pyx_PyType_GetName(type->tp_base); - base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i)); - PyErr_Format(PyExc_TypeError, - "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); - __Pyx_DECREF_TypeName(tp_base_name); - __Pyx_DECREF_TypeName(base_name); - free(base_vtables); - return -1; -} -#endif - -/* Import */ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - PyObject *module = 0; - PyObject *empty_dict = 0; - PyObject *empty_list = 0; - #if PY_MAJOR_VERSION < 3 - PyObject *py_import; - py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); - if (unlikely(!py_import)) - goto bad; - if (!from_list) { - empty_list = PyList_New(0); - if (unlikely(!empty_list)) - goto bad; - from_list = empty_list; - } - #endif - empty_dict = PyDict_New(); - if (unlikely(!empty_dict)) - goto bad; - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { - if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - #if CYTHON_COMPILING_IN_LIMITED_API - module = PyImport_ImportModuleLevelObject( - name, empty_dict, empty_dict, from_list, 1); - #else - module = PyImport_ImportModuleLevelObject( - name, __pyx_d, empty_dict, from_list, 1); - #endif - if (unlikely(!module)) { - if (unlikely(!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 (unlikely(!py_level)) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL); - Py_DECREF(py_level); - #else - #if CYTHON_COMPILING_IN_LIMITED_API - module = PyImport_ImportModuleLevelObject( - name, empty_dict, empty_dict, from_list, level); - #else - module = PyImport_ImportModuleLevelObject( - name, __pyx_d, empty_dict, from_list, level); - #endif - #endif - } - } -bad: - Py_XDECREF(empty_dict); - Py_XDECREF(empty_list); - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(py_import); - #endif - return module; -} - -/* ImportDottedModule */ -#if PY_MAJOR_VERSION >= 3 -static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) { - PyObject *partial_name = NULL, *slice = NULL, *sep = NULL; - if (unlikely(PyErr_Occurred())) { - PyErr_Clear(); - } - if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) { - partial_name = name; - } else { - slice = PySequence_GetSlice(parts_tuple, 0, count); - if (unlikely(!slice)) - goto bad; - sep = PyUnicode_FromStringAndSize(".", 1); - if (unlikely(!sep)) - goto bad; - partial_name = PyUnicode_Join(sep, slice); - } - PyErr_Format( -#if PY_MAJOR_VERSION < 3 - PyExc_ImportError, - "No module named '%s'", PyString_AS_STRING(partial_name)); -#else -#if PY_VERSION_HEX >= 0x030600B1 - PyExc_ModuleNotFoundError, -#else - PyExc_ImportError, -#endif - "No module named '%U'", partial_name); -#endif -bad: - Py_XDECREF(sep); - Py_XDECREF(slice); - Py_XDECREF(partial_name); - return NULL; -} -#endif -#if PY_MAJOR_VERSION >= 3 -static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) { - PyObject *imported_module; -#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) - PyObject *modules = PyImport_GetModuleDict(); - if (unlikely(!modules)) - return NULL; - imported_module = __Pyx_PyDict_GetItemStr(modules, name); - Py_XINCREF(imported_module); -#else - imported_module = PyImport_GetModule(name); -#endif - return imported_module; -} -#endif -#if PY_MAJOR_VERSION >= 3 -static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) { - Py_ssize_t i, nparts; - nparts = PyTuple_GET_SIZE(parts_tuple); - for (i=1; i < nparts && module; i++) { - PyObject *part, *submodule; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - part = PyTuple_GET_ITEM(parts_tuple, i); -#else - part = PySequence_ITEM(parts_tuple, i); -#endif - submodule = __Pyx_PyObject_GetAttrStrNoError(module, part); -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(part); -#endif - Py_DECREF(module); - module = submodule; - } - if (unlikely(!module)) { - return __Pyx__ImportDottedModule_Error(name, parts_tuple, i); - } - return module; -} -#endif -static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) { -#if PY_MAJOR_VERSION < 3 - PyObject *module, *from_list, *star = __pyx_n_s__41; - CYTHON_UNUSED_VAR(parts_tuple); - from_list = PyList_New(1); - if (unlikely(!from_list)) - return NULL; - Py_INCREF(star); - PyList_SET_ITEM(from_list, 0, star); - module = __Pyx_Import(name, from_list, 0); - Py_DECREF(from_list); - return module; -#else - PyObject *imported_module; - PyObject *module = __Pyx_Import(name, NULL, 0); - if (!parts_tuple || unlikely(!module)) - return module; - imported_module = __Pyx__ImportDottedModule_Lookup(name); - if (likely(imported_module)) { - Py_DECREF(module); - return imported_module; - } - PyErr_Clear(); - return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple); -#endif -} -static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1 - PyObject *module = __Pyx__ImportDottedModule_Lookup(name); - if (likely(module)) { - PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec); - if (likely(spec)) { - PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing); - if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) { - Py_DECREF(spec); - spec = NULL; - } - Py_XDECREF(unsafe); - } - if (likely(!spec)) { - PyErr_Clear(); - return module; - } - Py_DECREF(spec); - Py_DECREF(module); - } else if (PyErr_Occurred()) { - PyErr_Clear(); - } -#endif - return __Pyx__ImportDottedModule(name, parts_tuple); -} - -/* ImportFrom */ -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { - PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); - if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { - const char* module_name_str = 0; - PyObject* module_name = 0; - PyObject* module_dot = 0; - PyObject* full_name = 0; - PyErr_Clear(); - module_name_str = PyModule_GetName(module); - if (unlikely(!module_name_str)) { goto modbad; } - module_name = PyUnicode_FromString(module_name_str); - if (unlikely(!module_name)) { goto modbad; } - module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__21); - if (unlikely(!module_dot)) { goto modbad; } - full_name = PyUnicode_Concat(module_dot, name); - if (unlikely(!full_name)) { goto modbad; } - #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) - { - PyObject *modules = PyImport_GetModuleDict(); - if (unlikely(!modules)) - goto modbad; - value = PyObject_GetItem(modules, full_name); - } - #else - value = PyImport_GetModule(full_name); - #endif - modbad: - Py_XDECREF(full_name); - Py_XDECREF(module_dot); - Py_XDECREF(module_name); - } - if (unlikely(!value)) { - 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; -} - -/* Py3UpdateBases */ -static PyObject* -__Pyx_PEP560_update_bases(PyObject *bases) -{ - Py_ssize_t i, j, size_bases; - PyObject *base, *meth, *new_base, *result, *new_bases = NULL; - size_bases = PyTuple_GET_SIZE(bases); - for (i = 0; i < size_bases; i++) { - base = PyTuple_GET_ITEM(bases, i); - if (PyType_Check(base)) { - if (new_bases) { - if (PyList_Append(new_bases, base) < 0) { - goto error; - } - } - continue; - } - meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries); - if (!meth && PyErr_Occurred()) { - goto error; - } - if (!meth) { - if (new_bases) { - if (PyList_Append(new_bases, base) < 0) { - goto error; - } - } - continue; - } - new_base = __Pyx_PyObject_CallOneArg(meth, bases); - Py_DECREF(meth); - if (!new_base) { - goto error; - } - if (!PyTuple_Check(new_base)) { - PyErr_SetString(PyExc_TypeError, - "__mro_entries__ must return a tuple"); - Py_DECREF(new_base); - goto error; - } - if (!new_bases) { - if (!(new_bases = PyList_New(i))) { - goto error; - } - for (j = 0; j < i; j++) { - base = PyTuple_GET_ITEM(bases, j); - PyList_SET_ITEM(new_bases, j, base); - Py_INCREF(base); - } - } - j = PyList_GET_SIZE(new_bases); - if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { - goto error; - } - Py_DECREF(new_base); - } - if (!new_bases) { - Py_INCREF(bases); - return bases; - } - result = PyList_AsTuple(new_bases); - Py_DECREF(new_bases); - return result; -error: - Py_XDECREF(new_bases); - return NULL; -} - -/* 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; -} - -/* PyObjectLookupSpecial */ -#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { - PyObject *res; - PyTypeObject *tp = Py_TYPE(obj); -#if PY_MAJOR_VERSION < 3 - if (unlikely(PyInstance_Check(obj))) - return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name); -#endif - res = _PyType_Lookup(tp, attr_name); - if (likely(res)) { - descrgetfunc f = Py_TYPE(res)->tp_descr_get; - if (!f) { - Py_INCREF(res); - } else { - res = f(res, obj, (PyObject *)tp); - } - } else if (with_error) { - PyErr_SetObject(PyExc_AttributeError, attr_name); - } - return res; -} -#endif - -/* Py3ClassCreate */ -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, - PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { - PyObject *ns; - if (metaclass) { - PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare); - if (prep) { - PyObject *pargs[3] = {NULL, name, bases}; - ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); - Py_DECREF(prep); - } else { - if (unlikely(PyErr_Occurred())) - return NULL; - ns = PyDict_New(); - } - } else { - ns = PyDict_New(); - } - if (unlikely(!ns)) - return NULL; - if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; -#if PY_VERSION_HEX >= 0x03030000 - if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; -#else - CYTHON_MAYBE_UNUSED_VAR(qualname); -#endif - if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; - return ns; -bad: - Py_DECREF(ns); - return NULL; -} -#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS -static int __Pyx_SetNamesPEP487(PyObject *type_obj) { - PyTypeObject *type = (PyTypeObject*) type_obj; - PyObject *names_to_set, *key, *value, *set_name, *tmp; - Py_ssize_t i = 0; -#if CYTHON_USE_TYPE_SLOTS - names_to_set = PyDict_Copy(type->tp_dict); -#else - { - PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict); - names_to_set = NULL; - if (likely(d)) { - PyObject *names_to_set = PyDict_New(); - int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1; - Py_DECREF(d); - if (unlikely(ret < 0)) - Py_CLEAR(names_to_set); - } - } -#endif - if (unlikely(names_to_set == NULL)) - goto bad; - while (PyDict_Next(names_to_set, &i, &key, &value)) { - set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name); - if (unlikely(set_name != NULL)) { - tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key); - Py_DECREF(set_name); - if (unlikely(tmp == NULL)) { - __Pyx_TypeName value_type_name = - __Pyx_PyType_GetName(Py_TYPE(value)); - __Pyx_TypeName type_name = __Pyx_PyType_GetName(type); - PyErr_Format(PyExc_RuntimeError, -#if PY_MAJOR_VERSION >= 3 - "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'", - value_type_name, key, type_name); -#else - "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'", - value_type_name, - PyString_Check(key) ? PyString_AS_STRING(key) : "?", - type_name); -#endif - goto bad; - } else { - Py_DECREF(tmp); - } - } - else if (unlikely(PyErr_Occurred())) { - goto bad; - } - } - Py_DECREF(names_to_set); - return 0; -bad: - Py_XDECREF(names_to_set); - return -1; -} -static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) { -#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyTypeObject *type = (PyTypeObject*) type_obj; - PyObject *mro = type->tp_mro; - Py_ssize_t i, nbases; - if (unlikely(!mro)) goto done; - (void) &__Pyx_GetBuiltinName; - Py_INCREF(mro); - nbases = PyTuple_GET_SIZE(mro); - assert(PyTuple_GET_ITEM(mro, 0) == type_obj); - for (i = 1; i < nbases-1; i++) { - PyObject *base, *dict, *meth; - base = PyTuple_GET_ITEM(mro, i); - dict = ((PyTypeObject *)base)->tp_dict; - meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass); - if (unlikely(meth)) { - descrgetfunc f = Py_TYPE(meth)->tp_descr_get; - PyObject *res; - Py_INCREF(meth); - if (likely(f)) { - res = f(meth, NULL, type_obj); - Py_DECREF(meth); - if (unlikely(!res)) goto bad; - meth = res; - } - res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw); - Py_DECREF(meth); - if (unlikely(!res)) goto bad; - Py_DECREF(res); - goto done; - } else if (unlikely(PyErr_Occurred())) { - goto bad; - } - } -done: - Py_XDECREF(mro); - return type_obj; -bad: - Py_XDECREF(mro); - Py_DECREF(type_obj); - return NULL; -#else - PyObject *super_type, *super, *func, *res; -#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) - super_type = __Pyx_GetBuiltinName(__pyx_n_s_super); -#else - super_type = (PyObject*) &PySuper_Type; - (void) &__Pyx_GetBuiltinName; -#endif - super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL; -#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type) - Py_XDECREF(super_type); -#endif - if (unlikely(!super)) { - Py_CLEAR(type_obj); - goto done; - } - func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass); - Py_DECREF(super); - if (likely(!func)) { - if (unlikely(PyErr_Occurred())) - Py_CLEAR(type_obj); - goto done; - } - res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw); - Py_DECREF(func); - if (unlikely(!res)) - Py_CLEAR(type_obj); - Py_XDECREF(res); -done: - return type_obj; -#endif -} -#endif -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, - PyObject *dict, PyObject *mkw, - int calculate_metaclass, int allow_py2_metaclass) { - PyObject *result; - PyObject *owned_metaclass = NULL; - PyObject *margs[4] = {NULL, name, bases, dict}; - if (allow_py2_metaclass) { - owned_metaclass = PyObject_GetItem(dict, __pyx_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; - } - result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, -#if PY_VERSION_HEX < 0x030600A4 - (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw -#else - mkw -#endif - ); - Py_XDECREF(owned_metaclass); -#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS - if (likely(result) && likely(PyType_Check(result))) { - if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) { - Py_CLEAR(result); - } else { - result = __Pyx_InitSubclassPEP487(result, mkw); - } - } -#else - (void) &__Pyx_GetBuiltinName; -#endif - return result; -} - -/* GetNameInClass */ -static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { - PyObject *result; - PyObject *dict; - assert(PyType_Check(nmspace)); -#if CYTHON_USE_TYPE_SLOTS - dict = ((PyTypeObject*)nmspace)->tp_dict; - Py_XINCREF(dict); -#else - dict = PyObject_GetAttr(nmspace, __pyx_n_s_dict); -#endif - if (likely(dict)) { - result = PyObject_GetItem(dict, name); - Py_DECREF(dict); - if (result) { - return result; - } - } - PyErr_Clear(); - __Pyx_GetModuleGlobalNameUncached(result, name); - return result; -} - -/* CLineInTraceback */ -#ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; -#if CYTHON_COMPILING_IN_CPYTHON - PyObject **cython_runtime_dict; -#endif - CYTHON_MAYBE_UNUSED_VAR(tstate); - 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_GetAttrStrNoError(__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 */ -#if !CYTHON_COMPILING_IN_LIMITED_API -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); -} -#endif - -/* 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 -#if CYTHON_COMPILING_IN_LIMITED_API -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename) { - if (c_line) { - (void) __pyx_cfilenm; - (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); - } - _PyTraceback_Add(funcname, filename, py_line); -} -#else -static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = NULL; - PyObject *py_funcname = NULL; - #if 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, - 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); -} -#endif - -/* CIntFromPyVerify */ -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ - {\ - func_type value = func_value;\ - if (sizeof(target_type) < sizeof(func_type)) {\ - if (unlikely(value != (func_type) (target_type) value)) {\ - func_type zero = 0;\ - if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ - return (target_type) -1;\ - if (is_unsigned && unlikely(value < zero))\ - goto raise_neg_overflow;\ - else\ - goto raise_overflow;\ - }\ - }\ - return (target_type) value;\ - } - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_DIRECTION(RFC_DIRECTION value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_DIRECTION neg_one = (RFC_DIRECTION) -1, const_zero = (RFC_DIRECTION) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_DIRECTION) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_DIRECTION) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_DIRECTION) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_DIRECTION) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_DIRECTION) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_DIRECTION), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFCTYPE(RFCTYPE value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFCTYPE neg_one = (RFCTYPE) -1, const_zero = (RFCTYPE) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFCTYPE) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFCTYPE) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFCTYPE) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFCTYPE) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFCTYPE) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFCTYPE), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_UNIT_STATE(RFC_UNIT_STATE value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_UNIT_STATE neg_one = (RFC_UNIT_STATE) -1, const_zero = (RFC_UNIT_STATE) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_UNIT_STATE) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_UNIT_STATE) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_UNIT_STATE) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_UNIT_STATE) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_UNIT_STATE) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_UNIT_STATE), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_RC(RFC_RC value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_RC neg_one = (RFC_RC) -1, const_zero = (RFC_RC) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_RC) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_RC) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_RC) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_RC) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_RC) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_RC), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_CALL_TYPE(RFC_CALL_TYPE value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_CALL_TYPE neg_one = (RFC_CALL_TYPE) -1, const_zero = (RFC_CALL_TYPE) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_CALL_TYPE) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_CALL_TYPE) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_CALL_TYPE) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_CALL_TYPE) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_CALL_TYPE) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_CALL_TYPE), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(unsigned int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(unsigned int) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(unsigned int), - little, !is_unsigned); - } -} - -/* CIntFromPy */ -static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if ((sizeof(size_t) < sizeof(long))) { - __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (size_t) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) >= 2 * PyLong_SHIFT)) { - return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) >= 3 * PyLong_SHIFT)) { - return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) >= 4 * PyLong_SHIFT)) { - return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (size_t) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(size_t) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x)) -#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 - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(size_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { - return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); - } - } - break; - case 2: - if ((8 * sizeof(size_t) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { - return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); - } - } - break; - case -3: - if ((8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { - return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); - } - } - break; - case 3: - if ((8 * sizeof(size_t) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { - return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); - } - } - break; - case -4: - if ((8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { - return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); - } - } - break; - case 4: - if ((8 * sizeof(size_t) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT)) { - return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]))); - } - } - break; - } - } -#endif - if ((sizeof(size_t) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x)) -#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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (size_t) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (size_t) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (size_t) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (size_t) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (size_t) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(size_t) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((size_t) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(size_t) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((size_t) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((size_t) 1) << (sizeof(size_t) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - return (size_t) -1; - } - } else { - size_t val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (size_t) -1; - val = __Pyx_PyInt_As_size_t(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to size_t"); - return (size_t) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to size_t"); - return (size_t) -1; -} - -/* CIntFromPy */ -static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if ((sizeof(unsigned int) < sizeof(long))) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (unsigned int) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT)) { - return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT)) { - return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) >= 4 * PyLong_SHIFT)) { - return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (unsigned int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(unsigned int) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x)) -#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 - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(unsigned int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { - return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } - } - break; - case 2: - if ((8 * sizeof(unsigned int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { - return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } - } - break; - case -3: - if ((8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { - return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } - } - break; - case 3: - if ((8 * sizeof(unsigned int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { - return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } - } - break; - case -4: - if ((8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { - return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } - } - break; - case 4: - if ((8 * sizeof(unsigned int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(unsigned int) - 1 > 4 * PyLong_SHIFT)) { - return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]))); - } - } - break; - } - } -#endif - if ((sizeof(unsigned int) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x)) -#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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (unsigned int) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (unsigned int) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (unsigned int) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (unsigned int) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (unsigned int) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(unsigned int) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((unsigned int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(unsigned int) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((unsigned int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((unsigned int) 1) << (sizeof(unsigned int) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - 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 - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { - return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { - return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { - return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(int) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -#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 - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { - return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: - if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { - return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: - if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { - return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: - if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { - return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: - if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { - return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: - if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { - return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - } -#endif - if ((sizeof(int) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -#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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (int) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (int) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (int) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (int) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (int) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((int) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - return (int) -1; - } - } else { - int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to int"); - return (int) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const int neg_one = (int) -1, const_zero = (int) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } -} - -/* CIntFromPy */ -static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *x) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const short neg_one = (short) -1, const_zero = (short) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if ((sizeof(short) < sizeof(long))) { - __PYX_VERIFY_RETURN_INT(short, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (short) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(short, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(short) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(short) >= 2 * PyLong_SHIFT)) { - return (short) (((((short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(short) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(short) >= 3 * PyLong_SHIFT)) { - return (short) (((((((short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(short) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(short, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(short) >= 4 * PyLong_SHIFT)) { - return (short) (((((((((short)digits[3]) << PyLong_SHIFT) | (short)digits[2]) << PyLong_SHIFT) | (short)digits[1]) << PyLong_SHIFT) | (short)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (short) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(short) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(short, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(short) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(short, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(short, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (short) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (short) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (short) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (short) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (short) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(short) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((short) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(short) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((short) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((short) 1) << (sizeof(short) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - return (short) -1; - } - } else { - short val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (short) -1; - val = __Pyx_PyInt_As_short(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to short"); - return (short) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to short"); - return (short) -1; -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const long neg_one = (long) -1, const_zero = (long) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } -} - -/* CIntFromPy */ -static CYTHON_INLINE RFC_RC __Pyx_PyInt_As_RFC_RC(PyObject *x) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_RC neg_one = (RFC_RC) -1, const_zero = (RFC_RC) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if ((sizeof(RFC_RC) < sizeof(long))) { - __PYX_VERIFY_RETURN_INT(RFC_RC, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (RFC_RC) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_RC, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(RFC_RC) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_RC) >= 2 * PyLong_SHIFT)) { - return (RFC_RC) (((((RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(RFC_RC) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_RC) >= 3 * PyLong_SHIFT)) { - return (RFC_RC) (((((((RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(RFC_RC) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_RC, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_RC) >= 4 * PyLong_SHIFT)) { - return (RFC_RC) (((((((((RFC_RC)digits[3]) << PyLong_SHIFT) | (RFC_RC)digits[2]) << PyLong_SHIFT) | (RFC_RC)digits[1]) << PyLong_SHIFT) | (RFC_RC)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_RC) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(RFC_RC) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_RC, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(RFC_RC) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_RC, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_RC, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available, cannot convert large enums"); - 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 - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFCTYPE, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(RFCTYPE) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFCTYPE) >= 2 * PyLong_SHIFT)) { - return (RFCTYPE) (((((RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(RFCTYPE) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFCTYPE) >= 3 * PyLong_SHIFT)) { - return (RFCTYPE) (((((((RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(RFCTYPE) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFCTYPE, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFCTYPE) >= 4 * PyLong_SHIFT)) { - return (RFCTYPE) (((((((((RFCTYPE)digits[3]) << PyLong_SHIFT) | (RFCTYPE)digits[2]) << PyLong_SHIFT) | (RFCTYPE)digits[1]) << PyLong_SHIFT) | (RFCTYPE)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFCTYPE) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(RFCTYPE) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(RFCTYPE, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(RFCTYPE) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(RFCTYPE, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFCTYPE, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available, cannot convert large enums"); - 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 - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(RFC_DIRECTION) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_DIRECTION) >= 2 * PyLong_SHIFT)) { - return (RFC_DIRECTION) (((((RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(RFC_DIRECTION) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_DIRECTION) >= 3 * PyLong_SHIFT)) { - return (RFC_DIRECTION) (((((((RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(RFC_DIRECTION) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_DIRECTION) >= 4 * PyLong_SHIFT)) { - return (RFC_DIRECTION) (((((((((RFC_DIRECTION)digits[3]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[2]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[1]) << PyLong_SHIFT) | (RFC_DIRECTION)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_DIRECTION) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(RFC_DIRECTION) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_DIRECTION, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(RFC_DIRECTION) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_DIRECTION, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_DIRECTION, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available, cannot convert large enums"); - return (RFC_DIRECTION) -1; - } else { - RFC_DIRECTION val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (RFC_DIRECTION) -1; - val = __Pyx_PyInt_As_RFC_DIRECTION(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to RFC_DIRECTION"); - return (RFC_DIRECTION) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to RFC_DIRECTION"); - return (RFC_DIRECTION) -1; -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_ULLONG(SAP_ULLONG value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const SAP_ULLONG neg_one = (SAP_ULLONG) -1, const_zero = (SAP_ULLONG) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(SAP_ULLONG) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(SAP_ULLONG) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(SAP_ULLONG) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(SAP_ULLONG) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(SAP_ULLONG) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(SAP_ULLONG), - little, !is_unsigned); - } -} - -/* CIntFromPy */ -static CYTHON_INLINE RFC_INT __Pyx_PyInt_As_RFC_INT(PyObject *x) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_INT neg_one = (RFC_INT) -1, const_zero = (RFC_INT) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if ((sizeof(RFC_INT) < sizeof(long))) { - __PYX_VERIFY_RETURN_INT(RFC_INT, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return (RFC_INT) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_INT, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(RFC_INT) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_INT) >= 2 * PyLong_SHIFT)) { - return (RFC_INT) (((((RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(RFC_INT) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_INT) >= 3 * PyLong_SHIFT)) { - return (RFC_INT) (((((((RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(RFC_INT) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_INT, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_INT) >= 4 * PyLong_SHIFT)) { - return (RFC_INT) (((((((((RFC_INT)digits[3]) << PyLong_SHIFT) | (RFC_INT)digits[2]) << PyLong_SHIFT) | (RFC_INT)digits[1]) << PyLong_SHIFT) | (RFC_INT)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_INT) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(RFC_INT) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_INT, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(RFC_INT) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_INT, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_INT, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (RFC_INT) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (RFC_INT) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_INT) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (RFC_INT) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (RFC_INT) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(RFC_INT) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((RFC_INT) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(RFC_INT) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((RFC_INT) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((RFC_INT) 1) << (sizeof(RFC_INT) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - 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 - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_INT8, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(RFC_INT8) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_INT8) >= 2 * PyLong_SHIFT)) { - return (RFC_INT8) (((((RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(RFC_INT8) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_INT8) >= 3 * PyLong_SHIFT)) { - return (RFC_INT8) (((((((RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(RFC_INT8) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_INT8, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_INT8) >= 4 * PyLong_SHIFT)) { - return (RFC_INT8) (((((((((RFC_INT8)digits[3]) << PyLong_SHIFT) | (RFC_INT8)digits[2]) << PyLong_SHIFT) | (RFC_INT8)digits[1]) << PyLong_SHIFT) | (RFC_INT8)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_INT8) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(RFC_INT8) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_INT8, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(RFC_INT8) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_INT8, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_INT8, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (RFC_INT8) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (RFC_INT8) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_INT8) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (RFC_INT8) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (RFC_INT8) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(RFC_INT8) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((RFC_INT8) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(RFC_INT8) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((RFC_INT8) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((RFC_INT8) 1) << (sizeof(RFC_INT8) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - 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 - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(RFC_ERROR_GROUP) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_ERROR_GROUP) >= 2 * PyLong_SHIFT)) { - return (RFC_ERROR_GROUP) (((((RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(RFC_ERROR_GROUP) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_ERROR_GROUP) >= 3 * PyLong_SHIFT)) { - return (RFC_ERROR_GROUP) (((((((RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(RFC_ERROR_GROUP) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(RFC_ERROR_GROUP) >= 4 * PyLong_SHIFT)) { - return (RFC_ERROR_GROUP) (((((((((RFC_ERROR_GROUP)digits[3]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[2]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[1]) << PyLong_SHIFT) | (RFC_ERROR_GROUP)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (RFC_ERROR_GROUP) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(RFC_ERROR_GROUP) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_ERROR_GROUP, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if ((sizeof(RFC_ERROR_GROUP) <= sizeof(unsigned PY_LONG_LONG))) { - __PYX_VERIFY_RETURN_INT_EXC(RFC_ERROR_GROUP, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { -#if CYTHON_USE_PYLONG_INTERNALS - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(RFC_ERROR_GROUP, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(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 - } - } - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available, cannot convert large enums"); - return (RFC_ERROR_GROUP) -1; - } else { - RFC_ERROR_GROUP val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (RFC_ERROR_GROUP) -1; - val = __Pyx_PyInt_As_RFC_ERROR_GROUP(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to RFC_ERROR_GROUP"); - return (RFC_ERROR_GROUP) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to RFC_ERROR_GROUP"); - return (RFC_ERROR_GROUP) -1; -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_SAP_RAW(SAP_RAW value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const SAP_RAW neg_one = (SAP_RAW) -1, const_zero = (SAP_RAW) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(SAP_RAW) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(SAP_RAW) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(SAP_RAW) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(SAP_RAW) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(SAP_RAW) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(SAP_RAW), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT(RFC_INT value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_INT neg_one = (RFC_INT) -1, const_zero = (RFC_INT) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_INT) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_INT) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_INT) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_INT) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_INT) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_INT), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT2(RFC_INT2 value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_INT2 neg_one = (RFC_INT2) -1, const_zero = (RFC_INT2) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_INT2) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_INT2) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_INT2) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_INT2) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_INT2) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_INT2), - little, !is_unsigned); - } -} - -/* CIntToPy */ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_RFC_INT8(RFC_INT8 value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const RFC_INT8 neg_one = (RFC_INT8) -1, const_zero = (RFC_INT8) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(RFC_INT8) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(RFC_INT8) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_INT8) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof(RFC_INT8) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof(RFC_INT8) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(RFC_INT8), - little, !is_unsigned); - } -} - -/* FormatTypeName */ -#if CYTHON_COMPILING_IN_LIMITED_API -static __Pyx_TypeName -__Pyx_PyType_GetName(PyTypeObject* tp) -{ - PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, - __pyx_n_s_name_2); - if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { - PyErr_Clear(); - Py_XSETREF(name, __Pyx_NewRef(__pyx_n_s__164)); - } - return name; -} -#endif - -/* 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 - if (unlikely(__Pyx_PyLong_IsNeg(x))) { - goto raise_neg_overflow; - } else if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_DigitCount(x)) { - case 2: - if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { - return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: - if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { - return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: - if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { - return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - } - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if ((sizeof(long) <= sizeof(unsigned long))) { - __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -#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 - if (__Pyx_PyLong_IsCompact(x)) { - __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) - } else { - const digit* digits = __Pyx_PyLong_Digits(x); - assert(__Pyx_PyLong_DigitCount(x) > 1); - switch (__Pyx_PyLong_SignedDigitCount(x)) { - case -2: - if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { - return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: - if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { - return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: - if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { - return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: - if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { - return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: - if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { - return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: - if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { - if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) - } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { - return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - } -#endif - if ((sizeof(long) <= sizeof(long))) { - __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -#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 - } - } - { - 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 ret = -1; -#if !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); -#else - PyObject *stepval = NULL, *mask = NULL, *shift = NULL; - int bits, remaining_bits, is_negative = 0; - long idigit; - int chunk_size = (sizeof(long) < 8) ? 30 : 62; - if (unlikely(!PyLong_CheckExact(v))) { - PyObject *tmp = v; - v = PyNumber_Long(v); - assert(PyLong_CheckExact(v)); - Py_DECREF(tmp); - if (unlikely(!v)) return (long) -1; - } -#if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(x) == 0) - return (long) 0; - is_negative = Py_SIZE(x) < 0; -#else - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return (long) -1; - is_negative = result == 1; - } -#endif - if (is_unsigned && unlikely(is_negative)) { - goto raise_neg_overflow; - } else if (is_negative) { - stepval = PyNumber_Invert(v); - if (unlikely(!stepval)) - return (long) -1; - } else { - stepval = __Pyx_NewRef(v); - } - val = (long) 0; - mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; - shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; - for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { - PyObject *tmp, *digit; - digit = PyNumber_And(stepval, mask); - if (unlikely(!digit)) goto done; - idigit = PyLong_AsLong(digit); - Py_DECREF(digit); - if (unlikely(idigit < 0)) goto done; - tmp = PyNumber_Rshift(stepval, shift); - if (unlikely(!tmp)) goto done; - Py_DECREF(stepval); stepval = tmp; - val |= ((long) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - if (Py_SIZE(stepval) == 0) - goto unpacking_done; - #endif - } - idigit = PyLong_AsLong(stepval); - if (unlikely(idigit < 0)) goto done; - remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); - if (unlikely(idigit >= (1L << remaining_bits))) - goto raise_overflow; - val |= ((long) idigit) << bits; - #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030B0000 - unpacking_done: - #endif - if (!is_unsigned) { - if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) - goto raise_overflow; - if (is_negative) - val = ~val; - } - ret = 0; - done: - Py_XDECREF(shift); - Py_XDECREF(mask); - Py_XDECREF(stepval); -#endif - Py_DECREF(v); - if (likely(!ret)) - return val; - } - return (long) -1; - } - } else { - long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to long"); - return (long) -1; -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; -} - -/* CStringEquals */ -static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) { - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - return *s1 == *s2; -} - -/* CheckBinaryVersion */ -static int __Pyx_check_binary_version(void) { - char ctversion[5]; - int same=1, i, found_dot; - const char* rt_from_call = Py_GetVersion(); - PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); - found_dot = 0; - for (i = 0; i < 4; i++) { - if (!ctversion[i]) { - same = (rt_from_call[i] < '0' || rt_from_call[i] > '9'); - break; - } - if (rt_from_call[i] != ctversion[i]) { - same = 0; - break; - } - } - if (!same) { - char rtversion[5] = {'\0'}; - char message[200]; - for (i=0; i<4; ++i) { - if (rt_from_call[i] == '.') { - if (found_dot) break; - found_dot = 1; - } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') { - break; - } - rtversion[i] = rt_from_call[i]; - } - PyOS_snprintf(message, sizeof(message), - "compile time 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 */ -#if PY_MAJOR_VERSION >= 3 -static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) { - if (t.is_unicode | t.is_str) { - if (t.intern) { - *str = PyUnicode_InternFromString(t.s); - } else if (t.encoding) { - *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL); - } else { - *str = PyUnicode_FromStringAndSize(t.s, t.n - 1); - } - } else { - *str = PyBytes_FromStringAndSize(t.s, t.n - 1); - } - if (!*str) - return -1; - if (PyObject_Hash(*str) == -1) - return -1; - return 0; -} -#endif -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { - while (t->p) { - #if PY_MAJOR_VERSION >= 3 - __Pyx_InitString(*t, t->p); - #else - 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); - } - if (!*t->p) - return -1; - if (PyObject_Hash(*t->p) == -1) - return -1; - #endif - ++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 && !CYTHON_COMPILING_IN_LIMITED_API) || (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) { - __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); -#if PY_MAJOR_VERSION >= 3 - if (PyLong_Check(result)) { - if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, - "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " - "The ability to return an instance of a strict subclass of int is deprecated, " - "and may be removed in a future version of Python.", - result_type_name)) { - __Pyx_DECREF_TypeName(result_type_name); - Py_DECREF(result); - return NULL; - } - __Pyx_DECREF_TypeName(result_type_name); - return result; - } -#endif - PyErr_Format(PyExc_TypeError, - "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")", - type_name, type_name, result_type_name); - __Pyx_DECREF_TypeName(result_type_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 - if (likely(__Pyx_PyLong_IsCompact(b))) { - return __Pyx_PyLong_CompactValue(b); - } else { - const digit* digits = __Pyx_PyLong_Digits(b); - const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); - switch (size) { - case 2: - if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { - return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case -2: - if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { - return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case 3: - if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { - return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case -3: - if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { - return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case 4: - if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { - return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - case -4: - if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { - return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); - } - break; - } - } - #endif - return PyLong_AsSsize_t(b); - } - x = PyNumber_Index(b); - if (!x) return -1; - ival = 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); -} - - -/* #### Code section: utility_code_pragmas_end ### */ -#ifdef _MSC_VER -#pragma warning( pop ) -#endif - - - -/* #### Code section: end ### */ -#endif /* Py_PYTHON_H */