diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp new file mode 100644 index 00000000..0b412409 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp @@ -0,0 +1,20333 @@ +/* Generated by Cython 0.29.14 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "depends": [ + "ufx_interface.h" + ], + "include_dirs": [ + "." + ], + "language": "c++", + "libraries": [ + "t2sdk" + ], + "name": "py_t2sdk", + "sources": [ + "py_t2sdk.pyx", + "ufx_interface.cpp" + ] + }, + "module_name": "py_t2sdk" +} +END: Cython Metadata */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_14" +#define CYTHON_HEX_VERSION 0x001D0EF0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #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_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif +template +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 ==(U other) { return *ptr == other; } + template bool operator !=(U other) { return *ptr != other; } + private: + T *ptr; +}; + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#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_ERR(f_index, lineno, Ln_error) \ +{ \ + __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ +} + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__py_t2sdk +#define __PYX_HAVE_API__py_t2sdk +/* Early includes */ +#include "ios" +#include "new" +#include "stdexcept" +#include "typeinfo" +#include "ufx_interface.h" +#include +#include +#include +#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_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + + +static const char *__pyx_f[] = { + "stringsource", + "py_t2sdk.pyx", +}; + +/*--- Type declarations ---*/ +struct __pyx_obj_8py_t2sdk_pyIF2Packer; +struct __pyx_obj_8py_t2sdk_pyIF2UnPacker; +struct __pyx_obj_8py_t2sdk_pyCConfigInterface; +struct __pyx_obj_8py_t2sdk_pyIBizMessage; +struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface; +struct __pyx_obj_8py_t2sdk_pySubCallBack; +struct __pyx_obj_8py_t2sdk_pySubscribeInterface; +struct __pyx_obj_8py_t2sdk_pyCallbackInterface; +struct __pyx_obj_8py_t2sdk_pyConnectionInterface; + +/* "py_t2sdk.pyx":12 + * cdef class pyIF2UnPacker + * + * cdef class pyIF2Packer: # <<<<<<<<<<<<<< + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pyIF2Packer { + PyObject_HEAD + c_IF2Packer *lpPacker; +}; + + +/* "py_t2sdk.pyx":10 + * from libc.stdlib cimport * + * + * cdef class pyIF2UnPacker # <<<<<<<<<<<<<< + * + * cdef class pyIF2Packer: + */ +struct __pyx_obj_8py_t2sdk_pyIF2UnPacker { + PyObject_HEAD + c_IF2UnPacker *lpUnpacker; +}; + + +/* "py_t2sdk.pyx":209 + * self.lpUnpacker.Release() + * + * cdef class pyCConfigInterface: # <<<<<<<<<<<<<< + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pyCConfigInterface { + PyObject_HEAD + C_CConfigInterface *lpConfig; +}; + + +/* "py_t2sdk.pyx":243 + * self.lpConfig.Release() + * + * cdef class pyIBizMessage: # <<<<<<<<<<<<<< + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pyIBizMessage { + PyObject_HEAD + c_IBizMessage *lpBizMessage; +}; + + +/* "py_t2sdk.pyx":367 + * self.lpBizMessage.Release() + * + * cdef class pySubscribeParamInterface: # <<<<<<<<<<<<<< + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface { + PyObject_HEAD + c_CSubscribeParamInterface *lpSubscribeParam; +}; + + +/* "py_t2sdk.pyx":425 + * return self.lpSubscribeParam.Release() + * + * cdef class pySubCallBack: # <<<<<<<<<<<<<< + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): + */ +struct __pyx_obj_8py_t2sdk_pySubCallBack { + PyObject_HEAD + c_SubCallBack *lpSubCallBack; +}; + + +/* "py_t2sdk.pyx":434 + * return self.lpSubCallBack.initInstance() + * + * cdef class pySubscribeInterface: # <<<<<<<<<<<<<< + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): + */ +struct __pyx_obj_8py_t2sdk_pySubscribeInterface { + PyObject_HEAD + c_CSubscribeInterface *lpSubcribe; +}; + + +/* "py_t2sdk.pyx":456 + * def Release(self): + * return self.lpSubcribe.Release() + * cdef class pyCallbackInterface: # <<<<<<<<<<<<<< + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): + */ +struct __pyx_obj_8py_t2sdk_pyCallbackInterface { + PyObject_HEAD + c_CCallbackInterface *lpCallBack; +}; + + +/* "py_t2sdk.pyx":465 + * return self.lpCallBack.InitInstance() + * + * cdef class pyConnectionInterface: # <<<<<<<<<<<<<< + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): + */ +struct __pyx_obj_8py_t2sdk_pyConnectionInterface { + PyObject_HEAD + c_CConnectionInterface *lpConnect; +}; + + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* RaiseArgTupleInvalid.proto */ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); + +/* KeywordStringCheck.proto */ +static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* 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 + +/* bytes_index.proto */ +static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds); + +/* 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); + +/* 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); + Py_SIZE(list) = len+1; + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + 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 + +/* PyObjectCallMethO.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); +#endif + +/* PyObjectCallNoArg.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) +#endif + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* RaiseException.proto */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); + +/* IncludeStringH.proto */ +#include + +/* 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)); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* 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 */ +static int __Pyx_setup_reduce(PyObject* type_obj); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CppExceptionConversion.proto */ +#ifndef __Pyx_CppExn2PyErr +#include +#include +#include +#include +static void __Pyx_CppExn2PyErr() { + try { + if (PyErr_Occurred()) + ; // let the latest Python exn pass through and ignore the current one + else + throw; + } catch (const std::bad_alloc& exn) { + PyErr_SetString(PyExc_MemoryError, exn.what()); + } catch (const std::bad_cast& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::bad_typeid& exn) { + PyErr_SetString(PyExc_TypeError, exn.what()); + } catch (const std::domain_error& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::invalid_argument& exn) { + PyErr_SetString(PyExc_ValueError, exn.what()); + } catch (const std::ios_base::failure& exn) { + PyErr_SetString(PyExc_IOError, exn.what()); + } catch (const std::out_of_range& exn) { + PyErr_SetString(PyExc_IndexError, exn.what()); + } catch (const std::overflow_error& exn) { + PyErr_SetString(PyExc_OverflowError, exn.what()); + } catch (const std::range_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::underflow_error& exn) { + PyErr_SetString(PyExc_ArithmeticError, exn.what()); + } catch (const std::exception& exn) { + PyErr_SetString(PyExc_RuntimeError, exn.what()); + } + catch (...) + { + PyErr_SetString(PyExc_RuntimeError, "Unknown exception"); + } +} +#endif + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* 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); + + +/* Module declarations from 'cpython.pycapsule' */ + +/* Module declarations from 'libc.string' */ + +/* Module declarations from 'libcpp.string' */ + +/* Module declarations from 'libc.stdlib' */ + +/* Module declarations from 'py_t2sdk' */ +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIF2UnPacker = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIF2Packer = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyCConfigInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIBizMessage = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubscribeParamInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubCallBack = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubscribeInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyCallbackInterface = 0; +static PyTypeObject *__pyx_ptype_8py_t2sdk_pyConnectionInterface = 0; +#define __Pyx_MODULE_NAME "py_t2sdk" +extern int __pyx_module_is_main_py_t2sdk; +int __pyx_module_is_main_py_t2sdk = 0; + +/* Implementation of 'py_t2sdk' */ +static PyObject *__pyx_builtin_TypeError; +static const char __pyx_k_S[] = "S"; +static const char __pyx_k__19[] = "*"; +static const char __pyx_k_iLen[] = "iLen"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_nAsy[] = "nAsy"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_UTF_8[] = "UTF-8"; +static const char __pyx_k_hSend[] = "hSend"; +static const char __pyx_k_lpMsg[] = "lpMsg"; +static const char __pyx_k_utf_8[] = "utf-8"; +static const char __pyx_k_ctypes[] = "ctypes"; +static const char __pyx_k_iValue[] = "iValue"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_lpBuff[] = "lpBuff"; +static const char __pyx_k_lpData[] = "lpData"; +static const char __pyx_k_lpPack[] = "lpPack"; +static const char __pyx_k_reduce[] = "__reduce__"; +static const char __pyx_k_uiFlag[] = "uiFlag"; +static const char __pyx_k_iLength[] = "iLength"; +static const char __pyx_k_lpClass[] = "lpClass"; +static const char __pyx_k_lpMould[] = "lpMould"; +static const char __pyx_k_nAppLen[] = "nAppLen"; +static const char __pyx_k_pConfig[] = "pConfig"; +static const char __pyx_k_szEntry[] = "szEntry"; +static const char __pyx_k_szValue[] = "szValue"; +static const char __pyx_k_encoding[] = "encoding"; +static const char __pyx_k_getstate[] = "__getstate__"; +static const char __pyx_k_iDefault[] = "iDefault"; +static const char __pyx_k_iTimeOut[] = "iTimeOut"; +static const char __pyx_k_lpUnPack[] = "lpUnPack"; +static const char __pyx_k_nBuffLen[] = "nBuffLen"; +static const char __pyx_k_setstate[] = "__setstate__"; +static const char __pyx_k_TypeError[] = "TypeError"; +static const char __pyx_k_bAsyError[] = "bAsyError"; +static const char __pyx_k_lpAppdata[] = "lpAppdata"; +static const char __pyx_k_lpContent[] = "lpContent"; +static const char __pyx_k_lpKeyData[] = "lpKeyData"; +static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; +static const char __pyx_k_szDefault[] = "szDefault"; +static const char __pyx_k_szSection[] = "szSection"; +static const char __pyx_k_uiTimeout[] = "uiTimeout"; +static const char __pyx_k_cFieldType[] = "cFieldType"; +static const char __pyx_k_filterName[] = "filterName"; +static const char __pyx_k_lpSubParam[] = "lpSubParam"; +static const char __pyx_k_filterValue[] = "filterValue"; +static const char __pyx_k_iFieldScale[] = "iFieldScale"; +static const char __pyx_k_iFieldWidth[] = "iFieldWidth"; +static const char __pyx_k_iReturnCode[] = "iReturnCode"; +static const char __pyx_k_lppCallback[] = "lppCallback"; +static const char __pyx_k_pyIF2Packer[] = "pyIF2Packer"; +static const char __pyx_k_szFieldName[] = "szFieldName"; +static const char __pyx_k_SubScribeName[] = "SubScribeName"; +static const char __pyx_k_pyIBizMessage[] = "pyIBizMessage"; +static const char __pyx_k_pyIF2UnPacker[] = "pyIF2UnPacker"; +static const char __pyx_k_pySubCallBack[] = "pySubCallBack"; +static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; +static const char __pyx_k_szDatasetName[] = "szDatasetName"; +static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_pyCConfigInterface[] = "pyCConfigInterface"; +static const char __pyx_k_pyCallbackInterface[] = "pyCallbackInterface"; +static const char __pyx_k_pySubscribeInterface[] = "pySubscribeInterface"; +static const char __pyx_k_pyConnectionInterface[] = "pyConnectionInterface"; +static const char __pyx_k_pySubscribeParamInterface[] = "pySubscribeParamInterface"; +static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +static PyObject *__pyx_n_s_S; +static PyObject *__pyx_n_s_SubScribeName; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_kp_s_UTF_8; +static PyObject *__pyx_n_s__19; +static PyObject *__pyx_n_s_bAsyError; +static PyObject *__pyx_n_s_cFieldType; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_ctypes; +static PyObject *__pyx_n_s_encoding; +static PyObject *__pyx_n_s_filterName; +static PyObject *__pyx_n_s_filterValue; +static PyObject *__pyx_n_s_getstate; +static PyObject *__pyx_n_s_hSend; +static PyObject *__pyx_n_s_iDefault; +static PyObject *__pyx_n_s_iFieldScale; +static PyObject *__pyx_n_s_iFieldWidth; +static PyObject *__pyx_n_s_iLen; +static PyObject *__pyx_n_s_iLength; +static PyObject *__pyx_n_s_iReturnCode; +static PyObject *__pyx_n_s_iTimeOut; +static PyObject *__pyx_n_s_iValue; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_lpAppdata; +static PyObject *__pyx_n_s_lpBuff; +static PyObject *__pyx_n_s_lpClass; +static PyObject *__pyx_n_s_lpContent; +static PyObject *__pyx_n_s_lpData; +static PyObject *__pyx_n_s_lpKeyData; +static PyObject *__pyx_n_s_lpMould; +static PyObject *__pyx_n_s_lpMsg; +static PyObject *__pyx_n_s_lpPack; +static PyObject *__pyx_n_s_lpSubParam; +static PyObject *__pyx_n_s_lpUnPack; +static PyObject *__pyx_n_s_lppCallback; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_nAppLen; +static PyObject *__pyx_n_s_nAsy; +static PyObject *__pyx_n_s_nBuffLen; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; +static PyObject *__pyx_n_s_pConfig; +static PyObject *__pyx_n_s_pyCConfigInterface; +static PyObject *__pyx_n_s_pyCallbackInterface; +static PyObject *__pyx_n_s_pyConnectionInterface; +static PyObject *__pyx_n_s_pyIBizMessage; +static PyObject *__pyx_n_s_pyIF2Packer; +static PyObject *__pyx_n_s_pyIF2UnPacker; +static PyObject *__pyx_n_s_pySubCallBack; +static PyObject *__pyx_n_s_pySubscribeInterface; +static PyObject *__pyx_n_s_pySubscribeParamInterface; +static PyObject *__pyx_n_s_reduce; +static PyObject *__pyx_n_s_reduce_cython; +static PyObject *__pyx_n_s_reduce_ex; +static PyObject *__pyx_n_s_setstate; +static PyObject *__pyx_n_s_setstate_cython; +static PyObject *__pyx_n_s_szDatasetName; +static PyObject *__pyx_n_s_szDefault; +static PyObject *__pyx_n_s_szEntry; +static PyObject *__pyx_n_s_szFieldName; +static PyObject *__pyx_n_s_szSection; +static PyObject *__pyx_n_s_szValue; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_uiFlag; +static PyObject *__pyx_n_s_uiTimeout; +static PyObject *__pyx_kp_s_utf_8; +static int __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szDatasetName, int __pyx_v_iReturnCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szFieldName, PyObject *__pyx_v_cFieldType, int __pyx_v_iFieldWidth, int __pyx_v_iFieldScale); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, int __pyx_v_iValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, double __pyx_v_fValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_cValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, long __pyx_v_dwRetCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nIndex); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_szDatasetName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nRow); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szDefault); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iDefault); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nFUnctionNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketType); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nBranchNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSystemNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSubSystemNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSenderId); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketId); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nErrorNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_strErrorInfo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nReturnCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpContent, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nIssueType); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSequeceNo); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpKeyData, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpAppdata, int __pyx_v_nAppLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_nBuffLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_szName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_lpData, int __pyx_v_iLen); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filterName, PyObject *__pyx_v_filterValue); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filedName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bFromNow); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bReplace); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_nSendInterval); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_fileName); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static void __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam, int __pyx_v_uiTimeout, struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, int __pyx_v_subscribeIndex); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static int __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_uiTimeout); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_nErrorCode); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback, PyObject *__pyx_v_SubScribeName, int __pyx_v_iTimeOut); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_lppCallback); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg, int __pyx_v_nAsy); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_hSend, int __pyx_v_uiTimeout, int __pyx_v_uiFlag); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_bAsyError); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2UnPacker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2Packer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyCConfigInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyIBizMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeParamInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pySubCallBack(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyCallbackInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_8py_t2sdk_pyConnectionInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_int_0; +static PyObject *__pyx_int_neg_1; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__13; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__15; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__18; +/* Late includes */ + +/* "py_t2sdk.pyx":14 + * cdef class pyIF2Packer: + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_IF2Packer *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":15 + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): + * self.lpPacker = new c_IF2Packer() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpPacker + */ + try { + __pyx_t_1 = new c_IF2Packer(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 15, __pyx_L1_error) + } + __pyx_v_self->lpPacker = __pyx_t_1; + + /* "py_t2sdk.pyx":14 + * cdef class pyIF2Packer: + * cdef c_IF2Packer* lpPacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":16 + * def __cinit__(self): + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpPacker + * def BeginPack(self): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":17 + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): + * del self.lpPacker # <<<<<<<<<<<<<< + * def BeginPack(self): + * self.lpPacker.BeginPack() + */ + delete __pyx_v_self->lpPacker; + + /* "py_t2sdk.pyx":16 + * def __cinit__(self): + * self.lpPacker = new c_IF2Packer() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpPacker + * def BeginPack(self): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":18 + * def __dealloc__(self): + * del self.lpPacker + * def BeginPack(self): # <<<<<<<<<<<<<< + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("BeginPack (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("BeginPack", 0); + + /* "py_t2sdk.pyx":19 + * del self.lpPacker + * def BeginPack(self): + * self.lpPacker.BeginPack() # <<<<<<<<<<<<<< + * def NewDataset(self,str szDatasetName, int iReturnCode): + * sName = bytes(szDatasetName,encoding='utf-8') + */ + __pyx_v_self->lpPacker->BeginPack(); + + /* "py_t2sdk.pyx":18 + * def __dealloc__(self): + * del self.lpPacker + * def BeginPack(self): # <<<<<<<<<<<<<< + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":20 + * def BeginPack(self): + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szDatasetName = 0; + int __pyx_v_iReturnCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("NewDataset (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szDatasetName,&__pyx_n_s_iReturnCode,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szDatasetName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iReturnCode)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("NewDataset", 1, 2, 2, 1); __PYX_ERR(1, 20, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "NewDataset") < 0)) __PYX_ERR(1, 20, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_szDatasetName = ((PyObject*)values[0]); + __pyx_v_iReturnCode = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iReturnCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("NewDataset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 20, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.NewDataset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDatasetName), (&PyString_Type), 1, "szDatasetName", 1))) __PYX_ERR(1, 20, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_szDatasetName, __pyx_v_iReturnCode); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szDatasetName, int __pyx_v_iReturnCode) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("NewDataset", 0); + + /* "py_t2sdk.pyx":21 + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): + * sName = bytes(szDatasetName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szDatasetName); + __Pyx_GIVEREF(__pyx_v_szDatasetName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDatasetName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 21, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":22 + * def NewDataset(self,str szDatasetName, int iReturnCode): + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) # <<<<<<<<<<<<<< + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + * sName = bytes(szFieldName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 22, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->NewDataset(__pyx_t_4, __pyx_v_iReturnCode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 22, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":20 + * def BeginPack(self): + * self.lpPacker.BeginPack() + * def NewDataset(self,str szDatasetName, int iReturnCode): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.NewDataset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":23 + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): # <<<<<<<<<<<<<< + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szFieldName = 0; + PyObject *__pyx_v_cFieldType = 0; + int __pyx_v_iFieldWidth; + int __pyx_v_iFieldScale; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddField (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szFieldName,&__pyx_n_s_cFieldType,&__pyx_n_s_iFieldWidth,&__pyx_n_s_iFieldScale,0}; + PyObject* values[4] = {0,0,0,0}; + values[1] = ((PyObject*)__pyx_n_s_S); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szFieldName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cFieldType); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iFieldWidth); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iFieldScale); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "AddField") < 0)) __PYX_ERR(1, 23, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_szFieldName = ((PyObject*)values[0]); + __pyx_v_cFieldType = ((PyObject*)values[1]); + if (values[2]) { + __pyx_v_iFieldWidth = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iFieldWidth == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error) + } else { + __pyx_v_iFieldWidth = ((int)0xFF); + } + if (values[3]) { + __pyx_v_iFieldScale = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_iFieldScale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error) + } else { + __pyx_v_iFieldScale = ((int)4); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("AddField", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 23, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddField", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFieldName), (&PyString_Type), 1, "szFieldName", 1))) __PYX_ERR(1, 23, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cFieldType), (&PyString_Type), 1, "cFieldType", 1))) __PYX_ERR(1, 23, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_szFieldName, __pyx_v_cFieldType, __pyx_v_iFieldWidth, __pyx_v_iFieldScale); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szFieldName, PyObject *__pyx_v_cFieldType, int __pyx_v_iFieldWidth, int __pyx_v_iFieldScale) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_v_sType = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char __pyx_t_5; + __Pyx_RefNannySetupContext("AddField", 0); + + /* "py_t2sdk.pyx":24 + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + * sName = bytes(szFieldName,encoding='utf-8') # <<<<<<<<<<<<<< + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szFieldName); + __Pyx_GIVEREF(__pyx_v_szFieldName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFieldName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 24, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 24, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":25 + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_cFieldType); + __Pyx_GIVEREF(__pyx_v_cFieldType); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cFieldType); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 25, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 25, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sType = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":26 + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) # <<<<<<<<<<<<<< + * def AddStr(self,str szValue): + * sValue = bytes(szValue,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_GetItemInt(__pyx_v_sType, 0, 1); if (unlikely(__pyx_t_5 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddField(__pyx_t_4, __pyx_t_5, __pyx_v_iFieldWidth, __pyx_v_iFieldScale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":23 + * sName = bytes(szDatasetName,encoding='utf-8') + * return self.lpPacker.NewDataset(sName,iReturnCode) + * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): # <<<<<<<<<<<<<< + * sName = bytes(szFieldName,encoding='utf-8') + * sType = bytes(cFieldType,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddField", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF(__pyx_v_sType); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":27 + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): # <<<<<<<<<<<<<< + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr(PyObject *__pyx_v_self, PyObject *__pyx_v_szValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr(PyObject *__pyx_v_self, PyObject *__pyx_v_szValue) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddStr (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szValue), (&PyString_Type), 1, "szValue", 1))) __PYX_ERR(1, 27, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_szValue)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szValue) { + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("AddStr", 0); + + /* "py_t2sdk.pyx":28 + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): + * sValue = bytes(szValue,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szValue); + __Pyx_GIVEREF(__pyx_v_szValue); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 28, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":29 + * def AddStr(self,str szValue): + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) # <<<<<<<<<<<<<< + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 29, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddStr(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 29, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":27 + * sType = bytes(cFieldType,encoding='utf-8') + * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + * def AddStr(self,str szValue): # <<<<<<<<<<<<<< + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":30 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt(PyObject *__pyx_v_self, PyObject *__pyx_arg_iValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt(PyObject *__pyx_v_self, PyObject *__pyx_arg_iValue) { + int __pyx_v_iValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddInt (wrapper)", 0); + assert(__pyx_arg_iValue); { + __pyx_v_iValue = __Pyx_PyInt_As_int(__pyx_arg_iValue); if (unlikely((__pyx_v_iValue == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((int)__pyx_v_iValue)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, int __pyx_v_iValue) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("AddInt", 0); + + /* "py_t2sdk.pyx":31 + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) # <<<<<<<<<<<<<< + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddInt(__pyx_v_iValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":30 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpPacker.AddStr(sValue) + * def AddInt(self,int iValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":32 + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble(PyObject *__pyx_v_self, PyObject *__pyx_arg_fValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble(PyObject *__pyx_v_self, PyObject *__pyx_arg_fValue) { + double __pyx_v_fValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddDouble (wrapper)", 0); + assert(__pyx_arg_fValue); { + __pyx_v_fValue = __pyx_PyFloat_AsDouble(__pyx_arg_fValue); if (unlikely((__pyx_v_fValue == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 32, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddDouble", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((double)__pyx_v_fValue)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, double __pyx_v_fValue) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("AddDouble", 0); + + /* "py_t2sdk.pyx":33 + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) # <<<<<<<<<<<<<< + * def AddChar(self,str cValue): + * sValue = bytes(cValue,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddDouble(__pyx_v_fValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":32 + * def AddInt(self,int iValue): + * return self.lpPacker.AddInt(iValue) + * def AddDouble(self,double fValue): # <<<<<<<<<<<<<< + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddDouble", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":34 + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): # <<<<<<<<<<<<<< + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar(PyObject *__pyx_v_self, PyObject *__pyx_v_cValue); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar(PyObject *__pyx_v_self, PyObject *__pyx_v_cValue) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddChar (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cValue), (&PyString_Type), 1, "cValue", 1))) __PYX_ERR(1, 34, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_cValue)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_cValue) { + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("AddChar", 0); + + /* "py_t2sdk.pyx":35 + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): + * sValue = bytes(cValue,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cValue); + __Pyx_GIVEREF(__pyx_v_cValue); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 35, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 35, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":36 + * def AddChar(self,str cValue): + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) # <<<<<<<<<<<<<< + * def AddRaw(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sValue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 36, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddChar(__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 36, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":34 + * def AddDouble(self,double fValue): + * return self.lpPacker.AddDouble(fValue) + * def AddChar(self,str cValue): # <<<<<<<<<<<<<< + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddChar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":37 + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpBuff = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("AddRaw (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("AddRaw", 1, 2, 2, 1); __PYX_ERR(1, 37, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "AddRaw") < 0)) __PYX_ERR(1, 37, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpBuff = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 37, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("AddRaw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 37, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddRaw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 37, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + int __pyx_v_iRet; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("AddRaw", 0); + + /* "py_t2sdk.pyx":38 + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":39 + * def AddRaw(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":40 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":41 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + */ + if (unlikely(__pyx_v_lpBuff == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 41, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":42 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + * free(sBuff) + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":43 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) # <<<<<<<<<<<<<< + * free(sBuff) + * return iRet + */ + __pyx_v_iRet = __pyx_v_self->lpPacker->AddRaw(__pyx_v_sBuff, __pyx_v_iLen); + + /* "py_t2sdk.pyx":44 + * iIndex+=1 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + * free(sBuff) # <<<<<<<<<<<<<< + * return iRet + * def EndPack(self): + */ + free(__pyx_v_sBuff); + + /* "py_t2sdk.pyx":45 + * iRet = self.lpPacker.AddRaw(sBuff,iLen) + * free(sBuff) + * return iRet # <<<<<<<<<<<<<< + * def EndPack(self): + * return self.lpPacker.EndPack() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iRet); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":37 + * sValue = bytes(cValue,encoding='utf-8') + * return self.lpPacker.AddChar(sValue[0]) + * def AddRaw(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddRaw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":46 + * free(sBuff) + * return iRet + * def EndPack(self): # <<<<<<<<<<<<<< + * return self.lpPacker.EndPack() + * def GetPackBuf(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("EndPack (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("EndPack", 0); + + /* "py_t2sdk.pyx":47 + * return iRet + * def EndPack(self): + * return self.lpPacker.EndPack() # <<<<<<<<<<<<<< + * def GetPackBuf(self): + * cdef int iLength = self.lpPacker.GetPackLen() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpPacker->EndPack()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":46 + * free(sBuff) + * return iRet + * def EndPack(self): # <<<<<<<<<<<<<< + * return self.lpPacker.EndPack() + * def GetPackBuf(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.EndPack", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":48 + * def EndPack(self): + * return self.lpPacker.EndPack() + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackBuf (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + int __pyx_v_iLength; + int *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + __Pyx_RefNannySetupContext("GetPackBuf", 0); + + /* "py_t2sdk.pyx":49 + * return self.lpPacker.EndPack() + * def GetPackBuf(self): + * cdef int iLength = self.lpPacker.GetPackLen() # <<<<<<<<<<<<<< + * cdef int* sBuff = self.lpPacker.GetPackBuf() + * lpBuff = [] + */ + __pyx_v_iLength = __pyx_v_self->lpPacker->GetPackLen(); + + /* "py_t2sdk.pyx":50 + * def GetPackBuf(self): + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpPacker->GetPackBuf(); + + /* "py_t2sdk.pyx":51 + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLength: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":52 + * cdef int* sBuff = self.lpPacker.GetPackBuf() + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":53 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLength: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLength) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":54 + * cdef int iIndex = 0 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff + */ + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 54, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":55 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff + * def GetPackLen(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":56 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff # <<<<<<<<<<<<<< + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_lpBuff); + __pyx_r = __pyx_v_lpBuff; + goto __pyx_L0; + + /* "py_t2sdk.pyx":48 + * def EndPack(self): + * return self.lpPacker.EndPack() + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef int iLength = self.lpPacker.GetPackLen() + * cdef int* sBuff = self.lpPacker.GetPackBuf() + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackBuf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":57 + * iIndex +=1 + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackLen (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackLen", 0); + + /* "py_t2sdk.pyx":58 + * return lpBuff + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() # <<<<<<<<<<<<<< + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetPackLen()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":57 + * iIndex +=1 + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackLen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":59 + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackBufSize (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackBufSize", 0); + + /* "py_t2sdk.pyx":60 + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() # <<<<<<<<<<<<<< + * def GetVersion(self): + * return self.lpPacker.GetVersion() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetPackBufSize()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":59 + * def GetPackLen(self): + * return self.lpPacker.GetPackLen() + * def GetPackBufSize(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackBufSize", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":61 + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetVersion (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetVersion", 0); + + /* "py_t2sdk.pyx":62 + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): + * return self.lpPacker.GetVersion() # <<<<<<<<<<<<<< + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":61 + * def GetPackBufSize(self): + * return self.lpPacker.GetPackBufSize() + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":63 + * def GetVersion(self): + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): # <<<<<<<<<<<<<< + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_dwRetCode); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_dwRetCode) { + long __pyx_v_dwRetCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode (wrapper)", 0); + assert(__pyx_arg_dwRetCode); { + __pyx_v_dwRetCode = __Pyx_PyInt_As_long(__pyx_arg_dwRetCode); if (unlikely((__pyx_v_dwRetCode == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 63, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.SetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((long)__pyx_v_dwRetCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, long __pyx_v_dwRetCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode", 0); + + /* "py_t2sdk.pyx":64 + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) # <<<<<<<<<<<<<< + * def UnPack(self): + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + */ + __pyx_v_self->lpPacker->SetReturnCode(__pyx_v_dwRetCode); + + /* "py_t2sdk.pyx":63 + * def GetVersion(self): + * return self.lpPacker.GetVersion() + * def SetReturnCode(self,long dwRetCode): # <<<<<<<<<<<<<< + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":65 + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("UnPack (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + c_IF2UnPacker *__pyx_v_lpUnpacker; + struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpPyUnpacker = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("UnPack", 0); + + /* "py_t2sdk.pyx":66 + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() # <<<<<<<<<<<<<< + * lpPyUnpacker = pyIF2UnPacker() + * lpPyUnpacker.lpUnpacker = lpUnpacker + */ + __pyx_v_lpUnpacker = __pyx_v_self->lpPacker->UnPack(); + + /* "py_t2sdk.pyx":67 + * def UnPack(self): + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() # <<<<<<<<<<<<<< + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pyIF2UnPacker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpPyUnpacker = ((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":68 + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() + * lpPyUnpacker.lpUnpacker = lpUnpacker # <<<<<<<<<<<<<< + * return lpPyUnpacker + * def FreeMem(self): + */ + __pyx_v_lpPyUnpacker->lpUnpacker = __pyx_v_lpUnpacker; + + /* "py_t2sdk.pyx":69 + * lpPyUnpacker = pyIF2UnPacker() + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker # <<<<<<<<<<<<<< + * def FreeMem(self): + * self.lpPacker.FreeMem() + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_lpPyUnpacker)); + __pyx_r = ((PyObject *)__pyx_v_lpPyUnpacker); + goto __pyx_L0; + + /* "py_t2sdk.pyx":65 + * def SetReturnCode(self,long dwRetCode): + * self.lpPacker.SetReturnCode(dwRetCode) + * def UnPack(self): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + * lpPyUnpacker = pyIF2UnPacker() + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.UnPack", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_lpPyUnpacker); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":70 + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker + * def FreeMem(self): # <<<<<<<<<<<<<< + * self.lpPacker.FreeMem() + * def ClearValue(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("FreeMem (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("FreeMem", 0); + + /* "py_t2sdk.pyx":71 + * return lpPyUnpacker + * def FreeMem(self): + * self.lpPacker.FreeMem() # <<<<<<<<<<<<<< + * def ClearValue(self): + * self.lpPacker.ClearValue() + */ + __pyx_v_self->lpPacker->FreeMem(); + + /* "py_t2sdk.pyx":70 + * lpPyUnpacker.lpUnpacker = lpUnpacker + * return lpPyUnpacker + * def FreeMem(self): # <<<<<<<<<<<<<< + * self.lpPacker.FreeMem() + * def ClearValue(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":72 + * def FreeMem(self): + * self.lpPacker.FreeMem() + * def ClearValue(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearValue (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearValue", 0); + + /* "py_t2sdk.pyx":73 + * self.lpPacker.FreeMem() + * def ClearValue(self): + * self.lpPacker.ClearValue() # <<<<<<<<<<<<<< + * def BeginPackEx(self,str szName): + * sName = bytes(szName,encoding='utf-8') + */ + __pyx_v_self->lpPacker->ClearValue(); + + /* "py_t2sdk.pyx":72 + * def FreeMem(self): + * self.lpPacker.FreeMem() + * def ClearValue(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":74 + * def ClearValue(self): + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx(PyObject *__pyx_v_self, PyObject *__pyx_v_szName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx(PyObject *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("BeginPackEx (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szName), (&PyString_Type), 1, "szName", 1))) __PYX_ERR(1, 74, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_szName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("BeginPackEx", 0); + + /* "py_t2sdk.pyx":75 + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): + * sName = bytes(szName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szName); + __Pyx_GIVEREF(__pyx_v_szName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 75, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 75, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":76 + * def BeginPackEx(self,str szName): + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) # <<<<<<<<<<<<<< + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L1_error) + __pyx_v_self->lpPacker->BeginPackEx(__pyx_t_4); + + /* "py_t2sdk.pyx":74 + * def ClearValue(self): + * self.lpPacker.ClearValue() + * def BeginPackEx(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + */ + + /* 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("py_t2sdk.pyIF2Packer.BeginPackEx", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":77 + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearDataSet() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearDataSet (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ClearDataSet", 0); + + /* "py_t2sdk.pyx":78 + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() # <<<<<<<<<<<<<< + * def Release(self): + * self.lpPacker.Release() + */ + __pyx_v_self->lpPacker->ClearDataSet(); + + /* "py_t2sdk.pyx":77 + * sName = bytes(szName,encoding='utf-8') + * self.lpPacker.BeginPackEx(sName) + * def ClearDataSet(self): # <<<<<<<<<<<<<< + * self.lpPacker.ClearDataSet() + * def Release(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":79 + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpPacker.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":80 + * self.lpPacker.ClearDataSet() + * def Release(self): + * self.lpPacker.Release() # <<<<<<<<<<<<<< + * + * cdef class pyIF2UnPacker: + */ + __pyx_v_self->lpPacker->Release(); + + /* "py_t2sdk.pyx":79 + * def ClearDataSet(self): + * self.lpPacker.ClearDataSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpPacker.Release() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__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_8py_t2sdk_11pyIF2Packer_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":84 + * cdef class pyIF2UnPacker: + * cdef c_IF2UnPacker* lpUnpacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpUnpacker = NULL + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":85 + * cdef c_IF2UnPacker* lpUnpacker + * def __cinit__(self): + * self.lpUnpacker = NULL # <<<<<<<<<<<<<< + * def __dealloc__(self): + * if self.lpUnpacker != NULL: + */ + __pyx_v_self->lpUnpacker = NULL; + + /* "py_t2sdk.pyx":84 + * cdef class pyIF2UnPacker: + * cdef c_IF2UnPacker* lpUnpacker + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpUnpacker = NULL + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":86 + * def __cinit__(self): + * self.lpUnpacker = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * del self.lpUnpacker + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":87 + * self.lpUnpacker = NULL + * def __dealloc__(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * del self.lpUnpacker + * self.lpUnpacker = NULL + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker != NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":88 + * def __dealloc__(self): + * if self.lpUnpacker != NULL: + * del self.lpUnpacker # <<<<<<<<<<<<<< + * self.lpUnpacker = NULL + * def GetVersion(self): + */ + delete __pyx_v_self->lpUnpacker; + + /* "py_t2sdk.pyx":89 + * if self.lpUnpacker != NULL: + * del self.lpUnpacker + * self.lpUnpacker = NULL # <<<<<<<<<<<<<< + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() + */ + __pyx_v_self->lpUnpacker = NULL; + + /* "py_t2sdk.pyx":87 + * self.lpUnpacker = NULL + * def __dealloc__(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * del self.lpUnpacker + * self.lpUnpacker = NULL + */ + } + + /* "py_t2sdk.pyx":86 + * def __cinit__(self): + * self.lpUnpacker = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * del self.lpUnpacker + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":90 + * del self.lpUnpacker + * self.lpUnpacker = NULL + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetVersion (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetVersion", 0); + + /* "py_t2sdk.pyx":91 + * self.lpUnpacker = NULL + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() # <<<<<<<<<<<<<< + * def Open(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":90 + * del self.lpUnpacker + * self.lpUnpacker = NULL + * def GetVersion(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":92 + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpBuff = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Open (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("Open", 1, 2, 2, 1); __PYX_ERR(1, 92, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Open") < 0)) __PYX_ERR(1, 92, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpBuff = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 92, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("Open", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 92, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 92, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + long __pyx_v_iRet; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + c_IF2UnPacker *__pyx_t_4; + __Pyx_RefNannySetupContext("Open", 0); + + /* "py_t2sdk.pyx":93 + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":94 + * def Open(self,list lpBuff,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":95 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":96 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * if self.lpUnpacker == NULL: + */ + if (unlikely(__pyx_v_lpBuff == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 96, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 96, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 96, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":97 + * while iIndex < iLen: + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":98 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + * iRet = 0 + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker == NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":99 + * iIndex+=1 + * if self.lpUnpacker == NULL: + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) # <<<<<<<<<<<<<< + * iRet = 0 + * else: + */ + try { + __pyx_t_4 = new c_IF2UnPacker(__pyx_v_sBuff, __pyx_v_iLen); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 99, __pyx_L1_error) + } + __pyx_v_self->lpUnpacker = __pyx_t_4; + + /* "py_t2sdk.pyx":100 + * if self.lpUnpacker == NULL: + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + * iRet = 0 # <<<<<<<<<<<<<< + * else: + * iRet = self.lpUnpacker.Open(sBuff,iLen) + */ + __pyx_v_iRet = 0; + + /* "py_t2sdk.pyx":98 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + * iRet = 0 + */ + goto __pyx_L5; + } + + /* "py_t2sdk.pyx":102 + * iRet = 0 + * else: + * iRet = self.lpUnpacker.Open(sBuff,iLen) # <<<<<<<<<<<<<< + * free(sBuff) + * return iRet + */ + /*else*/ { + __pyx_v_iRet = __pyx_v_self->lpUnpacker->Open(__pyx_v_sBuff, __pyx_v_iLen); + } + __pyx_L5:; + + /* "py_t2sdk.pyx":103 + * else: + * iRet = self.lpUnpacker.Open(sBuff,iLen) + * free(sBuff) # <<<<<<<<<<<<<< + * return iRet + * def GetDatasetCount(self): + */ + free(__pyx_v_sBuff); + + /* "py_t2sdk.pyx":104 + * iRet = self.lpUnpacker.Open(sBuff,iLen) + * free(sBuff) + * return iRet # <<<<<<<<<<<<<< + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_iRet); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 104, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":92 + * def GetVersion(self): + * return self.lpUnpacker.GetVersion() + * def Open(self,list lpBuff,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Open", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":105 + * free(sBuff) + * return iRet + * def GetDatasetCount(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * return -1; + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDatasetCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetDatasetCount", 0); + + /* "py_t2sdk.pyx":106 + * return iRet + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1; + * return self.lpUnpacker.GetDatasetCount() + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker == NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":107 + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: + * return -1; # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_neg_1); + __pyx_r = __pyx_int_neg_1; + goto __pyx_L0; + + /* "py_t2sdk.pyx":106 + * return iRet + * def GetDatasetCount(self): + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1; + * return self.lpUnpacker.GetDatasetCount() + */ + } + + /* "py_t2sdk.pyx":108 + * if self.lpUnpacker == NULL: + * return -1; + * return self.lpUnpacker.GetDatasetCount() # <<<<<<<<<<<<<< + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetDatasetCount()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":105 + * free(sBuff) + * return iRet + * def GetDatasetCount(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * return -1; + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDatasetCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":109 + * return -1; + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): # <<<<<<<<<<<<<< + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIndex); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIndex) { + int __pyx_v_nIndex; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetCurrentDatasetByIndex (wrapper)", 0); + assert(__pyx_arg_nIndex); { + __pyx_v_nIndex = __Pyx_PyInt_As_int(__pyx_arg_nIndex); if (unlikely((__pyx_v_nIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.SetCurrentDatasetByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_nIndex)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nIndex) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetCurrentDatasetByIndex", 0); + + /* "py_t2sdk.pyx":110 + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) # <<<<<<<<<<<<<< + * def SetCurrentDataset(self,str szDatasetName): + * sName = bytes(szDatasetName,encoding='utf-8') + */ + (void)(__pyx_v_self->lpUnpacker->SetCurrentDatasetByIndex(__pyx_v_nIndex)); + + /* "py_t2sdk.pyx":109 + * return -1; + * return self.lpUnpacker.GetDatasetCount() + * def SetCurrentDatasetByIndex(self,int nIndex): # <<<<<<<<<<<<<< + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":111 + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset(PyObject *__pyx_v_self, PyObject *__pyx_v_szDatasetName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset(PyObject *__pyx_v_self, PyObject *__pyx_v_szDatasetName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetCurrentDataset (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDatasetName), (&PyString_Type), 1, "szDatasetName", 1))) __PYX_ERR(1, 111, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_szDatasetName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_szDatasetName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetCurrentDataset", 0); + + /* "py_t2sdk.pyx":112 + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): + * sName = bytes(szDatasetName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szDatasetName); + __Pyx_GIVEREF(__pyx_v_szDatasetName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDatasetName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 112, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":113 + * def SetCurrentDataset(self,str szDatasetName): + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) # <<<<<<<<<<<<<< + * def GetPackBuf(self): + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error) + (void)(__pyx_v_self->lpUnpacker->SetCurrentDataset(__pyx_t_4)); + + /* "py_t2sdk.pyx":111 + * def SetCurrentDatasetByIndex(self,int nIndex): + * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + * def SetCurrentDataset(self,str szDatasetName): # <<<<<<<<<<<<<< + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + */ + + /* 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("py_t2sdk.pyIF2UnPacker.SetCurrentDataset", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":114 + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackBuf (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + char *__pyx_v_lpBuff; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackBuf", 0); + + /* "py_t2sdk.pyx":115 + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() # <<<<<<<<<<<<<< + * return lpBuff + * def GetPackLen(self): + */ + __pyx_v_lpBuff = __pyx_v_self->lpUnpacker->GetPackBuf(); + + /* "py_t2sdk.pyx":116 + * def GetPackBuf(self): + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff # <<<<<<<<<<<<<< + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_lpBuff); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 116, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":114 + * sName = bytes(szDatasetName,encoding='utf-8') + * self.lpUnpacker.SetCurrentDataset(sName) + * def GetPackBuf(self): # <<<<<<<<<<<<<< + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetPackBuf", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":117 + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPackLen (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPackLen", 0); + + /* "py_t2sdk.pyx":118 + * return lpBuff + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() # <<<<<<<<<<<<<< + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetPackLen()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":117 + * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + * return lpBuff + * def GetPackLen(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetPackLen", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":119 + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetRowCount() + * def First(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRowCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetRowCount", 0); + + /* "py_t2sdk.pyx":120 + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() # <<<<<<<<<<<<<< + * def First(self): + * self.lpUnpacker.First() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetRowCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 120, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":119 + * def GetPackLen(self): + * return self.lpUnpacker.GetPackLen() + * def GetRowCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetRowCount() + * def First(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRowCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":121 + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() + * def First(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.First() + * def Last(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("First (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("First", 0); + + /* "py_t2sdk.pyx":122 + * return self.lpUnpacker.GetRowCount() + * def First(self): + * self.lpUnpacker.First() # <<<<<<<<<<<<<< + * def Last(self): + * self.lpUnpacker.Last() + */ + __pyx_v_self->lpUnpacker->First(); + + /* "py_t2sdk.pyx":121 + * def GetRowCount(self): + * return self.lpUnpacker.GetRowCount() + * def First(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.First() + * def Last(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":123 + * def First(self): + * self.lpUnpacker.First() + * def Last(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Last() + * def Go(self,int nRow): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Last (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Last", 0); + + /* "py_t2sdk.pyx":124 + * self.lpUnpacker.First() + * def Last(self): + * self.lpUnpacker.Last() # <<<<<<<<<<<<<< + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) + */ + __pyx_v_self->lpUnpacker->Last(); + + /* "py_t2sdk.pyx":123 + * def First(self): + * self.lpUnpacker.First() + * def Last(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Last() + * def Go(self,int nRow): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":125 + * def Last(self): + * self.lpUnpacker.Last() + * def Go(self,int nRow): # <<<<<<<<<<<<<< + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go(PyObject *__pyx_v_self, PyObject *__pyx_arg_nRow); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go(PyObject *__pyx_v_self, PyObject *__pyx_arg_nRow) { + int __pyx_v_nRow; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Go (wrapper)", 0); + assert(__pyx_arg_nRow); { + __pyx_v_nRow = __Pyx_PyInt_As_int(__pyx_arg_nRow); if (unlikely((__pyx_v_nRow == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 125, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Go", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_nRow)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nRow) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Go", 0); + + /* "py_t2sdk.pyx":126 + * self.lpUnpacker.Last() + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) # <<<<<<<<<<<<<< + * def GetDatasetName(self): + * cdef char* sName = self.lpUnpacker.GetDatasetName() + */ + __pyx_v_self->lpUnpacker->Go(__pyx_v_nRow); + + /* "py_t2sdk.pyx":125 + * def Last(self): + * self.lpUnpacker.Last() + * def Go(self,int nRow): # <<<<<<<<<<<<<< + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":127 + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDatasetName (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetDatasetName", 0); + + /* "py_t2sdk.pyx":128 + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): + * cdef char* sName = self.lpUnpacker.GetDatasetName() # <<<<<<<<<<<<<< + * return sName + * def GetColTypeByName(self,str columnName): + */ + __pyx_v_sName = __pyx_v_self->lpUnpacker->GetDatasetName(); + + /* "py_t2sdk.pyx":129 + * def GetDatasetName(self): + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName # <<<<<<<<<<<<<< + * def GetColTypeByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":127 + * def Go(self,int nRow): + * self.lpUnpacker.Go(nRow) + * def GetDatasetName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDatasetName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":130 + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + * def GetColTypeByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColTypeByName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 130, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + char *__pyx_v_sType; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetColTypeByName", 0); + + /* "py_t2sdk.pyx":131 + * return sName + * def GetColTypeByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 131, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":132 + * def GetColTypeByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) # <<<<<<<<<<<<<< + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L1_error) + __pyx_v_sType = __pyx_v_self->lpUnpacker->GetColTypeByName(__pyx_t_4); + + /* "py_t2sdk.pyx":133 + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') # <<<<<<<<<<<<<< + * def GetColScaleByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_sType, 0, strlen(__pyx_v_sType), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":130 + * cdef char* sName = self.lpUnpacker.GetDatasetName() + * return sName + * def GetColTypeByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColTypeByName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":134 + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColScaleByName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 134, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetColScaleByName", 0); + + /* "py_t2sdk.pyx":135 + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 135, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 135, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":136 + * def GetColScaleByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) # <<<<<<<<<<<<<< + * def GetColWidthByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 136, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColScaleByName(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":134 + * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + * return sType.decode('gbk') + * def GetColScaleByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScaleByName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":137 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColWidthByName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 137, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetColWidthByName", 0); + + /* "py_t2sdk.pyx":138 + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 138, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":139 + * def GetColWidthByName(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) # <<<<<<<<<<<<<< + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 139, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColWidthByName(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":137 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColScaleByName(sName) + * def GetColWidthByName(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidthByName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":140 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColCount", 0); + + /* "py_t2sdk.pyx":141 + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() # <<<<<<<<<<<<<< + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":140 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetColWidthByName(sName) + * def GetColCount(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":142 + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColName (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetColName", 0); + + /* "py_t2sdk.pyx":143 + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') # <<<<<<<<<<<<<< + * def GetColType(self,int column): + * cdef char* sType = self.lpUnpacker.GetColType(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->lpUnpacker->GetColName(__pyx_v_column); + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":142 + * def GetColCount(self): + * return self.lpUnpacker.GetColCount() + * def GetColName(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":144 + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): # <<<<<<<<<<<<<< + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColType (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 144, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + char *__pyx_v_sType; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColType", 0); + + /* "py_t2sdk.pyx":145 + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): + * cdef char* sType = self.lpUnpacker.GetColType(column) # <<<<<<<<<<<<<< + * return sType.decode('gbk') + * def GetColScale(self,int column): + */ + __pyx_v_sType = __pyx_v_self->lpUnpacker->GetColType(__pyx_v_column); + + /* "py_t2sdk.pyx":146 + * def GetColType(self,int column): + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') # <<<<<<<<<<<<<< + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_sType, 0, strlen(__pyx_v_sType), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":144 + * def GetColName(self,int column): + * return self.lpUnpacker.GetColName(column).decode('gbk') + * def GetColType(self,int column): # <<<<<<<<<<<<<< + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":147 + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + * def GetColScale(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColScale (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScale", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColScale", 0); + + /* "py_t2sdk.pyx":148 + * return sType.decode('gbk') + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) # <<<<<<<<<<<<<< + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColScale(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":147 + * cdef char* sType = self.lpUnpacker.GetColType(column) + * return sType.decode('gbk') + * def GetColScale(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScale", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":149 + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetColWidth (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetColWidth", 0); + + /* "py_t2sdk.pyx":150 + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) # <<<<<<<<<<<<<< + * def FindColIndex(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColWidth(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":149 + * def GetColScale(self,int column): + * return self.lpUnpacker.GetColScale(column) + * def GetColWidth(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidth", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":151 + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("FindColIndex (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 151, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("FindColIndex", 0); + + /* "py_t2sdk.pyx":152 + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 152, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 152, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":153 + * def FindColIndex(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) # <<<<<<<<<<<<<< + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 153, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->FindColIndex(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 153, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":151 + * def GetColWidth(self,int column): + * return self.lpUnpacker.GetColWidth(column) + * def FindColIndex(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.FindColIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":154 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetStrByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 154, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStrByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetStrByIndex", 0); + + /* "py_t2sdk.pyx":155 + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') # <<<<<<<<<<<<<< + * def GetStr(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->lpUnpacker->GetStrByIndex(__pyx_v_column); + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":154 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.FindColIndex(sName) + * def GetStrByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStrByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":156 + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetStr (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 156, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetStr", 0); + + /* "py_t2sdk.pyx":157 + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_UTF_8) < 0) __PYX_ERR(1, 157, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":158 + * def GetStr(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') # <<<<<<<<<<<<<< + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 158, __pyx_L1_error) + __pyx_t_5 = __pyx_v_self->lpUnpacker->GetStr(__pyx_t_4); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 158, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":156 + * def GetStrByIndex(self,int column): + * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + * def GetStr(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":159 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetCharByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetCharByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + char *__pyx_t_1; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("GetCharByIndex", 0); + + /* "py_t2sdk.pyx":160 + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') # <<<<<<<<<<<<<< + * def GetChar(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_v_self->lpUnpacker->GetCharByIndex(__pyx_v_column); + __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":159 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetStr(sName).decode('GBK') + * def GetCharByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetCharByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":161 + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetChar (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 161, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetChar", 0); + + /* "py_t2sdk.pyx":162 + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_UTF_8) < 0) __PYX_ERR(1, 162, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 162, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":163 + * def GetChar(self,str columnName): + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') # <<<<<<<<<<<<<< + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 163, __pyx_L1_error) + __pyx_t_5 = __pyx_v_self->lpUnpacker->GetChar(__pyx_t_4); + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":161 + * def GetCharByIndex(self,int column): + * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + * def GetChar(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetChar", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":164 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDoubleByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 164, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDoubleByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetDoubleByIndex", 0); + + /* "py_t2sdk.pyx":165 + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) # <<<<<<<<<<<<<< + * def GetDouble(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->lpUnpacker->GetDoubleByIndex(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":164 + * sName = bytes(columnName,encoding='UTF-8') + * return self.lpUnpacker.GetChar(sName).decode('UTF-8') + * def GetDoubleByIndex(self, int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDoubleByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":166 + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetDouble (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 166, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetDouble", 0); + + /* "py_t2sdk.pyx":167 + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 167, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":168 + * def GetDouble(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) # <<<<<<<<<<<<<< + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 168, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->lpUnpacker->GetDouble(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":166 + * def GetDoubleByIndex(self, int column): + * return self.lpUnpacker.GetDoubleByIndex(column) + * def GetDouble(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDouble", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":169 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetIntByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 169, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetIntByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetIntByIndex", 0); + + /* "py_t2sdk.pyx":170 + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) # <<<<<<<<<<<<<< + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetIntByIndex(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 170, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":169 + * sName = bytes(columnName,encoding='utf-8') + * return self.lpUnpacker.GetDouble(sName) + * def GetIntByIndex(self,int column): # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetIntByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":171 + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetInt (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 171, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = 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; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetInt", 0); + + /* "py_t2sdk.pyx":172 + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * if self.lpUnpacker == NULL: + * return -1 + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 172, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":173 + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1 + * return self.lpUnpacker.GetInt(sName) + */ + __pyx_t_4 = ((__pyx_v_self->lpUnpacker == NULL) != 0); + if (__pyx_t_4) { + + /* "py_t2sdk.pyx":174 + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: + * return -1 # <<<<<<<<<<<<<< + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_int_neg_1); + __pyx_r = __pyx_int_neg_1; + goto __pyx_L0; + + /* "py_t2sdk.pyx":173 + * def GetInt(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<< + * return -1 + * return self.lpUnpacker.GetInt(sName) + */ + } + + /* "py_t2sdk.pyx":175 + * if self.lpUnpacker == NULL: + * return -1 + * return self.lpUnpacker.GetInt(sName) # <<<<<<<<<<<<<< + * def GetRawByIndex(self,int column): + * cdef int ilength = 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetInt(__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":171 + * def GetIntByIndex(self,int column): + * return self.lpUnpacker.GetIntByIndex(column) + * def GetInt(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * if self.lpUnpacker == NULL: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":176 + * return -1 + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): # <<<<<<<<<<<<<< + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) { + int __pyx_v_column; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRawByIndex (wrapper)", 0); + assert(__pyx_arg_column); { + __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRawByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) { + int __pyx_v_ilength; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + 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; + __Pyx_RefNannySetupContext("GetRawByIndex", 0); + + /* "py_t2sdk.pyx":177 + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): + * cdef int ilength = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + * lpBuff = [] + */ + __pyx_v_ilength = 0; + + /* "py_t2sdk.pyx":178 + * def GetRawByIndex(self,int column): + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpUnpacker->GetRawByIndex(__pyx_v_column, (&__pyx_v_ilength)); + + /* "py_t2sdk.pyx":179 + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLength: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":180 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":181 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLength: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!__pyx_t_4) break; + + /* "py_t2sdk.pyx":182 + * cdef int iIndex = 0 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,ilength + */ + __pyx_t_3 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_3); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 182, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":183 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,ilength + * def GetRaw(self,str columnName): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":184 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff,ilength # <<<<<<<<<<<<<< + * def GetRaw(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ilength); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 184, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":176 + * return -1 + * return self.lpUnpacker.GetInt(sName) + * def GetRawByIndex(self,int column): # <<<<<<<<<<<<<< + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRawByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":185 + * iIndex +=1 + * return lpBuff,ilength + * def GetRaw(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRaw (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 185, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) { + PyObject *__pyx_v_sName = NULL; + int __pyx_v_ilength; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + int __pyx_t_5; + int __pyx_t_6; + __Pyx_RefNannySetupContext("GetRaw", 0); + + /* "py_t2sdk.pyx":186 + * return lpBuff,ilength + * def GetRaw(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_columnName); + __Pyx_GIVEREF(__pyx_v_columnName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":187 + * def GetRaw(self,str columnName): + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + * lpBuff = [] + */ + __pyx_v_ilength = 0; + + /* "py_t2sdk.pyx":188 + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 188, __pyx_L1_error) + __pyx_v_sBuff = __pyx_v_self->lpUnpacker->GetRaw(__pyx_t_4, (&__pyx_v_ilength)); + + /* "py_t2sdk.pyx":189 + * cdef int ilength = 0 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLength: + */ + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 189, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":190 + * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":191 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLength: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_iIndex); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __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(1, 191, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_5) break; + + /* "py_t2sdk.pyx":192 + * cdef int iIndex = 0 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,ilength + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 192, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":193 + * while iIndex < iLength: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,ilength + * def WasNull(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":194 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff,ilength # <<<<<<<<<<<<<< + * def WasNull(self): + * return self.lpUnpacker.WasNull() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ilength); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":185 + * iIndex +=1 + * return lpBuff,ilength + * def GetRaw(self,str columnName): # <<<<<<<<<<<<<< + * sName = bytes(columnName,encoding='utf-8') + * cdef int ilength = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRaw", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":195 + * iIndex +=1 + * return lpBuff,ilength + * def WasNull(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.WasNull() + * def Next(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("WasNull (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("WasNull", 0); + + /* "py_t2sdk.pyx":196 + * return lpBuff,ilength + * def WasNull(self): + * return self.lpUnpacker.WasNull() # <<<<<<<<<<<<<< + * def Next(self): + * self.lpUnpacker.Next() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->WasNull()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":195 + * iIndex +=1 + * return lpBuff,ilength + * def WasNull(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.WasNull() + * def Next(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.WasNull", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":197 + * def WasNull(self): + * return self.lpUnpacker.WasNull() + * def Next(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Next() + * def IsEOF(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Next (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Next", 0); + + /* "py_t2sdk.pyx":198 + * return self.lpUnpacker.WasNull() + * def Next(self): + * self.lpUnpacker.Next() # <<<<<<<<<<<<<< + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() + */ + __pyx_v_self->lpUnpacker->Next(); + + /* "py_t2sdk.pyx":197 + * def WasNull(self): + * return self.lpUnpacker.WasNull() + * def Next(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Next() + * def IsEOF(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":199 + * def Next(self): + * self.lpUnpacker.Next() + * def IsEOF(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("IsEOF (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("IsEOF", 0); + + /* "py_t2sdk.pyx":200 + * self.lpUnpacker.Next() + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() # <<<<<<<<<<<<<< + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->IsEOF()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":199 + * def Next(self): + * self.lpUnpacker.Next() + * def IsEOF(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.IsEOF", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":201 + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("IsEmpty (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("IsEmpty", 0); + + /* "py_t2sdk.pyx":202 + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() # <<<<<<<<<<<<<< + * def Destroy(self): + * self.lpUnpacker.Destroy() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->IsEmpty()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":201 + * def IsEOF(self): + * return self.lpUnpacker.IsEOF() + * def IsEmpty(self): # <<<<<<<<<<<<<< + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.IsEmpty", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":203 + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Destroy() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Destroy (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Destroy", 0); + + /* "py_t2sdk.pyx":204 + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): + * self.lpUnpacker.Destroy() # <<<<<<<<<<<<<< + * def Release(self): + * if self.lpUnpacker != NULL: + */ + __pyx_v_self->lpUnpacker->Destroy(); + + /* "py_t2sdk.pyx":203 + * def IsEmpty(self): + * return self.lpUnpacker.IsEmpty() + * def Destroy(self): # <<<<<<<<<<<<<< + * self.lpUnpacker.Destroy() + * def Release(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":205 + * def Destroy(self): + * self.lpUnpacker.Destroy() + * def Release(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * self.lpUnpacker.Release() + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":206 + * self.lpUnpacker.Destroy() + * def Release(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker.Release() + * + */ + __pyx_t_1 = ((__pyx_v_self->lpUnpacker != NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":207 + * def Release(self): + * if self.lpUnpacker != NULL: + * self.lpUnpacker.Release() # <<<<<<<<<<<<<< + * + * cdef class pyCConfigInterface: + */ + __pyx_v_self->lpUnpacker->Release(); + + /* "py_t2sdk.pyx":206 + * self.lpUnpacker.Destroy() + * def Release(self): + * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<< + * self.lpUnpacker.Release() + * + */ + } + + /* "py_t2sdk.pyx":205 + * def Destroy(self): + * self.lpUnpacker.Destroy() + * def Release(self): # <<<<<<<<<<<<<< + * if self.lpUnpacker != NULL: + * self.lpUnpacker.Release() + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.__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_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":211 + * cdef class pyCConfigInterface: + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + C_CConfigInterface *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":212 + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): + * self.lpConfig = new C_CConfigInterface() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpConfig + */ + try { + __pyx_t_1 = new C_CConfigInterface(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 212, __pyx_L1_error) + } + __pyx_v_self->lpConfig = __pyx_t_1; + + /* "py_t2sdk.pyx":211 + * cdef class pyCConfigInterface: + * cdef C_CConfigInterface* lpConfig + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":213 + * def __cinit__(self): + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpConfig + * def Load(self,str szFileName): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":214 + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): + * del self.lpConfig # <<<<<<<<<<<<<< + * def Load(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + */ + delete __pyx_v_self->lpConfig; + + /* "py_t2sdk.pyx":213 + * def __cinit__(self): + * self.lpConfig = new C_CConfigInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpConfig + * def Load(self,str szFileName): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":215 + * def __dealloc__(self): + * del self.lpConfig + * def Load(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Load (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFileName), (&PyString_Type), 1, "szFileName", 1))) __PYX_ERR(1, 215, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szFileName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("Load", 0); + + /* "py_t2sdk.pyx":216 + * del self.lpConfig + * def Load(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szFileName); + __Pyx_GIVEREF(__pyx_v_szFileName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFileName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 216, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":217 + * def Load(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) # <<<<<<<<<<<<<< + * def Save(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 217, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->Load(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":215 + * def __dealloc__(self): + * del self.lpConfig + * def Load(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.Load", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":218 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Save (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFileName), (&PyString_Type), 1, "szFileName", 1))) __PYX_ERR(1, 218, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szFileName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("Save", 0); + + /* "py_t2sdk.pyx":219 + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szFileName); + __Pyx_GIVEREF(__pyx_v_szFileName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFileName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 219, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":220 + * def Save(self,str szFileName): + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) # <<<<<<<<<<<<<< + * def GetString(self,str szSection,str szEntry,str szDefault): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 220, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->Save(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 220, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":218 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Load(sName) + * def Save(self,str szFileName): # <<<<<<<<<<<<<< + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.Save", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":221 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + PyObject *__pyx_v_szDefault = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_szDefault,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, 1); __PYX_ERR(1, 221, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szDefault)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, 2); __PYX_ERR(1, 221, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetString") < 0)) __PYX_ERR(1, 221, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_szDefault = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 221, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 221, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 221, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDefault), (&PyString_Type), 1, "szDefault", 1))) __PYX_ERR(1, 221, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_szDefault); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szDefault) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_v_sDefault = NULL; + char *__pyx_v_sValue; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + char *__pyx_t_6; + __Pyx_RefNannySetupContext("GetString", 0); + + /* "py_t2sdk.pyx":222 + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * sDefault = bytes(szDefault,encoding='utf-8') + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 222, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":223 + * def GetString(self,str szSection,str szEntry,str szDefault): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * sDefault = bytes(szDefault,encoding='utf-8') + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 223, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":224 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * sDefault = bytes(szDefault,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szDefault); + __Pyx_GIVEREF(__pyx_v_szDefault); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDefault); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 224, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sDefault = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":225 + * sEntry = bytes(szEntry,encoding='utf-8') + * sDefault = bytes(szDefault,encoding='utf-8') + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) # <<<<<<<<<<<<<< + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_sDefault); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error) + __pyx_v_sValue = __pyx_v_self->lpConfig->GetString(__pyx_t_4, __pyx_t_5, __pyx_t_6); + + /* "py_t2sdk.pyx":226 + * sDefault = bytes(szDefault,encoding='utf-8') + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue # <<<<<<<<<<<<<< + * def GetInt(self,str szSection,str szEntry, int iDefault): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":221 + * sName = bytes(szFileName,encoding='utf-8') + * return self.lpConfig.Save(sName) + * def GetString(self,str szSection,str szEntry,str szDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XDECREF(__pyx_v_sDefault); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":227 + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + int __pyx_v_iDefault; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetInt (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_iDefault,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, 1); __PYX_ERR(1, 227, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iDefault)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, 2); __PYX_ERR(1, 227, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetInt") < 0)) __PYX_ERR(1, 227, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_iDefault = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iDefault == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 227, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 227, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 227, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 227, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_iDefault); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iDefault) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("GetInt", 0); + + /* "py_t2sdk.pyx":228 + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 228, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":229 + * def GetInt(self,str szSection,str szEntry, int iDefault): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 229, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":230 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) # <<<<<<<<<<<<<< + * def SetString(self,str szSection,str szEntry,str szValue): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->GetInt(__pyx_t_4, __pyx_t_5, __pyx_v_iDefault)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":227 + * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + * return sValue + * def GetInt(self,str szSection,str szEntry, int iDefault): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":231 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + PyObject *__pyx_v_szValue = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetString (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_szValue,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, 1); __PYX_ERR(1, 231, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, 2); __PYX_ERR(1, 231, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetString") < 0)) __PYX_ERR(1, 231, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_szValue = ((PyObject*)values[2]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 231, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 231, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 231, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szValue), (&PyString_Type), 1, "szValue", 1))) __PYX_ERR(1, 231, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_szValue); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szValue) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + char *__pyx_t_6; + __Pyx_RefNannySetupContext("SetString", 0); + + /* "py_t2sdk.pyx":232 + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * sValue = bytes(szValue,encoding='utf-8') + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 232, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 232, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":233 + * def SetString(self,str szSection,str szEntry,str szValue): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 233, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":234 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * sValue = bytes(szValue,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szValue); + __Pyx_GIVEREF(__pyx_v_szValue); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 234, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":235 + * sEntry = bytes(szEntry,encoding='utf-8') + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) # <<<<<<<<<<<<<< + * def SetInt(self,str szSection,str szEntry, int iValue): + * sSection = bytes(szSection,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->SetString(__pyx_t_4, __pyx_t_5, __pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 235, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":231 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.GetInt(sSection,sEntry,iDefault) + * def SetString(self,str szSection,str szEntry,str szValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetString", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":236 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_szSection = 0; + PyObject *__pyx_v_szEntry = 0; + int __pyx_v_iValue; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetInt (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_iValue,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, 1); __PYX_ERR(1, 236, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, 2); __PYX_ERR(1, 236, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetInt") < 0)) __PYX_ERR(1, 236, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_szSection = ((PyObject*)values[0]); + __pyx_v_szEntry = ((PyObject*)values[1]); + __pyx_v_iValue = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iValue == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 236, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 236, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 236, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_iValue); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iValue) { + PyObject *__pyx_v_sSection = NULL; + PyObject *__pyx_v_sEntry = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("SetInt", 0); + + /* "py_t2sdk.pyx":237 + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): + * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<< + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szSection); + __Pyx_GIVEREF(__pyx_v_szSection); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sSection = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":238 + * def SetInt(self,str szSection,str szEntry, int iValue): + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<< + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_szEntry); + __Pyx_GIVEREF(__pyx_v_szEntry); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 238, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sEntry = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":239 + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) # <<<<<<<<<<<<<< + * def Release(self): + * self.lpConfig.Release() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->SetInt(__pyx_t_4, __pyx_t_5, __pyx_v_iValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 239, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":236 + * sValue = bytes(szValue,encoding='utf-8') + * return self.lpConfig.SetString(sSection,sEntry,sValue) + * def SetInt(self,str szSection,str szEntry, int iValue): # <<<<<<<<<<<<<< + * sSection = bytes(szSection,encoding='utf-8') + * sEntry = bytes(szEntry,encoding='utf-8') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetInt", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sSection); + __Pyx_XDECREF(__pyx_v_sEntry); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":240 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): # <<<<<<<<<<<<<< + * self.lpConfig.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":241 + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): + * self.lpConfig.Release() # <<<<<<<<<<<<<< + * + * cdef class pyIBizMessage: + */ + __pyx_v_self->lpConfig->Release(); + + /* "py_t2sdk.pyx":240 + * sEntry = bytes(szEntry,encoding='utf-8') + * return self.lpConfig.SetInt(sSection,sEntry,iValue) + * def Release(self): # <<<<<<<<<<<<<< + * self.lpConfig.Release() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__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_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":245 + * cdef class pyIBizMessage: + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_IBizMessage *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":246 + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): + * self.lpBizMessage = new c_IBizMessage() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpBizMessage + */ + try { + __pyx_t_1 = new c_IBizMessage(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 246, __pyx_L1_error) + } + __pyx_v_self->lpBizMessage = __pyx_t_1; + + /* "py_t2sdk.pyx":245 + * cdef class pyIBizMessage: + * cdef c_IBizMessage* lpBizMessage + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":247 + * def __cinit__(self): + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":248 + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): + * del self.lpBizMessage # <<<<<<<<<<<<<< + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) + */ + delete __pyx_v_self->lpBizMessage; + + /* "py_t2sdk.pyx":247 + * def __cinit__(self): + * self.lpBizMessage = new c_IBizMessage() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":249 + * def __dealloc__(self): + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction(PyObject *__pyx_v_self, PyObject *__pyx_arg_nFUnctionNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction(PyObject *__pyx_v_self, PyObject *__pyx_arg_nFUnctionNo) { + int __pyx_v_nFUnctionNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFunction (wrapper)", 0); + assert(__pyx_arg_nFUnctionNo); { + __pyx_v_nFUnctionNo = __Pyx_PyInt_As_int(__pyx_arg_nFUnctionNo); if (unlikely((__pyx_v_nFUnctionNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nFUnctionNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nFUnctionNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFunction", 0); + + /* "py_t2sdk.pyx":250 + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) # <<<<<<<<<<<<<< + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() + */ + __pyx_v_self->lpBizMessage->SetFunction(__pyx_v_nFUnctionNo); + + /* "py_t2sdk.pyx":249 + * def __dealloc__(self): + * del self.lpBizMessage + * def SetFunction(self,int nFUnctionNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":251 + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFunction (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFunction", 0); + + /* "py_t2sdk.pyx":252 + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() # <<<<<<<<<<<<<< + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetFunction()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":251 + * def SetFunction(self,int nFUnctionNo): + * self.lpBizMessage.SetFunction(nFUnctionNo) + * def GetFunction(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":253 + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketType); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketType) { + int __pyx_v_nPacketType; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketType (wrapper)", 0); + assert(__pyx_arg_nPacketType); { + __pyx_v_nPacketType = __Pyx_PyInt_As_int(__pyx_arg_nPacketType); if (unlikely((__pyx_v_nPacketType == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 253, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetPacketType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nPacketType)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketType) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketType", 0); + + /* "py_t2sdk.pyx":254 + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) # <<<<<<<<<<<<<< + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() + */ + __pyx_v_self->lpBizMessage->SetPacketType(__pyx_v_nPacketType); + + /* "py_t2sdk.pyx":253 + * def GetFunction(self): + * return self.lpBizMessage.GetFunction() + * def SetPacketType(self,int nPacketType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":255 + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPacketType (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPacketType", 0); + + /* "py_t2sdk.pyx":256 + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() # <<<<<<<<<<<<<< + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetPacketType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":255 + * def SetPacketType(self,int nPacketType): + * self.lpBizMessage.SetPacketType(nPacketType) + * def GetPacketType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetPacketType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":257 + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nBranchNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nBranchNo) { + int __pyx_v_nBranchNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetBranchNo (wrapper)", 0); + assert(__pyx_arg_nBranchNo); { + __pyx_v_nBranchNo = __Pyx_PyInt_As_int(__pyx_arg_nBranchNo); if (unlikely((__pyx_v_nBranchNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBranchNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nBranchNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nBranchNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetBranchNo", 0); + + /* "py_t2sdk.pyx":258 + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) # <<<<<<<<<<<<<< + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() + */ + __pyx_v_self->lpBizMessage->SetBranchNo(__pyx_v_nBranchNo); + + /* "py_t2sdk.pyx":257 + * def GetPacketType(self): + * return self.lpBizMessage.GetPacketType() + * def SetBranchNo(self,int nBranchNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":259 + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetBranchNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetBranchNo", 0); + + /* "py_t2sdk.pyx":260 + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() # <<<<<<<<<<<<<< + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetBranchNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":259 + * def SetBranchNo(self,int nBranchNo): + * self.lpBizMessage.SetBranchNo(nBranchNo) + * def GetBranchNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetBranchNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":261 + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSystemNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSystemNo) { + int __pyx_v_nSystemNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSystemNo (wrapper)", 0); + assert(__pyx_arg_nSystemNo); { + __pyx_v_nSystemNo = __Pyx_PyInt_As_int(__pyx_arg_nSystemNo); if (unlikely((__pyx_v_nSystemNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 261, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSystemNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSystemNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSystemNo", 0); + + /* "py_t2sdk.pyx":262 + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) # <<<<<<<<<<<<<< + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() + */ + __pyx_v_self->lpBizMessage->SetSystemNo(__pyx_v_nSystemNo); + + /* "py_t2sdk.pyx":261 + * def GetBranchNo(self): + * return self.lpBizMessage.GetBranchNo() + * def SetSystemNo(self,int nSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":263 + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSystemNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSystemNo", 0); + + /* "py_t2sdk.pyx":264 + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() # <<<<<<<<<<<<<< + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSystemNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 264, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":263 + * def SetSystemNo(self,int nSystemNo): + * self.lpBizMessage.SetSystemNo(nSystemNo) + * def GetSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":265 + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSubSystemNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSubSystemNo) { + int __pyx_v_nSubSystemNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSubSystemNo (wrapper)", 0); + assert(__pyx_arg_nSubSystemNo); { + __pyx_v_nSubSystemNo = __Pyx_PyInt_As_int(__pyx_arg_nSubSystemNo); if (unlikely((__pyx_v_nSubSystemNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 265, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSubSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSubSystemNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSubSystemNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSubSystemNo", 0); + + /* "py_t2sdk.pyx":266 + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) # <<<<<<<<<<<<<< + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() + */ + __pyx_v_self->lpBizMessage->SetSubSystemNo(__pyx_v_nSubSystemNo); + + /* "py_t2sdk.pyx":265 + * def GetSystemNo(self): + * return self.lpBizMessage.GetSystemNo() + * def SetSubSystemNo(self,int nSubSystemNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":267 + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSubSystemNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSubSystemNo", 0); + + /* "py_t2sdk.pyx":268 + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() # <<<<<<<<<<<<<< + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSubSystemNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":267 + * def SetSubSystemNo(self,int nSubSystemNo): + * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + * def GetSubSystemNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSubSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":269 + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSenderId); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSenderId) { + int __pyx_v_nSenderId; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSenderId (wrapper)", 0); + assert(__pyx_arg_nSenderId); { + __pyx_v_nSenderId = __Pyx_PyInt_As_int(__pyx_arg_nSenderId); if (unlikely((__pyx_v_nSenderId == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 269, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSenderId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSenderId)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSenderId) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSenderId", 0); + + /* "py_t2sdk.pyx":270 + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) # <<<<<<<<<<<<<< + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() + */ + __pyx_v_self->lpBizMessage->SetSenderId(__pyx_v_nSenderId); + + /* "py_t2sdk.pyx":269 + * def GetSubSystemNo(self): + * return self.lpBizMessage.GetSubSystemNo() + * def SetSenderId(self,int nSenderId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":271 + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSenderId (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSenderId", 0); + + /* "py_t2sdk.pyx":272 + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() # <<<<<<<<<<<<<< + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSenderId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":271 + * def SetSenderId(self,int nSenderId): + * self.lpBizMessage.SetSenderId(nSenderId) + * def GetSenderId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSenderId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":273 + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketId); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketId) { + int __pyx_v_nPacketId; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketId (wrapper)", 0); + assert(__pyx_arg_nPacketId); { + __pyx_v_nPacketId = __Pyx_PyInt_As_int(__pyx_arg_nPacketId); if (unlikely((__pyx_v_nPacketId == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 273, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetPacketId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nPacketId)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketId) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetPacketId", 0); + + /* "py_t2sdk.pyx":274 + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) # <<<<<<<<<<<<<< + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() + */ + __pyx_v_self->lpBizMessage->SetPacketId(__pyx_v_nPacketId); + + /* "py_t2sdk.pyx":273 + * def GetSenderId(self): + * return self.lpBizMessage.GetSenderId() + * def SetPacketId(self,int nPacketId): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":275 + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetPacketId (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetPacketId", 0); + + /* "py_t2sdk.pyx":276 + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() # <<<<<<<<<<<<<< + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetPacketId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":275 + * def SetPacketId(self,int nPacketId): + * self.lpBizMessage.SetPacketId(nPacketId) + * def GetPacketId(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetPacketId", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":277 + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorNo) { + int __pyx_v_nErrorNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetErrorNo (wrapper)", 0); + assert(__pyx_arg_nErrorNo); { + __pyx_v_nErrorNo = __Pyx_PyInt_As_int(__pyx_arg_nErrorNo); if (unlikely((__pyx_v_nErrorNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetErrorNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nErrorNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nErrorNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetErrorNo", 0); + + /* "py_t2sdk.pyx":278 + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) # <<<<<<<<<<<<<< + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() + */ + __pyx_v_self->lpBizMessage->SetErrorNo(__pyx_v_nErrorNo); + + /* "py_t2sdk.pyx":277 + * def GetPacketId(self): + * return self.lpBizMessage.GetPacketId() + * def SetErrorNo(self,int nErrorNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":279 + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetErrorNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetErrorNo", 0); + + /* "py_t2sdk.pyx":280 + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() # <<<<<<<<<<<<<< + * def SetErrorInfo(self,str strErrorInfo): + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetErrorNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":279 + * def SetErrorNo(self,int nErrorNo): + * self.lpBizMessage.SetErrorNo(nErrorNo) + * def GetErrorNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetErrorNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":281 + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): # <<<<<<<<<<<<<< + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_strErrorInfo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_strErrorInfo) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetErrorInfo (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strErrorInfo), (&PyString_Type), 1, "strErrorInfo", 1))) __PYX_ERR(1, 281, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((PyObject*)__pyx_v_strErrorInfo)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_strErrorInfo) { + PyObject *__pyx_v_sErrorInfo = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetErrorInfo", 0); + + /* "py_t2sdk.pyx":282 + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_strErrorInfo); + __Pyx_GIVEREF(__pyx_v_strErrorInfo); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_strErrorInfo); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 282, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sErrorInfo = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":283 + * def SetErrorInfo(self,str strErrorInfo): + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) # <<<<<<<<<<<<<< + * def GetErrorInfo(self): + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sErrorInfo); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_v_self->lpBizMessage->SetErrorInfo(__pyx_t_4); + + /* "py_t2sdk.pyx":281 + * def GetErrorNo(self): + * return self.lpBizMessage.GetErrorNo() + * def SetErrorInfo(self,str strErrorInfo): # <<<<<<<<<<<<<< + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + */ + + /* 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("py_t2sdk.pyIBizMessage.SetErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sErrorInfo); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":284 + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): # <<<<<<<<<<<<<< + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetErrorInfo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + char *__pyx_v_sErrInfo; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetErrorInfo", 0); + + /* "py_t2sdk.pyx":285 + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() # <<<<<<<<<<<<<< + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): + */ + __pyx_v_sErrInfo = __pyx_v_self->lpBizMessage->GetErrorInfo(); + + /* "py_t2sdk.pyx":286 + * def GetErrorInfo(self): + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo # <<<<<<<<<<<<<< + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sErrInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":284 + * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + * self.lpBizMessage.SetErrorInfo(sErrorInfo) + * def GetErrorInfo(self): # <<<<<<<<<<<<<< + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":287 + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_nReturnCode); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_nReturnCode) { + int __pyx_v_nReturnCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode (wrapper)", 0); + assert(__pyx_arg_nReturnCode); { + __pyx_v_nReturnCode = __Pyx_PyInt_As_int(__pyx_arg_nReturnCode); if (unlikely((__pyx_v_nReturnCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 287, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nReturnCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nReturnCode) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnCode", 0); + + /* "py_t2sdk.pyx":288 + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) # <<<<<<<<<<<<<< + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() + */ + __pyx_v_self->lpBizMessage->SetReturnCode(__pyx_v_nReturnCode); + + /* "py_t2sdk.pyx":287 + * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + * return sErrInfo + * def SetReturnCode(self,int nReturnCode): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":289 + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetReturnCode (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetReturnCode", 0); + + /* "py_t2sdk.pyx":290 + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() # <<<<<<<<<<<<<< + * def SetContent(self,list lpContent,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetReturnCode()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":289 + * def SetReturnCode(self,int nReturnCode): + * self.lpBizMessage.SetReturnCode(nReturnCode) + * def GetReturnCode(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":291 + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpContent = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetContent (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpContent,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpContent)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetContent", 1, 2, 2, 1); __PYX_ERR(1, 291, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetContent") < 0)) __PYX_ERR(1, 291, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpContent = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 291, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetContent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 291, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetContent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpContent), (&PyList_Type), 1, "lpContent", 1))) __PYX_ERR(1, 291, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpContent, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpContent, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("SetContent", 0); + + /* "py_t2sdk.pyx":292 + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":293 + * def SetContent(self,list lpContent,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpContent[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":294 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpContent[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":295 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpContent[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * self.lpBizMessage.SetContent(sBuff,iLen) + */ + if (unlikely(__pyx_v_lpContent == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 295, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpContent, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 295, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":296 + * while iIndex < iLen: + * sBuff[iIndex] = lpContent[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":297 + * sBuff[iIndex] = lpContent[iIndex] + * iIndex+=1 + * self.lpBizMessage.SetContent(sBuff,iLen) # <<<<<<<<<<<<<< + * free(sBuff) + * def GetContent(self): + */ + __pyx_v_self->lpBizMessage->SetContent(__pyx_v_sBuff, __pyx_v_iLen); + + /* "py_t2sdk.pyx":298 + * iIndex+=1 + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) # <<<<<<<<<<<<<< + * def GetContent(self): + * cdef int iLen = 0 + */ + free(__pyx_v_sBuff); + + /* "py_t2sdk.pyx":291 + * def GetReturnCode(self): + * return self.lpBizMessage.GetReturnCode() + * def SetContent(self,list lpContent,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetContent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":299 + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) + * def GetContent(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetContent (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + PyObject *__pyx_v_iTemp = 0; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("GetContent", 0); + + /* "py_t2sdk.pyx":300 + * free(sBuff) + * def GetContent(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + * lpBuff = [] + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":301 + * def GetContent(self): + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef iTemp = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetContent(__pyx_v_iLen); + + /* "py_t2sdk.pyx":302 + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef iTemp = 0 + * cdef int iIndex = 0 + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":303 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + * lpBuff = [] + * cdef iTemp = 0 # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_iTemp = __pyx_int_0; + + /* "py_t2sdk.pyx":304 + * lpBuff = [] + * cdef iTemp = 0 + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":305 + * cdef iTemp = 0 + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":306 + * cdef int iIndex = 0 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] # <<<<<<<<<<<<<< + * lpBuff.append(iTemp) + * iIndex +=1 + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_iTemp, __pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":307 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,iLen + */ + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_v_iTemp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 307, __pyx_L1_error) + + /* "py_t2sdk.pyx":308 + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":309 + * lpBuff.append(iTemp) + * iIndex +=1 + * return lpBuff,iLen # <<<<<<<<<<<<<< + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":299 + * self.lpBizMessage.SetContent(sBuff,iLen) + * free(sBuff) + * def GetContent(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetContent", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XDECREF(__pyx_v_iTemp); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":310 + * iIndex +=1 + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIssueType); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIssueType) { + int __pyx_v_nIssueType; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetIssueType (wrapper)", 0); + assert(__pyx_arg_nIssueType); { + __pyx_v_nIssueType = __Pyx_PyInt_As_int(__pyx_arg_nIssueType); if (unlikely((__pyx_v_nIssueType == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetIssueType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nIssueType)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nIssueType) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetIssueType", 0); + + /* "py_t2sdk.pyx":311 + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) # <<<<<<<<<<<<<< + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() + */ + __pyx_v_self->lpBizMessage->SetIssueType(__pyx_v_nIssueType); + + /* "py_t2sdk.pyx":310 + * iIndex +=1 + * return lpBuff,iLen + * def SetIssueType(self,int nIssueType): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":312 + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetIssueType (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetIssueType", 0); + + /* "py_t2sdk.pyx":313 + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() # <<<<<<<<<<<<<< + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetIssueType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 313, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":312 + * def SetIssueType(self,int nIssueType): + * self.lpBizMessage.SetIssueType(nIssueType) + * def GetIssueType(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetIssueType", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":314 + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSequeceNo); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSequeceNo) { + int __pyx_v_nSequeceNo; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSequeceNo (wrapper)", 0); + assert(__pyx_arg_nSequeceNo); { + __pyx_v_nSequeceNo = __Pyx_PyInt_As_int(__pyx_arg_nSequeceNo); if (unlikely((__pyx_v_nSequeceNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 314, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSequeceNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSequeceNo)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSequeceNo) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSequeceNo", 0); + + /* "py_t2sdk.pyx":315 + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) # <<<<<<<<<<<<<< + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() + */ + __pyx_v_self->lpBizMessage->SetSequeceNo(__pyx_v_nSequeceNo); + + /* "py_t2sdk.pyx":314 + * def GetIssueType(self): + * return self.lpBizMessage.GetIssueType() + * def SetSequeceNo(self,int nSequeceNo): # <<<<<<<<<<<<<< + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":316 + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSequeceNo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSequeceNo", 0); + + /* "py_t2sdk.pyx":317 + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() # <<<<<<<<<<<<<< + * def SetKeyInfo(self,list lpKeyData,int iLen): + * cdef char* sBuff = malloc(iLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSequeceNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":316 + * def SetSequeceNo(self,int nSequeceNo): + * self.lpBizMessage.SetSequeceNo(nSequeceNo) + * def GetSequeceNo(self): # <<<<<<<<<<<<<< + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSequeceNo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":318 + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpKeyData = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetKeyInfo (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpKeyData,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpKeyData)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetKeyInfo", 1, 2, 2, 1); __PYX_ERR(1, 318, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetKeyInfo") < 0)) __PYX_ERR(1, 318, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpKeyData = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 318, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetKeyInfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 318, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpKeyData), (&PyList_Type), 1, "lpKeyData", 1))) __PYX_ERR(1, 318, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpKeyData, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpKeyData, int __pyx_v_iLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("SetKeyInfo", 0); + + /* "py_t2sdk.pyx":319 + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): + * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen)); + + /* "py_t2sdk.pyx":320 + * def SetKeyInfo(self,list lpKeyData,int iLen): + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * sBuff[iIndex] = lpKeyData[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":321 + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpKeyData[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":322 + * cdef int iIndex = 0 + * while iIndex < iLen: + * sBuff[iIndex] = lpKeyData[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + */ + if (unlikely(__pyx_v_lpKeyData == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 322, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpKeyData, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":323 + * while iIndex < iLen: + * sBuff[iIndex] = lpKeyData[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":324 + * sBuff[iIndex] = lpKeyData[iIndex] + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) # <<<<<<<<<<<<<< + * def GetKeyInfo(self): + * cdef int iLen = 0 + */ + __pyx_v_self->lpBizMessage->SetKeyInfo(__pyx_v_sBuff, __pyx_v_iLen); + + /* "py_t2sdk.pyx":318 + * def GetSequeceNo(self): + * return self.lpBizMessage.GetSequeceNo() + * def SetKeyInfo(self,list lpKeyData,int iLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(iLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":325 + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef int itemp = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetKeyInfo (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + CYTHON_UNUSED int __pyx_v_itemp; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("GetKeyInfo", 0); + + /* "py_t2sdk.pyx":326 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef int itemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":327 + * def GetKeyInfo(self): + * cdef int iLen = 0 + * cdef int itemp = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + * lpBuff = [] + */ + __pyx_v_itemp = 0; + + /* "py_t2sdk.pyx":328 + * cdef int iLen = 0 + * cdef int itemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetKeyInfo(__pyx_v_iLen); + + /* "py_t2sdk.pyx":329 + * cdef int itemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":330 + * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * lpBuff.append(sBuff[iIndex]) + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":331 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":332 + * cdef int iIndex = 0 + * while iIndex < iLen: + * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,iLen + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 332, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":333 + * while iIndex < iLen: + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":334 + * lpBuff.append(sBuff[iIndex]) + * iIndex +=1 + * return lpBuff,iLen # <<<<<<<<<<<<<< + * def SetAppData(self,str lpAppdata,int nAppLen): + * sAppData = bytes(lpAppdata,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":325 + * iIndex+=1 + * self.lpBizMessage.SetKeyInfo(sBuff,iLen) + * def GetKeyInfo(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef int itemp = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":335 + * iIndex +=1 + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): # <<<<<<<<<<<<<< + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpAppdata = 0; + int __pyx_v_nAppLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetAppData (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpAppdata,&__pyx_n_s_nAppLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpAppdata)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nAppLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, 1); __PYX_ERR(1, 335, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAppData") < 0)) __PYX_ERR(1, 335, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpAppdata = ((PyObject*)values[0]); + __pyx_v_nAppLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nAppLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 335, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 335, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpAppdata), (&PyString_Type), 1, "lpAppdata", 1))) __PYX_ERR(1, 335, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpAppdata, __pyx_v_nAppLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpAppdata, int __pyx_v_nAppLen) { + PyObject *__pyx_v_sAppData = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetAppData", 0); + + /* "py_t2sdk.pyx":336 + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): + * sAppData = bytes(lpAppdata,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpAppdata); + __Pyx_GIVEREF(__pyx_v_lpAppdata); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpAppdata); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 336, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sAppData = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":337 + * def SetAppData(self,str lpAppdata,int nAppLen): + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) # <<<<<<<<<<<<<< + * def GetAppData(self): + * cdef int iLen = 0 + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sAppData); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 337, __pyx_L1_error) + __pyx_v_self->lpBizMessage->SetAppData(__pyx_t_4, __pyx_v_nAppLen); + + /* "py_t2sdk.pyx":335 + * iIndex +=1 + * return lpBuff,iLen + * def SetAppData(self,str lpAppdata,int nAppLen): # <<<<<<<<<<<<<< + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + */ + + /* 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("py_t2sdk.pyIBizMessage.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sAppData); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":338 + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetAppData (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + char *__pyx_v_sAppData; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("GetAppData", 0); + + /* "py_t2sdk.pyx":339 + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":340 + * def GetAppData(self): + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) # <<<<<<<<<<<<<< + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): + */ + __pyx_v_sAppData = __pyx_v_self->lpBizMessage->GetAppData(__pyx_v_iLen); + + /* "py_t2sdk.pyx":341 + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen # <<<<<<<<<<<<<< + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAppData); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":338 + * sAppData = bytes(lpAppdata,encoding='utf-8') + * self.lpBizMessage.SetAppData(sAppData,nAppLen) + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":342 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ChangeReq2AnsMessage (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ChangeReq2AnsMessage", 0); + + /* "py_t2sdk.pyx":343 + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() # <<<<<<<<<<<<<< + * def GetBuff(self): + * cdef int iLen = 0 + */ + (void)(__pyx_v_self->lpBizMessage->ChangeReq2AnsMessage()); + + /* "py_t2sdk.pyx":342 + * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + * return sAppData,iLen + * def ChangeReq2AnsMessage(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":344 + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef iTemp = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetBuff (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + int __pyx_v_iLen; + PyObject *__pyx_v_iTemp = 0; + char *__pyx_v_sBuff; + PyObject *__pyx_v_lpBuff = NULL; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + __Pyx_RefNannySetupContext("GetBuff", 0); + + /* "py_t2sdk.pyx":345 + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef iTemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":346 + * def GetBuff(self): + * cdef int iLen = 0 + * cdef iTemp = 0 # <<<<<<<<<<<<<< + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + * lpBuff = [] + */ + __Pyx_INCREF(__pyx_int_0); + __pyx_v_iTemp = __pyx_int_0; + + /* "py_t2sdk.pyx":347 + * cdef int iLen = 0 + * cdef iTemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) # <<<<<<<<<<<<<< + * lpBuff = [] + * cdef int iIndex = 0 + */ + __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetBuff(__pyx_v_iLen); + + /* "py_t2sdk.pyx":348 + * cdef iTemp = 0 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + * lpBuff = [] # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < iLen: + */ + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpBuff = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":349 + * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + * lpBuff = [] + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":350 + * lpBuff = [] + * cdef int iIndex = 0 + * while iIndex < iLen: # <<<<<<<<<<<<<< + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + */ + while (1) { + __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0); + if (!__pyx_t_2) break; + + /* "py_t2sdk.pyx":351 + * cdef int iIndex = 0 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] # <<<<<<<<<<<<<< + * lpBuff.append(iTemp) + * iIndex +=1 + */ + __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 351, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF_SET(__pyx_v_iTemp, __pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":352 + * while iIndex < iLen: + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) # <<<<<<<<<<<<<< + * iIndex +=1 + * return lpBuff,iLen + */ + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_v_iTemp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 352, __pyx_L1_error) + + /* "py_t2sdk.pyx":353 + * iTemp = sBuff[iIndex] + * lpBuff.append(iTemp) + * iIndex +=1 # <<<<<<<<<<<<<< + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":354 + * lpBuff.append(iTemp) + * iIndex +=1 + * return lpBuff,iLen # <<<<<<<<<<<<<< + * def SetBuff(self,list lpBuff,int nBuffLen): + * cdef char* sBuff = malloc(nBuffLen) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_v_lpBuff); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":344 + * def ChangeReq2AnsMessage(self): + * self.lpBizMessage.ChangeReq2AnsMessage() + * def GetBuff(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef iTemp = 0 + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_iTemp); + __Pyx_XDECREF(__pyx_v_lpBuff); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":355 + * iIndex +=1 + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpBuff = 0; + int __pyx_v_nBuffLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetBuff (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_nBuffLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nBuffLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetBuff", 1, 2, 2, 1); __PYX_ERR(1, 355, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetBuff") < 0)) __PYX_ERR(1, 355, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpBuff = ((PyObject*)values[0]); + __pyx_v_nBuffLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nBuffLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetBuff", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 355, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 355, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_nBuffLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_nBuffLen) { + char *__pyx_v_sBuff; + int __pyx_v_iIndex; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + char __pyx_t_3; + __Pyx_RefNannySetupContext("SetBuff", 0); + + /* "py_t2sdk.pyx":356 + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): + * cdef char* sBuff = malloc(nBuffLen) # <<<<<<<<<<<<<< + * cdef int iIndex = 0 + * while iIndex < nBuffLen: + */ + __pyx_v_sBuff = ((char *)malloc(__pyx_v_nBuffLen)); + + /* "py_t2sdk.pyx":357 + * def SetBuff(self,list lpBuff,int nBuffLen): + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 # <<<<<<<<<<<<<< + * while iIndex < nBuffLen: + * sBuff[iIndex] = lpBuff[iIndex] + */ + __pyx_v_iIndex = 0; + + /* "py_t2sdk.pyx":358 + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 + * while iIndex < nBuffLen: # <<<<<<<<<<<<<< + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + */ + while (1) { + __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_nBuffLen) != 0); + if (!__pyx_t_1) break; + + /* "py_t2sdk.pyx":359 + * cdef int iIndex = 0 + * while iIndex < nBuffLen: + * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<< + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + */ + if (unlikely(__pyx_v_lpBuff == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(1, 359, __pyx_L1_error) + } + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 359, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3; + + /* "py_t2sdk.pyx":360 + * while iIndex < nBuffLen: + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 # <<<<<<<<<<<<<< + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): + */ + __pyx_v_iIndex = (__pyx_v_iIndex + 1); + } + + /* "py_t2sdk.pyx":361 + * sBuff[iIndex] = lpBuff[iIndex] + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) # <<<<<<<<<<<<<< + * def ReSet(self): + * self.lpBizMessage.ReSet() + */ + (void)(__pyx_v_self->lpBizMessage->SetBuff(__pyx_v_sBuff, __pyx_v_nBuffLen)); + + /* "py_t2sdk.pyx":355 + * iIndex +=1 + * return lpBuff,iLen + * def SetBuff(self,list lpBuff,int nBuffLen): # <<<<<<<<<<<<<< + * cdef char* sBuff = malloc(nBuffLen) + * cdef int iIndex = 0 + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":362 + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ReSet() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ReSet (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("ReSet", 0); + + /* "py_t2sdk.pyx":363 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): + * self.lpBizMessage.ReSet() # <<<<<<<<<<<<<< + * def Release(self): + * self.lpBizMessage.Release() + */ + __pyx_v_self->lpBizMessage->ReSet(); + + /* "py_t2sdk.pyx":362 + * iIndex+=1 + * self.lpBizMessage.SetBuff(sBuff,nBuffLen) + * def ReSet(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.ReSet() + * def Release(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":364 + * def ReSet(self): + * self.lpBizMessage.ReSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":365 + * self.lpBizMessage.ReSet() + * def Release(self): + * self.lpBizMessage.Release() # <<<<<<<<<<<<<< + * + * cdef class pySubscribeParamInterface: + */ + __pyx_v_self->lpBizMessage->Release(); + + /* "py_t2sdk.pyx":364 + * def ReSet(self): + * self.lpBizMessage.ReSet() + * def Release(self): # <<<<<<<<<<<<<< + * self.lpBizMessage.Release() + * + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__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_8py_t2sdk_13pyIBizMessage_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":369 + * cdef class pySubscribeParamInterface: + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_CSubscribeParamInterface *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":370 + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): + * self.lpSubscribeParam = new c_CSubscribeParamInterface() # <<<<<<<<<<<<<< + * def __dealloc__(self): + * del self.lpSubscribeParam + */ + try { + __pyx_t_1 = new c_CSubscribeParamInterface(); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 370, __pyx_L1_error) + } + __pyx_v_self->lpSubscribeParam = __pyx_t_1; + + /* "py_t2sdk.pyx":369 + * cdef class pySubscribeParamInterface: + * cdef c_CSubscribeParamInterface* lpSubscribeParam + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":371 + * def __cinit__(self): + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":372 + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): + * del self.lpSubscribeParam # <<<<<<<<<<<<<< + * def SetTopicName(self,str szName): + * sName = bytes(szName,encoding='utf-8') + */ + delete __pyx_v_self->lpSubscribeParam; + + /* "py_t2sdk.pyx":371 + * def __cinit__(self): + * self.lpSubscribeParam = new c_CSubscribeParamInterface() + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":373 + * def __dealloc__(self): + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName(PyObject *__pyx_v_self, PyObject *__pyx_v_szName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName(PyObject *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetTopicName (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szName), (&PyString_Type), 1, "szName", 1))) __PYX_ERR(1, 373, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_szName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetTopicName", 0); + + /* "py_t2sdk.pyx":374 + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): + * sName = bytes(szName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_szName); + __Pyx_GIVEREF(__pyx_v_szName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 374, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":375 + * def SetTopicName(self,str szName): + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) # <<<<<<<<<<<<<< + * def SetAppData(self,str lpData,int iLen): + * sData = bytes(lpData,encoding='utf-8') + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 375, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetTopicName(__pyx_t_4); + + /* "py_t2sdk.pyx":373 + * def __dealloc__(self): + * del self.lpSubscribeParam + * def SetTopicName(self,str szName): # <<<<<<<<<<<<<< + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + */ + + /* 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("py_t2sdk.pySubscribeParamInterface.SetTopicName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":376 + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): # <<<<<<<<<<<<<< + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpData = 0; + int __pyx_v_iLen; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetAppData (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpData,&__pyx_n_s_iLen,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpData)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, 1); __PYX_ERR(1, 376, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAppData") < 0)) __PYX_ERR(1, 376, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpData = ((PyObject*)values[0]); + __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 376, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 376, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpData), (&PyString_Type), 1, "lpData", 1))) __PYX_ERR(1, 376, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), __pyx_v_lpData, __pyx_v_iLen); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_lpData, int __pyx_v_iLen) { + PyObject *__pyx_v_sData = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetAppData", 0); + + /* "py_t2sdk.pyx":377 + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): + * sData = bytes(lpData,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpData); + __Pyx_GIVEREF(__pyx_v_lpData); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpData); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 377, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sData = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":378 + * def SetAppData(self,str lpData,int iLen): + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) # <<<<<<<<<<<<<< + * def SetFilter(self,str filterName,str filterValue): + * sName = bytes(filterName,encoding='utf-8') + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sData); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetAppData(__pyx_t_4, __pyx_v_iLen); + + /* "py_t2sdk.pyx":376 + * sName = bytes(szName,encoding='utf-8') + * self.lpSubscribeParam.SetTopicName(sName) + * def SetAppData(self,str lpData,int iLen): # <<<<<<<<<<<<<< + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + */ + + /* 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("py_t2sdk.pySubscribeParamInterface.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sData); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":379 + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): # <<<<<<<<<<<<<< + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_filterName = 0; + PyObject *__pyx_v_filterValue = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFilter (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filterName,&__pyx_n_s_filterValue,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filterName)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filterValue)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 2, 2, 1); __PYX_ERR(1, 379, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetFilter") < 0)) __PYX_ERR(1, 379, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_filterName = ((PyObject*)values[0]); + __pyx_v_filterValue = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 379, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterName), (&PyString_Type), 1, "filterName", 1))) __PYX_ERR(1, 379, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterValue), (&PyString_Type), 1, "filterValue", 1))) __PYX_ERR(1, 379, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), __pyx_v_filterName, __pyx_v_filterValue); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filterName, PyObject *__pyx_v_filterValue) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_v_sValue = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + __Pyx_RefNannySetupContext("SetFilter", 0); + + /* "py_t2sdk.pyx":380 + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): + * sName = bytes(filterName,encoding='utf-8') # <<<<<<<<<<<<<< + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_filterName); + __Pyx_GIVEREF(__pyx_v_filterName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filterName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 380, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":381 + * def SetFilter(self,str filterName,str filterValue): + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_filterValue); + __Pyx_GIVEREF(__pyx_v_filterValue); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filterValue); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 381, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sValue = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":382 + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) # <<<<<<<<<<<<<< + * def SetReturnFiled(self,str filedName): + * sName = bytes(filedName,encoding='utf-8') + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetFilter(__pyx_t_4, __pyx_t_5); + + /* "py_t2sdk.pyx":379 + * sData = bytes(lpData,encoding='utf-8') + * self.lpSubscribeParam.SetAppData(sData,iLen) + * def SetFilter(self,str filterName,str filterValue): # <<<<<<<<<<<<<< + * sName = bytes(filterName,encoding='utf-8') + * sValue = bytes(filterValue,encoding='utf-8') + */ + + /* 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("py_t2sdk.pySubscribeParamInterface.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF(__pyx_v_sValue); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":383 + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): # <<<<<<<<<<<<<< + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled(PyObject *__pyx_v_self, PyObject *__pyx_v_filedName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled(PyObject *__pyx_v_self, PyObject *__pyx_v_filedName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReturnFiled (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filedName), (&PyString_Type), 1, "filedName", 1))) __PYX_ERR(1, 383, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_filedName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filedName) { + PyObject *__pyx_v_sName = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("SetReturnFiled", 0); + + /* "py_t2sdk.pyx":384 + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): + * sName = bytes(filedName,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_filedName); + __Pyx_GIVEREF(__pyx_v_filedName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filedName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 384, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 384, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":385 + * def SetReturnFiled(self,str filedName): + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) # <<<<<<<<<<<<<< + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L1_error) + __pyx_v_self->lpSubscribeParam->SetReturnFiled(__pyx_t_4); + + /* "py_t2sdk.pyx":383 + * sValue = bytes(filterValue,encoding='utf-8') + * self.lpSubscribeParam.SetFilter(sName,sValue) + * def SetReturnFiled(self,str filedName): # <<<<<<<<<<<<<< + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + */ + + /* 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("py_t2sdk.pySubscribeParamInterface.SetReturnFiled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":386 + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow(PyObject *__pyx_v_self, PyObject *__pyx_arg_bFromNow); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow(PyObject *__pyx_v_self, PyObject *__pyx_arg_bFromNow) { + int __pyx_v_bFromNow; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFromNow (wrapper)", 0); + assert(__pyx_arg_bFromNow); { + __pyx_v_bFromNow = __Pyx_PyInt_As_int(__pyx_arg_bFromNow); if (unlikely((__pyx_v_bFromNow == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 386, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFromNow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_bFromNow)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bFromNow) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetFromNow", 0); + + /* "py_t2sdk.pyx":387 + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) # <<<<<<<<<<<<<< + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) + */ + __pyx_v_self->lpSubscribeParam->SetFromNow(__pyx_v_bFromNow); + + /* "py_t2sdk.pyx":386 + * sName = bytes(filedName,encoding='utf-8') + * self.lpSubscribeParam.SetReturnFiled(sName) + * def SetFromNow(self,int bFromNow): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":388 + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace(PyObject *__pyx_v_self, PyObject *__pyx_arg_bReplace); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace(PyObject *__pyx_v_self, PyObject *__pyx_arg_bReplace) { + int __pyx_v_bReplace; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReplace (wrapper)", 0); + assert(__pyx_arg_bReplace); { + __pyx_v_bReplace = __Pyx_PyInt_As_int(__pyx_arg_bReplace); if (unlikely((__pyx_v_bReplace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 388, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetReplace", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_bReplace)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bReplace) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetReplace", 0); + + /* "py_t2sdk.pyx":389 + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) # <<<<<<<<<<<<<< + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + */ + __pyx_v_self->lpSubscribeParam->SetReplace(__pyx_v_bReplace); + + /* "py_t2sdk.pyx":388 + * def SetFromNow(self,int bFromNow): + * self.lpSubscribeParam.SetFromNow(bFromNow) + * def SetReplace(self,int bReplace): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":390 + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSendInterval); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSendInterval) { + int __pyx_v_nSendInterval; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSendInterval (wrapper)", 0); + assert(__pyx_arg_nSendInterval); { + __pyx_v_nSendInterval = __Pyx_PyInt_As_int(__pyx_arg_nSendInterval); if (unlikely((__pyx_v_nSendInterval == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 390, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetSendInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_nSendInterval)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_nSendInterval) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SetSendInterval", 0); + + /* "py_t2sdk.pyx":391 + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) # <<<<<<<<<<<<<< + * def GetTopicName(self): + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + */ + __pyx_v_self->lpSubscribeParam->SetSendInterval(__pyx_v_nSendInterval); + + /* "py_t2sdk.pyx":390 + * def SetReplace(self,int bReplace): + * self.lpSubscribeParam.SetReplace(bReplace) + * def SetSendInterval(self,int nSendInterval): # <<<<<<<<<<<<<< + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): + */ + + /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":392 + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetTopicName (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetTopicName", 0); + + /* "py_t2sdk.pyx":393 + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): + * cdef char* sName = self.lpSubscribeParam.GetTopicName() # <<<<<<<<<<<<<< + * return sName + * def GetAppData(self): + */ + __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetTopicName(); + + /* "py_t2sdk.pyx":394 + * def GetTopicName(self): + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName # <<<<<<<<<<<<<< + * def GetAppData(self): + * cdef int iLen = 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":392 + * def SetSendInterval(self,int nSendInterval): + * self.lpSubscribeParam.SetSendInterval(nSendInterval) + * def GetTopicName(self): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetTopicName", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":395 + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetAppData (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_v_iLen; + char *__pyx_v_sAppData; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("GetAppData", 0); + + /* "py_t2sdk.pyx":396 + * return sName + * def GetAppData(self): + * cdef int iLen = 0 # <<<<<<<<<<<<<< + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen + */ + __pyx_v_iLen = 0; + + /* "py_t2sdk.pyx":397 + * def GetAppData(self): + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) # <<<<<<<<<<<<<< + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): + */ + __pyx_v_sAppData = __pyx_v_self->lpSubscribeParam->GetAppData((&__pyx_v_iLen)); + + /* "py_t2sdk.pyx":398 + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen # <<<<<<<<<<<<<< + * def GetFilterNameByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAppData); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 398, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":395 + * cdef char* sName = self.lpSubscribeParam.GetTopicName() + * return sName + * def GetAppData(self): # <<<<<<<<<<<<<< + * cdef int iLen = 0 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":399 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { + int __pyx_v_index; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterNameByIndex (wrapper)", 0); + assert(__pyx_arg_index); { + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 399, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterNameByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFilterNameByIndex", 0); + + /* "py_t2sdk.pyx":400 + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) # <<<<<<<<<<<<<< + * return sName + * def GetFilterValueByIndex(self,int index): + */ + __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetFilterNameByIndex(__pyx_v_index); + + /* "py_t2sdk.pyx":401 + * def GetFilterNameByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName # <<<<<<<<<<<<<< + * def GetFilterValueByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":399 + * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + * return sAppData,iLen + * def GetFilterNameByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterNameByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":402 + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + * def GetFilterValueByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { + int __pyx_v_index; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterValueByIndex (wrapper)", 0); + assert(__pyx_arg_index); { + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValueByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_index)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index) { + char *__pyx_v_sName; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFilterValueByIndex", 0); + + /* "py_t2sdk.pyx":403 + * return sName + * def GetFilterValueByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) # <<<<<<<<<<<<<< + * return sName + * def GetFilterValue(self,str fileName): + */ + __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetFilterValueByIndex(__pyx_v_index); + + /* "py_t2sdk.pyx":404 + * def GetFilterValueByIndex(self,int index): + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName # <<<<<<<<<<<<<< + * def GetFilterValue(self,str fileName): + * sName = bytes(fileName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 404, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":402 + * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + * return sName + * def GetFilterValueByIndex(self,int index): # <<<<<<<<<<<<<< + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValueByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":405 + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + * def GetFilterValue(self,str fileName): # <<<<<<<<<<<<<< + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue(PyObject *__pyx_v_self, PyObject *__pyx_v_fileName); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue(PyObject *__pyx_v_self, PyObject *__pyx_v_fileName) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterValue (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fileName), (&PyString_Type), 1, "fileName", 1))) __PYX_ERR(1, 405, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_fileName)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_fileName) { + PyObject *__pyx_v_sName = NULL; + char *__pyx_v_sValus; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + __Pyx_RefNannySetupContext("GetFilterValue", 0); + + /* "py_t2sdk.pyx":406 + * return sName + * def GetFilterValue(self,str fileName): + * sName = bytes(fileName,encoding='utf-8') # <<<<<<<<<<<<<< + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_fileName); + __Pyx_GIVEREF(__pyx_v_fileName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fileName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 406, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 406, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":407 + * def GetFilterValue(self,str fileName): + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) # <<<<<<<<<<<<<< + * return sValus + * def GetFilterCount(self): + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 407, __pyx_L1_error) + __pyx_v_sValus = __pyx_v_self->lpSubscribeParam->GetFilterValue(__pyx_t_4); + + /* "py_t2sdk.pyx":408 + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus # <<<<<<<<<<<<<< + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sValus); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 408, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":405 + * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + * return sName + * def GetFilterValue(self,str fileName): # <<<<<<<<<<<<<< + * sName = bytes(fileName,encoding='utf-8') + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValue", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":409 + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus + * def GetFilterCount(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFilterCount (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFilterCount", 0); + + /* "py_t2sdk.pyx":410 + * return sValus + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() # <<<<<<<<<<<<<< + * def GetReturnFiled(self): + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubscribeParam->GetFilterCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":409 + * sValus = self.lpSubscribeParam.GetFilterValue(sName) + * return sValus + * def GetFilterCount(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterCount", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":411 + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): # <<<<<<<<<<<<<< + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetReturnFiled (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + char *__pyx_v_sFields; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetReturnFiled", 0); + + /* "py_t2sdk.pyx":412 + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() # <<<<<<<<<<<<<< + * return sFields + * def GetFromNow(self): + */ + __pyx_v_sFields = __pyx_v_self->lpSubscribeParam->GetReturnFiled(); + + /* "py_t2sdk.pyx":413 + * def GetReturnFiled(self): + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields # <<<<<<<<<<<<<< + * def GetFromNow(self): + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":411 + * def GetFilterCount(self): + * return self.lpSubscribeParam.GetFilterCount() + * def GetReturnFiled(self): # <<<<<<<<<<<<<< + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetReturnFiled", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":414 + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + * def GetFromNow(self): # <<<<<<<<<<<<<< + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetFromNow (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_v_bFromNow; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetFromNow", 0); + + /* "py_t2sdk.pyx":415 + * return sFields + * def GetFromNow(self): + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() # <<<<<<<<<<<<<< + * return bFromNow + * def GetReplace(self): + */ + __pyx_v_bFromNow = __pyx_v_self->lpSubscribeParam->GetFromNow(); + + /* "py_t2sdk.pyx":416 + * def GetFromNow(self): + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow # <<<<<<<<<<<<<< + * def GetReplace(self): + * cdef int bRep = self.lpSubscribeParam.GetReplace() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bFromNow); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":414 + * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + * return sFields + * def GetFromNow(self): # <<<<<<<<<<<<<< + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFromNow", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":417 + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + * def GetReplace(self): # <<<<<<<<<<<<<< + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetReplace (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + int __pyx_v_bRep; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetReplace", 0); + + /* "py_t2sdk.pyx":418 + * return bFromNow + * def GetReplace(self): + * cdef int bRep = self.lpSubscribeParam.GetReplace() # <<<<<<<<<<<<<< + * return bRep + * def GetSendInterval(self): + */ + __pyx_v_bRep = __pyx_v_self->lpSubscribeParam->GetReplace(); + + /* "py_t2sdk.pyx":419 + * def GetReplace(self): + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep # <<<<<<<<<<<<<< + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bRep); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":417 + * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + * return bFromNow + * def GetReplace(self): # <<<<<<<<<<<<<< + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetReplace", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":420 + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + * def GetSendInterval(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSendInterval (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSendInterval", 0); + + /* "py_t2sdk.pyx":421 + * return bRep + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() # <<<<<<<<<<<<<< + * def Release(self): + * return self.lpSubscribeParam.Release() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubscribeParam->GetSendInterval()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":420 + * cdef int bRep = self.lpSubscribeParam.GetReplace() + * return bRep + * def GetSendInterval(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetSendInterval", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":422 + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.Release() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":423 + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): + * return self.lpSubscribeParam.Release() # <<<<<<<<<<<<<< + * + * cdef class pySubCallBack: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubscribeParam->Release()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 423, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":422 + * def GetSendInterval(self): + * return self.lpSubscribeParam.GetSendInterval() + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubscribeParam.Release() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.Release", __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_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__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_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":427 + * cdef class pySubCallBack: + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpMould = 0; + PyObject *__pyx_v_lpClass = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMould,&__pyx_n_s_lpClass,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMould)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpClass)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 427, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 427, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpMould = ((PyObject*)values[0]); + __pyx_v_lpClass = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 427, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMould), (&PyString_Type), 1, "lpMould", 1))) __PYX_ERR(1, 427, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpClass), (&PyString_Type), 1, "lpClass", 1))) __PYX_ERR(1, 427, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self), __pyx_v_lpMould, __pyx_v_lpClass); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass) { + PyObject *__pyx_v_sMould = NULL; + PyObject *__pyx_v_sClass = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + c_SubCallBack *__pyx_t_6; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":428 + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') # <<<<<<<<<<<<<< + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpMould); + __Pyx_GIVEREF(__pyx_v_lpMould); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpMould); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 428, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 428, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sMould = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":429 + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_lpClass); + __Pyx_GIVEREF(__pyx_v_lpClass); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lpClass); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sClass = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":430 + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) # <<<<<<<<<<<<<< + * def initInstance(self): + * return self.lpSubCallBack.initInstance() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sMould); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sClass); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error) + try { + __pyx_t_6 = new c_SubCallBack(__pyx_t_4, __pyx_t_5); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 430, __pyx_L1_error) + } + __pyx_v_self->lpSubCallBack = __pyx_t_6; + + /* "py_t2sdk.pyx":427 + * cdef class pySubCallBack: + * cdef c_SubCallBack* lpSubCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sMould); + __Pyx_XDECREF(__pyx_v_sClass); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":431 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): # <<<<<<<<<<<<<< + * return self.lpSubCallBack.initInstance() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("initInstance (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("initInstance", 0); + + /* "py_t2sdk.pyx":432 + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): + * return self.lpSubCallBack.initInstance() # <<<<<<<<<<<<<< + * + * cdef class pySubscribeInterface: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubCallBack->initInstance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":431 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + * def initInstance(self): # <<<<<<<<<<<<<< + * return self.lpSubCallBack.initInstance() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.initInstance", __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_8py_t2sdk_13pySubCallBack_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__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_8py_t2sdk_13pySubCallBack_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":436 + * cdef class pySubscribeInterface: + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubcribe = NULL + * def __dealloc__(self): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} + if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":437 + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): + * self.lpSubcribe = NULL # <<<<<<<<<<<<<< + * def __dealloc__(self): + * if self.lpSubcribe != NULL: + */ + __pyx_v_self->lpSubcribe = NULL; + + /* "py_t2sdk.pyx":436 + * cdef class pySubscribeInterface: + * cdef c_CSubscribeInterface* lpSubcribe + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lpSubcribe = NULL + * def __dealloc__(self): + */ + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":438 + * def __cinit__(self): + * self.lpSubcribe = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpSubcribe != NULL: + * del self.lpSubcribe + */ + +/* Python wrapper */ +static void __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + __Pyx_RefNannyDeclarations + int __pyx_t_1; + __Pyx_RefNannySetupContext("__dealloc__", 0); + + /* "py_t2sdk.pyx":439 + * self.lpSubcribe = NULL + * def __dealloc__(self): + * if self.lpSubcribe != NULL: # <<<<<<<<<<<<<< + * del self.lpSubcribe + * self.lpSubcribe = NULL + */ + __pyx_t_1 = ((__pyx_v_self->lpSubcribe != NULL) != 0); + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":440 + * def __dealloc__(self): + * if self.lpSubcribe != NULL: + * del self.lpSubcribe # <<<<<<<<<<<<<< + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + */ + delete __pyx_v_self->lpSubcribe; + + /* "py_t2sdk.pyx":441 + * if self.lpSubcribe != NULL: + * del self.lpSubcribe + * self.lpSubcribe = NULL # <<<<<<<<<<<<<< + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + * cdef c_IF2UnPacker** lppBizUnPack = NULL + */ + __pyx_v_self->lpSubcribe = NULL; + + /* "py_t2sdk.pyx":439 + * self.lpSubcribe = NULL + * def __dealloc__(self): + * if self.lpSubcribe != NULL: # <<<<<<<<<<<<<< + * del self.lpSubcribe + * self.lpSubcribe = NULL + */ + } + + /* "py_t2sdk.pyx":438 + * def __cinit__(self): + * self.lpSubcribe = NULL + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if self.lpSubcribe != NULL: + * del self.lpSubcribe + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "py_t2sdk.pyx":442 + * del self.lpSubcribe + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam = 0; + int __pyx_v_uiTimeout; + struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack = 0; + struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SubscribeTopic (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpSubParam,&__pyx_n_s_uiTimeout,&__pyx_n_s_lpUnPack,&__pyx_n_s_lpPack,0}; + PyObject* values[4] = {0,0,0,0}; + values[2] = (PyObject *)((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)Py_None); + values[3] = (PyObject *)((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)Py_None); + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpSubParam)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiTimeout)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("SubscribeTopic", 0, 2, 4, 1); __PYX_ERR(1, 442, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpUnPack); + if (value) { values[2] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 3: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpPack); + if (value) { values[3] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SubscribeTopic") < 0)) __PYX_ERR(1, 442, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_lpSubParam = ((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)values[0]); + __pyx_v_uiTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 442, __pyx_L3_error) + __pyx_v_lpUnPack = ((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)values[2]); + __pyx_v_lpPack = ((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)values[3]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SubscribeTopic", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 442, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.SubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpSubParam), __pyx_ptype_8py_t2sdk_pySubscribeParamInterface, 1, "lpSubParam", 0))) __PYX_ERR(1, 442, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpUnPack), __pyx_ptype_8py_t2sdk_pyIF2UnPacker, 1, "lpUnPack", 0))) __PYX_ERR(1, 442, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpPack), __pyx_ptype_8py_t2sdk_pyIF2Packer, 1, "lpPack", 0))) __PYX_ERR(1, 442, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), __pyx_v_lpSubParam, __pyx_v_uiTimeout, __pyx_v_lpUnPack, __pyx_v_lpPack); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam, int __pyx_v_uiTimeout, struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack) { + c_IF2UnPacker **__pyx_v_lppBizUnPack; + c_IF2Packer *__pyx_v_lpBizPack; + int __pyx_v_ret; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + c_IF2Packer *__pyx_t_4; + __Pyx_RefNannySetupContext("SubscribeTopic", 0); + + /* "py_t2sdk.pyx":443 + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + * cdef c_IF2UnPacker** lppBizUnPack = NULL # <<<<<<<<<<<<<< + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: + */ + __pyx_v_lppBizUnPack = NULL; + + /* "py_t2sdk.pyx":444 + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL # <<<<<<<<<<<<<< + * if lpUnPack != None and lpPack != None: + * lppBizUnPack = &(lpUnPack.lpUnpacker) + */ + __pyx_v_lpBizPack = NULL; + + /* "py_t2sdk.pyx":445 + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: # <<<<<<<<<<<<<< + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker + */ + __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_lpUnPack), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + } else { + __pyx_t_1 = __pyx_t_3; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_lpPack), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 445, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "py_t2sdk.pyx":446 + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: + * lppBizUnPack = &(lpUnPack.lpUnpacker) # <<<<<<<<<<<<<< + * lpBizPack = lpPack.lpPacker + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + */ + __pyx_v_lppBizUnPack = (&__pyx_v_lpUnPack->lpUnpacker); + + /* "py_t2sdk.pyx":447 + * if lpUnPack != None and lpPack != None: + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker # <<<<<<<<<<<<<< + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret + */ + __pyx_t_4 = __pyx_v_lpPack->lpPacker; + __pyx_v_lpBizPack = __pyx_t_4; + + /* "py_t2sdk.pyx":445 + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + * if lpUnPack != None and lpPack != None: # <<<<<<<<<<<<<< + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker + */ + } + + /* "py_t2sdk.pyx":448 + * lppBizUnPack = &(lpUnPack.lpUnpacker) + * lpBizPack = lpPack.lpPacker + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) # <<<<<<<<<<<<<< + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): + */ + __pyx_v_ret = __pyx_v_self->lpSubcribe->SubscribeTopic(__pyx_v_lpSubParam->lpSubscribeParam, __pyx_v_uiTimeout, __pyx_v_lppBizUnPack, __pyx_v_lpBizPack); + + /* "py_t2sdk.pyx":449 + * lpBizPack = lpPack.lpPacker + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret # <<<<<<<<<<<<<< + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 449, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":442 + * del self.lpSubcribe + * self.lpSubcribe = NULL + * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): # <<<<<<<<<<<<<< + * cdef c_IF2UnPacker** lppBizUnPack = NULL + * cdef c_IF2Packer* lpBizPack = NULL + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.SubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":450 + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): # <<<<<<<<<<<<<< + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_arg_subscribeIndex); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_arg_subscribeIndex) { + int __pyx_v_subscribeIndex; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("CancelSubscribeTopic (wrapper)", 0); + assert(__pyx_arg_subscribeIndex); { + __pyx_v_subscribeIndex = __Pyx_PyInt_As_int(__pyx_arg_subscribeIndex); if (unlikely((__pyx_v_subscribeIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 450, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.CancelSubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((int)__pyx_v_subscribeIndex)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, int __pyx_v_subscribeIndex) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("CancelSubscribeTopic", 0); + + /* "py_t2sdk.pyx":451 + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) # <<<<<<<<<<<<<< + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubcribe->CancelSubscribeTopic(__pyx_v_subscribeIndex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":450 + * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + * return ret + * def CancelSubscribeTopic(self,int subscribeIndex): # <<<<<<<<<<<<<< + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.CancelSubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":452 + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): # <<<<<<<<<<<<<< + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_v_lpPack); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_v_lpPack) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSubcribeTopic (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpPack), __pyx_ptype_8py_t2sdk_pyIF2Packer, 1, "lpPack", 0))) __PYX_ERR(1, 452, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_lpPack)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSubcribeTopic", 0); + + /* "py_t2sdk.pyx":453 + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) # <<<<<<<<<<<<<< + * def Release(self): + * return self.lpSubcribe.Release() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubcribe->GetSubcribeTopic(__pyx_v_lpPack->lpPacker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":452 + * def CancelSubscribeTopic(self,int subscribeIndex): + * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + * def GetSubcribeTopic(self,pyIF2Packer lpPack): # <<<<<<<<<<<<<< + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.GetSubcribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":454 + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubcribe.Release() + * cdef class pyCallbackInterface: + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Release (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Release", 0); + + /* "py_t2sdk.pyx":455 + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): + * return self.lpSubcribe.Release() # <<<<<<<<<<<<<< + * cdef class pyCallbackInterface: + * cdef c_CCallbackInterface* lpCallBack + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubcribe->Release()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 455, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":454 + * def GetSubcribeTopic(self,pyIF2Packer lpPack): + * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + * def Release(self): # <<<<<<<<<<<<<< + * return self.lpSubcribe.Release() + * cdef class pyCallbackInterface: + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.Release", __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_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.__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_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":458 + * cdef class pyCallbackInterface: + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_lpMould = 0; + PyObject *__pyx_v_lpClass = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMould,&__pyx_n_s_lpClass,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMould)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpClass)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 458, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 458, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_lpMould = ((PyObject*)values[0]); + __pyx_v_lpClass = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 458, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMould), (&PyString_Type), 1, "lpMould", 1))) __PYX_ERR(1, 458, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpClass), (&PyString_Type), 1, "lpClass", 1))) __PYX_ERR(1, 458, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self), __pyx_v_lpMould, __pyx_v_lpClass); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass) { + PyObject *__pyx_v_sMould = NULL; + PyObject *__pyx_v_sClass = NULL; + int __pyx_r; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + char *__pyx_t_5; + c_CCallbackInterface *__pyx_t_6; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":459 + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') # <<<<<<<<<<<<<< + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_lpMould); + __Pyx_GIVEREF(__pyx_v_lpMould); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpMould); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 459, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sMould = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":460 + * def __cinit__(self,str lpMould,str lpClass): + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') # <<<<<<<<<<<<<< + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): + */ + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_v_lpClass); + __Pyx_GIVEREF(__pyx_v_lpClass); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lpClass); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 460, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sClass = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":461 + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) # <<<<<<<<<<<<<< + * def InitInstance(self): + * return self.lpCallBack.InitInstance() + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sMould); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sClass); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error) + try { + __pyx_t_6 = new c_CCallbackInterface(__pyx_t_4, __pyx_t_5); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 461, __pyx_L1_error) + } + __pyx_v_self->lpCallBack = __pyx_t_6; + + /* "py_t2sdk.pyx":458 + * cdef class pyCallbackInterface: + * cdef c_CCallbackInterface* lpCallBack + * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<< + * sMould = bytes(lpMould,encoding='utf-8') + * sClass = bytes(lpClass,encoding='utf-8') + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sMould); + __Pyx_XDECREF(__pyx_v_sClass); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":462 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): # <<<<<<<<<<<<<< + * return self.lpCallBack.InitInstance() + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("InitInstance (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("InitInstance", 0); + + /* "py_t2sdk.pyx":463 + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): + * return self.lpCallBack.InitInstance() # <<<<<<<<<<<<<< + * + * cdef class pyConnectionInterface: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpCallBack->InitInstance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":462 + * sClass = bytes(lpClass,encoding='utf-8') + * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + * def InitInstance(self): # <<<<<<<<<<<<<< + * return self.lpCallBack.InitInstance() + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.InitInstance", __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_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__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_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":467 + * cdef class pyConnectionInterface: + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): # <<<<<<<<<<<<<< + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): + */ + +/* Python wrapper */ +static int __pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static int __pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig = 0; + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pConfig,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pConfig)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 467, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + } + __pyx_v_pConfig = ((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)values[0]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 467, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return -1; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pConfig), __pyx_ptype_8py_t2sdk_pyCConfigInterface, 1, "pConfig", 0))) __PYX_ERR(1, 467, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_pConfig); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig) { + int __pyx_r; + __Pyx_RefNannyDeclarations + c_CConnectionInterface *__pyx_t_1; + __Pyx_RefNannySetupContext("__cinit__", 0); + + /* "py_t2sdk.pyx":468 + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) # <<<<<<<<<<<<<< + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) + */ + try { + __pyx_t_1 = new c_CConnectionInterface(__pyx_v_pConfig->lpConfig); + } catch(...) { + __Pyx_CppExn2PyErr(); + __PYX_ERR(1, 468, __pyx_L1_error) + } + __pyx_v_self->lpConnect = __pyx_t_1; + + /* "py_t2sdk.pyx":467 + * cdef class pyConnectionInterface: + * cdef c_CConnectionInterface* lpConnect + * def __cinit__(self,pyCConfigInterface pConfig): # <<<<<<<<<<<<<< + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): + */ + + /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = -1; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":469 + * def __cinit__(self,pyCConfigInterface pConfig): + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): # <<<<<<<<<<<<<< + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect(PyObject *__pyx_v_self, PyObject *__pyx_arg_uiTimeout); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect(PyObject *__pyx_v_self, PyObject *__pyx_arg_uiTimeout) { + int __pyx_v_uiTimeout; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Connect (wrapper)", 0); + assert(__pyx_arg_uiTimeout); { + __pyx_v_uiTimeout = __Pyx_PyInt_As_int(__pyx_arg_uiTimeout); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 469, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((int)__pyx_v_uiTimeout)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_uiTimeout) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Connect", 0); + + /* "py_t2sdk.pyx":470 + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) # <<<<<<<<<<<<<< + * def Close(self): + * return self.lpConnect.Close() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Connect(__pyx_v_uiTimeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 470, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":469 + * def __cinit__(self,pyCConfigInterface pConfig): + * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + * def Connect(self,int uiTimeout): # <<<<<<<<<<<<<< + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":471 + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): # <<<<<<<<<<<<<< + * return self.lpConnect.Close() + * def GetServerAddress(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Close (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Close", 0); + + /* "py_t2sdk.pyx":472 + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): + * return self.lpConnect.Close() # <<<<<<<<<<<<<< + * def GetServerAddress(self): + * cdef int iPort = 0 + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Close()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 472, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":471 + * def Connect(self,int uiTimeout): + * return self.lpConnect.Connect(uiTimeout) + * def Close(self): # <<<<<<<<<<<<<< + * return self.lpConnect.Close() + * def GetServerAddress(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Close", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":473 + * def Close(self): + * return self.lpConnect.Close() + * def GetServerAddress(self): # <<<<<<<<<<<<<< + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetServerAddress (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + int __pyx_v_iPort; + char *__pyx_v_sAddress; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + __Pyx_RefNannySetupContext("GetServerAddress", 0); + + /* "py_t2sdk.pyx":474 + * return self.lpConnect.Close() + * def GetServerAddress(self): + * cdef int iPort = 0 # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort + */ + __pyx_v_iPort = 0; + + /* "py_t2sdk.pyx":475 + * def GetServerAddress(self): + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) # <<<<<<<<<<<<<< + * return sAddress,iPort + * def GetStatus(self): + */ + __pyx_v_sAddress = __pyx_v_self->lpConnect->GetServerAddress((&__pyx_v_iPort)); + + /* "py_t2sdk.pyx":476 + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort # <<<<<<<<<<<<<< + * def GetStatus(self): + * return self.lpConnect.GetStatus() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iPort); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 476, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); + __pyx_t_1 = 0; + __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":473 + * def Close(self): + * return self.lpConnect.Close() + * def GetServerAddress(self): # <<<<<<<<<<<<<< + * cdef int iPort = 0 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetServerAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":477 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort + * def GetStatus(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetStatus (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetStatus", 0); + + /* "py_t2sdk.pyx":478 + * return sAddress,iPort + * def GetStatus(self): + * return self.lpConnect.GetStatus() # <<<<<<<<<<<<<< + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":477 + * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + * return sAddress,iPort + * def GetStatus(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetStatus", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":479 + * def GetStatus(self): + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetServerLoad (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetServerLoad", 0); + + /* "py_t2sdk.pyx":480 + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() # <<<<<<<<<<<<<< + * def GetErrorMsg(self,int nErrorCode): + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetServerLoad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":479 + * def GetStatus(self): + * return self.lpConnect.GetStatus() + * def GetServerLoad(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetServerLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":481 + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): # <<<<<<<<<<<<<< + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorCode); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorCode) { + int __pyx_v_nErrorCode; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetErrorMsg (wrapper)", 0); + assert(__pyx_arg_nErrorCode); { + __pyx_v_nErrorCode = __Pyx_PyInt_As_int(__pyx_arg_nErrorCode); if (unlikely((__pyx_v_nErrorCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 481, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetErrorMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((int)__pyx_v_nErrorCode)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_nErrorCode) { + char *__pyx_v_sErrMsg; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetErrorMsg", 0); + + /* "py_t2sdk.pyx":482 + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) # <<<<<<<<<<<<<< + * return sErrMsg.decode('GBK') + * def GetConnectError(self): + */ + __pyx_v_sErrMsg = __pyx_v_self->lpConnect->GetErrorMsg(__pyx_v_nErrorCode); + + /* "py_t2sdk.pyx":483 + * def GetErrorMsg(self,int nErrorCode): + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') # <<<<<<<<<<<<<< + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_sErrMsg, 0, strlen(__pyx_v_sErrMsg), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":481 + * def GetServerLoad(self): + * return self.lpConnect.GetServerLoad() + * def GetErrorMsg(self,int nErrorCode): # <<<<<<<<<<<<<< + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetErrorMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":484 + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + * def GetConnectError(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetConnectError (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetConnectError", 0); + + /* "py_t2sdk.pyx":485 + * return sErrMsg.decode('GBK') + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() # <<<<<<<<<<<<<< + * def GetRealAddress(self): + * cdef char* sAddress = self.lpConnect.GetRealAddress() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetConnectError()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":484 + * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + * return sErrMsg.decode('GBK') + * def GetConnectError(self): # <<<<<<<<<<<<<< + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetConnectError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":486 + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetRealAddress (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_sAddress; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetRealAddress", 0); + + /* "py_t2sdk.pyx":487 + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): + * cdef char* sAddress = self.lpConnect.GetRealAddress() # <<<<<<<<<<<<<< + * return sAddress + * def GetSelfAddress(self): + */ + __pyx_v_sAddress = __pyx_v_self->lpConnect->GetRealAddress(); + + /* "py_t2sdk.pyx":488 + * def GetRealAddress(self): + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress # <<<<<<<<<<<<<< + * def GetSelfAddress(self): + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":486 + * def GetConnectError(self): + * return self.lpConnect.GetConnectError() + * def GetRealAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetRealAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":489 + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + * def GetSelfAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSelfAddress (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_sAddress; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSelfAddress", 0); + + /* "py_t2sdk.pyx":490 + * return sAddress + * def GetSelfAddress(self): + * cdef char* sAddress = self.lpConnect.GetSelfAddress() # <<<<<<<<<<<<<< + * return sAddress + * def GetSelfMac(self): + */ + __pyx_v_sAddress = __pyx_v_self->lpConnect->GetSelfAddress(); + + /* "py_t2sdk.pyx":491 + * def GetSelfAddress(self): + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress # <<<<<<<<<<<<<< + * def GetSelfMac(self): + * cdef char* sMac = self.lpConnect.GetSelfMac() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":489 + * cdef char* sAddress = self.lpConnect.GetRealAddress() + * return sAddress + * def GetSelfAddress(self): # <<<<<<<<<<<<<< + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetSelfAddress", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":492 + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + * def GetSelfMac(self): # <<<<<<<<<<<<<< + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetSelfMac (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_sMac; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetSelfMac", 0); + + /* "py_t2sdk.pyx":493 + * return sAddress + * def GetSelfMac(self): + * cdef char* sMac = self.lpConnect.GetSelfMac() # <<<<<<<<<<<<<< + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + */ + __pyx_v_sMac = __pyx_v_self->lpConnect->GetSelfMac(); + + /* "py_t2sdk.pyx":494 + * def GetSelfMac(self): + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac # <<<<<<<<<<<<<< + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + * sName = bytes(SubScribeName,encoding='utf-8') + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sMac); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":492 + * cdef char* sAddress = self.lpConnect.GetSelfAddress() + * return sAddress + * def GetSelfMac(self): # <<<<<<<<<<<<<< + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetSelfMac", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":495 + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): # <<<<<<<<<<<<<< + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback = 0; + PyObject *__pyx_v_SubScribeName = 0; + int __pyx_v_iTimeOut; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("NewSubscriber (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lppCallback,&__pyx_n_s_SubScribeName,&__pyx_n_s_iTimeOut,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lppCallback)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_SubScribeName)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, 1); __PYX_ERR(1, 495, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iTimeOut)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, 2); __PYX_ERR(1, 495, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "NewSubscriber") < 0)) __PYX_ERR(1, 495, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_lppCallback = ((struct __pyx_obj_8py_t2sdk_pySubCallBack *)values[0]); + __pyx_v_SubScribeName = ((PyObject*)values[1]); + __pyx_v_iTimeOut = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iTimeOut == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 495, __pyx_L3_error) + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 495, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.NewSubscriber", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lppCallback), __pyx_ptype_8py_t2sdk_pySubCallBack, 1, "lppCallback", 0))) __PYX_ERR(1, 495, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_SubScribeName), (&PyString_Type), 1, "SubScribeName", 1))) __PYX_ERR(1, 495, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_lppCallback, __pyx_v_SubScribeName, __pyx_v_iTimeOut); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback, PyObject *__pyx_v_SubScribeName, int __pyx_v_iTimeOut) { + PyObject *__pyx_v_sName = NULL; + c_CSubscribeInterface *__pyx_v_lpSub; + struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_pSub = NULL; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + char *__pyx_t_4; + int __pyx_t_5; + __Pyx_RefNannySetupContext("NewSubscriber", 0); + + /* "py_t2sdk.pyx":496 + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + * sName = bytes(SubScribeName,encoding='utf-8') # <<<<<<<<<<<<<< + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + * pSub = pySubscribeInterface() + */ + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_SubScribeName); + __Pyx_GIVEREF(__pyx_v_SubScribeName); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_SubScribeName); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 496, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 496, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_sName = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":497 + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) # <<<<<<<<<<<<<< + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub + */ + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 497, __pyx_L1_error) + __pyx_v_lpSub = __pyx_v_self->lpConnect->NewSubscriber(__pyx_v_lppCallback->lpSubCallBack, __pyx_t_4, __pyx_v_iTimeOut, NULL); + + /* "py_t2sdk.pyx":498 + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + * pSub = pySubscribeInterface() # <<<<<<<<<<<<<< + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: + */ + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pySubscribeInterface)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 498, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_pSub = ((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "py_t2sdk.pyx":499 + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub # <<<<<<<<<<<<<< + * if lpSub == NULL: + * return -1,pSub + */ + __pyx_v_pSub->lpSubcribe = __pyx_v_lpSub; + + /* "py_t2sdk.pyx":500 + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: # <<<<<<<<<<<<<< + * return -1,pSub + * else: + */ + __pyx_t_5 = ((__pyx_v_lpSub == NULL) != 0); + if (__pyx_t_5) { + + /* "py_t2sdk.pyx":501 + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: + * return -1,pSub # <<<<<<<<<<<<<< + * else: + * return 0,pSub + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 501, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_neg_1); + __Pyx_INCREF(((PyObject *)__pyx_v_pSub)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pSub)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSub)); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":500 + * pSub = pySubscribeInterface() + * pSub.lpSubcribe = lpSub + * if lpSub == NULL: # <<<<<<<<<<<<<< + * return -1,pSub + * else: + */ + } + + /* "py_t2sdk.pyx":503 + * return -1,pSub + * else: + * return 0,pSub # <<<<<<<<<<<<<< + * def GetMCLastError(self): + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + */ + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 503, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0); + __Pyx_INCREF(((PyObject *)__pyx_v_pSub)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pSub)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSub)); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + } + + /* "py_t2sdk.pyx":495 + * cdef char* sMac = self.lpConnect.GetSelfMac() + * return sMac + * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): # <<<<<<<<<<<<<< + * sName = bytes(SubScribeName,encoding='utf-8') + * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.NewSubscriber", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_sName); + __Pyx_XDECREF((PyObject *)__pyx_v_pSub); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":504 + * else: + * return 0,pSub + * def GetMCLastError(self): # <<<<<<<<<<<<<< + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetMCLastError (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + char *__pyx_v_lpMcErr; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetMCLastError", 0); + + /* "py_t2sdk.pyx":505 + * return 0,pSub + * def GetMCLastError(self): + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() # <<<<<<<<<<<<<< + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + */ + __pyx_v_lpMcErr = __pyx_v_self->lpConnect->GetMCLastError(); + + /* "py_t2sdk.pyx":506 + * def GetMCLastError(self): + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr # <<<<<<<<<<<<<< + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_lpMcErr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":504 + * else: + * return 0,pSub + * def GetMCLastError(self): # <<<<<<<<<<<<<< + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetMCLastError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":507 + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): # <<<<<<<<<<<<<< + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg(PyObject *__pyx_v_self, PyObject *__pyx_v_lppCallback); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg(PyObject *__pyx_v_self, PyObject *__pyx_v_lppCallback) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("Create2BizMsg (wrapper)", 0); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lppCallback), __pyx_ptype_8py_t2sdk_pyCallbackInterface, 1, "lppCallback", 0))) __PYX_ERR(1, 507, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_lppCallback)); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_lppCallback) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("Create2BizMsg", 0); + + /* "py_t2sdk.pyx":508 + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) # <<<<<<<<<<<<<< + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Create2BizMsg(__pyx_v_lppCallback->lpCallBack)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":507 + * cdef char* lpMcErr = self.lpConnect.GetMCLastError() + * return lpMcErr + * def Create2BizMsg(self,pyCallbackInterface lppCallback): # <<<<<<<<<<<<<< + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Create2BizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":509 + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): # <<<<<<<<<<<<<< + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg = 0; + int __pyx_v_nAsy; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("SendBizMsg (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMsg,&__pyx_n_s_nAsy,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMsg)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nAsy); + if (value) { values[1] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SendBizMsg") < 0)) __PYX_ERR(1, 509, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_lpMsg = ((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)values[0]); + if (values[1]) { + __pyx_v_nAsy = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nAsy == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 509, __pyx_L3_error) + } else { + __pyx_v_nAsy = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("SendBizMsg", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 509, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.SendBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMsg), __pyx_ptype_8py_t2sdk_pyIBizMessage, 1, "lpMsg", 0))) __PYX_ERR(1, 509, __pyx_L1_error) + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_lpMsg, __pyx_v_nAsy); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg, int __pyx_v_nAsy) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("SendBizMsg", 0); + + /* "py_t2sdk.pyx":510 + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) # <<<<<<<<<<<<<< + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + * lpMsg = pyIBizMessage() + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->SendBizMsg(__pyx_v_lpMsg->lpBizMessage, __pyx_v_nAsy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":509 + * def Create2BizMsg(self,pyCallbackInterface lppCallback): + * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): # <<<<<<<<<<<<<< + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.SendBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":511 + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): # <<<<<<<<<<<<<< + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_hSend; + int __pyx_v_uiTimeout; + int __pyx_v_uiFlag; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("RecvBizMsg (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hSend,&__pyx_n_s_uiTimeout,&__pyx_n_s_uiFlag,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hSend)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiTimeout); + if (value) { values[1] = value; kw_args--; } + } + CYTHON_FALLTHROUGH; + case 2: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiFlag); + if (value) { values[2] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RecvBizMsg") < 0)) __PYX_ERR(1, 511, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + break; + default: goto __pyx_L5_argtuple_error; + } + } + __pyx_v_hSend = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_hSend == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error) + if (values[1]) { + __pyx_v_uiTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error) + } else { + __pyx_v_uiTimeout = ((int)0x3E8); + } + if (values[2]) { + __pyx_v_uiFlag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_uiFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error) + } else { + __pyx_v_uiFlag = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("RecvBizMsg", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 511, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.RecvBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_hSend, __pyx_v_uiTimeout, __pyx_v_uiFlag); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_hSend, int __pyx_v_uiTimeout, int __pyx_v_uiFlag) { + struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg = NULL; + int __pyx_v_ret; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("RecvBizMsg", 0); + + /* "py_t2sdk.pyx":512 + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + * lpMsg = pyIBizMessage() # <<<<<<<<<<<<<< + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg + */ + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pyIBizMessage)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_lpMsg = ((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "py_t2sdk.pyx":513 + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) # <<<<<<<<<<<<<< + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): + */ + __pyx_v_ret = __pyx_v_self->lpConnect->RecvBizMsg(__pyx_v_hSend, __pyx_v_lpMsg->lpBizMessage, __pyx_v_uiTimeout, __pyx_v_uiFlag); + + /* "py_t2sdk.pyx":514 + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg # <<<<<<<<<<<<<< + * def GetLastAnsError(self,int bAsyError=0): + * return self.lpConnect.GetLastAnsError(bAsyError) + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 514, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_INCREF(((PyObject *)__pyx_v_lpMsg)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_lpMsg)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_lpMsg)); + __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":511 + * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): # <<<<<<<<<<<<<< + * lpMsg = pyIBizMessage() + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.RecvBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_lpMsg); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "py_t2sdk.pyx":515 + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): # <<<<<<<<<<<<<< + * return self.lpConnect.GetLastAnsError(bAsyError) + * + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_bAsyError; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("GetLastAnsError (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bAsyError,0}; + PyObject* values[1] = {0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bAsyError); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetLastAnsError") < 0)) __PYX_ERR(1, 515, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_bAsyError = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_bAsyError == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 515, __pyx_L3_error) + } else { + __pyx_v_bAsyError = ((int)0); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("GetLastAnsError", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 515, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetLastAnsError", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_bAsyError); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_bAsyError) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("GetLastAnsError", 0); + + /* "py_t2sdk.pyx":516 + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): + * return self.lpConnect.GetLastAnsError(bAsyError) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->lpConnect->GetLastAnsError(__pyx_v_bAsyError)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "py_t2sdk.pyx":515 + * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + * return ret,lpMsg + * def GetLastAnsError(self,int bAsyError=0): # <<<<<<<<<<<<<< + * return self.lpConnect.GetLastAnsError(bAsyError) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetLastAnsError", __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_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__reduce_cython__", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 2, __pyx_L1_error) + + /* "(tree fragment)":1 + * def __reduce_cython__(self): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__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_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); + __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("__setstate_cython__", 0); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_t_1, 0, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __PYX_ERR(0, 4, __pyx_L1_error) + + /* "(tree fragment)":3 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2UnPacker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyIF2UnPacker(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyIF2UnPacker[] = { + {"GetVersion", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion, METH_NOARGS, 0}, + {"Open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetDatasetCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount, METH_NOARGS, 0}, + {"SetCurrentDatasetByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex, METH_O, 0}, + {"SetCurrentDataset", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset, METH_O, 0}, + {"GetPackBuf", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf, METH_NOARGS, 0}, + {"GetPackLen", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen, METH_NOARGS, 0}, + {"GetRowCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount, METH_NOARGS, 0}, + {"First", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First, METH_NOARGS, 0}, + {"Last", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last, METH_NOARGS, 0}, + {"Go", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go, METH_O, 0}, + {"GetDatasetName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName, METH_NOARGS, 0}, + {"GetColTypeByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName, METH_O, 0}, + {"GetColScaleByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName, METH_O, 0}, + {"GetColWidthByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName, METH_O, 0}, + {"GetColCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount, METH_NOARGS, 0}, + {"GetColName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName, METH_O, 0}, + {"GetColType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType, METH_O, 0}, + {"GetColScale", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale, METH_O, 0}, + {"GetColWidth", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth, METH_O, 0}, + {"FindColIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex, METH_O, 0}, + {"GetStrByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex, METH_O, 0}, + {"GetStr", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr, METH_O, 0}, + {"GetCharByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex, METH_O, 0}, + {"GetChar", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar, METH_O, 0}, + {"GetDoubleByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex, METH_O, 0}, + {"GetDouble", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble, METH_O, 0}, + {"GetIntByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex, METH_O, 0}, + {"GetInt", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt, METH_O, 0}, + {"GetRawByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex, METH_O, 0}, + {"GetRaw", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw, METH_O, 0}, + {"WasNull", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull, METH_NOARGS, 0}, + {"Next", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next, METH_NOARGS, 0}, + {"IsEOF", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF, METH_NOARGS, 0}, + {"IsEmpty", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty, METH_NOARGS, 0}, + {"Destroy", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyIF2UnPacker = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyIF2UnPacker", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyIF2UnPacker, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyIF2UnPacker, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyIF2UnPacker, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2Packer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyIF2Packer(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyIF2Packer[] = { + {"BeginPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack, METH_NOARGS, 0}, + {"NewDataset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset, METH_VARARGS|METH_KEYWORDS, 0}, + {"AddField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField, METH_VARARGS|METH_KEYWORDS, 0}, + {"AddStr", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr, METH_O, 0}, + {"AddInt", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt, METH_O, 0}, + {"AddDouble", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble, METH_O, 0}, + {"AddChar", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar, METH_O, 0}, + {"AddRaw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw, METH_VARARGS|METH_KEYWORDS, 0}, + {"EndPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack, METH_NOARGS, 0}, + {"GetPackBuf", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf, METH_NOARGS, 0}, + {"GetPackLen", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen, METH_NOARGS, 0}, + {"GetPackBufSize", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize, METH_NOARGS, 0}, + {"GetVersion", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion, METH_NOARGS, 0}, + {"SetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode, METH_O, 0}, + {"UnPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack, METH_NOARGS, 0}, + {"FreeMem", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem, METH_NOARGS, 0}, + {"ClearValue", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue, METH_NOARGS, 0}, + {"BeginPackEx", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx, METH_O, 0}, + {"ClearDataSet", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyIF2Packer = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyIF2Packer", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyIF2Packer), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyIF2Packer, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyIF2Packer, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyIF2Packer, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyCConfigInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyCConfigInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyCConfigInterface[] = { + {"Load", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load, METH_O, 0}, + {"Save", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save, METH_O, 0}, + {"GetString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt, METH_VARARGS|METH_KEYWORDS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyCConfigInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyCConfigInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyCConfigInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyCConfigInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyCConfigInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyCConfigInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyIBizMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyIBizMessage(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyIBizMessage[] = { + {"SetFunction", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction, METH_O, 0}, + {"GetFunction", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction, METH_NOARGS, 0}, + {"SetPacketType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType, METH_O, 0}, + {"GetPacketType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType, METH_NOARGS, 0}, + {"SetBranchNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo, METH_O, 0}, + {"GetBranchNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo, METH_NOARGS, 0}, + {"SetSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo, METH_O, 0}, + {"GetSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo, METH_NOARGS, 0}, + {"SetSubSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo, METH_O, 0}, + {"GetSubSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo, METH_NOARGS, 0}, + {"SetSenderId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId, METH_O, 0}, + {"GetSenderId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId, METH_NOARGS, 0}, + {"SetPacketId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId, METH_O, 0}, + {"GetPacketId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId, METH_NOARGS, 0}, + {"SetErrorNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo, METH_O, 0}, + {"GetErrorNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo, METH_NOARGS, 0}, + {"SetErrorInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo, METH_O, 0}, + {"GetErrorInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo, METH_NOARGS, 0}, + {"SetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode, METH_O, 0}, + {"GetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode, METH_NOARGS, 0}, + {"SetContent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetContent", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent, METH_NOARGS, 0}, + {"SetIssueType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType, METH_O, 0}, + {"GetIssueType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType, METH_NOARGS, 0}, + {"SetSequeceNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo, METH_O, 0}, + {"GetSequeceNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo, METH_NOARGS, 0}, + {"SetKeyInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetKeyInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo, METH_NOARGS, 0}, + {"SetAppData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetAppData", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData, METH_NOARGS, 0}, + {"ChangeReq2AnsMessage", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage, METH_NOARGS, 0}, + {"GetBuff", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff, METH_NOARGS, 0}, + {"SetBuff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff, METH_VARARGS|METH_KEYWORDS, 0}, + {"ReSet", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyIBizMessage = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyIBizMessage", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyIBizMessage), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyIBizMessage, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyIBizMessage, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyIBizMessage, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeParamInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pySubscribeParamInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pySubscribeParamInterface[] = { + {"SetTopicName", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName, METH_O, 0}, + {"SetAppData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetFilter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter, METH_VARARGS|METH_KEYWORDS, 0}, + {"SetReturnFiled", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled, METH_O, 0}, + {"SetFromNow", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow, METH_O, 0}, + {"SetReplace", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace, METH_O, 0}, + {"SetSendInterval", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval, METH_O, 0}, + {"GetTopicName", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName, METH_NOARGS, 0}, + {"GetAppData", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData, METH_NOARGS, 0}, + {"GetFilterNameByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex, METH_O, 0}, + {"GetFilterValueByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex, METH_O, 0}, + {"GetFilterValue", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue, METH_O, 0}, + {"GetFilterCount", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount, METH_NOARGS, 0}, + {"GetReturnFiled", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled, METH_NOARGS, 0}, + {"GetFromNow", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow, METH_NOARGS, 0}, + {"GetReplace", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace, METH_NOARGS, 0}, + {"GetSendInterval", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval, METH_NOARGS, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pySubscribeParamInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pySubscribeParamInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pySubscribeParamInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pySubscribeParamInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pySubscribeParamInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pySubCallBack(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pySubCallBack(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pySubCallBack[] = { + {"initInstance", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pySubCallBack = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pySubCallBack", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pySubCallBack), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pySubCallBack, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pySubCallBack, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pySubCallBack, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pySubscribeInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pySubscribeInterface[] = { + {"SubscribeTopic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic, METH_VARARGS|METH_KEYWORDS, 0}, + {"CancelSubscribeTopic", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic, METH_O, 0}, + {"GetSubcribeTopic", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic, METH_O, 0}, + {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pySubscribeInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pySubscribeInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pySubscribeInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pySubscribeInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pySubscribeInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pySubscribeInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyCallbackInterface(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyCallbackInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyCallbackInterface[] = { + {"InitInstance", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance, METH_NOARGS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyCallbackInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyCallbackInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyCallbackInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyCallbackInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyCallbackInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyCallbackInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +}; + +static PyObject *__pyx_tp_new_8py_t2sdk_pyConnectionInterface(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(o, a, k) < 0)) goto bad; + return o; + bad: + Py_DECREF(o); o = 0; + return NULL; +} + +static void __pyx_tp_dealloc_8py_t2sdk_pyConnectionInterface(PyObject *o) { + #if CYTHON_USE_TP_FINALIZE + if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + (*Py_TYPE(o)->tp_free)(o); +} + +static PyMethodDef __pyx_methods_8py_t2sdk_pyConnectionInterface[] = { + {"Connect", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect, METH_O, 0}, + {"Close", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close, METH_NOARGS, 0}, + {"GetServerAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress, METH_NOARGS, 0}, + {"GetStatus", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus, METH_NOARGS, 0}, + {"GetServerLoad", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad, METH_NOARGS, 0}, + {"GetErrorMsg", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg, METH_O, 0}, + {"GetConnectError", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError, METH_NOARGS, 0}, + {"GetRealAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress, METH_NOARGS, 0}, + {"GetSelfAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress, METH_NOARGS, 0}, + {"GetSelfMac", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac, METH_NOARGS, 0}, + {"NewSubscriber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetMCLastError", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError, METH_NOARGS, 0}, + {"Create2BizMsg", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg, METH_O, 0}, + {"SendBizMsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg, METH_VARARGS|METH_KEYWORDS, 0}, + {"RecvBizMsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg, METH_VARARGS|METH_KEYWORDS, 0}, + {"GetLastAnsError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError, METH_VARARGS|METH_KEYWORDS, 0}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__, METH_O, 0}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_8py_t2sdk_pyConnectionInterface = { + PyVarObject_HEAD_INIT(0, 0) + "py_t2sdk.pyConnectionInterface", /*tp_name*/ + sizeof(struct __pyx_obj_8py_t2sdk_pyConnectionInterface), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_8py_t2sdk_pyConnectionInterface, /*tp_dealloc*/ + #if PY_VERSION_HEX < 0x030800b4 + 0, /*tp_print*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 + 0, /*tp_vectorcall_offset*/ + #endif + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #endif + #if PY_MAJOR_VERSION >= 3 + 0, /*tp_as_async*/ + #endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_8py_t2sdk_pyConnectionInterface, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + __pyx_tp_new_8py_t2sdk_pyConnectionInterface, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif + #if PY_VERSION_HEX >= 0x030800b1 + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #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[] = { + "C_CConfigInterface", + "PyCapsule_Destructor", + "PyCapsule_Type", + "__pyx_ctuple_char__ptr__and_int", + "__pyx_ctuple_char__ptr__and_int_struct", + "__pyx_opt_args_22c_CConnectionInterface_NewSubscriber", + "c_CCallbackInterface", + "c_CConnectionInterface", + "c_CSubscribeInterface", + "c_CSubscribeParamInterface", + "c_IBizMessage", + "c_IF2Packer", + "c_IF2UnPacker", + "c_SubCallBack", + "const_char", + "const_void", + "div_t", + "ldiv_t", + "lldiv_t", + "pyCConfigInterface", + "pyCallbackInterface", + "pyConnectionInterface", + "pyIBizMessage", + "pyIF2Packer", + "pyIF2UnPacker", + "pySubCallBack", + "pySubscribeInterface", + "pySubscribeParamInterface", + "string", + 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 + PyString_Check(name) && + PyString_AS_STRING(name)[0] == '_') +#else + PyUnicode_Check(name) && + PyUnicode_AS_UNICODE(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; +} + + + +#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_py_t2sdk(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_py_t2sdk}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "py_t2sdk", + 0, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, + {&__pyx_n_s_SubScribeName, __pyx_k_SubScribeName, sizeof(__pyx_k_SubScribeName), 0, 0, 1, 1}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_kp_s_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 0, 1, 0}, + {&__pyx_n_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 1}, + {&__pyx_n_s_bAsyError, __pyx_k_bAsyError, sizeof(__pyx_k_bAsyError), 0, 0, 1, 1}, + {&__pyx_n_s_cFieldType, __pyx_k_cFieldType, sizeof(__pyx_k_cFieldType), 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_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1}, + {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, + {&__pyx_n_s_filterName, __pyx_k_filterName, sizeof(__pyx_k_filterName), 0, 0, 1, 1}, + {&__pyx_n_s_filterValue, __pyx_k_filterValue, sizeof(__pyx_k_filterValue), 0, 0, 1, 1}, + {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, + {&__pyx_n_s_hSend, __pyx_k_hSend, sizeof(__pyx_k_hSend), 0, 0, 1, 1}, + {&__pyx_n_s_iDefault, __pyx_k_iDefault, sizeof(__pyx_k_iDefault), 0, 0, 1, 1}, + {&__pyx_n_s_iFieldScale, __pyx_k_iFieldScale, sizeof(__pyx_k_iFieldScale), 0, 0, 1, 1}, + {&__pyx_n_s_iFieldWidth, __pyx_k_iFieldWidth, sizeof(__pyx_k_iFieldWidth), 0, 0, 1, 1}, + {&__pyx_n_s_iLen, __pyx_k_iLen, sizeof(__pyx_k_iLen), 0, 0, 1, 1}, + {&__pyx_n_s_iLength, __pyx_k_iLength, sizeof(__pyx_k_iLength), 0, 0, 1, 1}, + {&__pyx_n_s_iReturnCode, __pyx_k_iReturnCode, sizeof(__pyx_k_iReturnCode), 0, 0, 1, 1}, + {&__pyx_n_s_iTimeOut, __pyx_k_iTimeOut, sizeof(__pyx_k_iTimeOut), 0, 0, 1, 1}, + {&__pyx_n_s_iValue, __pyx_k_iValue, sizeof(__pyx_k_iValue), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_lpAppdata, __pyx_k_lpAppdata, sizeof(__pyx_k_lpAppdata), 0, 0, 1, 1}, + {&__pyx_n_s_lpBuff, __pyx_k_lpBuff, sizeof(__pyx_k_lpBuff), 0, 0, 1, 1}, + {&__pyx_n_s_lpClass, __pyx_k_lpClass, sizeof(__pyx_k_lpClass), 0, 0, 1, 1}, + {&__pyx_n_s_lpContent, __pyx_k_lpContent, sizeof(__pyx_k_lpContent), 0, 0, 1, 1}, + {&__pyx_n_s_lpData, __pyx_k_lpData, sizeof(__pyx_k_lpData), 0, 0, 1, 1}, + {&__pyx_n_s_lpKeyData, __pyx_k_lpKeyData, sizeof(__pyx_k_lpKeyData), 0, 0, 1, 1}, + {&__pyx_n_s_lpMould, __pyx_k_lpMould, sizeof(__pyx_k_lpMould), 0, 0, 1, 1}, + {&__pyx_n_s_lpMsg, __pyx_k_lpMsg, sizeof(__pyx_k_lpMsg), 0, 0, 1, 1}, + {&__pyx_n_s_lpPack, __pyx_k_lpPack, sizeof(__pyx_k_lpPack), 0, 0, 1, 1}, + {&__pyx_n_s_lpSubParam, __pyx_k_lpSubParam, sizeof(__pyx_k_lpSubParam), 0, 0, 1, 1}, + {&__pyx_n_s_lpUnPack, __pyx_k_lpUnPack, sizeof(__pyx_k_lpUnPack), 0, 0, 1, 1}, + {&__pyx_n_s_lppCallback, __pyx_k_lppCallback, sizeof(__pyx_k_lppCallback), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_nAppLen, __pyx_k_nAppLen, sizeof(__pyx_k_nAppLen), 0, 0, 1, 1}, + {&__pyx_n_s_nAsy, __pyx_k_nAsy, sizeof(__pyx_k_nAsy), 0, 0, 1, 1}, + {&__pyx_n_s_nBuffLen, __pyx_k_nBuffLen, sizeof(__pyx_k_nBuffLen), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 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_pConfig, __pyx_k_pConfig, sizeof(__pyx_k_pConfig), 0, 0, 1, 1}, + {&__pyx_n_s_pyCConfigInterface, __pyx_k_pyCConfigInterface, sizeof(__pyx_k_pyCConfigInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pyCallbackInterface, __pyx_k_pyCallbackInterface, sizeof(__pyx_k_pyCallbackInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pyConnectionInterface, __pyx_k_pyConnectionInterface, sizeof(__pyx_k_pyConnectionInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pyIBizMessage, __pyx_k_pyIBizMessage, sizeof(__pyx_k_pyIBizMessage), 0, 0, 1, 1}, + {&__pyx_n_s_pyIF2Packer, __pyx_k_pyIF2Packer, sizeof(__pyx_k_pyIF2Packer), 0, 0, 1, 1}, + {&__pyx_n_s_pyIF2UnPacker, __pyx_k_pyIF2UnPacker, sizeof(__pyx_k_pyIF2UnPacker), 0, 0, 1, 1}, + {&__pyx_n_s_pySubCallBack, __pyx_k_pySubCallBack, sizeof(__pyx_k_pySubCallBack), 0, 0, 1, 1}, + {&__pyx_n_s_pySubscribeInterface, __pyx_k_pySubscribeInterface, sizeof(__pyx_k_pySubscribeInterface), 0, 0, 1, 1}, + {&__pyx_n_s_pySubscribeParamInterface, __pyx_k_pySubscribeParamInterface, sizeof(__pyx_k_pySubscribeParamInterface), 0, 0, 1, 1}, + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, + {&__pyx_n_s_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_n_s_szDatasetName, __pyx_k_szDatasetName, sizeof(__pyx_k_szDatasetName), 0, 0, 1, 1}, + {&__pyx_n_s_szDefault, __pyx_k_szDefault, sizeof(__pyx_k_szDefault), 0, 0, 1, 1}, + {&__pyx_n_s_szEntry, __pyx_k_szEntry, sizeof(__pyx_k_szEntry), 0, 0, 1, 1}, + {&__pyx_n_s_szFieldName, __pyx_k_szFieldName, sizeof(__pyx_k_szFieldName), 0, 0, 1, 1}, + {&__pyx_n_s_szSection, __pyx_k_szSection, sizeof(__pyx_k_szSection), 0, 0, 1, 1}, + {&__pyx_n_s_szValue, __pyx_k_szValue, sizeof(__pyx_k_szValue), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_uiFlag, __pyx_k_uiFlag, sizeof(__pyx_k_uiFlag), 0, 0, 1, 1}, + {&__pyx_n_s_uiTimeout, __pyx_k_uiTimeout, sizeof(__pyx_k_uiTimeout), 0, 0, 1, 1}, + {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__10); + __Pyx_GIVEREF(__pyx_tuple__10); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__15); + __Pyx_GIVEREF(__pyx_tuple__15); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + + /* "(tree fragment)":2 + * def __reduce_cython__(self): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + */ + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 2, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); + + /* "(tree fragment)":4 + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") + * def __setstate_cython__(self, __pyx_state): + * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< + */ + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + __Pyx_RefNannyFinishContext(); + return 0; + __pyx_L1_error:; + __Pyx_RefNannyFinishContext(); + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error); + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIF2UnPacker.tp_dictoffset && __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIF2UnPacker, (PyObject *)&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyIF2UnPacker = &__pyx_type_8py_t2sdk_pyIF2UnPacker; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyIF2Packer.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIF2Packer.tp_dictoffset && __pyx_type_8py_t2sdk_pyIF2Packer.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyIF2Packer.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIF2Packer, (PyObject *)&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyIF2Packer = &__pyx_type_8py_t2sdk_pyIF2Packer; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyCConfigInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyCConfigInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyCConfigInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyCConfigInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyCConfigInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyCConfigInterface = &__pyx_type_8py_t2sdk_pyCConfigInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyIBizMessage.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIBizMessage.tp_dictoffset && __pyx_type_8py_t2sdk_pyIBizMessage.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyIBizMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIBizMessage, (PyObject *)&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyIBizMessage = &__pyx_type_8py_t2sdk_pyIBizMessage; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubscribeParamInterface, (PyObject *)&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pySubscribeParamInterface = &__pyx_type_8py_t2sdk_pySubscribeParamInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pySubCallBack.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubCallBack.tp_dictoffset && __pyx_type_8py_t2sdk_pySubCallBack.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pySubCallBack.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubCallBack, (PyObject *)&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pySubCallBack = &__pyx_type_8py_t2sdk_pySubCallBack; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pySubscribeInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubscribeInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pySubscribeInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pySubscribeInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubscribeInterface, (PyObject *)&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pySubscribeInterface = &__pyx_type_8py_t2sdk_pySubscribeInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyCallbackInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyCallbackInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyCallbackInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyCallbackInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyCallbackInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyCallbackInterface = &__pyx_type_8py_t2sdk_pyCallbackInterface; + if (PyType_Ready(&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error) + #if PY_VERSION_HEX < 0x030800B1 + __pyx_type_8py_t2sdk_pyConnectionInterface.tp_print = 0; + #endif + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyConnectionInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyConnectionInterface.tp_getattro == PyObject_GenericGetAttr)) { + __pyx_type_8py_t2sdk_pyConnectionInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr; + } + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyConnectionInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error) + __pyx_ptype_8py_t2sdk_pyConnectionInterface = &__pyx_type_8py_t2sdk_pyConnectionInterface; + __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 +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC void +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#else +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initpy_t2sdk(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initpy_t2sdk(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_py_t2sdk(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'py_t2sdk' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 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(1, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #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("py_t2sdk", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 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(1, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_py_t2sdk) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "py_t2sdk")) { + if (unlikely(PyDict_SetItemString(modules, "py_t2sdk", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) goto __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)) goto __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(1, 1, __pyx_L1_error) + #endif + + /* "py_t2sdk.pyx":6 + * cimport py_t2sdk + * from cpython.pycapsule cimport * + * from ctypes import * # <<<<<<<<<<<<<< + * from libcpp.string cimport string + * from libc.stdlib cimport * + */ + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s__19); + __Pyx_GIVEREF(__pyx_n_s__19); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__19); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_ctypes, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(1, 6, __pyx_L1_error); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* "py_t2sdk.pyx":1 + * # coding=utf-8 # <<<<<<<<<<<<<< + * # distutils: language = c++ + * + */ + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); 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_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init py_t2sdk", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init py_t2sdk"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* RaiseArgTupleInvalid */ +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* KeywordStringCheck */ +static int __Pyx_CheckKeywordStrings( + PyObject *kwdict, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CYTHON_COMPILING_IN_PYPY + if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return 0; +#endif +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(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 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->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 + +/* bytes_index */ +static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + if (index < 0) + index += PyBytes_GET_SIZE(bytes); + if (check_bounds) { + Py_ssize_t size = PyBytes_GET_SIZE(bytes); + if (unlikely(!__Pyx_is_valid_index(index, size))) { + PyErr_SetString(PyExc_IndexError, "string index out of range"); + return (char) -1; + } + } + return PyBytes_AS_STRING(bytes)[index]; +} + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* 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 + +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* RaiseException */ +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + if (PyType_Check(type)) { +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + } else { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + goto bad; + } else { + type = instance_class; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +/* 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; + } + length = stop - start; + if (unlikely(length <= 0)) + return PyUnicode_FromUnicode(NULL, 0); + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyObject_GenericGetAttrNoDict */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + Py_INCREF(descr); + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + +/* PyObject_GenericGetAttr */ +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + +/* SetupReduce */ +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); + 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_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; +#if CYTHON_USE_PYTYPE_LOOKUP + if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; +#else + if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; +#endif +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; +#endif + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto 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 BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { + reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; + setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { + setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto GOOD; +BAD: + if (!PyErr_Occurred()) + PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); + ret = -1; +GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* 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 + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + 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) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + 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); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + 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); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(char) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(char) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(char) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= 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(char), + little, !is_unsigned); + } +} + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(char) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (char) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0]) + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) { + return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) { + return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, 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(char) >= 4 * PyLong_SHIFT) { + return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (char) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(char) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (char) 0; + case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0]) + case -2: + if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(char) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(char) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT) { + return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(char) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(char, 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(char) - 1 > 4 * PyLong_SHIFT) { + return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]))); + } + } + break; + } +#endif + if (sizeof(char) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + char val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (char) -1; + } + } else { + char val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (char) -1; + val = __Pyx_PyInt_As_char(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to char"); + return (char) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to char"); + return (char) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd new file mode 100644 index 00000000..7e2fd769 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd @@ -0,0 +1,188 @@ +# coding=utf-8 +# distutils: language = c++ + +cdef extern from "ufx_interface.h": + cdef cppclass c_IF2UnPacker + + cdef cppclass c_IF2Packer: + c_IF2Packer() except+ + void SetBuffer(char* pBuf,int iBufSize,int iDataLen) + void BeginPack() + int NewDataset(char *szDatasetName, int iReturnCode) + int AddField(char *szFieldName,char cFieldType,int iFieldWidth,int iFieldScale) + int AddStr(char *szValue) + int AddInt(int iValue) + int AddDouble(double fValue) + int AddChar(char* cValue) + int AddRaw(char* lpBuff,int iLen) + void EndPack() + int* GetPackBuf() + int GetPackLen() + int GetPackBufSize() + int GetVersion() + void SetReturnCode(long dwRetCode) + c_IF2UnPacker* UnPack() + void FreeMem() + void ClearValue() + void BeginPackEx(char* szName) + void ClearDataSet() + void Release() + + cdef cppclass c_IF2UnPacker: + c_IF2UnPacker(char* lpBuffer,int iLen) except+ + c_IF2UnPacker(c_IF2Packer* lpPacker) except+ + int GetVersion() + char* GetErrorInfo() + int Open(char* lpBuffer,int iLen) + int GetDatasetCount() + int SetCurrentDatasetByIndex(int nIndex) + int SetCurrentDataset(char *szDatasetName) + char* GetPackBuf() + int GetPackLen() + int GetRowCount() + void First() + void Last() + void Go(int nRow) + char* GetDatasetName() + int OpenAndCopy(char* lpBuffer,int iLen) + char* GetColTypeByName(char* columnName) + int GetColScaleByName(char* columnName) + int GetColWidthByName(char* columnName) + int GetColCount(); + char* GetColName(int column); + char* GetColType(int column); + int GetColScale(int column); + int GetColWidth(int column); + int FindColIndex(char * columnName); + char* GetStrByIndex(int column); + char* GetStr(char * columnName); + char* GetCharByIndex(int column); + char* GetChar(char * columnName); + double GetDoubleByIndex( int column); + double GetDouble(char * columnName); + int GetIntByIndex(int column); + int GetInt(char * columnName); + char* GetRawByIndex(int column,int * lpRawLen); + char* GetRaw(char * columnName,int * lpRawLen); + int WasNull(); + void Next(); + int IsEOF(); + int IsEmpty(); + void Destroy(); + void Release() + + cdef cppclass C_CConfigInterface: + C_CConfigInterface() except+ + int Load(char *szFileName) + int Save(char *szFileName) + char * GetString(char *szSection, char *szEntry, char *szDefault) + int GetInt(char *szSection, char *szEntry, int iDefault) + int SetString(char *szSection, char *szEntry, char *szValue) + int SetInt(char *szSection, char *szEntry, int iValue) + void Release() + + cdef cppclass c_IBizMessage: + c_IBizMessage() except+ + void SetFunction(int nFUnctionNo) + int GetFunction() + void SetPacketType(int nPacketType) + int GetPacketType() + void SetBranchNo(int nBranchNo) + int GetBranchNo() + void SetSystemNo(int nSystemNo) + int GetSystemNo() + void SetSubSystemNo(int nSubSystemNo) + int GetSubSystemNo() + void SetSenderId(int nSenderId) + int GetSenderId() + void SetPacketId(int nPacketId) + int GetPacketId() + void SetErrorNo(int nErrorNo) + int GetErrorNo() + void SetErrorInfo(char* strErrorInfo) + char* GetErrorInfo() + void SetReturnCode(int nReturnCode) + int GetReturnCode() + void SetContent(char* lpContent,int iLen) + char* GetContent(int& iLen) + void SetIssueType(int nIssueType) + int GetIssueType() + void SetSequeceNo(int nSequeceNo) + int GetSequeceNo() + void SetKeyInfo(char* lpKeyData,int iLen) + char* GetKeyInfo(int& iLen) + void SetAppData(char* lpAppdata,int nAppLen) + char* GetAppData(int& nAppLen) + int ChangeReq2AnsMessage() + char* GetBuff(int& nBuffLen) + int SetBuff(char* lpBuff,int nBuffLen) + void ReSet() + void Release() + + cdef cppclass c_CSubscribeParamInterface: + c_CSubscribeParamInterface() except+ + void SetTopicName(char* szName) + void SetAppData(char* lpData,int iLen) + void SetFilter(char* filterName,char* filterValue) + void SetReturnFiled(char* filedName) + void SetFromNow(int bFromNow) + void SetReplace(int bReplace) + void SetSendInterval(int nSendInterval) + char* GetTopicName() + char* GetAppData(int *iLen) + char* GetFilterNameByIndex(int index) + char* GetFilterValueByIndex(int index) + char* GetFilterValue(char* fileName) + int GetFilterCount() + char* GetReturnFiled() + int GetFromNow() + int GetReplace() + int GetSendInterval() + void Release() + + cdef cppclass c_SubCallBack: + c_SubCallBack(char *lpMould,char *lpClass) except+ + c_SubCallBack() except+ + int initInstance() + + cdef cppclass c_CSubscribeInterface: + int SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,int uiTimeout,c_IF2UnPacker** lppBizUnPack,c_IF2Packer* lpBizPack); + int CancelSubscribeTopic(int subscribeIndex) + void GetSubcribeTopic(c_IF2Packer* lpPack) + void Release(); + + cdef cppclass c_CCallbackInterface: + c_CCallbackInterface(char* sMould,char* sClass) except+ + c_CCallbackInterface() except+ + int InitInstance() + + cdef cppclass c_CConnectionInterface: + c_CConnectionInterface(C_CConfigInterface* lpConfig) except+ + int Create(c_CCallbackInterface *lpCallback) + int Connect(unsigned int uiTimeout) + int Close() + char* GetServerAddress(int *lpPort) + int GetStatus() + int GetServerLoad() + char* GetErrorMsg(int nErrorCode) + int GetConnectError() + int SendBiz(int iFunID, c_IF2Packer *lpPacker, int nAsy, int iSystemNo, int nCompressID) + int RecvBiz(int hSend, c_IF2UnPacker **lppUnPackerOrStr, int uiTimeout, int uiFlag) + int SendBizEx(int iFunID, c_IF2Packer *lpPacker,char* svrName, int nAsy, int iSystemNo, int nCompressID,int branchNo) + int RecvBizEx(int hSend, c_IF2UnPacker **lppUnpackerOrStr, unsigned uiTimeout, unsigned uiFlag) + int CreateEx(c_CCallbackInterface *lpCallback) + char* GetRealAddress() + int Reserved8() + int Reserved9() + char* GetSelfAddress() + char* GetSelfMac() + c_CSubscribeInterface* NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) + c_IF2UnPacker* GetTopic(int byForce,int iTimeOut) + char* GetMCLastError() + int Create2BizMsg(c_CCallbackInterface *lpCallback) + int SendBizMsg(c_IBizMessage* lpMsg,int nAsy) + int RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout, unsigned uiFlag) + int Reserved10() + int Reserved11() + char* GetLastAnsError(int bAsyError) diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx new file mode 100644 index 00000000..2dbe2d29 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx @@ -0,0 +1,519 @@ +# coding=utf-8 +# distutils: language = c++ + +cimport py_t2sdk +from cpython.pycapsule cimport * +from ctypes import * +from libcpp.string cimport string +from libc.stdlib cimport * + +cdef class pyIF2UnPacker + +cdef class pyIF2Packer: + cdef c_IF2Packer* lpPacker + def __cinit__(self): + self.lpPacker = new c_IF2Packer() + def __dealloc__(self): + del self.lpPacker + def BeginPack(self): + self.lpPacker.BeginPack() + def NewDataset(self,str szDatasetName, int iReturnCode): + sName = bytes(szDatasetName,encoding='utf-8') + return self.lpPacker.NewDataset(sName,iReturnCode) + def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): + sName = bytes(szFieldName,encoding='utf-8') + sType = bytes(cFieldType,encoding='utf-8') + return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) + def AddStr(self,str szValue): + sValue = bytes(szValue,encoding='utf-8') + return self.lpPacker.AddStr(sValue) + def AddInt(self,int iValue): + return self.lpPacker.AddInt(iValue) + def AddDouble(self,double fValue): + return self.lpPacker.AddDouble(fValue) + def AddChar(self,str cValue): + sValue = bytes(cValue,encoding='utf-8') + return self.lpPacker.AddChar(sValue[0]) + def AddRaw(self,list lpBuff,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpBuff[iIndex] + iIndex+=1 + iRet = self.lpPacker.AddRaw(sBuff,iLen) + free(sBuff) + return iRet + def EndPack(self): + return self.lpPacker.EndPack() + def GetPackBuf(self): + cdef int iLength = self.lpPacker.GetPackLen() + cdef int* sBuff = self.lpPacker.GetPackBuf() + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLength: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff + def GetPackLen(self): + return self.lpPacker.GetPackLen() + def GetPackBufSize(self): + return self.lpPacker.GetPackBufSize() + def GetVersion(self): + return self.lpPacker.GetVersion() + def SetReturnCode(self,long dwRetCode): + self.lpPacker.SetReturnCode(dwRetCode) + def UnPack(self): + cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() + lpPyUnpacker = pyIF2UnPacker() + lpPyUnpacker.lpUnpacker = lpUnpacker + return lpPyUnpacker + def FreeMem(self): + self.lpPacker.FreeMem() + def ClearValue(self): + self.lpPacker.ClearValue() + def BeginPackEx(self,str szName): + sName = bytes(szName,encoding='utf-8') + self.lpPacker.BeginPackEx(sName) + def ClearDataSet(self): + self.lpPacker.ClearDataSet() + def Release(self): + self.lpPacker.Release() + +cdef class pyIF2UnPacker: + cdef c_IF2UnPacker* lpUnpacker + def __cinit__(self): + self.lpUnpacker = NULL + def __dealloc__(self): + if self.lpUnpacker != NULL: + del self.lpUnpacker + self.lpUnpacker = NULL + def GetVersion(self): + return self.lpUnpacker.GetVersion() + def Open(self,list lpBuff,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpBuff[iIndex] + iIndex+=1 + if self.lpUnpacker == NULL: + self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) + iRet = 0 + else: + iRet = self.lpUnpacker.Open(sBuff,iLen) + free(sBuff) + return iRet + def GetDatasetCount(self): + if self.lpUnpacker == NULL: + return -1; + return self.lpUnpacker.GetDatasetCount() + def SetCurrentDatasetByIndex(self,int nIndex): + self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) + def SetCurrentDataset(self,str szDatasetName): + sName = bytes(szDatasetName,encoding='utf-8') + self.lpUnpacker.SetCurrentDataset(sName) + def GetPackBuf(self): + cdef char* lpBuff = self.lpUnpacker.GetPackBuf() + return lpBuff + def GetPackLen(self): + return self.lpUnpacker.GetPackLen() + def GetRowCount(self): + return self.lpUnpacker.GetRowCount() + def First(self): + self.lpUnpacker.First() + def Last(self): + self.lpUnpacker.Last() + def Go(self,int nRow): + self.lpUnpacker.Go(nRow) + def GetDatasetName(self): + cdef char* sName = self.lpUnpacker.GetDatasetName() + return sName + def GetColTypeByName(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) + return sType.decode('gbk') + def GetColScaleByName(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.GetColScaleByName(sName) + def GetColWidthByName(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.GetColWidthByName(sName) + def GetColCount(self): + return self.lpUnpacker.GetColCount() + def GetColName(self,int column): + return self.lpUnpacker.GetColName(column).decode('gbk') + def GetColType(self,int column): + cdef char* sType = self.lpUnpacker.GetColType(column) + return sType.decode('gbk') + def GetColScale(self,int column): + return self.lpUnpacker.GetColScale(column) + def GetColWidth(self,int column): + return self.lpUnpacker.GetColWidth(column) + def FindColIndex(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.FindColIndex(sName) + def GetStrByIndex(self,int column): + return self.lpUnpacker.GetStrByIndex(column).decode('GBK') + def GetStr(self,str columnName): + sName = bytes(columnName,encoding='UTF-8') + return self.lpUnpacker.GetStr(sName).decode('GBK') + def GetCharByIndex(self,int column): + return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') + def GetChar(self,str columnName): + sName = bytes(columnName,encoding='UTF-8') + return self.lpUnpacker.GetChar(sName).decode('UTF-8') + def GetDoubleByIndex(self, int column): + return self.lpUnpacker.GetDoubleByIndex(column) + def GetDouble(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + return self.lpUnpacker.GetDouble(sName) + def GetIntByIndex(self,int column): + return self.lpUnpacker.GetIntByIndex(column) + def GetInt(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + if self.lpUnpacker == NULL: + return -1 + return self.lpUnpacker.GetInt(sName) + def GetRawByIndex(self,int column): + cdef int ilength = 0 + cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLength: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff,ilength + def GetRaw(self,str columnName): + sName = bytes(columnName,encoding='utf-8') + cdef int ilength = 0 + cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLength: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff,ilength + def WasNull(self): + return self.lpUnpacker.WasNull() + def Next(self): + self.lpUnpacker.Next() + def IsEOF(self): + return self.lpUnpacker.IsEOF() + def IsEmpty(self): + return self.lpUnpacker.IsEmpty() + def Destroy(self): + self.lpUnpacker.Destroy() + def Release(self): + if self.lpUnpacker != NULL: + self.lpUnpacker.Release() + +cdef class pyCConfigInterface: + cdef C_CConfigInterface* lpConfig + def __cinit__(self): + self.lpConfig = new C_CConfigInterface() + def __dealloc__(self): + del self.lpConfig + def Load(self,str szFileName): + sName = bytes(szFileName,encoding='utf-8') + return self.lpConfig.Load(sName) + def Save(self,str szFileName): + sName = bytes(szFileName,encoding='utf-8') + return self.lpConfig.Save(sName) + def GetString(self,str szSection,str szEntry,str szDefault): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + sDefault = bytes(szDefault,encoding='utf-8') + cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) + return sValue + def GetInt(self,str szSection,str szEntry, int iDefault): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + return self.lpConfig.GetInt(sSection,sEntry,iDefault) + def SetString(self,str szSection,str szEntry,str szValue): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + sValue = bytes(szValue,encoding='utf-8') + return self.lpConfig.SetString(sSection,sEntry,sValue) + def SetInt(self,str szSection,str szEntry, int iValue): + sSection = bytes(szSection,encoding='utf-8') + sEntry = bytes(szEntry,encoding='utf-8') + return self.lpConfig.SetInt(sSection,sEntry,iValue) + def Release(self): + self.lpConfig.Release() + +cdef class pyIBizMessage: + cdef c_IBizMessage* lpBizMessage + def __cinit__(self): + self.lpBizMessage = new c_IBizMessage() + def __dealloc__(self): + del self.lpBizMessage + def SetFunction(self,int nFUnctionNo): + self.lpBizMessage.SetFunction(nFUnctionNo) + def GetFunction(self): + return self.lpBizMessage.GetFunction() + def SetPacketType(self,int nPacketType): + self.lpBizMessage.SetPacketType(nPacketType) + def GetPacketType(self): + return self.lpBizMessage.GetPacketType() + def SetBranchNo(self,int nBranchNo): + self.lpBizMessage.SetBranchNo(nBranchNo) + def GetBranchNo(self): + return self.lpBizMessage.GetBranchNo() + def SetSystemNo(self,int nSystemNo): + self.lpBizMessage.SetSystemNo(nSystemNo) + def GetSystemNo(self): + return self.lpBizMessage.GetSystemNo() + def SetSubSystemNo(self,int nSubSystemNo): + self.lpBizMessage.SetSubSystemNo(nSubSystemNo) + def GetSubSystemNo(self): + return self.lpBizMessage.GetSubSystemNo() + def SetSenderId(self,int nSenderId): + self.lpBizMessage.SetSenderId(nSenderId) + def GetSenderId(self): + return self.lpBizMessage.GetSenderId() + def SetPacketId(self,int nPacketId): + self.lpBizMessage.SetPacketId(nPacketId) + def GetPacketId(self): + return self.lpBizMessage.GetPacketId() + def SetErrorNo(self,int nErrorNo): + self.lpBizMessage.SetErrorNo(nErrorNo) + def GetErrorNo(self): + return self.lpBizMessage.GetErrorNo() + def SetErrorInfo(self,str strErrorInfo): + sErrorInfo = bytes(strErrorInfo,encoding='utf-8') + self.lpBizMessage.SetErrorInfo(sErrorInfo) + def GetErrorInfo(self): + cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() + return sErrInfo + def SetReturnCode(self,int nReturnCode): + self.lpBizMessage.SetReturnCode(nReturnCode) + def GetReturnCode(self): + return self.lpBizMessage.GetReturnCode() + def SetContent(self,list lpContent,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpContent[iIndex] + iIndex+=1 + self.lpBizMessage.SetContent(sBuff,iLen) + free(sBuff) + def GetContent(self): + cdef int iLen = 0 + cdef char* sBuff = self.lpBizMessage.GetContent(iLen) + lpBuff = [] + cdef iTemp = 0 + cdef int iIndex = 0 + while iIndex < iLen: + iTemp = sBuff[iIndex] + lpBuff.append(iTemp) + iIndex +=1 + return lpBuff,iLen + def SetIssueType(self,int nIssueType): + self.lpBizMessage.SetIssueType(nIssueType) + def GetIssueType(self): + return self.lpBizMessage.GetIssueType() + def SetSequeceNo(self,int nSequeceNo): + self.lpBizMessage.SetSequeceNo(nSequeceNo) + def GetSequeceNo(self): + return self.lpBizMessage.GetSequeceNo() + def SetKeyInfo(self,list lpKeyData,int iLen): + cdef char* sBuff = malloc(iLen) + cdef int iIndex = 0 + while iIndex < iLen: + sBuff[iIndex] = lpKeyData[iIndex] + iIndex+=1 + self.lpBizMessage.SetKeyInfo(sBuff,iLen) + def GetKeyInfo(self): + cdef int iLen = 0 + cdef int itemp = 0 + cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLen: + lpBuff.append(sBuff[iIndex]) + iIndex +=1 + return lpBuff,iLen + def SetAppData(self,str lpAppdata,int nAppLen): + sAppData = bytes(lpAppdata,encoding='utf-8') + self.lpBizMessage.SetAppData(sAppData,nAppLen) + def GetAppData(self): + cdef int iLen = 0 + cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) + return sAppData,iLen + def ChangeReq2AnsMessage(self): + self.lpBizMessage.ChangeReq2AnsMessage() + def GetBuff(self): + cdef int iLen = 0 + cdef iTemp = 0 + cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) + lpBuff = [] + cdef int iIndex = 0 + while iIndex < iLen: + iTemp = sBuff[iIndex] + lpBuff.append(iTemp) + iIndex +=1 + return lpBuff,iLen + def SetBuff(self,list lpBuff,int nBuffLen): + cdef char* sBuff = malloc(nBuffLen) + cdef int iIndex = 0 + while iIndex < nBuffLen: + sBuff[iIndex] = lpBuff[iIndex] + iIndex+=1 + self.lpBizMessage.SetBuff(sBuff,nBuffLen) + def ReSet(self): + self.lpBizMessage.ReSet() + def Release(self): + self.lpBizMessage.Release() + +cdef class pySubscribeParamInterface: + cdef c_CSubscribeParamInterface* lpSubscribeParam + def __cinit__(self): + self.lpSubscribeParam = new c_CSubscribeParamInterface() + def __dealloc__(self): + del self.lpSubscribeParam + def SetTopicName(self,str szName): + sName = bytes(szName,encoding='utf-8') + self.lpSubscribeParam.SetTopicName(sName) + def SetAppData(self,str lpData,int iLen): + sData = bytes(lpData,encoding='utf-8') + self.lpSubscribeParam.SetAppData(sData,iLen) + def SetFilter(self,str filterName,str filterValue): + sName = bytes(filterName,encoding='utf-8') + sValue = bytes(filterValue,encoding='utf-8') + self.lpSubscribeParam.SetFilter(sName,sValue) + def SetReturnFiled(self,str filedName): + sName = bytes(filedName,encoding='utf-8') + self.lpSubscribeParam.SetReturnFiled(sName) + def SetFromNow(self,int bFromNow): + self.lpSubscribeParam.SetFromNow(bFromNow) + def SetReplace(self,int bReplace): + self.lpSubscribeParam.SetReplace(bReplace) + def SetSendInterval(self,int nSendInterval): + self.lpSubscribeParam.SetSendInterval(nSendInterval) + def GetTopicName(self): + cdef char* sName = self.lpSubscribeParam.GetTopicName() + return sName + def GetAppData(self): + cdef int iLen = 0 + cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) + return sAppData,iLen + def GetFilterNameByIndex(self,int index): + cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) + return sName + def GetFilterValueByIndex(self,int index): + cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) + return sName + def GetFilterValue(self,str fileName): + sName = bytes(fileName,encoding='utf-8') + sValus = self.lpSubscribeParam.GetFilterValue(sName) + return sValus + def GetFilterCount(self): + return self.lpSubscribeParam.GetFilterCount() + def GetReturnFiled(self): + cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() + return sFields + def GetFromNow(self): + cdef int bFromNow = self.lpSubscribeParam.GetFromNow() + return bFromNow + def GetReplace(self): + cdef int bRep = self.lpSubscribeParam.GetReplace() + return bRep + def GetSendInterval(self): + return self.lpSubscribeParam.GetSendInterval() + def Release(self): + return self.lpSubscribeParam.Release() + +cdef class pySubCallBack: + cdef c_SubCallBack* lpSubCallBack + def __cinit__(self,str lpMould,str lpClass): + sMould = bytes(lpMould,encoding='utf-8') + sClass = bytes(lpClass,encoding='utf-8') + self.lpSubCallBack = new c_SubCallBack(sMould,sClass) + def initInstance(self): + return self.lpSubCallBack.initInstance() + +cdef class pySubscribeInterface: + cdef c_CSubscribeInterface* lpSubcribe + def __cinit__(self): + self.lpSubcribe = NULL + def __dealloc__(self): + if self.lpSubcribe != NULL: + del self.lpSubcribe + self.lpSubcribe = NULL + def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): + cdef c_IF2UnPacker** lppBizUnPack = NULL + cdef c_IF2Packer* lpBizPack = NULL + if lpUnPack != None and lpPack != None: + lppBizUnPack = &(lpUnPack.lpUnpacker) + lpBizPack = lpPack.lpPacker + cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) + return ret + def CancelSubscribeTopic(self,int subscribeIndex): + return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) + def GetSubcribeTopic(self,pyIF2Packer lpPack): + return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) + def Release(self): + return self.lpSubcribe.Release() +cdef class pyCallbackInterface: + cdef c_CCallbackInterface* lpCallBack + def __cinit__(self,str lpMould,str lpClass): + sMould = bytes(lpMould,encoding='utf-8') + sClass = bytes(lpClass,encoding='utf-8') + self.lpCallBack = new c_CCallbackInterface(sMould,sClass) + def InitInstance(self): + return self.lpCallBack.InitInstance() + +cdef class pyConnectionInterface: + cdef c_CConnectionInterface* lpConnect + def __cinit__(self,pyCConfigInterface pConfig): + self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) + def Connect(self,int uiTimeout): + return self.lpConnect.Connect(uiTimeout) + def Close(self): + return self.lpConnect.Close() + def GetServerAddress(self): + cdef int iPort = 0 + cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) + return sAddress,iPort + def GetStatus(self): + return self.lpConnect.GetStatus() + def GetServerLoad(self): + return self.lpConnect.GetServerLoad() + def GetErrorMsg(self,int nErrorCode): + cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) + return sErrMsg.decode('GBK') + def GetConnectError(self): + return self.lpConnect.GetConnectError() + def GetRealAddress(self): + cdef char* sAddress = self.lpConnect.GetRealAddress() + return sAddress + def GetSelfAddress(self): + cdef char* sAddress = self.lpConnect.GetSelfAddress() + return sAddress + def GetSelfMac(self): + cdef char* sMac = self.lpConnect.GetSelfMac() + return sMac + def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): + sName = bytes(SubScribeName,encoding='utf-8') + cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) + pSub = pySubscribeInterface() + pSub.lpSubcribe = lpSub + if lpSub == NULL: + return -1,pSub + else: + return 0,pSub + def GetMCLastError(self): + cdef char* lpMcErr = self.lpConnect.GetMCLastError() + return lpMcErr + def Create2BizMsg(self,pyCallbackInterface lppCallback): + return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) + def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): + return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) + def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): + lpMsg = pyIBizMessage() + ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) + return ret,lpMsg + def GetLastAnsError(self,int bAsyError=0): + return self.lpConnect.GetLastAnsError(bAsyError) + + + \ No newline at end of file diff --git a/vnpy/api/t2sdk/py_t2sdk/setup.py b/vnpy/api/t2sdk/py_t2sdk/setup.py new file mode 100644 index 00000000..46e45f49 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/setup.py @@ -0,0 +1,22 @@ +from distutils.core import setup +from distutils.extension import Extension +from Cython.Distutils import build_ext # noqa +from Cython.Build import cythonize + +setup( + name="py_t2sdk", + version="1.0.0", + author="rdc@hundsun", + author_email="", + url="", + ext_modules=cythonize(Extension( + "py_t2sdk", + sources=["py_t2sdk.pyx", "ufx_interface.cpp"], + language="c++", + include_dirs=[], + library_dirs=[], + libraries=["t2sdk"], + extra_compile_args=[], + extra_link_args=[] + )) +) diff --git a/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib b/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib new file mode 100644 index 00000000..3ca9f05a Binary files /dev/null and b/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib differ diff --git a/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h b/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h new file mode 100644 index 00000000..6ed77b90 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h @@ -0,0 +1,1812 @@ +#include +#include + +#ifndef _T2SDK_INTERFACE_H +# define _T2SDK_INTERFACE_H + +#ifdef _WIN32 + #if !defined( FUNCTION_CALL_MODE ) + #define FUNCTION_CALL_MODE __stdcall + #endif +#else + #define FUNCTION_CALL_MODE +#endif + +#ifndef HS_IKNOWN_SDK +#define HS_IKNOWN_SDK +struct IKnown +{ + virtual unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) = 0; + + virtual unsigned long FUNCTION_CALL_MODE AddRef() = 0; + + virtual unsigned long FUNCTION_CALL_MODE Release() = 0; + + ~IKnown(){} +}; +#endif + +#include + +#ifdef _WIN32 +typedef unsigned int uint32; +#else +#include +#if defined(__linux__) +#include +#endif +typedef uint32_t uint32; +#endif + +///ESB组名长度,名字为可见字符,不能包含实例分隔符、空格、分号; +#define IDENTITY_NAME_LENGTH 32 +///实例编号最大占位长度 +#define ID_LENGTH 4 +///节点名全长,定义时使用char sName[ID_STR_LEN+1] +#define ID_STR_LEN (IDENTITY_NAME_LENGTH + ID_LENGTH + 1) + + +// 插件接口名的最大长度,定义时使用char sName[PLUGINID_LENGTH+1] +#define PLUGINID_LENGTH 256 +// 插件实例名的最大长度,定义时使用char sName[PLUGIN_NAME_LENGTH+1] +#define PLUGIN_NAME_LENGTH (PLUGINID_LENGTH+ID_LENGTH+1) +// 进程名最大长度.定义时使用char sName[SVR_NAME_LENGTH+1] +#define SVR_NAME_LENGTH 256 +// 进程实例名最大长度.定义时使用char sName[PLUGINID_NAME_LENGTH+1] +#define SVRINSTANCE_NAME_LENGTH (SVR_NAME_LENGTH+ID_LENGTH+1) + +//文件更新列表字段 +/** 文件更新:以下宏为API库中文件更新功能与界面间交互的打包器中的字段 */ +#define PACKER_INT_FILE_LIST "file_list" /**< 文件列表 */ +#define PACKER_INT_FILE_ID "file_id" /**< 文件id */ +#define PACKER_INT_FILE_SIZE "file_size" /**< 文件大小 */ +#define PACKER_INT_TIME "time" /**< 文件时间 */ +#define PACKER_STRING_FILE_NAME "file_name" /**< 文件名 */ +#define PACKER_STRING_FILE_PATH "file_path" /**< 文件路径 */ +#define PACKER_STRING_LOCAL_PATH "local_path" /**< 本地文件路径 */ +#define PACKER_STRING_MD5_CODE "md5_code" /**< 文件md5值 */ +#define PACKER_STRING_FILE_FLAG "file_flag" /**< 文件标识 */ + +//业务消息类型 +//请求 +#define REQUEST_PACKET 0 +//应答 +#define ANSWER_PACKET 1 +//20110302 xuxp 增加路由信息的结构体定义 +typedef struct tagRouteInfo +{ + char ospfName[ID_STR_LEN+1]; + char nbrName[ID_STR_LEN+1]; + char svrName[SVRINSTANCE_NAME_LENGTH+1]; + char pluginID[PLUGIN_NAME_LENGTH+1]; + int connectID; + int memberNO; + + tagRouteInfo() + { + memset(this,0,sizeof(tagRouteInfo)); + } +}Route_Info; + + +//20101228 xuxp 为了发送和返回订阅推送信息而增加的结构体的定义 +typedef struct tagRequestData +{ + int sequeceNo; + int issueType; + void* lpKeyInfo; + int keyInfoLen; + void* lpFileHead; + int fileHeadLen; + int packetType;//20100111 xuxp 新加的包类型 + Route_Info routeInfo;//20110302 xuxp 请求里面增加路由信息 + int iSubSystemNo;//20130508 xuxp 参数中增加子系统号传入 + int iCompanyID;//20140114 xuxp 增加公司编号 +}REQ_DATA, *LPREQ_DATA; +typedef struct tagRespondData +{ + int functionID; + int returnCode; + int errorNo; + char* errorInfo; + int issueType; + void* lpKeyInfo; + int keyInfoLen; + Route_Info sendInfo;//20110302 xuxp 应答里面增加发送者信息 +}RET_DATA, *LPRET_DATA; + +//20150209 majc 增加宏定义 +#define T2SDK_MAX_BRANCH_NO_LEN 256 +#define T2SDK_MAX_COMPANY_NO_LEN 256 +#define T2SDK_MAX_OSPF_LEN 256 + +//20150209 majc 增加创建订阅者时,指定路由参数结构体定义 +typedef struct tagSubRouteInfo +{ + int iSystemNo; //系统号 + int iSubSystemNo; //子系统号 + char szBranchNo[T2SDK_MAX_BRANCH_NO_LEN+1]; //分支号 + char szCompanyNo[T2SDK_MAX_COMPANY_NO_LEN+1]; //公司编号 + char szOspfName[T2SDK_MAX_OSPF_LEN+1]; //OSPF + tagSubRouteInfo() + { + memset(this,0,sizeof(tagSubRouteInfo)); + } +}SUB_ROUTER_INFO; + +///解包器接口 +struct IF2ResultSet : public IKnown +{ + + ///取字段数 + /**@return 返回字段数. + */ + virtual int FUNCTION_CALL_MODE GetColCount()=0; + + ///取字段名 + /** @param column:字段序号(以0为基数) + * @return 返回字段名 下标越界 返回NULL + */ + virtual const char * FUNCTION_CALL_MODE GetColName(int column)=0; + + //取字段数据类型 + /** @param column:字段序号(以0为基数) + * @return:见上面常量定义;下标越界 返回-1 + */ + virtual char FUNCTION_CALL_MODE GetColType(int column)=0; + + + ///取数字型字段小数位数 + /** @param column:字段序号(以0为基数) + * @return int 返回字段数据小数位数 下标越界 返回-1 + */ + virtual int FUNCTION_CALL_MODE GetColScale(int column)=0; + + //取字段允许存放数据的最大宽度. + /** @param column:字段序号(以0为基数) + * @return int 返回字段宽度 下标越界 返回-1 + */ + virtual int FUNCTION_CALL_MODE GetColWidth(int column) = 0; + + ///取字段名对应的字段序号 + /**@param columnName: 字段名 + *@return 返回字段序号. 不存在返回-1 + */ + virtual int FUNCTION_CALL_MODE FindColIndex(const char * columnName)=0; + + // + //按字段序号(以0为基数),取字段值(字符串) + /**@param column:字段序号(以0为基数) + *@return 字符串型字段值,下标越界返回NULL + */ + virtual const char * FUNCTION_CALL_MODE GetStrByIndex(int column)=0; + + //按字段名,取字段值(字符串) + /**@param columnName: 字段名 + *@return 字符串型字段值,不存在返回NULL + */ + virtual const char * FUNCTION_CALL_MODE GetStr(const char * columnName)=0; + + //按字段序号(以0为基数),取字段值 + /**@param column:字段序号(以0为基数) + *@return 字符型字段值,下标越界返回'\0'. + */ + virtual char FUNCTION_CALL_MODE GetCharByIndex(int column)=0; + + //按字段名,取字段值 + /**@param columnName: 字段名 + *@return 字符型字段值,不存在返回'\0' + */ + virtual char FUNCTION_CALL_MODE GetChar(const char * columnName)=0; + + //按字段序号,取字段值 + /**@param column:字段序号(以0为基数) + *@return double型字段值,下标越界返回0 + */ + virtual double FUNCTION_CALL_MODE GetDoubleByIndex( int column)=0; + + ///按字段名,取字段值 + /**@param columnName:字段名 + *@return double型字段值,不存在返回0 + */ + virtual double FUNCTION_CALL_MODE GetDouble(const char * columnName)=0; + + ///按字段序号,取字段值 + /**@param column:字段序号(以0为基数) + *@return int型字段值,下标越界返回0 + */ + virtual int FUNCTION_CALL_MODE GetIntByIndex(int column)=0; + + ///按字段名,取字段值 + /**@param columnName:字段名 + *@return int型字段值,不存在返回0 + */ + virtual int FUNCTION_CALL_MODE GetInt(const char * columnName)=0; + + ///按字段序号获得字段值,二进制数据 + /**@param column: 字段序号(以0为基数) + *@param lpRawLen: [out]数据长度 + *@return : 数据首地址 + */ + virtual void * FUNCTION_CALL_MODE GetRawByIndex(int column,int * lpRawLen) = 0; + + ///按字段名,取字段值 + /**@param columnName:字段名 + *@param lpRawLen: [out]数据长度 + *@return : 数据首地址 + */ + virtual void * FUNCTION_CALL_MODE GetRaw(const char * columnName,int * lpRawLen) = 0; + + + ///最后一次取的字段值是否为NULL + /**@return 0 是, 1不是 + */ + virtual int FUNCTION_CALL_MODE WasNull()=0; + + ///取下一条记录 + virtual void FUNCTION_CALL_MODE Next()=0; + + ///判断是否为结尾 + /**@return 1 是,0 不是; + */ + virtual int FUNCTION_CALL_MODE IsEOF()=0; + + ///判断是否为空 + /**@return 1 是,0 不是; + */ + virtual int FUNCTION_CALL_MODE IsEmpty()=0; + + virtual void * FUNCTION_CALL_MODE Destroy() = 0; +}; + +struct IF2UnPacker; + +///多结果集打包接口(一个包可有多个异构结果集) +/**执行序列: + * + * 0、准备(可选, 若不进行该操作, 则由IF2Packer内部申请内存缓冲): SetBuffer(),如果打包缓存区由调用者提供,则必须在BeginPack()之前准备; + * + * 1、开始: BeginPack(),打包器复位; + * + * 2、第一个结果集打包: + * + *(a)添加字段名列表域:AddField() + * + *(b)按照结果集二维表顺序,逐字段,逐条记录按字段类型添加内容:AddStr() {AddInt(), AddDouble(), AddRaw()} + * + * 3、设置结果集的返回码(可选,若不设置, 则返回码为0) SetReturnCode() + * + * 4、打下一个结果集(可选) NewDataSet(),此处同时设置了该结果集的返回码; + * + * 5、参考第2步实现下一个结果集打包(可选); + * + * 6、结束:EndPack(),重复调用会导致加入空结果集; + * + * 7、取打包结果(缓存区,缓存区大小,数据长度) + * 打包结果也可以直接解包UnPack()返回解包接口 + * + *使用注意事项:IF2Packer所使用的内存缓存区,由调用者负责回收; + * 结果集附带的返回码,只有在包格式版本0x21及以上时有效; + */ +struct IF2Packer : public IKnown +{ + ///打包器初始化(使用调用者的缓存区) + /** 第一次使用打包器时,可先使用本方法设置好缓冲区(数据长度被置为iDataLen) + *@param char * pBuf 缓冲区地址 + *@param int iBufSize 缓冲区空间 + *@param int iDataLen 已有数据长度,新增数据加在已有数据之后(只对V1.0格式的包有效) + */ + virtual void FUNCTION_CALL_MODE SetBuffer(void * pBuf,int iBufSize,int iDataLen=0 )=0; + + ///复位,重新开始打另一个包(字段数与记录数置为0行0例) + /** + * 功能:开始打包,把包长度清零(重复使用已有的缓存区空间) + *@return 无 + */ + virtual void FUNCTION_CALL_MODE BeginPack(void)=0; + + ///开始打一个结果集 + /**在打单结果集的包时,可以不调用本方法,均取默认值 + *@param const char *szDatasetName 0x20版打包需要指明结果集名字 + *@param int iReturnCode 0x20版打包需要为每个结果集指明返回值 + */ + virtual int FUNCTION_CALL_MODE NewDataset(const char *szDatasetName, int iReturnCode = 0)=0; + + /** + * 功能:向包添加字段 + * + *有执行次序要求:在 NewDataset()或Reset(),SetBuffer()之后,逐个字段按顺序添加; + * + *@param szFieldName:字段名 + *@param cFieldType :字段类型:I整数,D浮点数,C字符,S字符串,R任意二进制数据 + *@param iFieldWidth :字段宽度(所占最大字节数) + *@param iFieldScale :字段精度,即cFieldType='D'时的小数位数(缺省为4位小数) + *@return 负数表示失败,否则为目前包的长度 + */ + virtual int FUNCTION_CALL_MODE AddField(const char *szFieldName,char cFieldType ='S',int iFieldWidth=255,int iFieldScale=4)=0; + + /** + * 功能:向包添加字符串数据 + * 有执行次序要求:必须在所有字段增加完之后,逐个字段按顺序添加; + *@param szValue:字符串数据 + *@return 负数表示失败,否则为目前包的长度 + */ + virtual int FUNCTION_CALL_MODE AddStr(const char *szValue)=0; + + /** + * 功能:向包添加整数数据 + *@param iValue:整数数据 + *@return 负数表示失败,否则为目前包的长度 + */ + virtual int FUNCTION_CALL_MODE AddInt(int iValue)=0; + + /** + * 功能:向包添加浮点数据 + *@param fValue:浮点数据 + *@return 负数表示失败,否则为目前包的长度 + */ + virtual int FUNCTION_CALL_MODE AddDouble(double fValue)=0; + + /** + * 功能:向包添加一个字符 + *@param cValue:字符 + *@return 负数表示失败,否则为目前包的长度 + */ + virtual int FUNCTION_CALL_MODE AddChar(char cValue)=0; + + /** + * 功能:向包添加一个大对象 + *@param void * lpBuff 数据区 + *@param int iLen 数据长度 + *@return 负数表示失败,否则为目前包的长度 + */ + virtual int FUNCTION_CALL_MODE AddRaw(void * lpBuff,int iLen)=0; + + ///结束打包 + virtual void FUNCTION_CALL_MODE EndPack()=0; + + /** + * 功能:取打包结果指针 + *@return 打包结果指针 + */ + virtual void * FUNCTION_CALL_MODE GetPackBuf(void) = 0; + + /** + * 功能:取打包结果长度 + *@return 打包结果长度 + */ + virtual int FUNCTION_CALL_MODE GetPackLen(void) = 0; + + /** + * 功能:取打包结果缓冲区大小 + *@return 打包结果缓冲区大小 + */ + virtual int FUNCTION_CALL_MODE GetPackBufSize(void) = 0; + + /** + * 功能:取打包格式版本 + *@return 版本 + */ + virtual int FUNCTION_CALL_MODE GetVersion(void) = 0; + + ///设置结果集的返回码(0x20版以上要求),错误结果集需要设置 + /**返回码取缺省值0,则不设置,如果设置,则必须在EndPack()之前调用 + *@return 版本 + */ + virtual void FUNCTION_CALL_MODE SetReturnCode(unsigned long dwRetCode) = 0; + + /**直接返回当前打包结果的解包接口,必须在EndPack()之后才能调用,在打包器释放时相应的解包器实例也释放 + *@return 解包器接口,此解包接口不能调用 destroy()来释放 + */ + virtual IF2UnPacker * FUNCTION_CALL_MODE UnPack(void) = 0; + + /** + * + */ + virtual void FUNCTION_CALL_MODE FreeMem(void* lpBuf) = 0; + + /** + * + */ + virtual void FUNCTION_CALL_MODE ClearValue() = 0; + + + //20110302 xuxp 增加一个接口函数,用来传递第一个结果集的名字 + ///复位,重新开始打另一个包(字段数与记录数置为0行0例) + /** + * 功能:开始打包,把包长度清零(重复使用已有的缓存区空间) + *@return 无 + */ + virtual void FUNCTION_CALL_MODE BeginPackEx(char* szName = NULL) = 0; + + //20110324 dongpf 增加一个接口函数,用来复位当前结果集 + ///复位当前结果集(字段数与记录数置为0行0例),不影响其他结果集 + /** + * 功能:复位当前结果集 + *@return 无 + */ + virtual void FUNCTION_CALL_MODE ClearDataSet() = 0; +}; + +///解包器接口 +struct IF2UnPacker : public IF2ResultSet +{ + /**取打包格式版本 + *@return 版本 + */ + virtual int FUNCTION_CALL_MODE GetVersion(void) = 0; + + /**取解包数据长度 + *@return 0 表示成功, 其它为失败 + */ + virtual int FUNCTION_CALL_MODE Open(void * lpBuffer,unsigned int iLen) = 0; + + ///取结果集个数(0x20以上版本支持) + virtual int FUNCTION_CALL_MODE GetDatasetCount()=0; + + ///设置当前结果集(0x20以上版本支持) + /** + *@param int nIndex 结果集编号 + *@return int 非0 表示成功,否则为失败 + */ + virtual int FUNCTION_CALL_MODE SetCurrentDatasetByIndex(int nIndex)=0; + + ///设置当前结果集 (0x20以上版本支持) + /** + *@param const char *szDatasetName 结果集名称 + *@return int 非0 表示成功,否则为失败 + */ + virtual int FUNCTION_CALL_MODE SetCurrentDataset(const char *szDatasetName)=0; + + /** 取解包数据区指针 + *@return 数据区指针 + */ + virtual void * FUNCTION_CALL_MODE GetPackBuf(void) = 0; + + /** 取解包数据长度 + *@return 解包数据长度 + */ + virtual unsigned int FUNCTION_CALL_MODE GetPackLen(void) = 0; + + /**取解包数据记录条数,20051207以后版本支持 + *@return 记录条数 + */ + virtual unsigned int FUNCTION_CALL_MODE GetRowCount(void) = 0; + + ///结果集行记录游标接口:取结果集的首条记录 + virtual void FUNCTION_CALL_MODE First() = 0; + + ///结果集行记录游标接口:取结果集的最后一条记录 + virtual void FUNCTION_CALL_MODE Last() = 0; + + ///结果集行记录游标接口:取结果集的第n条记录,取值范围[1, GetRowCount()] + virtual void FUNCTION_CALL_MODE Go(int nRow) = 0; + + ///获取当前结果集名字的接口,没有名字返回"" + virtual const char* FUNCTION_CALL_MODE GetDatasetName() = 0; + + virtual int FUNCTION_CALL_MODE OpenAndCopy(void * lpBuffer,unsigned int iLen) = 0; + + //20140623 majc 增加根据名字获取字段类型,字段精度,字段最大长度 + //取字段数据类型 + /** @param columnName:字段名 + * @return:见上面常量定义;列名不存在 默认返回'S' + */ + virtual char FUNCTION_CALL_MODE GetColTypeByName(const char * columnName)=0; + + + ///取数字型字段小数位数 + /** @param columnName:字段名 + * @return int 返回字段数据小数位数 列名不存在 返回0 + */ + virtual int FUNCTION_CALL_MODE GetColScaleByName(const char * columnName)=0; + + //取字段允许存放数据的最大宽度. + /** @param columnName:字段名 + * @return int 返回字段宽度 列名不存在 返回1 + */ + virtual int FUNCTION_CALL_MODE GetColWidthByName(const char * columnName) = 0; +}; + +///连接对象 CConnectionInterface 的参数配置对象CConfigInterface +/** +* 包括从文件加载、保存到文件,读写操作 +*/ +class CConfigInterface: public IKnown +{ +public: + /** + * 从文件加载 + * @param szFileName 文件名,格式类似ini,具体参考开发包示例 + * @return 返回0表示成功,否则失败 + */ + virtual int FUNCTION_CALL_MODE Load(const char *szFileName) = 0; + + /** + * 保存到文件 + * @param szFileName 文件名 + * @return 返回0表示成功,否则失败 + */ + virtual int FUNCTION_CALL_MODE Save(const char *szFileName) = 0; + + /** + * 取字符串值 + * @param szSection 节名 + * @param szEntry 变量名 + * @param szDefault 缺省值 + * @return 字符串值,没有找到时返回szDefault + */ + virtual const char * FUNCTION_CALL_MODE GetString(const char *szSection, const char *szEntry, const char *szDefault) = 0; + + /** + * 取整数值 + * @param szSection 节名 + * @param szEntry 变量名 + * @param iDefault 缺省值 + * @return 整数值,没有找到时返回iDefault + */ + virtual int FUNCTION_CALL_MODE GetInt(const char *szSection, const char *szEntry, int iDefault) = 0; + + /** + * 设置字符串值 + * @param szSection 节名 + * @param szEntry 变量名 + * @param szValue 值 + * @return 0表示成功,否则失败 + */ + virtual int FUNCTION_CALL_MODE SetString(const char *szSection, const char *szEntry, const char *szValue) = 0; + + /** + * 设置整数值 + * @param szSection 节名 + * @param szEntry 变量名 + * @param iValue 值 + * @return 0表示成功,否则失败 + */ + virtual int FUNCTION_CALL_MODE SetInt(const char *szSection, const char *szEntry, int iValue) = 0; +}; + + +typedef struct tagBizRouteInfo +{ + char ospfName[ID_STR_LEN+1];//路由目标节点中间件名字 + char nbrName[ID_STR_LEN+1];//中间件节点的邻居名字 + char svrName[SVRINSTANCE_NAME_LENGTH+1];//中间件的进程名字 + char pluginID[PLUGIN_NAME_LENGTH+1];//中间件插件名 + int connectID;//连接号 + int memberNO;//成员编号 + + tagBizRouteInfo() + { + memset(this,0,sizeof(tagBizRouteInfo)); + } +}BIZROUTE_INFO; + + +struct IBizMessage : public IKnown +{ + //设置功能号 + virtual void FUNCTION_CALL_MODE SetFunction(const int nFUnctionNo) = 0; + //获取功能号 + virtual int FUNCTION_CALL_MODE GetFunction() = 0; + + //设置包类型 + virtual void FUNCTION_CALL_MODE SetPacketType(const int nPacketType) = 0; + //获取包类型 + virtual int FUNCTION_CALL_MODE GetPacketType() = 0; + + //设置营业部号 + virtual void FUNCTION_CALL_MODE SetBranchNo(const int nBranchNo) = 0; + //获取营业部号 + virtual int FUNCTION_CALL_MODE GetBranchNo() = 0; + + //设置系统号 + virtual void FUNCTION_CALL_MODE SetSystemNo(const int nSystemNo) = 0; + //获取系统号 + virtual int FUNCTION_CALL_MODE GetSystemNo() = 0; + + //设置子系统号 + virtual void FUNCTION_CALL_MODE SetSubSystemNo(const int nSubSystemNo) = 0; + //获取子系统号 + virtual int FUNCTION_CALL_MODE GetSubSystemNo() = 0; + + //设置发送者编号 + virtual void FUNCTION_CALL_MODE SetSenderId(const int nSenderId) = 0; + //获取发送者编号 + virtual int FUNCTION_CALL_MODE GetSenderId() = 0; + + //设置包序号 + virtual void FUNCTION_CALL_MODE SetPacketId(const int nPacketId) = 0; + //获取包序号 + virtual int FUNCTION_CALL_MODE GetPacketId() = 0; + + //设置目的地路由 + virtual void FUNCTION_CALL_MODE SetTargetInfo(const BIZROUTE_INFO targetInfo) = 0; + //获取目的地路由 + virtual void FUNCTION_CALL_MODE GetTargetInfo(BIZROUTE_INFO& targetInfo) = 0; + + //设置发送者路由 + virtual void FUNCTION_CALL_MODE SetSendInfo(const BIZROUTE_INFO sendInfo) = 0; + //获取发送者路由 + virtual void FUNCTION_CALL_MODE GetSendInfo(BIZROUTE_INFO& sendInfo) = 0; + + //设置错误号 + virtual void FUNCTION_CALL_MODE SetErrorNo(const int nErrorNo) = 0; + //获取错误号 + virtual int FUNCTION_CALL_MODE GetErrorNo() = 0; + + //设置错误信息 + virtual void FUNCTION_CALL_MODE SetErrorInfo(const char* strErrorInfo) = 0; + //获取错误信息 + virtual const char* FUNCTION_CALL_MODE GetErrorInfo() = 0; + + //设置返回码 + virtual void FUNCTION_CALL_MODE SetReturnCode(const int nReturnCode) = 0; + //获取返回码 + virtual int FUNCTION_CALL_MODE GetReturnCode() = 0; + + //设置业务内容 + virtual void FUNCTION_CALL_MODE SetContent(void* lpContent,int iLen) = 0; + //获取业务内容 + virtual const void* FUNCTION_CALL_MODE GetContent(int& iLen) = 0; + + //以下接口用于消息中心1.0的订阅 + //设置订阅类型 + virtual void FUNCTION_CALL_MODE SetIssueType(const int nIssueType) = 0; + //获取订阅类型 + virtual int FUNCTION_CALL_MODE GetIssueType() = 0; + + //设置序号 + virtual void FUNCTION_CALL_MODE SetSequeceNo(const int nSequeceNo) = 0; + //获取序号 + virtual int FUNCTION_CALL_MODE GetSequeceNo() = 0; + + //设置关键字段信息 + virtual void FUNCTION_CALL_MODE SetKeyInfo(void* lpKeyData,int iLen) = 0; + //获取关键字段信息 + virtual const void* FUNCTION_CALL_MODE GetKeyInfo(int& iLen) = 0; + + //设置附加数据,订阅推送时原样返回 + virtual void FUNCTION_CALL_MODE SetAppData(const void* lpAppdata,int nAppLen) = 0; + //获取附加数据,订阅推送时原样返回 + virtual const void* FUNCTION_CALL_MODE GetAppData(int& nAppLen) = 0; + + //请求转应答 + virtual int FUNCTION_CALL_MODE ChangeReq2AnsMessage() = 0; + + //获取二进制 + virtual void* FUNCTION_CALL_MODE GetBuff(int& nBuffLen) = 0; + //解析二进制 + virtual int FUNCTION_CALL_MODE SetBuff(const void* lpBuff,int nBuffLen) = 0; + + //清除消息内的字段,可以下次复用。 + virtual void FUNCTION_CALL_MODE ReSet() = 0; + + //设置公司编号 + virtual void FUNCTION_CALL_MODE SetCompanyID(const int nCompanyID) = 0; + //获取公司编号 + virtual int FUNCTION_CALL_MODE GetCompanyID() = 0; + + //设置发送者公司编号 + virtual void FUNCTION_CALL_MODE SetSenderCompanyID(const int nSenderCompanyID) = 0; + //获取发送者公司编号 + virtual int FUNCTION_CALL_MODE GetSenderCompanyID() = 0; +}; + +#define IDENTITY_NAME_LENGTH 32 /**< 客户端名字长度 */ +#define MAX_MACADDRESS_LEN 18 /**< MAC 地址长度 */ +#define MAX_RAND_LEN 4 /**< 随机数长度 */ + +/** 客户标识长度 */ +#define MAX_BIZNAME_LEN \ + IDENTITY_NAME_LENGTH+1+MAX_MACADDRESS_LEN+1+MAX_RAND_LEN+2 + +#define INIT_RECVQ_LEN 256 /**< 接收队列初始长度 */ +#define STEP_RECVQ_LEN 512 /**< 接收队列扩展步长 */ +#define SIMPLIFIED_CHINESE 0 /**< 错误信息语言:简体中文 */ +#define ENGLISH 1 /**< 错误信息语言:英文 */ +#define MAX_FILTERFIELD_LEN 63 /**< 过滤字段长度 */ + +/** 主题可靠等级 */ +enum ReliableLevel +{ + LEVEL_DOBEST = 0, /**< 尽力而为 */ + LEVEL_DOBEST_BYSEQ = 1, /**< 尽力有序 */ + LEVEL_MEM = 2, /**< 内存 */ + LEVEL_FILE = 3, /**< 文件 */ + LEVEL_SYSTEM = 4 /**< 系统 */ +}; + +/** + * 过滤器接口 + */ +class CFilterInterface:public IKnown +{ +public: + /** + * 根据下标获取过滤条件的名字 + * @param index 对应的过滤条件下标 + * @return 返回对应的下标过滤条件的名字,否则返回NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterNameByIndex(int index) = 0; + + /** + * 根据下标获取过滤条件的值 + * @param index 对应的过滤条件下标 + * @return 返回对应的下标过滤条件的值,否则返回NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValueByIndex(int index)= 0; + + /** + * 根据过滤条件的名字获取过滤条件的值 + * @param fileName 对应的过滤条件名字 + * @return 返回对应的过滤条件名字的条件值,否则返回NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValue(char* fileName)= 0; + + /** + * 获取过滤条件的个数 + * @return 返回对应过滤条件的个数,没有返回0 + */ + virtual int FUNCTION_CALL_MODE GetCount() = 0; + + /** + * 设置过滤条件,根据过滤条件名字和值 + * @param filterName 对应的过滤条件名字 + * @param filterValue 对应的过滤条件名字的值 + */ + virtual void FUNCTION_CALL_MODE SetFilter(char* filterName,char* filterValue) =0; +}; + +/** + * 订阅参数类接口 + */ +class CSubscribeParamInterface:public IKnown +{ +public: + + /** + * 设置主题名字 + * @param szName 对应的主题名字 + */ + virtual void FUNCTION_CALL_MODE SetTopicName(char* szName) =0; + + /** + * 设置附加数据 + * @param lpData 附加数据的首地址 + * @param iLen 附加数据的长度 + */ + virtual void FUNCTION_CALL_MODE SetAppData(void* lpData,int iLen)=0; + + /** + * 添加过滤条件 + * @param filterName 过滤条件的名字 + * @param filterValue 过滤条件的值 + */ + virtual void FUNCTION_CALL_MODE SetFilter(char* filterName,char* filterValue)=0; + + /** + * 添加返回字段 + * @param filedName 需要添加的返回字段 + */ + virtual void FUNCTION_CALL_MODE SetReturnFiled(char* filedName)=0; + + /** + * 设置是否补缺标志 + * @param bFromNow true表示需要之前的数据,也就是补缺,false表示不需要补缺 + */ + virtual void FUNCTION_CALL_MODE SetFromNow(bool bFromNow)=0; + + /** + * 设置覆盖订阅标志 + * @param bReplace true表示覆盖订阅,取消之前的所有订阅,只保留当前的订阅,false表示追加订阅 + */ + virtual void FUNCTION_CALL_MODE SetReplace(bool bReplace)=0; + + /** + * 设置发送间隔 + * @param nSendInterval 单位是秒 + */ + virtual void FUNCTION_CALL_MODE SetSendInterval(int nSendInterval)=0; + + /** + * 获取主题名字 + * @return 返回主题名字信息 + */ + virtual char* FUNCTION_CALL_MODE GetTopicName() =0; + + /** + * 获取附加数据 + * @param iLen 出参,表示附加数据的长度 + * @return 返回附加数据首地址,没有返回NULL + */ + virtual void* FUNCTION_CALL_MODE GetAppData(int *iLen) =0; + + /** + * 获取对应的过滤字段的名字 + * @param index 对应的过滤条件下标 + * @return 返回对应的下标过滤条件的名字,否则返回NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterNameByIndex(int index) = 0; + + /** + * 根据下标获取过滤条件的值 + * @param index 对应的过滤条件下标 + * @return 返回对应的下标过滤条件的值,否则返回NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValueByIndex(int index)= 0; + + /** + * 根据过滤条件的名字获取过滤条件的值 + * @param fileName 对应的过滤条件名字 + * @return 返回对应的过滤条件名字的条件值,否则返回NULL. + */ + virtual char* FUNCTION_CALL_MODE GetFilterValue(char* fileName)= 0; + + /** + * 获取过滤条件的个数 + * @return 返回对应过滤条件的个数,没有返回0 + */ + virtual int FUNCTION_CALL_MODE GetFilterCount() = 0; + + /** + * 获取返回字段 + * @return 返回对应的返回字段信息 + */ + virtual char* FUNCTION_CALL_MODE GetReturnFiled()=0; + + /** + * 获取是否补缺的标志 + * @return 返回对应的补缺标志 + */ + virtual bool FUNCTION_CALL_MODE GetFromNow()=0 ; + + /** + * 获取是否覆盖订阅的标志 + * @return 返回对应的覆盖订阅标志 + */ + virtual bool FUNCTION_CALL_MODE GetReplace() =0; + + /** + * 获取对应的发送频率 + * @return 返回对应的发送间隔 + */ + virtual int FUNCTION_CALL_MODE GetSendInterval()=0; + + /** + * 设置是否更新消息序号 + * @param bUpdate true表示需要更新消息序号,false表示不更新 + */ + virtual void FUNCTION_CALL_MODE SetUpdateMsgNo(bool bUpdate)=0; + + /** + * 获取是否更新消息序号 + * @return 返回是否更新消息序号 + */ + virtual bool FUNCTION_CALL_MODE GetUpdateMsgNo()=0; +}; + +class CSubscribeInterface; + +/** + * @brief 订阅回调接口返回的数据定义,除了订阅需要的业务体之外,还需要返回的数据 + */ +typedef struct tagSubscribeRecvData +{ + char* lpFilterData; /**< 过滤字段的数据头指针,用解包器解包 */ + int iFilterDataLen; /**< 过滤字段的数据长度 */ + char* lpAppData; /**< 附加数据的数据头指针 */ + int iAppDataLen; /**< 附加数据的长度 */ + char szTopicName[260]; /**< 主题名字 */ + + /** + * tagSubscribeRecvData 构造函数 + */ + tagSubscribeRecvData() + { + memset(this,0,sizeof(tagSubscribeRecvData)); + } +}SUBSCRIBE_RECVDATA, *LPSUBSCRIBE_RECVDATA; + +/** + * 订阅回调接口,上层应用通过这个接口,接收主推过来的消息 + */ +class CSubCallbackInterface: public IKnown +{ +public: + + /** + * 收到发布消息的回调 + * @param lpSub 回调的订阅指针 + * @param subscribeIndex 消息对应的订阅标识,这个标识来自于SubscribeTopic函数的返回 + * @param lpData 返回消息的二进制指针,一般是消息的业务体打包内容 + * @param nLength 二进制数据的长度 + * @param lpRecvData 主推消息的其他字段返回,主要包含了附加数据,过滤信息,主题名字,详细参看前面结构体定义 + * @return 无 + */ + virtual void FUNCTION_CALL_MODE OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData) = 0; + + /** + * 收到剔除订阅项的消息回调,一般在拥有踢人策略的主题下会回调这个接口,这个回调里面不需要取消订阅,底层已经取消这个订阅,只是一个通知接口 + * @param lpSub 回调的订阅指针 + * @param subscribeIndex 消息对应的订阅标识,这个标识来自于SubscribeTopic函数的返回 + * @param TickMsgInfo 踢人的错误信息,主要是包含具体重复的订阅项位置信息 + * @return 无 + */ + virtual void FUNCTION_CALL_MODE OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo) = 0; +}; + + +/** + * 订阅接口的定义 + */ +class CSubscribeInterface: public IKnown +{ +public: + + /** + * 订阅主题 + * @param lpSubscribeParamInter 上面定义的订阅参数结构 + * @param uiTimeout 超时时间 + * @param lppBizUnPack 业务校验时,失败返回的业务错误信息,如果订阅成功没有返回,输出参数,需要外面调用Release释放 + 如果接受业务校验的错误信息,写法如下: + IF2UnPacker* lpBizUnPack =NULL; + SubscribeTopic(...,&lpBizUnPack); + 最后根据返回值,如果是失败的就判断 lpBizUnPack 是不是NULL. + 最后错误信息获取完之后,释放 + lpBizUnPack->Release(); + * @param lpBizPack 业务校验需要增加的业务字段以及值,没有就根据过滤属性作为业务校验字段 + * @return 返回值大于0,表示当前订阅成功的订阅标识,外面要记住这个标识和订阅项之间的映射关系,这个标识需要用于取消订阅和接收消息的回调里面. + * 返回其他值,根据错误号获取错误信息. + */ + virtual int FUNCTION_CALL_MODE SubscribeTopic(CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,IF2UnPacker** lppBizUnPack=NULL,IF2Packer* lpBizPack=NULL) = 0; + + /** + * 取消订阅主题 + * @param subscribeIndex 消息对应的订阅标识,这个标识来自于SubscribeTopic函数的返回 + * @return 返回0表示取消订阅成功,返回其他值,根据错误号获取错误信息. + */ + virtual int FUNCTION_CALL_MODE CancelSubscribeTopic(int subscribeIndex) = 0; + + + /** + * 取消订阅主题 + * @param topicName 主题名字 + * @param lpFilterInterface 对应的过滤条件 + * @return 返回0表示取消订阅成功,返回其他值,根据错误号获取错误信息. + */ + virtual int FUNCTION_CALL_MODE CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface) = 0; + + + + /** + * 获取当前订阅接口已经订阅的所有主题以及过滤条件信息 + * @param lpPack 外面传入的打包器 + * @note packer报文字段 + - SubcribeIndex + - IsBornTopic + - TopicName + - TopicNo + - FilterRaw + - Appdata + - SendInterval + - ReturnFileds + - isReplace + - isFromNow + */ + virtual void FUNCTION_CALL_MODE GetSubcribeTopic(IF2Packer* lpPack)=0; + + + /** + * 取服务器地址 + * @param lpPort 输出的服务器端口,可以为NULL + * @return 返回服务器地址 + */ + virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0; + /** + * 获取服务端的所有主题信息 + * @param byForce 是否强制从后台获取 + * @param iTimeOut 超时时间 + * @return 成功就返回所有主题信息 + * @note 解包器外面需要调用release接口进行释放. + * @note packer返回字段 + * - TopicName + * - TopicNo + * - ReliableLevel + * - IssuePriority + * - MsgLifetime + * - Stutas + * - TickStrategy + * - BusinessVerify + * - Local + * - FilterField1 + * - FilterField2 + * - FilterField3 + * - FilterField4 + * - FilterField5 + * - FilterField6 + * - FilterField7 + * - FilterField8 + * - FilterField9 + * - FilterField10 + * - FilterField11 + * - FilterField12 + * - FilterField13 + * - FilterField14 + * - FilterField15 + * - FilterField16 + * - SubscribeStr + * - PublishStr + */ + virtual IF2UnPacker* FUNCTION_CALL_MODE GetTopic(bool byForce,int iTimeOut) = 0; + + + /** + *批量订阅的接口 + *@param lpSubReqUnpack 批量参数的集合,采用unpack的形式传入 + *传入的解包器必须包含的字段如下: + *TopicName SendInterval ReturnFileds isFromNow AppData + *FilterField1 FilterValue1 FilterField2 FilterValue2 FilterField3 FilterValue3 FilterField4 FilterValue4 + *FilterField5 FilterValue5 FilterField6 FilterValue6 FilterField7 FilterValue7 FilterField8 FilterValue8 + *FilterField9 FilterValue9 FilterField10 FilterValue10 FilterField11 FilterValue11 FilterField12 FilterValue12 + *FilterField13 FilterValue13 FilterField14 FilterValue14 FilterField15 FilterValue15 FilterField16 FilterValue16 + *BizCheckPack(用于订阅相应主题的业务校验unpack,二进制格式存放) + *@param lpSubAnsPacker 订阅结果的返回,由外部申请一个空的打包器,函数内部把每个订阅结果打入打包器。 + *传出的打包器包含的字段如下: + *TopicName SendInterval ReturnFileds isFromNow AppData + *FilterField1 FilterValue1 FilterField2 FilterValue2 FilterField3 FilterValue3 FilterField4 FilterValue4 + *FilterField5 FilterValue5 FilterField6 FilterValue6 FilterField7 FilterValue7 FilterField8 FilterValue8 + *FilterField9 FilterValue9 FilterField10 FilterValue10 FilterField11 FilterValue11 FilterField12 FilterValue12 + *FilterField13 FilterValue13 FilterField14 FilterValue14 FilterField15 FilterValue15 FilterField16 FilterValue16 + *BizCheckPack SubscribeIndex NotifyStatus ErrorNo ErrorInfo + *@param uiTimeout 订阅的超时时间,单位毫秒 + *@return 成功就返回0,其他值表示失败,通过错误号获取错误信息,具体每个订阅的失败原因可以查看lpSubAnsPacker内容。 + ////////////////////////////////////////////////////////////////////////////// + *调用实例: + *IF2Packer* lpSubReqPack =NewPacker(2); + *lpSubReqPack->AddRef(); + *添加多天需要订阅的参数,按照参数说面添加。 + *IF2Packer* lpSubAnsPack =NewPacker(2); + *lpSubAnsPack->AddRef(); + *lpSubAnsPack->BeginPack(); + *BatchSubscribeTopic(lpSubReqPack->Unpack(),lpSubAnsPack,10000); + *lpSubAnsPack->EndPack(); + *IF2UnPacker* lpAnsUnPack=lpSubAnsPack->Unpack(); + *根据返回参数获取对应的订阅应答 + *lpSubReqPack->FreeMem(lpSubReqPack->GetPackBuf()); + *lpSubReqPack->Release(); + *lpSubAnsPack->FreeMem(lpSubAnsPack->GetPackBuf()); + *lpSubAnsPack->Release(); + ////////////////////////////////////////////////////////////////////////////// + */ + virtual int FUNCTION_CALL_MODE BatchSubscribeTopic(IF2UnPacker* lpSubReqUnpack,IF2Packer* lpSubAnsPacker,unsigned int uiTimeout) = 0; + + /** + * 获取订阅会话状态 + * @return 0 与消息中心连接断开 + 1 正在与消息中心建立连接 + 2 与消息中心连接已建立 + */ + virtual int FUNCTION_CALL_MODE GetSessionStatus() = 0; +}; + +/** + * 发布接口 + */ +class CPublishInterface: public IKnown +{ +public: + + /** + * 业务打包格式的内容发布接口 + * @param topicName 主题名字,不知道名字就传NULL + * @param lpUnPacker 具体的内容 + * @param iTimeOut 超时时间 + * @param lppBizUnPack 业务校验时,失败返回的业务错误信息,如果发布成功没有返回,输出参数,需要外面调用Release释放 + 如果接受业务校验的错误信息,写法如下: + IF2UnPacker* lpBizUnPack =NULL; + PubMsgByPacker(...,&lpBizUnPack); + 最后根据返回值,如果是失败的就判断 lpBizUnPack 是不是NULL. + 最后错误信息获取完之后,释放 + lpBizUnPack->Release(); + * @param bAddTimeStamp 是否添加时间戳,配合单笔性能查找 + * @return 返回0表示成功,返回其他值,根据错误号获取错误信息. + */ + virtual int FUNCTION_CALL_MODE PubMsgByPacker(char* topicName ,IF2UnPacker* lpUnPacker,int iTimeOut=-1, + IF2UnPacker** lppBizUnPack=NULL,bool bAddTimeStamp=false) = 0; + + /** + * 非业务打包格式的内容发布接口,一般二进制格式报文发布 + * @param topicName 主题名字,不知道名字就传NULL + * @param lpFilterInterface 过滤条件,需要上层自己指定,否则默认没有过滤条件 + * @param lpData 具体的内容 + * @param nLength 内容长度 + * @param iTimeOut 超时时间 + * @param lppBizUnPack 业务校验时,失败返回的业务错误信息,如果发布成功没有返回,输出参数,需要外面调用Release释放 + 如果接受业务校验的错误信息,写法如下: + IF2UnPacker* lpBizUnPack =NULL; + PubMsgByPacker(...,&lpBizUnPack); + 最后根据返回值,如果是失败的就判断 lpBizUnPack 是不是NULL. + 最后错误信息获取完之后,释放 + lpBizUnPack->Release(); + * @param bAddTimeStamp 是否添加时间戳,配合单笔性能查找 + * @return 返回0表示成功,返回其他值,根据错误号获取错误信息. + */ + virtual int FUNCTION_CALL_MODE PubMsg(char* topicName, CFilterInterface* lpFilterInterface, const void *lpData, int nLength,int iTimeOut=-1, + IF2UnPacker** lppBizUnPack=NULL,bool bAddTimeStamp=false) = 0; + + /** + * 返回当前主题的发布序号 + * @param topicName 主题名字 + * @return 返回0表示没有对应的主题,返回其他值表示成功 + */ + virtual uint32 FUNCTION_CALL_MODE GetMsgNoByTopicName(char* topicName)=0; + + /** + * 取服务器地址 + * @param lpPort 输出的服务器端口,可以为NULL + * @return 返回服务器地址 + */ + virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0; +}; +/** + * 文件更新回调接口 + */ +class CFileUpdateCallbackInterface: public IKnown +{ +public: + + /** + * 收到更新文件列表的回调 + * @param lpData 返回二进制指针 + * @param nLength 二进制数据的长度,如果为负数则为错误码 + * @param lpErrorInfo 如果不为NULL则为错误信息,发生错误,应该先去看错误信息,如果没有再去拿错误码信息 + * @return 无 + */ + virtual void FUNCTION_CALL_MODE OnRecvFileList(const void *lpData, int nLength, const char * lpErrorInfo) = 0; + + /** + * 收到通知文件更新进度 + * @param iOneFileProcessBar 当前文件进度 + * @param iTotalProcessBar 总进度 + * @param lpErrorInfo 如果不为NULL则为错误信息,发生错误,应该先去看错误信息,如果没有再去拿错误码信息 + * @return 无 + */ + virtual void FUNCTION_CALL_MODE OnShowProcessBar(int iOneFileProcessBar, int iTotalProcessBar, const char * lpErrorInfo) = 0; + + /** + * 收到成功取消文件更新 + * @return 无 + */ + virtual void FUNCTION_CALL_MODE OnCancel() = 0; + + +}; +/** + * 文件更新接口 + */ +class CFileUpdateInterface: public IKnown +{ +public: + + /** + * 根据前面回调显示的文件列表,由用户选择后下发需要更新的文件列表 + * @param lpPack 更新文件列表指针 + * @return 返回0表示成功,其他值表示失败. + */ + virtual int FUNCTION_CALL_MODE UpdateFile(IF2Packer* lpPack) = 0; + + /** + * 界面取消正在更新中的更新动作 + * @return 返回0表示成功,其他值表示失败 + */ + virtual int FUNCTION_CALL_MODE CancelUpdateFile() = 0; + + /** + * 获取更新文件列表 + * @return 文件列表解包器,不允许外部操作,只能读,不能释放 + * @note 解包器里面的字段见该文件define字段,注意:在OnRecvFileList回调以后该方法有效 + */ + virtual IF2UnPacker* FUNCTION_CALL_MODE GetFileUpdateList() = 0; +}; +class CConnectionInterface; + +///连接对象 CConnectionInterface 需要的回调对象接口定义 +/** +* 包括连接成功、连接断开、发送完成、收到数据等事件 +*/ +class CCallbackInterface: public IKnown +{ +public: + /** + * 套接字连接成功 + * @param lpConnection 发生该事件的连接对象 + */ + virtual void FUNCTION_CALL_MODE OnConnect(CConnectionInterface *lpConnection) = 0; + + /** + * 完成安全连接 + * @param lpConnection 发生该事件的连接对象 + */ + virtual void FUNCTION_CALL_MODE OnSafeConnect(CConnectionInterface *lpConnection) = 0; + + /** + * 完成注册 + * @param lpConnection 发生该事件的连接对象 + */ + virtual void FUNCTION_CALL_MODE OnRegister(CConnectionInterface *lpConnection) = 0; + + /** + * 连接被断开 + * @param lpConnection 发生该事件的连接对象 + */ + virtual void FUNCTION_CALL_MODE OnClose(CConnectionInterface *lpConnection) = 0; + + /** + * 发送完成 + * @param lpConnection 发生该事件的连接对象 + * @param hSend 发送句柄 + * @param reserved1 保留字段 + * @param reserved2 保留字段 + * @param nQueuingData 发送队列中剩余个数,使用者可以用此数值控制发送的速度,即小于某值时进行发送 + * @see Send() + */ + virtual void FUNCTION_CALL_MODE OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData) = 0; + + virtual void FUNCTION_CALL_MODE Reserved1(void *a, void *b, void *c, void *d) = 0; + + virtual void FUNCTION_CALL_MODE Reserved2(void *a, void *b, void *c, void *d) = 0; + + virtual int FUNCTION_CALL_MODE Reserved3() = 0; + + virtual void FUNCTION_CALL_MODE Reserved4() = 0; + + virtual void FUNCTION_CALL_MODE Reserved5() = 0; + + virtual void FUNCTION_CALL_MODE Reserved6() = 0; + + virtual void FUNCTION_CALL_MODE Reserved7() = 0; + + /** + * 收到SendBiz异步发送的请求的应答 + * @param lpConnection 发生该事件的连接对象 + * @param hSend 发送句柄 + * @param lpUnPackerOrStr 指向解包器指针或者错误信息 + * @param nResult 收包结果 + * 如果nResult等于0,表示业务数据接收成功,并且业务操作成功,lpUnPackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果nResult等于1,表示业务数据接收成功,但业务操作失败了,lpUnPackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果nResult等于2,表示收到非业务错误信息,lpUnPackerOrStr指向一个可读的字符串错误信息。 + * 如果nResult等于3,表示业务包解包失败。lpUnPackerOrStr指向NULL。 + * 如果nResult等于4,表示业务包为空。lpUnpackerOrStr指向NULL。lpRetData这部分结果还会存在 + */ + virtual void FUNCTION_CALL_MODE OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult) = 0; + + /** + * 收到SendBiz异步发送的请求的应答 + * @param lpConnection 发生该事件的连接对象 + * @param hSend 发送句柄 + * @param lpRetData 其他需要返回的应答内容,根据需要获取 + * @param lpUnPackerOrStr 指向解包器指针或者错误信息 + * @param nResult 收包结果 + * 如果nResult等于0,表示业务数据接收成功,并且业务操作成功,lpUnpackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果nResult等于1,表示业务数据接收成功,但业务操作失败了,lpUnpackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果nResult等于2,表示收到非业务错误信息,lpUnpackerOrStr指向一个可读的字符串错误信息。 + * 如果nResult等于3,表示业务包解包失败。lpUnpackerOrStr指向NULL。 + * 如果nResult等于4,表示业务包为空。lpUnpackerOrStr指向NULL。lpRetData这部分结果还会存在 + */ + virtual void FUNCTION_CALL_MODE OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult) = 0; + //20130624 xuxp 回调增加BizMessage接口 + /** + * 收到发送时指定了ReplyCallback选项的请求的应答或者是没有对应请求的数据 + * @param lpConnection 发生该事件的连接对象 + * @param hSend 发送句柄 + * @param lpMsg 业务消息指针 + */ + virtual void FUNCTION_CALL_MODE OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg) = 0; + + //20150709 majc 增加回调类的析构 + ~CCallbackInterface(){} + +}; + +///T2_SDK连接对象接口 +/** +* 连接的对象是线程不安全,同时一个连接最好是归于一个线程所用,不要多线程使用!!! +* 包括连接、断开、发送、接收等 +*/ +class CConnectionInterface: public IKnown +{ +public: + ///连接状态,可组合 + enum ConnectionStatus + { + Disconnected = 0x0000, /**< 未连接 */ + Connecting = 0x0001, /**< socket正在连接 */ + Connected = 0x0002, /**< socket已连接 */ + SafeConnecting = 0x0004, /**< 正在建立安全连接 */ + SafeConnected = 0x0008, /**< 已建立安全连接 */ + Registering = 0x0010, /**< 正注册 */ + Registered = 0x0020, /**< 已注册 */ + Rejected = 0x0040 /**< 被拒绝,将被关闭 */ + }; + + ///接收选项(可组合,0表示接收超时时,不删除包ID,仍可再次调用RecvBiz方法来尝试接收) + enum RecvFlags + { + JustRemoveHandle = 0x0001 /**< 当接收超时时,把packet_id删除 */ + }; + + /** + * 初始化连接对象 + * @param lpCallback 回调对象 + * @return 返回0表示成功,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + * 如果应用不需要任何回调方法,则可向该方法传递NULL,而不必自定义回调类和对象 + */ + virtual int FUNCTION_CALL_MODE Create(CCallbackInterface *lpCallback) = 0; + + /** + * 开始连接/注册 + * @param uiTimeout 超时时间,单位毫秒,0表示不等待(使用代理连接服务器时,该参数不起作用) + * @return 返回0表示成功,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + */ + virtual int FUNCTION_CALL_MODE Connect(unsigned int uiTimeout) = 0; + + /** + * 断开连接 + * @return 返回0表示成功,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + */ + virtual int FUNCTION_CALL_MODE Close() = 0; + + virtual int FUNCTION_CALL_MODE Reserved1() = 0; + + virtual int FUNCTION_CALL_MODE Reserved2() = 0; + + virtual int FUNCTION_CALL_MODE Reserved3() = 0; + + virtual int FUNCTION_CALL_MODE Reserved4() = 0; + + virtual int FUNCTION_CALL_MODE Reserved5() = 0; + + virtual int FUNCTION_CALL_MODE Reserved6() = 0; + + /** + * 取服务器地址 + * @param lpPort 输出的服务器端口,可以为NULL + * @return 返回服务器地址 + */ + virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0; + + /** + * 取连接状态 + * @return 返回连接状态 + */ + virtual int FUNCTION_CALL_MODE GetStatus() = 0; + + /** + * 取服务器负载,使用者可以同时创建多个连接实例同时连接不同的服务器,根据完成连接的时间以及负载决定使用哪个服务器 + * @return 返回服务器负载(非负数),越大表示越繁忙,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + */ + virtual int FUNCTION_CALL_MODE GetServerLoad() = 0; + + /** + * 取错误码对应的错误信息,目前支持简体中文和英文,支持其他语言可以通过连接对象配置errormsg + * @param nErrorCode 错误码 + * @return 返回错误信息 + */ + virtual const char * FUNCTION_CALL_MODE GetErrorMsg(int nErrorCode) = 0; + + /** + * 取连接错误号,当连接无法与服务端完成注册时,既可通过Connect的返回值获取错误号, + * 也可通过调用本方法来获取错误号,然后用该错误号调用GetErrorMsg可获取可读的错误信息 + * @return 返回连接错误号 + */ + virtual int FUNCTION_CALL_MODE GetConnectError() = 0; + + /** + * 发送业务数据 + * @param iFunID 功能号 + * @param lpPacker 打包器指针 + * @param nAsy 0表示同步,否则表示异步 + * @param iSystemNo 如果iSystemNo > 0则设置系统号 + * @param nCompressID 对业务包体进行压缩的压缩算法ID,目前只支持ID = 1的压缩算法。 + * ID = 0表示不压缩。注意,压缩只是向SDK提出建议,是否真正压缩还取决于包的实际大小。 + * 同步发送的包,通过调用RecvBiz来接收,异步发送的包,当收到应答包后,自动触发回调函数OnReceivedBiz。 + * @return 返回发送句柄(正数),否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + */ + virtual int FUNCTION_CALL_MODE SendBiz(int iFunID, IF2Packer *lpPacker, int nAsy = 0, int iSystemNo = 0, int nCompressID = 1) = 0; + + /** + * 接收业务数据 + * @param hSend 发送句柄(SendBiz的成功返回值) + * @param lppUnPackerOrStr 如果返回值等于0,表示业务数据接收成功,并且业务操作成功,*lppUnPackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果返回值等于1,表示业务数据接收成功,但业务操作失败了,*lppUnPackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果返回值等于2,表示收到非业务错误信息,*lppUnPackerOrStr指向一个可读的字符串错误信息。 + * 如果返回值等于3,表示业务包解包失败。*lppUnPackerOrStr原先所指向的内容不会被改变。 + * @param uiTimeout 超时时间,单位毫秒。 + * @param uiFlag 接收选项,0表示接收超时后仍可继续调用RecvBiz来接收, + * JustRemoveHandle表示当接收超时后,把hSend相关数据删除 + * @return 小于0表示RecvBiz操作本身失败,通过调用GetErrorMsg可以获取详细错误信息 + * 注意!外部指针所指向的解包器的内存由SDK内部管理,外部切勿释放! + * 注意!lppUnPackerOrStr对应的解包器是临时的,上层不可以缓存指针,再次调用这个连接的RecvBiz,指针指向的内容就会改变 + * 如果要拷贝,需要调用解包器的GetPackBuf方法,二进制拷贝出去,其他线程需要再解包 + */ + virtual int FUNCTION_CALL_MODE RecvBiz(int hSend, void **lppUnPackerOrStr, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0; + + //20101228 xuxp 新增发送和接受的两个接口函数,用于订阅和推送 + /** + * 发送业务数据 + * @param iFunID 功能号 + * @param lpPacker 打包器指针 + * @param svrName 指定中间件的节点 + * @param nAsy 0表示同步,否则表示异步。 + * @param iSystemNo 如果iSystemNo > 0则设置系统号 + * @param nCompressID 对业务包体进行压缩的压缩算法ID,目前只支持ID = 1的压缩算法。 + * ID = 0表示不压缩。注意,压缩只是向SDK提出建议,是否真正压缩还取决于包的实际大小。 + * 同步发送的包,通过调用RecvBizEx来接收,异步发送的包,当收到应答包后,自动触发回调函数OnReceivedBizEx。 + * @param branchNo 营业部号。 + * @param lpRequest 请求里面的其他内容,根据结构体定义赋值。 + * @return 返回发送句柄(正数),否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + */ + virtual int FUNCTION_CALL_MODE SendBizEx(int iFunID, IF2Packer *lpPacker,char* svrName, int nAsy = 0, int iSystemNo = 0, int nCompressID = 1,int branchNo=0,LPREQ_DATA lpRequest=NULL) = 0; + + /** + * 接收业务数据 + * @param hSend 发送句柄(SendBiz的成功返回值) + * @param lppUnPackerOrStr 如果返回值等于0,表示业务数据接收成功,并且业务操作成功,*lppUnPackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果返回值等于1,表示业务数据接收成功,但业务操作失败了,*lppUnPackerOrStr指向一个解包器,此时应首先将该指针转换为IF2UnPacker *。 + * 如果返回值等于2,表示收到非业务错误信息,*lppUnPackerOrStr指向一个可读的字符串错误信息。 + * 如果返回值等于3,表示业务包解包失败。*lppUnPackerOrStr原先所指向的内容不会被改变。 + * @param lpRetData 其他需要返回的应答内容,根据需要获取 + * @param uiTimeout 超时时间,单位毫秒,0表示不等待。 + * @param uiFlag 接收选项,0表示接收超时后仍可继续调用RecvBiz来接收, + * JustRemoveHandle表示当接收超时后,把hSend相关数据删除 + * @return 小于0表示RecvBizEx操作本身失败,通过调用GetErrorMsg可以获取详细错误信息 + * 注意!外部指针所指向的解包器的内存由SDK内部管理,外部切勿释放! + * 注意!外部指针所指向的LPRET_DATA的内存由SDK内部管理,外部切勿释放! + * 注意!lppUnPackerOrStr对应的解包器和LPRET_DATA都是临时的,上层不可以缓存指针,再次调用这个连接的RecvBizEx,这两个指针指向的内容就会改变 + * 如果要拷贝,需要调用解包器的GetPackBuf方法,二进制拷贝出去,其他线程需要再解包; + * LPRET_DATA拷贝,就需要做结构体复制 + */ + virtual int FUNCTION_CALL_MODE RecvBizEx(int hSend, void **lppUnpackerOrStr, LPRET_DATA* lpRetData, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0; + + + //20101228 xuxp 新增Create函数,来保证回调用新的OnReceivedBizEx的接口 + /** + * 初始化连接对象 + * @param lpCallback 回调对象 + * @return 返回0表示成功,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + * 如果应用不需要任何回调方法,则可向该方法传递NULL,而不必自定义回调类和对象 + */ + virtual int FUNCTION_CALL_MODE CreateEx(CCallbackInterface *lpCallback) = 0; + + + //20120111 dongpf 新增GetRealAddress函数,来获取服务端上自己的ip地址和端口 + /** + * 获取ip地址和端口 + * @return 获取ip地址和端口,格式:ip地址+端口 + */ + virtual const char* FUNCTION_CALL_MODE GetRealAddress() = 0; + + + virtual int FUNCTION_CALL_MODE Reserved8() = 0; + virtual int FUNCTION_CALL_MODE Reserved9() = 0; + + //20130527 xuxp 新增GetSelfAddress函数,来获取自己本地的IP和端口 + /** + * 获取ip地址和端口 + * @return 获取ip地址和端口,格式:ip地址+端口 + */ + virtual const char* FUNCTION_CALL_MODE GetSelfAddress() = 0; + + //20130529 xuxp 新增GetSelfMac函数,来获取自己本地使用的网卡MAC + /** + * 获取MAC地址 + * @return MAC的地址字符串格式,类似“D067E5556D83”,中间没有分隔符 + */ + virtual const char* FUNCTION_CALL_MODE GetSelfMac() = 0; + + //20130609 xuxp 新增订阅发布接口 + ///////////////////////////////////下面增加订阅发布的接口/////////////////////////////////////// + + /** + * 创建一个订阅者 + * @param lpCallback 回调接口 + * @param SubScribeName 订阅者名字,多订阅者的名字必须不一样,不可以相同.最大长度32个字节 + * @param iTimeOut 超时时间 + * @param iInitRecvQLen 初始化接收队列的长度 + * @param iStepRecvQLen 接受队列的扩展步长 + * @return 返回订阅接口实例,一个会话接口对应一个回调. + */ + virtual CSubscribeInterface* FUNCTION_CALL_MODE NewSubscriber(CSubCallbackInterface *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0; + + /** + * 获取发布者 + * @param PublishName 发布者业务名 + * @param msgCount 本地缓存消息的个数 + * @param iTimeOut 初始化的时候的超时时间 + * @param bResetNo 是否重置序 + * @return 返回发送接口实例,返回对应的指针 + */ + //virtual CPublishInterface* FUNCTION_CALL_MODE GetPublisher(int msgCount,int iTimeOut,bool bResetNo = false) = 0; + virtual CPublishInterface* FUNCTION_CALL_MODE NewPublisher(char* PublishName,int msgCount,int iTimeOut,bool bResetNo = false) = 0; + + + + + /** + * 获取服务端的所有主题信息 + * @param byForce 是否强制从后台获取 + * @param iTimeOut 超时时间 + * @return 成功就返回所有主题信息 + * @note 解包器外面需要调用release接口进行释放. + * @note packer返回字段 + * - TopicName + * - TopicNo + * - ReliableLevel + * - IssuePriority + * - MsgLifetime + * - Stutas + * - TickStrategy + * - BusinessVerify + * - Local + * - FilterField1 + * - FilterField2 + * - FilterField3 + * - FilterField4 + * - FilterField5 + * - FilterField6 + * - FilterField7 + * - FilterField8 + * - FilterField9 + * - FilterField10 + * - FilterField11 + * - FilterField12 + * - FilterField13 + * - FilterField14 + * - FilterField15 + * - FilterField16 + * - SubscribeStr + * - PublishStr + + */ + virtual IF2UnPacker* FUNCTION_CALL_MODE GetTopic(bool byForce,int iTimeOut) = 0; + + /** + * 获取订阅发布的最后错误 + */ + virtual const char* FUNCTION_CALL_MODE GetMCLastError() = 0; + //////////////////////////////////////////////////////////////////////////////// + + //20130624 xuxp 连接接口增加下面三个接口,用来作为服务端的接口,客户端开发也推荐使用 + ///////////////////////////////////新的一套操作接口/////////////////////////////////////// + /** + * 初始化连接对象 + * @param lpCallback 回调对象 + * @return 返回0表示成功,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + * 如果应用不需要任何回调方法,则可向该方法传递NULL,而不必自定义回调类和对象 + */ + virtual int FUNCTION_CALL_MODE Create2BizMsg(CCallbackInterface *lpCallback) = 0; + + /** + * 发送业务数据 + * @param lpMsg 业务消息接口指针 + * @param nAsy 0表示同步,否则表示异步。 + * 同步发送的包,通过调用RecvBizMsg来接收,异步发送的包,当收到应答包后,自动触发回调函数OnReceivedBizMsg。 + * @return 返回发送句柄(正数),否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + */ + virtual int FUNCTION_CALL_MODE SendBizMsg(IBizMessage* lpMsg,int nAsy = 0) = 0; + + /** + * 接收数据 + * @param hSend 发送句柄 + * @param lpMsg 收到业务消息指针的地址 + * @param uiTimeout 超时时间,单位毫秒,0表示不等待 + * @param uiFlag 接收选项,0表示接收超时后仍可继续调用Receive来接收, + * JustRemoveHandle表示当接收超时时,把packet_id删除(以后再收到,则会以异步的方式收到) + * @return 返回0表示成功,否则表示失败,通过调用GetErrorMsg可以获取详细错误信息 + * 注意!外部指针所指向的IBizMessage的内存由SDK内部管理,外部切勿释放! + * 注意!lpMsg对应的消息指针是临时的,上层不可以缓存指针,再次调用这个连接的RecvBizMsg,这个指针指向的内容就会改变 + * 如果要拷贝,需要调用IBizMessage的GetBuff方法,二进制拷贝出去,其他线程需要再调用SetBuff; + */ + virtual int FUNCTION_CALL_MODE RecvBizMsg(int hSend, IBizMessage** lpMsg, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0; + + //20141117 majc 增加文件更新目录过滤字段 + /** + * 获取文件更新,一个连接里面只有一个文件更新,如果存在就返回之前的接口 + * @param szTopicName 文件更新主题,来自于服务端消息中心文件更新主题 + * @param lpCallBack 回调接口 + * @param szScanDir 扫描文件根目录 + * @param szUpdateDir 文件更新存放根目录 + * @param iTimeOut 超时时间 + * @param szDirFilter 目录过滤条件,如果有多个目录用;号隔开 + * @return 返回文件更新接口指针 + */ + virtual CFileUpdateInterface* FUNCTION_CALL_MODE NewFileUpdate(const char* szTopicName,CFileUpdateCallbackInterface* lpCallBack ,const char* szScanDir,const char* szUpdateDir,unsigned int uiTimeOut = 5000, const char * szDirFilter = NULL) = 0; + + /** + * 获取文件更新的最后错误 + */ + virtual const char* FUNCTION_CALL_MODE GetFileUpdateLastError() = 0; + + //20140618 majc 增加获取最后一个应答错误的详细信息接口 + /** + * 取返回错误消息的详细信息 + * @param bAsyError 0表示同步(默认),否则表示异步。 + * @return 返回详细错误信息 + * @note 返回信息格式:packType:xxx;funtionId:xxx;branchNo:zxx;systemNo:xxx;subSystemNO:xxx;packId:xxx;routerInfo:xxx,xxx,xxx,xxx,xxx,xxx;sendPath:xxx,xxx,xxx,xxx,xxx,xxx;returnCode:xxx;errorNo:xxx;errorInfo:xxx + * packType-包类型 + * funtionId-功能号 + * branchNo-分支号 + * systemNo-系统号 + * subSystemNO-子系统号 + * packId-包序号 + * routerInfo-目标路由 + * sendPath-发送者路由 + * returnCode-返回错误码 + * errorNo-错误号 + * errorInfo-错误信息 + * 调用说明:1:同步调用时,方法Receive返回的lppData解析ESBMessage后RetuenCode不为0时调用;方法RecvBiz、RecvBizEx是在返回值为1、2、3、4时调用;方法RecvBizMsg是在GetReturnCode()不为0时调用 + * 2:异步调用时,回调OnReceived的lpData解析ESBMessage后RetuenCode不为0时调用;回调OnReceivedBiz、OnReceivedBizEx的nResult为1、2、3、4时调用;回调OnReceivedBizMsg的lpMsg在GetReturnCode()不为0时调用 + */ + virtual const char * FUNCTION_CALL_MODE GetLastAnsError(bool bAsyError = 0) = 0; + + //////////////////////////////////////////////////////////////////////////////// + //20150209 majc 新增订阅接口 + /** + * 创建一个订阅者 + * @param lpCallback 回调接口 + * @param SubScribeName 订阅者名字,多订阅者的名字必须不一样,不可以相同.最大长度32个字节 + * @param subRoterInfo 创建时指定路由 + * @param iTimeOut 超时时间 + * @param iInitRecvQLen 初始化接收队列的长度 + * @param iStepRecvQLen 接受队列的扩展步长 + * @return 返回订阅接口实例,一个会话接口对应一个回调. + */ + virtual CSubscribeInterface* FUNCTION_CALL_MODE NewSubscriberEx(CSubCallbackInterface *lpCallback,char* SubScribeName,SUB_ROUTER_INFO &subRoterInfo,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0; + //20150514 majc 增加连接user_token设置 + virtual void FUNCTION_CALL_MODE SetUserToken(const char* szUserToken) = 0; + //////////////////////////////////////////////////////////////////////////////// + + //20150610 xuxp 新增集群订阅者创建的接口 + /** + * 创建一个集群订阅者 + * @param lpCallback 回调接口 + * @param SubScribeName 订阅者名字,多订阅者的名字必须不一样,不可以相同.最大长度32个字节 + * @param iTimeOut 超时时间 + * @param iInitRecvQLen 初始化接收队列的长度 + * @param iStepRecvQLen 接受队列的扩展步长 + * @return 返回订阅接口实例,一个会话接口对应一个回调. + */ + virtual CSubscribeInterface* FUNCTION_CALL_MODE NewClusterSubscriber(CSubCallbackInterface *lpCallback,char* SubScribeName,SUB_ROUTER_INFO &subRoterInfo,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0; + + ///20150812 liuzl 返回所连接的服务器的节点名,如ar#0,支持F5 + ///20160614 zhouwh 修改接口定义,增加FUNCTION_CALL_MODE + //virtual const char *GetServerNodeName() = 0; + virtual const char * FUNCTION_CALL_MODE GetServerNodeName() = 0; + + //20160614 zhouwh 主动回收同步模式的队列缓存 + // note: 主动回收模式下,该接口必须调用,否则存在内存泄露 + /** + @param lpData 同步receive时返回的数据指针 + */ + virtual void FUNCTION_CALL_MODE RecycleDataBuf(void *lpData) = 0; + + //20161028 majc 增加接口设置唯一序号前缀 + /** + * @param lpPrefix 唯一序号前缀,最大支持255字节 + */ + virtual void FUNCTION_CALL_MODE SetUniquePrefix(const char* lpPrefix) = 0; + + //20161223 huxb 增加主动断开连接接口 + /** + * @param bSafe 是否为安全停止,默认为非安全停止 + * @param uiTimeout 安全停止超时时间,单位为ms + */ + virtual int FUNCTION_CALL_MODE ActiveClose(bool bSafe = false, unsigned int uiTimeout = 5000) = 0; + + //20161223 huxb 增加重新设置服务器地址接口 + //注:必须单线程调用 + /** + * @param szServers 新的服务器地址 + */ + virtual int FUNCTION_CALL_MODE SetServers(const char * szServers) = 0; +}; + +extern "C" +{ + /** + * 获取T2_SDK的版本号 + * @return 当前T2_SDK的版本号 + * 譬如:版本为0x10000002表示1.0.0.2 + */ + int FUNCTION_CALL_MODE GetVersionInfo(); + + /** + * 获取一个实现CConfigInterface接口的类的指针 + * @return 实现CConfigInterface接口的类的指针 + */ +CConfigInterface* FUNCTION_CALL_MODE NewConfig(); + + /** + * 获取一个实现CConnectionInterface接口的类的指针 + * @param CConfigInterface 实现CConfigInterface接口的类的指针 + * @return实现CConnectionInterface接口的类的指针 + */ +CConnectionInterface* FUNCTION_CALL_MODE NewConnection(CConfigInterface *lpConfig); + +/** +* @param int iVersion 业务包格式版本(取值:1 字串版,其他值 0x20版) +* 推荐使用0x20版 +* @return IPacker * 打包器接口指针 +*/ +IF2Packer * FUNCTION_CALL_MODE NewPacker(int iVersion); + +/** +* @param void * lpBuffer 要解包的数据(不含AR通信包头) +* @param unsigned int iLen 数据长度 +* @return IUnPacker * 版本2结果集操作接口指针 +*/ +IF2UnPacker * FUNCTION_CALL_MODE NewUnPacker(void * lpBuffer, unsigned int iLen); + +/** +* @param void * lpBuffer 要解包的数据(不含AR通信包头) +* @param unsigned int iLen 数据长度 +* @return IUnPacker * 版本1结果集操作接口指针 +*/ +IF2UnPacker * FUNCTION_CALL_MODE NewUnPackerV1(void * lpBuffer, unsigned int iLen); + +/** +* @param void * lpBuffer 要解包的数据(不含AR通信包头) +* @return 1表示版本1的结果集数据,0x21~0x2F 版本2的结果集数据 +*/ +int FUNCTION_CALL_MODE GetPackVersion(const void *lpBuffer); +/** +* @param char *EncodePass 传出的散列结果,字符串,长度不超过16(包括'\0') +* @param const char* Password 传入的待散列的密码 +* @param int nReserve 保留参数,采用默认值 +* @return char * 传出的散列结果地址,同EncodePass +*/ +char * FUNCTION_CALL_MODE Encode(char *EncodePass, const char* Password, int nReserve = 0 ); + + +/** +*利用一部提供的加密函数来对密码进行加密 +* @param const char* pIn 传入的待加密的字符串 +* @param const char* pOut 输出参数,长度和传入的字符串大小一样,由外部申请 +* @return +*/ +int FUNCTION_CALL_MODE EncodeEx(const char *pIn, char *pOut); + + +/** +* 构造一个过滤器接口指针 +* @return 返回NULL表示失败. +*/ +CFilterInterface* FUNCTION_CALL_MODE NewFilter(); + +/** +* 构造一个订阅属性接口指针 +* @return 返回NULL表示失败. +*/ +CSubscribeParamInterface* FUNCTION_CALL_MODE NewSubscribeParam(); + +//20130625 xuxp 构造业务消息 +IBizMessage* FUNCTION_CALL_MODE NewBizMessage(); + +//20160317 zhouwh 构造业务消息,添加压缩标志 +IBizMessage* FUNCTION_CALL_MODE NewBizMessageEx(int nCompressID = 1); + +//20161027 majc 导出测速端口 +/** +*lpRequest:传入字段:address port +*lpResult: 传出字段:成功:conn_count net_delay net_speed last_error 失败:error_no error_info +*uiTimeOut:超时时间 +* 返回值:0 成功,非0失败 +*/ +int FUNCTION_CALL_MODE GetMultiNetWorkSpeed(IF2UnPacker * lpRequest, IF2Packer * lpResult, unsigned int uiTimeOut); +} + +#endif diff --git a/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp new file mode 100644 index 00000000..0ae1e2f9 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp @@ -0,0 +1,1479 @@ +#include "ufx_interface.h" + +CRITICAL_SECTION* g_MsgQueueSection = NULL; +int iTreadNum = 0; +int GetThreadNum() +{ + if(g_MsgQueueSection == NULL) + { + g_MsgQueueSection = new CRITICAL_SECTION; + InitializeCriticalSection(g_MsgQueueSection); + } + EnterCriticalSection(g_MsgQueueSection); + iTreadNum++; + LeaveCriticalSection(g_MsgQueueSection); + return iTreadNum; +} + +c_IF2Packer::c_IF2Packer() +{ + lpPacker = NewPacker(2); + lpPacker->AddRef(); +} + +c_IF2Packer::~c_IF2Packer() +{ + +} + +void c_IF2Packer::SetBuffer(char* pBuf,int iBufSize,int iDataLen) +{ + lpPacker->SetBuffer(pBuf,iBufSize,iDataLen); +} + +void c_IF2Packer::BeginPack(void) +{ + lpPacker->BeginPack(); +} + +int c_IF2Packer::NewDataset(char *szDatasetName, int iReturnCode ) +{ + return lpPacker->NewDataset(szDatasetName,iReturnCode); +} + +int c_IF2Packer::AddField(char *szFieldName,char cFieldType,int iFieldWidth,int iFieldScale) +{ + return lpPacker->AddField(szFieldName,cFieldType,iFieldWidth,iFieldScale); +} + +int c_IF2Packer::AddStr(char *szValue) +{ + return lpPacker->AddStr(szValue); +} + +int c_IF2Packer::AddInt(int iValue) +{ + return lpPacker->AddInt(iValue); +} + +int c_IF2Packer::AddDouble(double fValue) +{ + return lpPacker->AddDouble(fValue); +} + +int c_IF2Packer::AddChar(char* cValue) +{ + return lpPacker->AddDouble(cValue[0]); +} + +int c_IF2Packer::AddRaw(char* lpBuff,int iLen) +{ + return lpPacker->AddRaw(lpBuff,iLen); +} + +void c_IF2Packer::EndPack() +{ + lpPacker->EndPack(); +} + +int* c_IF2Packer::GetPackBuf(void) +{ + char* lpBuff = (char*)(lpPacker->GetPackBuf()); + int iLength = lpPacker->GetPackLen(); + int* sValue = new int[iLength]; + for(int i=0;iGetPackLen(); +} + +int c_IF2Packer::GetPackBufSize(void) +{ + return lpPacker->GetPackBufSize(); +} + +int c_IF2Packer::GetVersion(void) +{ + return lpPacker->GetVersion(); +} + +void c_IF2Packer::SetReturnCode(long dwRetCode) +{ + return lpPacker->SetReturnCode(dwRetCode); +} + +c_IF2UnPacker* c_IF2Packer::UnPack(void) +{ + IF2UnPacker* lpUnpacker = lpPacker->UnPack(); + c_IF2UnPacker* lpcUnpacker = new c_IF2UnPacker(lpUnpacker); + return lpcUnpacker; + +} + +void c_IF2Packer::FreeMem() +{ + void* lpBuff = lpPacker->GetPackBuf(); + return lpPacker->FreeMem(lpBuff); +} + +void c_IF2Packer::ClearValue() +{ + return lpPacker->ClearValue(); +} + +void c_IF2Packer::BeginPackEx(char* szName) +{ + return lpPacker->BeginPackEx(szName); +} + +void c_IF2Packer::ClearDataSet() +{ + return lpPacker->ClearDataSet(); +} + +IF2Packer* c_IF2Packer::GetInstance() +{ + return lpPacker; +} + +void c_IF2Packer::Release() +{ + lpPacker->Release(); +} + +c_IF2UnPacker::c_IF2UnPacker(char* lpBuffer,int iLen) +{ + //printf("初始化,%d\n",iLen); + lpBuf = malloc(iLen); + memcpy(lpBuf,(void*)lpBuffer,iLen); + lpUnPacker = NewUnPacker(lpBuf,iLen); + if(lpUnPacker == NULL) + printf("初始化失败,%d\n",iLen); + lpUnPacker->AddRef(); + bRelease = true; +} + +c_IF2UnPacker::c_IF2UnPacker(IF2UnPacker* lpUnPack) +{ + lpBuf = NULL; + lpUnPacker = lpUnPack; + bRelease = false; +} + +c_IF2UnPacker::~c_IF2UnPacker() +{ + +} + +int c_IF2UnPacker::GetVersion(void) +{ + return lpUnPacker->GetVersion(); +} + +int c_IF2UnPacker::Open(char* lpBuffer,int iLen) +{ + return lpUnPacker->OpenAndCopy(lpBuffer,iLen); +} + +int c_IF2UnPacker::GetDatasetCount() +{ + return lpUnPacker->GetDatasetCount(); +} + +int c_IF2UnPacker::SetCurrentDatasetByIndex(int nIndex) +{ + return lpUnPacker->SetCurrentDatasetByIndex(nIndex); +} + +int c_IF2UnPacker::SetCurrentDataset(char *szDatasetName) +{ + return lpUnPacker->SetCurrentDataset(szDatasetName); +} + +char* c_IF2UnPacker::GetPackBuf(void) +{ + return (char*)(lpUnPacker->GetPackBuf()); +} + + +int c_IF2UnPacker::GetPackLen() +{ + return lpUnPacker->GetPackLen(); +} + +int c_IF2UnPacker::GetRowCount(void) +{ + return lpUnPacker->GetRowCount(); +} + +void c_IF2UnPacker::First() +{ + lpUnPacker->First(); +} + +void c_IF2UnPacker::Last() +{ + lpUnPacker->Last(); +} + +void c_IF2UnPacker::Go(int nRow) +{ + lpUnPacker->Go(nRow); +} + +char* c_IF2UnPacker::GetDatasetName() +{ + return (char*)(lpUnPacker->GetDatasetName()); +} + +int c_IF2UnPacker::OpenAndCopy(char* lpBuffer,int iLen) +{ + return lpUnPacker->OpenAndCopy(lpBuffer,iLen); +} + +char* c_IF2UnPacker::GetColTypeByName(char * columnName) +{ + char cType = lpUnPacker->GetColTypeByName(columnName); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} + +int c_IF2UnPacker::GetColScaleByName(char * columnName) +{ + return lpUnPacker->GetColScaleByName(columnName); +} + +int c_IF2UnPacker::GetColWidthByName(char * columnName) +{ + return lpUnPacker->GetColWidthByName(columnName); +} + +IF2UnPacker* c_IF2UnPacker::GetInstance() +{ + return lpUnPacker; +} + +int c_IF2UnPacker::GetColCount() +{ + return lpUnPacker->GetColCount(); +} + +char* c_IF2UnPacker::GetColName(int column) +{ + return (char*)lpUnPacker->GetColName(column); +} +char* c_IF2UnPacker::GetColType(int column) +{ + char cType = lpUnPacker->GetColType(column); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} +int c_IF2UnPacker::GetColScale(int column) +{ + return lpUnPacker->GetColScale(column); +} +int c_IF2UnPacker::GetColWidth(int column) +{ + return lpUnPacker->GetColWidth(column); +} +int c_IF2UnPacker::FindColIndex(char * columnName) +{ + return lpUnPacker->FindColIndex(columnName); +} +char* c_IF2UnPacker::GetStrByIndex(int column) +{ + return (char*)lpUnPacker->GetStrByIndex(column); +} +char* c_IF2UnPacker::GetStr(char * columnName) +{ + return (char*)lpUnPacker->GetStr(columnName); +} +char* c_IF2UnPacker::GetCharByIndex(int column) +{ + char cType = lpUnPacker->GetCharByIndex(column); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} +char* c_IF2UnPacker::GetChar(char * columnName) +{ + char cType = lpUnPacker->GetChar(columnName); + char* sType=new char[2]; + sType[0]=cType; + sType[1]='\0'; + return sType; +} +double c_IF2UnPacker::GetDoubleByIndex(int column) +{ + return lpUnPacker->GetDoubleByIndex(column); +} +double c_IF2UnPacker::GetDouble(char * columnName) +{ + return lpUnPacker->GetDouble(columnName); +} +int c_IF2UnPacker::GetIntByIndex(int column) +{ + return lpUnPacker->GetIntByIndex(column); +} +int c_IF2UnPacker::GetInt(char* columnName) +{ + return lpUnPacker->GetInt(columnName); +} +char* c_IF2UnPacker::GetRawByIndex(int column,int* lpRawLen) +{ + return (char*)lpUnPacker->GetRawByIndex(column,lpRawLen); +} +char* c_IF2UnPacker::GetRaw(char* columnName,int* lpRawLen) +{ + return (char*)lpUnPacker->GetRaw(columnName,lpRawLen); +} +int c_IF2UnPacker::WasNull() +{ + return lpUnPacker->WasNull(); +} +void c_IF2UnPacker::Next() +{ + lpUnPacker->Next(); +} +int c_IF2UnPacker::IsEOF() +{ + return lpUnPacker->IsEOF(); +} +int c_IF2UnPacker::IsEmpty() +{ + return lpUnPacker->IsEmpty(); +} +void c_IF2UnPacker::Destroy() +{ + lpUnPacker->Destroy(); +} + +void c_IF2UnPacker::Release() +{ + if (lpUnPacker && bRelease) + { + lpUnPacker->Release(); + lpUnPacker = NULL; + } + if (lpBuf) + { + free(lpBuf); + lpBuf = NULL; + } +} + +C_CConfigInterface::C_CConfigInterface() +{ + lpConfig = NewConfig(); + lpConfig->AddRef(); +} + +C_CConfigInterface::~C_CConfigInterface() +{ + +} + +int C_CConfigInterface::Load( char *szFileName) +{ + return lpConfig->Load(szFileName); +} + +int C_CConfigInterface::Save( char *szFileName) +{ + return lpConfig->Save(szFileName); +} + +char* C_CConfigInterface::GetString(char *szSection,char *szEntry,char *szDefault) +{ + return (char*)lpConfig->GetString(szSection,szEntry,szDefault); +} + +int C_CConfigInterface::GetInt(char *szSection,char *szEntry, int iDefault) +{ + return lpConfig->GetInt(szSection,szEntry,iDefault); +} + +int C_CConfigInterface::SetString( char *szSection, char *szEntry, char *szValue) +{ + return lpConfig->SetString(szSection,szEntry,szValue); +} + +int C_CConfigInterface::SetInt( char *szSection, char *szEntry, int iValue) +{ + return lpConfig->SetInt(szSection,szEntry,iValue); +} + +CConfigInterface* C_CConfigInterface::GetInstance() +{ + return lpConfig; +} + +void C_CConfigInterface::Release() +{ + lpConfig->Release(); +} + +c_IBizMessage::c_IBizMessage() +{ + lpBizMessage = NewBizMessage(); + lpBizMessage->AddRef(); +} + +c_IBizMessage::~c_IBizMessage() +{ + +} + +void c_IBizMessage::SetFunction(int nFUnctionNo) +{ + lpBizMessage->SetFunction(nFUnctionNo); +} + +int c_IBizMessage::GetFunction() +{ + return lpBizMessage->GetFunction(); +} + +void c_IBizMessage::SetPacketType(int nPacketType) +{ + lpBizMessage->SetPacketType(nPacketType); +} + +int c_IBizMessage::GetPacketType() +{ + return lpBizMessage->GetPacketType(); +} + +void c_IBizMessage::SetBranchNo(int nBranchNo) +{ + return lpBizMessage->SetBranchNo(nBranchNo); +} + +int c_IBizMessage::GetBranchNo() +{ + return lpBizMessage->GetBranchNo(); +} + +void c_IBizMessage::SetSystemNo(int nSystemNo) +{ + lpBizMessage->SetSystemNo(nSystemNo); +} + +int c_IBizMessage::GetSystemNo() +{ + return lpBizMessage->GetSystemNo(); +} + +void c_IBizMessage::SetSubSystemNo(int nSubSystemNo) +{ + return lpBizMessage->SetSubSystemNo(nSubSystemNo); +} + +int c_IBizMessage::GetSubSystemNo() +{ + return lpBizMessage->GetSubSystemNo(); +} + +void c_IBizMessage::SetSenderId(int nSenderId) +{ + lpBizMessage->SetSenderId(nSenderId); +} + +int c_IBizMessage::GetSenderId() +{ + return lpBizMessage->GetSenderId(); +} + +void c_IBizMessage::SetPacketId(int nPacketId) +{ + lpBizMessage->SetPacketId(nPacketId); +} + +int c_IBizMessage::GetPacketId() +{ + return lpBizMessage->GetPacketId(); +} + +void c_IBizMessage::SetErrorNo(int nErrorNo) +{ + lpBizMessage->SetErrorNo(nErrorNo); +} + +int c_IBizMessage::GetErrorNo() +{ + return lpBizMessage->GetErrorNo(); +} + +void c_IBizMessage::SetErrorInfo(char* strErrorInfo) +{ + lpBizMessage->SetErrorInfo(strErrorInfo); +} + +char* c_IBizMessage::GetErrorInfo() +{ + return (char*)(lpBizMessage->GetErrorInfo()); +} + +void c_IBizMessage::SetReturnCode(int nReturnCode) +{ + lpBizMessage->SetReturnCode(nReturnCode); +} + +int c_IBizMessage::GetReturnCode() +{ + return lpBizMessage->GetReturnCode(); +} + +void c_IBizMessage::SetContent(char* lpContent,int iLen) +{ + lpBizMessage->SetContent(lpContent,iLen); +} + +char* c_IBizMessage::GetContent(int& iLen) +{ + return (char*)(lpBizMessage->GetContent(iLen)); +} + +void c_IBizMessage::SetIssueType(int nIssueType) +{ + lpBizMessage->SetIssueType(nIssueType); +} + +int c_IBizMessage::GetIssueType() +{ + return lpBizMessage->GetIssueType(); +} + +void c_IBizMessage::SetSequeceNo(int nSequeceNo) +{ + return lpBizMessage->SetSequeceNo(nSequeceNo); +} + +int c_IBizMessage::GetSequeceNo() +{ + return lpBizMessage->GetSequeceNo(); +} + +void c_IBizMessage::SetKeyInfo(char* lpKeyData,int iLen) +{ + lpBizMessage->SetKeyInfo(lpKeyData,iLen); +} + +char* c_IBizMessage::GetKeyInfo(int& iLen) +{ + return (char*)lpBizMessage->GetKeyInfo(iLen); +} + +void c_IBizMessage::SetAppData(char* lpAppdata,int nAppLen) +{ + lpBizMessage->SetAppData(lpAppdata,nAppLen); +} + +char* c_IBizMessage::GetAppData(int& nAppLen) +{ + return (char*)lpBizMessage->GetAppData(nAppLen); +} + +int c_IBizMessage::ChangeReq2AnsMessage() +{ + return lpBizMessage->ChangeReq2AnsMessage(); +} + +char* c_IBizMessage::GetBuff(int& nBuffLen) +{ + return (char*)lpBizMessage->GetBuff(nBuffLen); +} + +int c_IBizMessage::SetBuff(char* lpBuff,int nBuffLen) +{ + return lpBizMessage->SetBuff(lpBuff,nBuffLen); +} + +void c_IBizMessage::ReSet() +{ + lpBizMessage->ReSet(); +} + +IBizMessage* c_IBizMessage::GetInstance() +{ + return lpBizMessage; +} + +void c_IBizMessage::Release() +{ + lpBizMessage->Release(); +} + +c_CSubscribeParamInterface::c_CSubscribeParamInterface() +{ + lpSubParam = NewSubscribeParam(); + lpSubParam->AddRef(); +} + +c_CSubscribeParamInterface::~c_CSubscribeParamInterface() +{ + +} + +void c_CSubscribeParamInterface::SetTopicName(char* szName) +{ + lpSubParam->SetTopicName(szName); +} + +void c_CSubscribeParamInterface::SetAppData(char* lpData,int iLen) +{ + lpSubParam->SetAppData(lpData,iLen); +} + +void c_CSubscribeParamInterface::SetFilter(char* filterName,char* filterValue) +{ + lpSubParam->SetFilter(filterName,filterValue); +} + +void c_CSubscribeParamInterface::SetReturnFiled(char* filedName) +{ + lpSubParam->SetReturnFiled(filedName); +} + +void c_CSubscribeParamInterface::SetFromNow(int bFromNow) +{ + bool bFN = false; + if(bFromNow > 0) + bFN = true; + lpSubParam->SetFromNow(bFN); +} + +void c_CSubscribeParamInterface::SetReplace(int bReplace) +{ + bool bRe = false; + if(bReplace > 0) + bRe = true; + lpSubParam->SetFromNow(bRe); +} + +void c_CSubscribeParamInterface::SetSendInterval(int nSendInterval) +{ + lpSubParam->SetSendInterval(nSendInterval); +} + +char* c_CSubscribeParamInterface::GetTopicName() +{ + return (char*)lpSubParam->GetTopicName(); +} + +char* c_CSubscribeParamInterface::GetAppData(int *iLen) +{ + return (char*)lpSubParam->GetAppData(iLen); +} + +char* c_CSubscribeParamInterface::GetFilterNameByIndex(int index) +{ + return (char*)lpSubParam->GetFilterNameByIndex(index); +} + +char* c_CSubscribeParamInterface::GetFilterValueByIndex(int index) +{ + return (char*)lpSubParam->GetFilterValueByIndex(index); +} + +char* c_CSubscribeParamInterface::GetFilterValue(char* fileName) +{ + return (char*)lpSubParam->GetFilterValue(fileName); +} + +int c_CSubscribeParamInterface::GetFilterCount() +{ + return lpSubParam->GetFilterCount(); +} + +char* c_CSubscribeParamInterface::GetReturnFiled() +{ + return (char*)lpSubParam->GetReturnFiled(); +} + +int c_CSubscribeParamInterface::GetFromNow() +{ + return lpSubParam->GetFromNow(); +} + +int c_CSubscribeParamInterface::GetReplace() +{ + return lpSubParam->GetReplace(); +} + +int c_CSubscribeParamInterface::GetSendInterval() +{ + return lpSubParam->GetSendInterval(); +} + +CSubscribeParamInterface* c_CSubscribeParamInterface::GetInstance() +{ + return lpSubParam; +} + +void c_CSubscribeParamInterface::Release() +{ + lpSubParam->Release(); +} + +c_SubCallBack::c_SubCallBack(char *lpMould,char *lpClass) +{ + strcpy_s(lpCallMould,lpMould); + strcpy_s(lpCallClass,lpClass); + DealMsgQueue = new std::queue(); + IsRun=true; + for (int i = 0; i < 2; i++) + { + char threadName[12] = {0}; + sprintf_s(threadName,"sub_thread%d",GetThreadNum()); + EventHandle[i] = CreateEvent(NULL, FALSE, FALSE, (LPCTSTR)threadName); + } + gMsgQueueSection = new CRITICAL_SECTION; + InitializeCriticalSection(gMsgQueueSection); +} + +c_SubCallBack::~c_SubCallBack() +{ + IsRun=false; + SetEvent(EventHandle[1]); + Py_Finalize(); +} + +c_SubCallBack::c_SubCallBack() +{ + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } +} + +int c_SubCallBack::initInstance() +{ + pModule = NULL; + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } + pModule = PyImport_ImportModule(lpCallMould); + if (!pModule) + { + printf("Can`t open python file!\n"); + return -1; + } + pDict = PyModule_GetDict(pModule); + if(!pDict) + { + printf("Can`t open Get Dict!\n"); + return -1; + } + pClass = PyObject_GetAttrString(pModule, lpCallClass); + if(!pClass) + { + printf("Can`t open Get Class!\n"); + return -1; + } + pObject = PyEval_CallObject(pClass, NULL); + if(!pObject) + { + printf("%s Class init failed!\n",lpCallClass); + return -1; + } + pOnReceiveFunc=PyObject_GetAttrString(pObject, "OnReceived"); + if(!pOnReceiveFunc) + { + printf("OnReceived function init failed!\n"); + return -1; + } + Thread = new std::thread(&c_SubCallBack::run,this); + return 0; +} + +void c_SubCallBack::run() +{ + while(IsRun) + { + CSubCalBackPara* lpMsg; + int index = WaitForMultipleObjects(2, EventHandle, FALSE, INFINITE); + PyObject* list = NULL; + state = PyGILState_Ensure(); + Py_INCREF(pClass); + switch(index) + { + case WAIT_OBJECT_0: + EnterCriticalSection(gMsgQueueSection); + while( DealMsgQueue->size() > 0) + { + lpMsg = DealMsgQueue->front(); + DealMsgQueue->pop(); + LeaveCriticalSection(gMsgQueueSection); + int iLenght; + char* lpBuff = (char*)(lpMsg->lpBizMsg->GetBuff(iLenght)); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + char * lpTopic = lpMsg->szTopicName; + PyObject* call = PyObject_CallFunction(pOnReceiveFunc,"sOi",lpTopic,list,iLenght); + Py_CLEAR(call); + Py_DECREF(list); + delete lpMsg; + EnterCriticalSection(gMsgQueueSection); + } + LeaveCriticalSection(gMsgQueueSection); + break; + case WAIT_OBJECT_0 + 1: + IsRun = false; + break; + } + PyGILState_Release(state); + } +} + +void c_SubCallBack::OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData) +{ + if (lpData == NULL || nLength <= 0) + { + printf("主推数据指针为空\n"); + return; + } + CSubCalBackPara * lpPara = new CSubCalBackPara(); + lpPara->lpBizMsg = NewBizMessage(); + lpPara->lpBizMsg->AddRef(); + strncpy_s(lpPara->szTopicName,lpRecvData->szTopicName,sizeof(lpPara->szTopicName)-1); + lpPara->lpBizMsg->SetContent((void*)lpData,nLength); + lpPara->lpBizMsg->SetKeyInfo(lpRecvData->lpFilterData,lpRecvData->iFilterDataLen); + lpPara->lpBizMsg->SetAppData(lpRecvData->lpAppData,lpRecvData->iAppDataLen); + + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpPara); + LeaveCriticalSection(gMsgQueueSection); + SetEvent(EventHandle[0]); +} + +void c_SubCallBack::OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo) +{ + printf("OnRecvTickMsg"); +} + +c_CSubscribeInterface::c_CSubscribeInterface(CSubscribeInterface* lpSub) +{ + lpSubscribe = lpSub; + lpSubscribe->AddRef(); +} + +c_CSubscribeInterface::~c_CSubscribeInterface() +{ + +} + +int c_CSubscribeInterface::SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,c_IF2UnPacker** lppBizUnPack,c_IF2Packer* lpBizPack) +{ + CSubscribeParamInterface* lpParam = lpSubscribeParamInter->GetInstance(); + IF2UnPacker* lpUnpack = NULL; + IF2Packer* lpPack = NULL; + int ret = -1; + if(lpBizPack != NULL) + { + lpPack = lpBizPack->GetInstance(); + IF2UnPacker* lpTempUnPacker = NULL; + ret = lpSubscribe->SubscribeTopic(lpParam,uiTimeout,&lpTempUnPacker,lpPack); + if(lpTempUnPacker != NULL) + *lppBizUnPack = new c_IF2UnPacker(lpTempUnPacker); + } + else + { + ret = lpSubscribe->SubscribeTopic(lpParam,uiTimeout); + } + return ret; +} + + +int c_CSubscribeInterface::CancelSubscribeTopic(int subscribeIndex) +{ + return lpSubscribe->CancelSubscribeTopic(subscribeIndex); +} + +int c_CSubscribeInterface::CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface) +{ + return lpSubscribe->CancelSubscribeTopicEx(topicName,lpFilterInterface); +} + +void c_CSubscribeInterface::GetSubcribeTopic(c_IF2Packer* lpPack) +{ + lpSubscribe->GetSubcribeTopic(lpPack->GetInstance()); +} +void c_CSubscribeInterface::Release() +{ + if (lpSubscribe) + { + lpSubscribe->Release(); + } +} + +c_CCallbackInterface::c_CCallbackInterface() +{ + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } +} + +c_CCallbackInterface::c_CCallbackInterface(char* sMould,char* sClass) +{ + strcpy_s(sMouldName, sMould); + strcpy_s(sClassName, sClass); + DealMsgQueue = new std::queue(); + IsRun=true; + for (int i = 0; i < 2; i++) + { + char threadName[12] = {0}; + sprintf_s(threadName,"thread%d",GetThreadNum()); + EventHandle[i] = CreateEvent(NULL, FALSE, FALSE, (LPCTSTR)threadName); + } + gMsgQueueSection = new CRITICAL_SECTION; + InitializeCriticalSection(gMsgQueueSection); +} + +c_CCallbackInterface::~c_CCallbackInterface() +{ + IsRun=false; + SetEvent(EventHandle[1]); + Py_Finalize(); +} + +void c_CCallbackInterface::run() +{ + while(IsRun) + { + CCallBackParam* lpMsg; + int index = WaitForMultipleObjects(2, EventHandle, FALSE, INFINITE); + PyObject* list = NULL; + PyObject* call; + state = PyGILState_Ensure(); + Py_INCREF(pClass); + switch(index) + { + case WAIT_OBJECT_0: + EnterCriticalSection(gMsgQueueSection); + while( DealMsgQueue->size() > 0) + { + lpMsg = DealMsgQueue->front(); + DealMsgQueue->pop(); + LeaveCriticalSection(gMsgQueueSection); + + switch(lpMsg->iCallFuncType) + { + case 0: + //PyObject_CallFunction(pConnectFunc,NULL); + break; + case 1: + //PyObject_CallFunction(pSafeConnectFunc,NULL); + break; + case 2: + call = PyObject_CallFunction(pRegisterFunc,NULL); + Py_CLEAR(call); + break; + case 3: + call = PyObject_CallFunction(pCloseFunc,NULL); + Py_CLEAR(call); + break; + case 4: + //PyObject_CallFunction(pSendFunc,NULL); + break; + case 5: + if(lpMsg->iResult == 0 || lpMsg->iResult == 1) + { + char* lpBuff = (char*)(lpMsg->lpUnPacker->GetPackBuf()); + int iLenght = lpMsg->lpUnPacker->GetPackLen(); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + //PyObject_CallFunction(pReceivedBizFunc,"iOi",lpMsg->hSend,list,iLenght); + } + else + { + //PyObject_CallFunction(pReceivedBizFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue)); + } + break; + case 6: + if(lpMsg->iResult == 0 || lpMsg->iResult == 1) + { + char* lpBuff = (char*)(lpMsg->lpUnPacker->GetPackBuf()); + int iLenght = lpMsg->lpUnPacker->GetPackLen(); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + //PyObject_CallFunction(pReceivedBizExFunc,"iOi",lpMsg->hSend,list,iLenght); + } + else + { + //PyObject_CallFunction(pReceivedBizExFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue)); + } + break; + case 7: + { + //if(lpMsg->iResult == 0 || lpMsg->iResult == 1) + //{ + + int iLenght = 0; + //char* lpBuff = (char*)(lpMsg->lpBizMsg->GetContent(iLenght)); + char* lpBuff = (char*)lpMsg->lpBizMsg->GetBuff(iLenght); + list = PyList_New(0); + for (int i = 0; i < iLenght; i++) + { + int iTemp = lpBuff[i]; + PyList_Append(list, Py_BuildValue("i", iTemp)); + } + //PyObject_CallFunction(pReceivedBizExFunc,"iOi",lpMsg->hSend,list,iLenght); + //} + //else + //{ + // PyObject_CallFunction(pReceivedBizExFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue)); + //} + //PyObject_CallFunction(pReceivedBizMsgFunc,NULL); + call = PyObject_CallFunction(pReceivedBizMsgFunc,"iOi",lpMsg->hSend,list,iLenght); + Py_CLEAR(call); + Py_DECREF(list); + } + break; + default: + printf("unkown event\n"); + } + delete(lpMsg); + EnterCriticalSection(gMsgQueueSection); + } + LeaveCriticalSection(gMsgQueueSection); + break; + case WAIT_OBJECT_0 + 1: + IsRun = false; + break; + default: + printf("unkown wait\n"); + } + PyGILState_Release(state); + } +} + +int c_CCallbackInterface::InitInstance() +{ + pModule = NULL; + if (!Py_IsInitialized()) + { + Py_Initialize(); + PyEval_InitThreads(); + PyRun_SimpleString("import sys"); + PyRun_SimpleString("sys.path.append('./')"); + } + pModule = PyImport_ImportModule(sMouldName); + if (!pModule) + { + printf("Cant open python file!\n"); + return -1; + } + pDict = PyModule_GetDict(pModule); + if(!pDict) + { + printf("Cant open Get Dict!\n"); + return -1; + } + pClass = PyObject_GetAttrString(pModule, sClassName); + if(!pClass) + { + printf("Cant open Get Class!\n"); + return -1; + } + pObject = PyEval_CallObject(pClass, NULL); + if(!pObject) + { + printf("Class install failed!\n"); + return -1; + } + + // pConnectFunc=PyObject_GetAttrString(pObject, "OnConnect"); + //if(!pConnectFunc) + //{ + // printf("OnConnect function init failed!\n"); + // return -1; + //} + + //pSafeConnectFunc=PyObject_GetAttrString(pObject, "OnSafeConnect"); + //if(!pSafeConnectFunc) + //{ + // printf("OnSafeConnect function init failed!\n"); + // return -1; + //} + + pRegisterFunc=PyObject_GetAttrString(pObject, "OnRegister"); + if(!pRegisterFunc) + { + printf("OnRegister function init failed!\n"); + return -1; + } + + //pSendFunc=PyObject_GetAttrString(pObject, "OnSent"); + //if(!pSendFunc) + //{ + // printf("OnSent function init failed!\n"); + // return -1; + //} + + pCloseFunc=PyObject_GetAttrString(pObject, "OnClose"); + if(!pCloseFunc) + { + printf("OnClose function init failed!\n"); + return -1; + } + + //pReceivedBizFunc=PyObject_GetAttrString(pObject, "OnReceivedBiz"); + //if(!pReceivedBizFunc) + //{ + // printf("OnReceivedBiz function init failed!\n"); + // return -1; + //} + + //pReceivedBizExFunc=PyObject_GetAttrString(pObject, "OnReceivedBizEx"); + //if(!pReceivedBizExFunc) + //{ + // printf("OnReceivedBizEx function init failed!\n"); + // return -1; + //} + + pReceivedBizMsgFunc=PyObject_GetAttrString(pObject, "OnReceivedBizMsg"); + if(!pReceivedBizMsgFunc) + { + printf("OnReceivedBizMsg function init failed!\n"); + return -1; + } + Thread = new std::thread(&c_CCallbackInterface::run,this); + return 0; +} + +void c_CCallbackInterface::OnConnect(CConnectionInterface *lpConnection) +{ + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->iResult = 0; + //lpMsg->iCallFuncType = 0; + //lpMsg->lpBizMsg = NULL; + //lpMsg->lpUnPacker = NULL; + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + //SetEvent(EventHandle[0]); +} + +void c_CCallbackInterface::OnSafeConnect(CConnectionInterface *lpConnection) +{ + //printf("OnSafeConnect!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->iResult = 0; + //lpMsg->iCallFuncType = 1; + //lpMsg->lpBizMsg = NULL; + //lpMsg->lpUnPacker = NULL; + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + ////state = PyGILState_Ensure(); + //SetEvent(EventHandle[0]); + ////PyObject_CallFunction(pSafeConnectFunc,NULL); + ////PyGILState_Release(state); +} + +void c_CCallbackInterface::OnRegister(CConnectionInterface *lpConnection) +{ + CCallBackParam* lpMsg = new CCallBackParam(); + lpMsg->iResult = 0; + lpMsg->iCallFuncType = 2; + lpMsg->lpBizMsg = NULL; + lpMsg->lpUnPacker = NULL; + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpMsg); + LeaveCriticalSection(gMsgQueueSection); + //state = PyGILState_Ensure(); + SetEvent(EventHandle[0]); + //PyObject_CallFunction(pRegisterFunc,NULL); + //PyGILState_Release(state); +} + +void c_CCallbackInterface::OnClose(CConnectionInterface *lpConnection) +{ + CCallBackParam* lpMsg = new CCallBackParam(); + lpMsg->iResult = 0; + lpMsg->iCallFuncType = 3; + lpMsg->lpBizMsg = NULL; + lpMsg->lpUnPacker = NULL; + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpMsg); + LeaveCriticalSection(gMsgQueueSection); + //state = PyGILState_Ensure(); + SetEvent(EventHandle[0]); + //PyObject_CallFunction(pCloseFunc,NULL); + //PyGILState_Release(state); +} + +void c_CCallbackInterface::OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData) +{ + //printf("OnSent!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->iResult = 0; + //lpMsg->iCallFuncType = 4; + //lpMsg->lpBizMsg = NULL; + //lpMsg->lpUnPacker = NULL; + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + ////state = PyGILState_Ensure(); + //SetEvent(EventHandle[0]); + ////PyObject_CallFunction(pSendFunc,NULL); + ////PyGILState_Release(state); +} + +void c_CCallbackInterface::Reserved1(void *a, void *b, void *c, void *d) +{ +} + +void c_CCallbackInterface::Reserved2(void *a, void *b, void *c, void *d) +{ +} + +int c_CCallbackInterface::Reserved3() +{ + return 0; +} + +void c_CCallbackInterface::Reserved4() +{ +} + +void c_CCallbackInterface::Reserved5() +{ +} + +void c_CCallbackInterface::Reserved6() +{ +} + +void c_CCallbackInterface::Reserved7() +{ +} + +void c_CCallbackInterface::OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult) +{ + //printf("OnReceivedBiz!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->hSend = hSend; + //lpMsg->iResult = nResult; + //lpMsg->iCallFuncType = 5; + //lpMsg->lpBizMsg = NULL; + //if(nResult == 0 || nResult == 1) + //{ + // void* lpBuff = ((IF2UnPacker*)lpUnPackerOrStr)->GetPackBuf(); + // int iLen = ((IF2UnPacker*)lpUnPackerOrStr)->GetPackLen(); + // lpMsg->lpUnPacker = NewUnPacker(lpBuff,iLen); + //} + //else + //{ + // char* sInfo = (char*)lpUnPackerOrStr; + // lpMsg->sValue = (char*)malloc(sizeof(char)*strlen(sInfo)); + // strcpy_s(lpMsg->sValue,strlen(sInfo),sInfo); + //} + //EnterCriticalSection(gMsgQueueSection); + // DealMsgQueue->push(lpMsg); + // LeaveCriticalSection(gMsgQueueSection); + //SetEvent(EventHandle[0]); +} + +void c_CCallbackInterface::OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult) +{ + //printf("OnReceivedBizEx!\n"); + //CCallBackParam* lpMsg = new CCallBackParam(); + //lpMsg->hSend = hSend; + //lpMsg->iResult = nResult; + //lpMsg->iCallFuncType = 6; + //lpMsg->lpBizMsg = NULL; + //if(nResult == 0 || nResult == 1) + //{ + // void* lpBuff = ((IF2UnPacker*)lpUnpackerOrStr)->GetPackBuf(); + // int iLen = ((IF2UnPacker*)lpUnpackerOrStr)->GetPackLen(); + // lpMsg->lpUnPacker = NewUnPacker(lpBuff,iLen); + //} + //else + //{ + // char* sInfo = (char*)lpUnpackerOrStr; + // lpMsg->sValue = (char*)malloc(sizeof(char)*strlen(sInfo)); + // strcpy_s(lpMsg->sValue,strlen(sInfo),sInfo); + //} + //EnterCriticalSection(gMsgQueueSection); + //DealMsgQueue->push(lpMsg); + //LeaveCriticalSection(gMsgQueueSection); + //state = PyGILState_Ensure(); + //SetEvent(EventHandle[0]); + //PyGILState_Release(state); +} + +void c_CCallbackInterface::OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg) +{ + //printf("OnReceivedBizMsg!\n"); + CCallBackParam* lpCallMsg = new CCallBackParam(); + lpCallMsg->hSend = hSend; + lpCallMsg->iResult = 0; + lpCallMsg->iCallFuncType = 7; + lpCallMsg->lpUnPacker = NULL; + int iLen = 0; + const void* lpBuff = lpMsg->GetBuff(iLen); + lpCallMsg->lpBizMsg = NewBizMessage(); + lpCallMsg->lpBizMsg->AddRef(); + lpCallMsg->lpBizMsg->SetBuff((void*)lpBuff,iLen); + EnterCriticalSection(gMsgQueueSection); + DealMsgQueue->push(lpCallMsg); + LeaveCriticalSection(gMsgQueueSection); + state = PyGILState_Ensure(); + SetEvent(EventHandle[0]); + PyGILState_Release(state); +} + +c_CConnectionInterface::c_CConnectionInterface(C_CConfigInterface* lpConfig) +{ + lpConnect = NewConnection(lpConfig->GetInstance()); + lpConnect->AddRef(); +} + +c_CConnectionInterface::~c_CConnectionInterface() +{ +} + +int c_CConnectionInterface::Connect(unsigned int uiTimeout) +{ + return lpConnect->Connect(uiTimeout); +} + +int c_CConnectionInterface::Close() +{ + return lpConnect->Close(); +} + +char* c_CConnectionInterface::GetServerAddress(int* lpPort) +{ + return (char*)lpConnect->GetServerAddress(lpPort); +} + +int c_CConnectionInterface::GetStatus() +{ + return lpConnect->GetStatus(); +} + +int c_CConnectionInterface::GetServerLoad() +{ + return lpConnect->GetServerLoad(); +} + +char* c_CConnectionInterface::GetErrorMsg(int nErrorCode) +{ + return (char*)lpConnect->GetErrorMsg(nErrorCode); +} + +int c_CConnectionInterface::GetConnectError() +{ + return lpConnect->GetConnectError(); +} + +char* c_CConnectionInterface::GetRealAddress() +{ + return (char*)lpConnect->GetRealAddress(); +} +char* c_CConnectionInterface::GetSelfAddress() +{ + return (char*)lpConnect->GetSelfAddress(); +} + +char* c_CConnectionInterface::GetSelfMac() +{ + return (char*)lpConnect->GetSelfMac(); +} + +c_CSubscribeInterface* c_CConnectionInterface::NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen,int iStepRecvQLen) +{ + CSubscribeInterface* lpSub = lpConnect->NewSubscriber(lpCallback, SubScribeName,iTimeOut,iInitRecvQLen,iStepRecvQLen); + c_CSubscribeInterface* lp = NULL; + if (lpSub != NULL) + { + lp= new c_CSubscribeInterface(lpSub); + } + return lp; +} + +c_IF2UnPacker* c_CConnectionInterface::GetTopic(int byForce,int iTimeOut) +{ + bool bForce = false; + if(byForce > 0) + bForce = true; + IF2UnPacker* lpUnpack = lpConnect->GetTopic(bForce,iTimeOut); + c_IF2UnPacker* lpUnpacker = new c_IF2UnPacker(lpUnpack); + return lpUnpacker; +} + +char* c_CConnectionInterface::GetMCLastError() +{ + return (char*)lpConnect->GetMCLastError(); +} + +int c_CConnectionInterface::Create2BizMsg(c_CCallbackInterface *lpCallback) +{ + return lpConnect->Create2BizMsg(lpCallback); +} + +int c_CConnectionInterface::SendBizMsg(c_IBizMessage* lpMsg,int nAsy) +{ + return lpConnect->SendBizMsg(lpMsg->GetInstance(),nAsy); +} + +int c_CConnectionInterface::RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout, unsigned uiFlag) +{ + IBizMessage* lpBizMsg = lpMsg->GetInstance(); + IBizMessage* lpRecv = NULL; + int iRet = lpConnect->RecvBizMsg(hSend,&lpRecv,uiTimeout,uiFlag); + if (iRet == 0 && lpRecv != NULL) //如果接收成功 + { + int iLen = 0; + void * lpBuf = lpRecv->GetBuff(iLen); + lpBizMsg->SetBuff(lpBuf,iLen); + } + return iRet; +} +char* c_CConnectionInterface::GetLastAnsError(int bAsyError) +{ + bool bAs = false; + if(bAsyError > 0) + bAs = true; + return (char*)lpConnect->GetLastAnsError(bAs); +} +void c_CConnectionInterface::Release() +{ + lpConnect->Release(); +} + diff --git a/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h new file mode 100644 index 00000000..64327336 --- /dev/null +++ b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h @@ -0,0 +1,388 @@ +#ifndef _UFX_INTERFACE_H_ +#define _UFX_INTERFACE_H_ +#include "t2sdk_interface.h" +#include "python.h" +#include +#include +#include +#include + + +class c_IF2Packer; +class c_IF2UnPacker; + +struct CCallBackParam{ + int hSend; + int iResult; + int iCallFuncType; //回调方法 + IF2UnPacker* lpUnPacker; + IBizMessage* lpBizMsg; + char* sValue; + CCallBackParam() + { + memset(this , 0, sizeof(CCallBackParam)); + } + ~CCallBackParam() + { + if (lpUnPacker) + { + lpUnPacker->Release(); + lpUnPacker = NULL; + } + if (lpBizMsg) + { + lpBizMsg->Release(); + lpBizMsg = NULL; + } + if (sValue) + { + free(sValue); + sValue = NULL; + } + } +}; +struct CSubCalBackPara +{ + char szTopicName[256]; + IBizMessage* lpBizMsg; + CSubCalBackPara() + { + memset(this, 0, sizeof(CSubCalBackPara)); + } + ~CSubCalBackPara() + { + if (lpBizMsg) + { + lpBizMsg->Release(); + lpBizMsg = NULL; + } + } + +}; +class c_IF2Packer +{ +private: + IF2Packer* lpPacker; +public: + c_IF2Packer(); + ~c_IF2Packer(); + void SetBuffer(char* pBuf,int iBufSize,int iDataLen); + void BeginPack(); + int NewDataset(char *szDatasetName, int iReturnCode ); + int AddField(char *szFieldName,char cFieldType='S',int iFieldWidth=255,int iFieldScale=4); + int AddStr(char *szValue); + int AddInt(int iValue); + int AddDouble(double fValue); + int AddChar(char* cValue); + int AddRaw(char* lpBuff,int iLen); + void EndPack(); + int* GetPackBuf(); + int GetPackLen(); + int GetPackBufSize(); + int GetVersion(); + void SetReturnCode(long dwRetCode); + c_IF2UnPacker* UnPack(); + void FreeMem(); + void ClearValue(); + void BeginPackEx(char* szName = NULL); + void ClearDataSet(); + IF2Packer* GetInstance(); + void Release(); +}; + +class c_IF2UnPacker +{ +private: + IF2UnPacker* lpUnPacker; + void * lpBuf; + bool bRelease; +public: + c_IF2UnPacker(char* lpBuffer,int iLen); + c_IF2UnPacker(IF2UnPacker* lpUnPack); + ~c_IF2UnPacker(); + int GetVersion(void); + int Open(char* lpBuffer,int iLen); + int GetDatasetCount(); + int SetCurrentDatasetByIndex(int nIndex); + int SetCurrentDataset(char *szDatasetName); + char* GetPackBuf(); + int GetPackLen(); + int GetRowCount(); + void First(); + void Last(); + void Go(int nRow); + char* GetDatasetName(); + int OpenAndCopy(char* lpBuffer,int iLen); + char* GetColTypeByName(char * columnName); + int GetColScaleByName(char * columnName); + int GetColWidthByName(char * columnName); + IF2UnPacker* GetInstance(); + int GetColCount(); + char* GetColName(int column); + char* GetColType(int column); + int GetColScale(int column); + int GetColWidth(int column); + int FindColIndex(char * columnName); + char* GetStrByIndex(int column); + char* GetStr(char * columnName); + char* GetCharByIndex(int column); + char* GetChar(char * columnName); + double GetDoubleByIndex( int column); + double GetDouble(char * columnName); + int GetIntByIndex(int column); + int GetInt(char * columnName); + char* GetRawByIndex(int column,int * lpRawLen); + char* GetRaw(char * columnName,int * lpRawLen); + int WasNull(); + void Next(); + int IsEOF(); + int IsEmpty(); + void Destroy(); + void Release(); +}; + +class C_CConfigInterface +{ +private: + CConfigInterface* lpConfig; +public: + C_CConfigInterface(); + ~C_CConfigInterface(); + int Load( char *szFileName); + int Save( char *szFileName); + char * GetString( char *szSection, char *szEntry, char *szDefault); + int GetInt( char *szSection, char *szEntry, int iDefault); + int SetString( char *szSection, char *szEntry, char *szValue); + int SetInt( char *szSection, char *szEntry, int iValue); + CConfigInterface* GetInstance(); + void Release(); +}; + +class c_IBizMessage +{ +private: + IBizMessage* lpBizMessage; +public: + c_IBizMessage(); + ~c_IBizMessage(); + void SetFunction(int nFUnctionNo); + int GetFunction(); + void SetPacketType(int nPacketType); + int GetPacketType(); + void SetBranchNo(int nBranchNo); + int GetBranchNo(); + void SetSystemNo(int nSystemNo); + int GetSystemNo(); + void SetSubSystemNo(int nSubSystemNo); + int GetSubSystemNo(); + void SetSenderId(int nSenderId); + int GetSenderId(); + void SetPacketId(int nPacketId); + int GetPacketId(); + void SetErrorNo(int nErrorNo); + int GetErrorNo(); + void SetErrorInfo(char* strErrorInfo); + char* GetErrorInfo(); + void SetReturnCode(int nReturnCode); + int GetReturnCode(); + void SetContent(char* lpContent,int iLen); + char* GetContent(int& iLen); + void SetIssueType(int nIssueType); + int GetIssueType(); + void SetSequeceNo(int nSequeceNo); + int GetSequeceNo(); + void SetKeyInfo(char* lpKeyData,int iLen); + char* GetKeyInfo(int& iLen); + void SetAppData(char* lpAppdata,int nAppLen); + char* GetAppData(int& nAppLen); + int ChangeReq2AnsMessage(); + char* GetBuff(int& nBuffLen); + int SetBuff(char* lpBuff,int nBuffLen); + void ReSet(); + IBizMessage* GetInstance(); + void Release(); +}; + +class c_CSubscribeParamInterface +{ +private: + CSubscribeParamInterface* lpSubParam; +public: + c_CSubscribeParamInterface(); + ~c_CSubscribeParamInterface(); + void SetTopicName(char* szName); + void SetAppData(char* lpData,int iLen); + void SetFilter(char* filterName,char* filterValue); + void SetReturnFiled(char* filedName); + void SetFromNow(int bFromNow); + void SetReplace(int bReplace); + void SetSendInterval(int nSendInterval); + char* GetTopicName(); + char* GetAppData(int *iLen); + char* GetFilterNameByIndex(int index); + char* GetFilterValueByIndex(int index); + char* GetFilterValue(char* fileName); + int GetFilterCount(); + char* GetReturnFiled(); + int GetFromNow(); + int GetReplace(); + int GetSendInterval(); + CSubscribeParamInterface* GetInstance(); + void Release(); +}; + +class c_SubCallBack: public CSubCallbackInterface +{ +private: + PyObject* pModule; + PyObject* pDict; + PyObject* pClass; + PyObject* pObject; + PyObject* pOnReceiveFunc; + char lpCallMould[50]; + char lpCallClass[50]; + PyGILState_STATE state; + HANDLE EventHandle[2]; + std::thread* Thread; + std::queue* DealMsgQueue; + CRITICAL_SECTION* gMsgQueueSection; + bool IsRun; + void operator()() { + run(); + } + void run(); +public: + c_SubCallBack(char *lpMould,char *lpClass); + c_SubCallBack(); + ~c_SubCallBack(); + + int initInstance(); + unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE AddRef() + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE Release() + { + return 0; + } + void FUNCTION_CALL_MODE OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData); + void FUNCTION_CALL_MODE OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo); +}; + +class c_CSubscribeInterface +{ +private: + CSubscribeInterface* lpSubscribe; +public: + c_CSubscribeInterface(CSubscribeInterface* lpSub); + ~c_CSubscribeInterface(); + int SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,c_IF2UnPacker** lppBizUnPack=NULL,c_IF2Packer* lpBizPack=NULL); + int CancelSubscribeTopic(int subscribeIndex); + int CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface); + void GetSubcribeTopic(c_IF2Packer* lpPack); + void Release(); +}; + +class c_CCallbackInterface: public CCallbackInterface +{ +private: + PyObject* pModuleT2; + PyObject* pT2Class; + PyObject* pModule; + PyObject* pDict; + PyObject* pClass; + PyObject* pObject; + //PyObject* pConnectFunc; + //PyObject* pSafeConnectFunc; + PyObject* pRegisterFunc; + PyObject* pCloseFunc; + //PyObject* pSendFunc; + //PyObject* pReceivedBizFunc; + //PyObject* pReceivedBizExFunc; + PyObject* pReceivedBizMsgFunc; + PyGILState_STATE state; + char sMouldName[50]; + char sClassName[50]; + HANDLE EventHandle[2]; + std::thread* Thread; + std::queue* DealMsgQueue; + CRITICAL_SECTION* gMsgQueueSection; + bool IsRun; + void operator()() { + run(); + } + void run(); +public: + c_CCallbackInterface(char* sMould,char* sClass); + c_CCallbackInterface(); + ~c_CCallbackInterface(); + int InitInstance(); + unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE AddRef() + { + return 0; + } + + unsigned long FUNCTION_CALL_MODE Release() + { + return 0; + } + void FUNCTION_CALL_MODE OnConnect(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnSafeConnect(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnRegister(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnClose(CConnectionInterface *lpConnection); + void FUNCTION_CALL_MODE OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData); + void FUNCTION_CALL_MODE Reserved1(void *a, void *b, void *c, void *d); + void FUNCTION_CALL_MODE Reserved2(void *a, void *b, void *c, void *d); + int FUNCTION_CALL_MODE Reserved3(); + void FUNCTION_CALL_MODE Reserved4(); + void FUNCTION_CALL_MODE Reserved5(); + void FUNCTION_CALL_MODE Reserved6(); + void FUNCTION_CALL_MODE Reserved7(); + void FUNCTION_CALL_MODE OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult); + void FUNCTION_CALL_MODE OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult); + void FUNCTION_CALL_MODE OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg); +}; + +class c_CConnectionInterface +{ +private: + CConnectionInterface* lpConnect; +public: + c_CConnectionInterface(C_CConfigInterface* lpConfig); + ~c_CConnectionInterface(); + int Connect(unsigned int uiTimeout); + int Close(); + char * GetServerAddress(int *lpPort); + int GetStatus(); + int GetServerLoad(); + char * GetErrorMsg(int nErrorCode); + int GetConnectError(); + char* GetRealAddress(); + char* GetSelfAddress(); + char* GetSelfMac(); + c_CSubscribeInterface* NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut, + int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN); + c_IF2UnPacker* GetTopic(int byForce,int iTimeOut); + char* GetMCLastError(); + int Create2BizMsg(c_CCallbackInterface *lpCallback); + int SendBizMsg(c_IBizMessage* lpMsg,int nAsy = 0); + int RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout = 1000, unsigned uiFlag = 0); + char * GetLastAnsError(int bAsyError = 0); + void Release(); +}; + + + + +#endif \ No newline at end of file diff --git a/vnpy/app/cta_stock/template.py b/vnpy/app/cta_stock/template.py index 4b0e784a..d1dc8df6 100644 --- a/vnpy/app/cta_stock/template.py +++ b/vnpy/app/cta_stock/template.py @@ -8,7 +8,7 @@ import traceback import zlib import json from abc import ABC -from copy import copy +from copy import copy,deepcopy from typing import Any, Callable, List, Dict from logging import INFO, ERROR from datetime import datetime @@ -385,7 +385,6 @@ class StockPolicy(CtaPolicy): last_signal_time = None self.signals.update({k: {'last_signal': last_signal, 'last_signal_time': last_signal_time}}) - def to_json(self): """杞崲鑷砵son鏂囦欢""" j = super().to_json() @@ -394,12 +393,13 @@ class StockPolicy(CtaPolicy): d = {} for kline_name, signal in self.signals.items(): last_signal_time = signal.get('last_signal_time', None) - d.update({kline_name: - {'last_signal': signal.get('last_signal', ''), + c_signal = {} + c_signal.update(signal) + c_signal.update({'last_signal': signal.get('last_signal', ''), 'last_signal_time': last_signal_time.strftime( '%Y-%m-%d %H:%M:%S') if last_signal_time is not None else "" - } - }) + }) + d.update({kline_name: c_signal}) j['signals'] = d return j diff --git a/vnpy/app/cta_strategy_pro/engine.py b/vnpy/app/cta_strategy_pro/engine.py index e2eacc4d..5e4c1122 100644 --- a/vnpy/app/cta_strategy_pro/engine.py +++ b/vnpy/app/cta_strategy_pro/engine.py @@ -1211,7 +1211,8 @@ class CtaEngine(BaseEngine): if module_name: new_class_name = module_name + '.' + class_name self.write_log(u'杞崲绛栫暐涓哄叏璺緞:{}'.format(new_class_name)) - + old_strategy_class = self.classes[class_name] + self.write_log(f'鏃х瓥鐣D:{id(old_strategy_class)}') strategy_class = import_module_by_str(new_class_name) if strategy_class is None: err_msg = u'鍔犺浇绛栫暐妯″潡澶辫触:{}'.format(new_class_name) @@ -1219,7 +1220,10 @@ class CtaEngine(BaseEngine): return False, err_msg self.write_log(f'閲嶆柊鍔犺浇妯″潡鎴愬姛锛屼娇鐢ㄦ柊妯″潡:{new_class_name}') + self.write_log(f'鏂扮瓥鐣D:{id(strategy_class)}') self.classes[class_name] = strategy_class + else: + self.write_log(f'娌℃湁{class_name}鐨刴odule_name,鏃犳硶閲嶆柊鍔犺浇妯″潡') # 鍋滄褰撳墠绛栫暐瀹炰緥鐨勮繍琛岋紝鎾ゅ崟 self.stop_strategy(strategy_name) diff --git a/vnpy/app/cta_strategy_pro/template_spread.py b/vnpy/app/cta_strategy_pro/template_spread.py index 13e17741..17dd117b 100644 --- a/vnpy/app/cta_strategy_pro/template_spread.py +++ b/vnpy/app/cta_strategy_pro/template_spread.py @@ -1,4 +1,4 @@ -# 濂楀埄妯℃澘 +锘# 濂楀埄妯℃澘 # 鍗庡瘜璧勪骇 @ 鏉庢潵浣 import os @@ -43,6 +43,8 @@ class CtaSpreadTemplate(CtaTemplate): cancel_seconds = 120 allow_trading_open = True # 鍏佽寮浠 force_trading_close = False # 寮哄埗骞充粨 + history_orders = {} + # 閫昏緫杩囩▼鏃ュ織 dist_fieldnames = ['datetime', 'symbol', 'volume', 'price', @@ -386,6 +388,7 @@ class CtaSpreadTemplate(CtaTemplate): def on_stop(self): """鍋滄绛栫暐锛堝繀椤荤敱鐢ㄦ埛缁ф壙瀹炵幇锛""" self.active_orders.clear() + self.history_orders.clear() self.pos = 0 self.entrust = 0 @@ -399,8 +402,12 @@ class CtaSpreadTemplate(CtaTemplate): trade.__dict__)) # 鎵惧埌濮旀墭鍗曡褰 - order_info = self.active_orders.get(trade.vt_orderid) - if order_info: + order_info = None + if trade.vt_orderid in self.active_orders.keys(): + order_info = self.active_orders.get(trade.vt_orderid) + if trade.vt_orderid in self.history_orders.keys(): + order_info = self.history_orders.get(trade.vt_orderid) + if order_info is not None: # 濮旀墭鍗曡褰 =銆 鎵惧埌 Grid grid = order_info.get('grid') if grid: @@ -648,7 +655,7 @@ class CtaSpreadTemplate(CtaTemplate): self.write_log(f'鍓╀綑濮旀墭鍗曞彿:{grid.order_ids}') # 鍦ㄧ瓥鐣ュ緱娲诲姩璁㈠崟涓紝绉婚櫎 - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) self.gt.save() if len(self.active_orders) < 1: self.entrust = 0 @@ -690,7 +697,7 @@ class CtaSpreadTemplate(CtaTemplate): self.write_error(msg) self.write_log(u'绉婚櫎:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) return order_price = old_order['price'] @@ -720,7 +727,7 @@ class CtaSpreadTemplate(CtaTemplate): self.write_log(u'缃戞牸淇℃伅鏇存柊:{}'.format(grid.__dict__)) self.write_log(u'绉婚櫎:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) return order_retry += 1 @@ -767,7 +774,7 @@ class CtaSpreadTemplate(CtaTemplate): self.gt.save() # 鍒犻櫎鏃х殑濮旀墭璁板綍 self.write_log(u'绉婚櫎鏃х殑濮旀墭璁板綍:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) elif old_order['direction'] == Direction.SHORT and order_type == OrderType.FAK: @@ -810,7 +817,7 @@ class CtaSpreadTemplate(CtaTemplate): self.gt.save() # 鍒犻櫎鏃х殑濮旀墭璁板綍 self.write_log(u'绉婚櫎鏃х殑濮旀墭璁板綍:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) else: pre_status = old_order.get('status', Status.NOTTRADED) old_order.update({'status': Status.CANCELLED}) @@ -855,7 +862,7 @@ class CtaSpreadTemplate(CtaTemplate): self.write_error(msg) self.send_wechat(msg) self.write_log(u'娲诲姩璁㈠崟绉婚櫎:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) return order_price = old_order['price'] @@ -877,7 +884,7 @@ class CtaSpreadTemplate(CtaTemplate): self.write_log(u'鏇存柊缃戞牸=>{}'.format(grid.__dict__)) self.write_log(u'绉婚櫎娲诲姩璁㈠崟:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) return order_retry += 1 @@ -917,7 +924,7 @@ class CtaSpreadTemplate(CtaTemplate): grid.order_ids.remove(order.vt_orderid) self.gt.save() self.write_log(u'绉婚櫎娲诲姩璁㈠崟:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) elif old_order['direction'] == Direction.SHORT and order_type == OrderType.FAK: self.write_log(u'FAK妯″紡锛岄渶瑕侀噸鏂板彂閫乻ell濮旀墭.grid:{}'.format(grid.__dict__)) @@ -956,7 +963,7 @@ class CtaSpreadTemplate(CtaTemplate): self.gt.save() self.write_log(u'绉婚櫎娲诲姩璁㈠崟:{}'.format(order.vt_orderid)) - self.active_orders.pop(order.vt_orderid, None) + self.history_orders[order.vt_orderid] = self.active_orders.pop(order.vt_orderid, None) else: pre_status = old_order.get('status', Status.NOTTRADED) @@ -1110,7 +1117,7 @@ class CtaSpreadTemplate(CtaTemplate): # 鍒犻櫎鎾ゅ崟鐨勮鍗 for vt_orderid in canceled_ids: self.write_log(u'鍒犻櫎orderID:{0}'.format(vt_orderid)) - self.active_orders.pop(vt_orderid, None) + self.history_orders[vt_orderid] = self.active_orders.pop(vt_orderid, None) if len(self.active_orders) == 0: self.entrust = 0 diff --git a/vnpy/app/option_master/base.py b/vnpy/app/option_master/base.py index a6bbd6a7..4e09980f 100644 --- a/vnpy/app/option_master/base.py +++ b/vnpy/app/option_master/base.py @@ -50,7 +50,7 @@ CHAIN_UNDERLYING_MAP = { class InstrumentData: - """""" + """鏈熸潈鍚堢害鏁版嵁""" def __init__(self, contract: ContractData): """""" diff --git a/vnpy/app/option_master/engine.py b/vnpy/app/option_master/engine.py index 07759e71..3eadf294 100644 --- a/vnpy/app/option_master/engine.py +++ b/vnpy/app/option_master/engine.py @@ -58,7 +58,7 @@ class OptionEngine(BaseEngine): super().__init__(main_engine, event_engine, APP_NAME) self.portfolios: Dict[str, PortfolioData] = {} - self.instruments: Dict[str, InstrumentData] = {} + self.instruments: Dict[str, InstrumentData] = {} # vt_symbol: 鍚堢害 self.active_portfolios: Dict[str, PortfolioData] = {} self.timer_count: int = 0 diff --git a/vnpy/gateway/ctp/ctp_gateway.py b/vnpy/gateway/ctp/ctp_gateway.py index c5f8049f..436123c5 100644 --- a/vnpy/gateway/ctp/ctp_gateway.py +++ b/vnpy/gateway/ctp/ctp_gateway.py @@ -1007,8 +1007,8 @@ class CtpTdApi(TdApi): pricetick=data["PriceTick"], gateway_name=self.gateway_name ) - # 淇濊瘉閲戣垂鐜 - contract.margin_rate = max(data.get('LongMarginRatio', 0), data.get('ShortMarginRatio', 0)) + # 淇濊瘉閲戣垂鐜(鏈熸潈鍚堢害鐨勪繚璇侀噾姣斾緥鏁板煎彲鑳戒笉瀵癸紝鎵浠ヨ缃釜0.2鐨勬渶澶у) + contract.margin_rate = min(0.2,max(data.get('LongMarginRatio', 0), data.get('ShortMarginRatio', 0))) if contract.margin_rate == 0: contract.margin_rate = 0.1 diff --git a/vnpy/gateway/hsoption/(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat b/vnpy/gateway/hsoption/(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat new file mode 100644 index 00000000..8effa775 Binary files /dev/null and b/vnpy/gateway/hsoption/(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat differ diff --git a/vnpy/gateway/hsoption/__init__.py b/vnpy/gateway/hsoption/__init__.py new file mode 100644 index 00000000..7bec654f --- /dev/null +++ b/vnpy/gateway/hsoption/__init__.py @@ -0,0 +1 @@ +from .hsoption_gateway import HsoptionGateway \ No newline at end of file diff --git a/vnpy/gateway/hsoption/citic.ini b/vnpy/gateway/hsoption/citic.ini new file mode 100644 index 00000000..0b92ef49 --- /dev/null +++ b/vnpy/gateway/hsoption/citic.ini @@ -0,0 +1,27 @@ +[t2sdk] +license_file=(20130403)ZXZQ-TESTsfjrt-ALL-0001_3rd.dat +;servers=118.192.134.94:29112 +;电信请使用这个地址: +servers=124.207.9.94:29112 +login_name=syn_send +lang=2052 +;lang=2052 +;send_queue_size=100 +license_pwd=999999 +init_recv_buf_size=5120 +init_send_buf_size=5120 +send_queue_size=1000 +errormsg=errormsg.ini +writedata=1 +[proxy] +proxy_type= +ip=127.0.0.1 +port= +user_name=guest +password=888888 +[safe] +safe_level=ssl +client_id= +comm_pwd= +cert_file=s2013.pfx +cert_pwd=999999 \ No newline at end of file diff --git a/vnpy/gateway/hsoption/hsoption_gateway.py b/vnpy/gateway/hsoption/hsoption_gateway.py new file mode 100644 index 00000000..590804c1 --- /dev/null +++ b/vnpy/gateway/hsoption/hsoption_gateway.py @@ -0,0 +1,1139 @@ +import wmi +import socket +from typing import Dict, List +import requests +from datetime import datetime +from time import sleep +import traceback +import pytz + +from vnpy.api.t2sdk import py_t2sdk +from vnpy.api.sopt import MdApi +from vnpy.trader.gateway import BaseGateway +from vnpy.trader.utility import get_folder_path, print_dict +from vnpy.trader.event import EVENT_TIMER +from vnpy.trader.constant import ( + Direction, + Offset, + Exchange, + OrderType, + Product, + Status, + OptionType +) +from vnpy.trader.object import ( + TickData, + OrderData, + TradeData, + PositionData, + AccountData, + ContractData, + OrderRequest, + CancelRequest, + SubscribeRequest, +) + + +EXCHANGE_HSOPTION2VT: Dict[str, Exchange] = { + "1": Exchange.SSE, + "2": Exchange.SZSE +} +EXCHANGE_VT2HSOPTION = { + Exchange.SSE: "1", + Exchange.SZSE: "2" +} + +DIRECTION_VT2HSOPTION: Dict[Direction, str] = { + Direction.LONG: "1", + Direction.SHORT: "2", +} +DIRECTION_HSOPTION2VT = {v: k for k, v in DIRECTION_VT2HSOPTION.items()} + +POS_DIRECTION_VT2HSOPTION: Dict[Direction, str] = { + Direction.LONG: "0", + Direction.SHORT: "1", +} + +POS_DIRECTION_HSOPTION2VT: Dict[str, Direction] = { + "0": Direction.LONG, + "1": Direction.SHORT, + "2": Direction.SHORT +} + +DIRECTION_HSOPTION2VT = {v: k for k, v in DIRECTION_VT2HSOPTION.items()} + +OFFSET_HSOPTION2VT: Dict[str, Offset] = { + "O": Offset.OPEN, + "C": Offset.CLOSE +} +OFFSET_VT2HSOPTION = {v: k for k, v in OFFSET_HSOPTION2VT.items()} + +STATUS_HSOPTION2VT: Dict[str, Status] = { + "0": Status.SUBMITTING, + "1": Status.SUBMITTING, + "2": Status.NOTTRADED, + "3": Status.SUBMITTING, + "4": Status.PARTTRADED, + "5": Status.CANCELLED, + "6": Status.CANCELLED, + "7": Status.PARTTRADED, + "8": Status.ALLTRADED, + "9": Status.REJECTED +} +STATUS_VT2HSOPTION = {v: k for k, v in STATUS_HSOPTION2VT.items()} + +ORDERTYPE_VT2HSOPTION = { + OrderType.LIMIT: "0", + OrderType.MARKET: "OPB" +} +ORDERTYPE_HSOPTION2VT = {v: k for k, v in ORDERTYPE_VT2HSOPTION.items()} + +OPTIONTYPE_HSOPTION2VT = { + "C": OptionType.CALL, + "P": OptionType.PUT +} + +symbol_exchange_map = {} +symbol_name_map = {} +symbol_size_map = {} + +FUNCTION_USER_LOGIN = 331100 +FUNCTION_QUERY_POSITION = 338023 +FUNCTION_QUERY_ACCOUNT = 338022 +FUNCTION_QUERY_ORDER = 338020 +FUNCTION_QUERY_TRADE = 338021 +FUNCTION_QUERY_CONTRACT = 338000 +FUNCTION_SEND_ORDER = 338011 +FUNCTION_CANCEL_ORDER = 338012 + +ISSUE_ORDER = "33012" +ISSUE_TRADE = "33011" + +CHINA_TZ = pytz.timezone("Asia/Shanghai") + + +class HsoptionGateway(BaseGateway): + """ + VN Trader Gateway for Hundsun Option. + """ + + default_setting = { + "浜ゆ槗鐢ㄦ埛鍚": "", + "浜ゆ槗瀵嗙爜": "", + "鐢ㄦ埛鍚嶇О鎷奸煶澶у啓": "VNPY", + "琛屾儏鐢ㄦ埛鍚": "", + "琛屾儏瀵嗙爜": "", + "琛屾儏缁忕邯鍟嗕唬鐮": "", + "琛屾儏鏈嶅姟鍣": "", + } + + exchanges = [Exchange.SSE, Exchange.SZSE] + + def __init__(self, event_engine, gateway_name="HSOPTION"): + """Constructor""" + super().__init__(event_engine, gateway_name) + + self.td_api = TdApi(self) + self.md_api = SoptMdApi(self) + self.user_upper_name = "VNPY" + + def connect(self, setting: dict) -> None: + """""" + td_userid = setting["浜ゆ槗鐢ㄦ埛鍚"] + td_password = setting["浜ゆ槗瀵嗙爜"] + self.user_upper_name = setting.get('鐢ㄦ埛鍚嶇О鎷奸煶澶у啓', 'VNPY') + md_userid = setting["琛屾儏鐢ㄦ埛鍚"] + md_password = setting["琛屾儏瀵嗙爜"] + md_brokerid = setting["琛屾儏缁忕邯鍟嗕唬鐮"] + md_address = setting["琛屾儏鏈嶅姟鍣"] + + if not md_address.startswith("tcp://"): + md_address = "tcp://" + md_address + + self.md_api.connect(md_address, md_userid, md_password, md_brokerid) + self.td_api.connect(td_userid, td_password) + + self.init_query() + + def subscribe(self, req: SubscribeRequest) -> None: + """""" + self.md_api.subscribe(req) + + def send_order(self, req: OrderRequest) -> str: + """""" + return self.td_api.send_order(req) + + def cancel_order(self, req: CancelRequest) -> None: + """""" + self.td_api.cancel_order(req) + + def query_account(self) -> None: + """""" + self.td_api.query_account() + + def query_position(self) -> None: + """""" + self.td_api.query_position() + + def close(self) -> None: + """""" + self.md_api.close() + + def process_timer_event(self, event) -> None: + """""" + self.count += 1 + if self.count < 2: + return + self.count = 0 + + func = self.query_functions.pop(0) + func() + self.query_functions.append(func) + + def init_query(self) -> None: + """""" + self.count = 0 + self.query_functions = [self.query_account, self.query_position] + self.event_engine.register(EVENT_TIMER, self.process_timer_event) + + +class SoptMdApi(MdApi): + """""" + + def __init__(self, gateway): + """Constructor""" + super().__init__() + + self.gateway = gateway + self.gateway_name = gateway.gateway_name + + self.reqid = 0 + + self.connect_status = False + self.login_status = False + self.subscribed = set() + + self.userid = "" + self.password = "" + self.brokerid = "" + + def onFrontConnected(self) -> None: + """ + Callback when front server is connected. + """ + self.gateway.write_log("琛屾儏鏈嶅姟鍣ㄨ繛鎺ユ垚鍔") + self.login() + + def onFrontDisconnected(self, reason: int) -> None: + """ + Callback when front server is disconnected. + """ + self.login_status = False + self.gateway.write_log(f"琛屾儏鏈嶅姟鍣ㄨ繛鎺ユ柇寮锛屽師鍥爗reason}") + + def onRspUserLogin(self, data: dict, error: dict, reqid: int, last: bool) -> None: + """ + Callback when user is logged in. + """ + if not error["ErrorID"]: + self.login_status = True + self.gateway.write_log("琛屾儏鏈嶅姟鍣ㄧ櫥褰曟垚鍔") + + for symbol in self.subscribed: + self.subscribeMarketData(symbol) + else: + self.gateway.write_error("琛屾儏鏈嶅姟鍣ㄧ櫥褰曞け璐", error) + + def onRspError(self, error: dict, reqid: int, last: bool) -> None: + """ + Callback when error occured. + """ + self.gateway.write_error("琛屾儏鎺ュ彛鎶ラ敊", error) + + def onRspSubMarketData( + self, + data: dict, + error: dict, + reqid: int, + last: bool + ) -> None: + """""" + if not error or not error["ErrorID"]: + return + + self.gateway.write_error("琛屾儏璁㈤槄澶辫触", error) + + def onRtnDepthMarketData(self, data: dict) -> None: + """ + Callback of tick data update. + """ + symbol = data["InstrumentID"] + exchange = symbol_exchange_map.get(symbol, "") + + if not exchange: + return + + timestamp = f"{data['TradingDay']} {data['UpdateTime']}.{int(data['UpdateMillisec']/100)}" + + tick = TickData( + symbol=symbol, + exchange=exchange, + datetime=datetime.strptime(timestamp, "%Y%m%d %H:%M:%S.%f"), + name=symbol_name_map.get(symbol, ""), + volume=data["Volume"], + open_interest=data["OpenInterest"], + last_price=data["LastPrice"], + limit_up=data["UpperLimitPrice"], + limit_down=data["LowerLimitPrice"], + open_price=data["OpenPrice"], + high_price=data["HighestPrice"], + low_price=data["LowestPrice"], + pre_close=data["PreClosePrice"], + bid_price_1=data["BidPrice1"], + ask_price_1=data["AskPrice1"], + bid_volume_1=data["BidVolume1"], + ask_volume_1=data["AskVolume1"], + gateway_name=self.gateway_name + ) + + tick.bid_price_2 = data["BidPrice2"] + tick.bid_price_3 = data["BidPrice3"] + tick.bid_price_4 = data["BidPrice4"] + tick.bid_price_5 = data["BidPrice5"] + + tick.ask_price_2 = data["AskPrice2"] + tick.ask_price_3 = data["AskPrice3"] + tick.ask_price_4 = data["AskPrice4"] + tick.ask_price_5 = data["AskPrice5"] + + tick.bid_volume_2 = data["BidVolume2"] + tick.bid_volume_3 = data["BidVolume3"] + tick.bid_volume_4 = data["BidVolume4"] + tick.bid_volume_5 = data["BidVolume5"] + + tick.ask_volume_2 = data["AskVolume2"] + tick.ask_volume_3 = data["AskVolume3"] + tick.ask_volume_4 = data["AskVolume4"] + tick.ask_volume_5 = data["AskVolume5"] + + self.gateway.on_tick(tick) + + def connect( + self, + address: str, + userid: str, + password: str, + brokerid: int + ) -> None: + """ + Start connection to server. + """ + self.userid = userid + self.password = password + self.brokerid = brokerid + + # If not connected, then start connection first. + if not self.connect_status: + path = get_folder_path(self.gateway_name.lower()) + self.createFtdcMdApi(str(path) + "\\Md") + self.registerFront(address) + self.init() + self.connect_status = True + + # Sleep 1 second and check trigger callback manually + # (temp fix of the bug of Huaxi futures SOPT system) + sleep(1) + if not self.login_status: + self.onFrontConnected() + + # If already connected, then login immediately. + elif not self.login_status: + self.login() + + def login(self) -> None: + """ + Login onto server. + """ + req = { + "UserID": self.userid, + "Password": self.password, + "BrokerID": self.brokerid + } + + self.reqid += 1 + self.reqUserLogin(req, self.reqid) + + sleep(3) + self.gateway.write_log("琛屾儏鏈嶅姟鍣ㄧ櫥褰曟垚鍔") + self.login_status = True + + def subscribe(self, req: SubscribeRequest) -> None: + """ + Subscribe to tick data update. + """ + if self.login_status: + self.subscribeMarketData(req.symbol) + self.subscribed.add(req.symbol) + + def close(self) -> None: + """ + Close the connection. + """ + if self.connect_status: + self.exit() + + +class TdApi: + """""" + + def __init__(self, gateway: HsoptionGateway): + """""" + global td_api + if not td_api: + td_api = self + + self.userid: str = "" + self.password: str = "" + self.op_station: str = "" + self.connect_status: bool = False + self.login_status: bool = False + self.batch_no: int = 1000000 + + self.batch_entrust_id: Dict[str, str] = {} + self.entrust_batch_id: Dict[str, str] = {} + self.orders: Dict[str, OrderData] = {} + self.cancels: Dict[str, CancelRequest] = {} + + self.gateway: HsoptionGateway = gateway + self.gateway_name: str = gateway.gateway_name + + self.config: py_t2sdk.pyCConfigInterface = None + self.connection: py_t2sdk.pyConnectionInterface = None + + self.callbacks = { + FUNCTION_USER_LOGIN: self.on_login, + FUNCTION_QUERY_POSITION: self.on_query_position, + FUNCTION_QUERY_ACCOUNT: self.on_query_account, + FUNCTION_QUERY_ORDER: self.on_query_order, + FUNCTION_QUERY_TRADE: self.on_query_trade, + FUNCTION_QUERY_CONTRACT: self.on_query_contract, + FUNCTION_SEND_ORDER: self.on_send_order, + FUNCTION_CANCEL_ORDER: self.on_cancel_order, + + ISSUE_ORDER: self.on_return_order, + ISSUE_TRADE: self.on_return_trade, + } + + def connect( + self, + userid: str, + password: str, + ) -> None: + """""" + self.userid = userid + self.password = password + + self.op_station = self.generate_op_station() + + # If not connected, then start connection first. + if not self.connect_status: + self.config = py_t2sdk.pyCConfigInterface() + self.config.Load("citic.ini") + + self.connection = py_t2sdk.pyConnectionInterface(self.config) + + async_callback = py_t2sdk.pyCallbackInterface( + "vnpy.gateway.hsoption.hsoption_gateway", + "TdAsyncCallback" + ) + async_callback.InitInstance() + + ret = self.connection.Create2BizMsg(async_callback) + if ret: + msg = str(self.connection.GetErrorMsg(ret)) + self.gateway.write_log(f"鍒濆鍖栧け璐ワ紝閿欒鐮侊細{ret}锛屼俊鎭細{msg}") + + ret = self.connection.Connect(1000) + if ret: + msg = str(self.connection.GetErrorMsg(ret)) + self.gateway.write_log(f"杩炴帴澶辫触锛岄敊璇爜锛歿ret}锛屼俊鎭細{msg}") + + self.connect_status = True + self.gateway.write_log("浜ゆ槗鏈嶅姟鍣ㄨ繛鎺ユ垚鍔") + + # If already connected, then login immediately. + if not self.login_status: + self.login() + + def on_login(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + self.gateway.write_log("浜ゆ槗鏈嶅姟鍣ㄧ櫥褰曞け璐") + return + else: + self.gateway.write_log("浜ゆ槗鏈嶅姟鍣ㄧ櫥褰曟垚鍔") + + self.login_status = True + + for d in data: + self.user_token = d["user_token"] + self.branch_no = d["branch_no"] + self.client_id = d["client_id"] + self.asset_prop = d["asset_prop"] + self.sysnode_id = d["sysnode_id"] + + # Generate ETF contract data + contract_1 = ContractData( + symbol="510050", + exchange=Exchange.SSE, + name="50ETF", + size=1, + pricetick=0.001, + product=Product.ETF, + gateway_name=self.gateway_name + ) + self.gateway.on_contract(contract_1) + + contract_2 = ContractData( + symbol="510300", + exchange=Exchange.SSE, + name="300ETF", + size=1, + pricetick=0.001, + product=Product.ETF, + gateway_name=self.gateway_name + ) + self.gateway.on_contract(contract_2) + + contract_3 = ContractData( + symbol="159919", + exchange=Exchange.SZSE, + name="300ETF", + size=1, + pricetick=0.001, + product=Product.ETF, + gateway_name=self.gateway_name + ) + self.gateway.on_contract(contract_3) + + self.query_contract() + + def on_query_position(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + return + + for d in data: + symbol = d["option_code"] + position = PositionData( + accountid=self.userid, + symbol=symbol, + name=symbol_name_map[symbol], + exchange=EXCHANGE_HSOPTION2VT[d["exchange_type"]], + direction=POS_DIRECTION_HSOPTION2VT[d["opthold_type"]], + volume=int(float(d["hold_amount"])), + pnl=float(d["income_balance"]), + price=float(d["opt_cost_price"]), + frozen=int((float(d["hold_amount"]) - float(d["enable_amount"]))), + gateway_name=self.gateway_name + ) + self.gateway.on_position(position) + + def on_query_account(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + return + + for d in data: + account = AccountData( + accountid=self.userid, + balance=float(d["total_asset"]), + frozen=float(d["total_asset"]) - float(d["enable_balance"]), + gateway_name=self.gateway_name + ) + self.gateway.on_account(account) + self.query_position() + + def on_query_order(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + self.gateway.write_log("濮旀墭淇℃伅鏌ヨ鎴愬姛") + self.query_trade() + return + + for d in data: + batch_no = d["batch_no"] + self.batch_no = max(self.batch_no, int(batch_no)) + self.batch_entrust_id[batch_no] = d["entrust_no"] + self.entrust_batch_id[d["entrust_no"]] = batch_no + + order = OrderData( + accountid=self.userid, + symbol=d["option_code"], + exchange=EXCHANGE_HSOPTION2VT[d["exchange_type"]], + direction=DIRECTION_HSOPTION2VT[d["entrust_bs"]], + status=STATUS_HSOPTION2VT.get(d["entrust_status"], Status.SUBMITTING), + orderid=batch_no, + offset=OFFSET_HSOPTION2VT[d["entrust_oc"]], + volume=int(float(d["entrust_amount"])), + traded=int(float(d["business_amount"])), + price=float(d["opt_entrust_price"]), + datetime=generate_datetime(d["entrust_time"]), + gateway_name=self.gateway_name + + ) + self.gateway.on_order(order) + self.orders[batch_no] = order + + self.gateway.write_log("濮旀墭淇℃伅鏌ヨ鎴愬姛") + self.query_trade() + + def on_query_trade(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + self.gateway.write_log("鎴愪氦淇℃伅鏌ヨ鎴愬姛") + return + + for d in data: + price = float(d["opt_business_price"]) + if price == 0: + continue + + batch_no = self.entrust_batch_id[d["entrust_no"]] + + trade = TradeData( + accountid=self.userid, + orderid=batch_no, + tradeid=d["business_id"], + symbol=d["option_code"], + exchange=EXCHANGE_HSOPTION2VT[d["exchange_type"]], + direction=DIRECTION_HSOPTION2VT[d["entrust_bs"]], + offset=OFFSET_HSOPTION2VT[d["entrust_oc"]], + price=price, + volume=int(float(d["business_amount"])), + datetime=generate_datetime(d["business_time"]), + gateway_name=self.gateway_name + ) + self.gateway.on_trade(trade) + + self.gateway.write_log("鎴愪氦淇℃伅鏌ヨ鎴愬姛") + + self.subcribe_order() + self.subcribe_trade() + + def on_query_contract(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + self.gateway.write_log("鍚堢害淇℃伅鏌ヨ澶辫触") + return + + # Process option contract + for d in data: + contract = ContractData( + symbol=d["option_code"], + exchange=EXCHANGE_HSOPTION2VT[d["exchange_type"]], + name=d["option_name"], + size=int(float(d["amount_per_hand"])), + pricetick=float(d["opt_price_step"]), + product=Product.OPTION, + gateway_name=self.gateway_name + ) + + contract.option_portfolio = d["stock_code"] + "_O" + contract.option_underlying = ( + d["stock_code"] + + "-" + + str(d["end_date"]) + ) + contract.option_type = OPTIONTYPE_HSOPTION2VT[d["option_type"]] + contract.option_strike = float(d["exercise_price"]) + contract.option_expiry = datetime.strptime(d["end_date"], "%Y%m%d") + contract.option_index = get_option_index( + contract.option_strike, d["optcontract_id"] + ) + + self.gateway.on_contract(contract) + + symbol_exchange_map[contract.symbol] = contract.exchange + symbol_name_map[contract.symbol] = contract.name + + if len(data) == 1000: + position_str = d["position_str"] + self.query_contract(position_str) + else: + self.gateway.write_log("鍚堢害淇℃伅鏌ヨ鎴愬姛") + self.query_order() + + def on_send_order(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + self.gateway.write_log("濮旀墭澶辫触") + return + + for d in data: + batch_no = d["batch_no"] + self.batch_entrust_id[batch_no] = d["entrust_no"] + self.entrust_batch_id[d["entrust_no"]] = batch_no + + if batch_no in self.cancels: + cancel_req = self.cancels[batch_no] + self.cancel_order(cancel_req) + + order = self.orders[batch_no] + order.datetime = generate_datetime(d["entrust_time"]), + self.gateway.on_order(order) + + def on_cancel_order(self, data: List[Dict[str, str]]) -> None: + """""" + if not data: + self.gateway.write_log("鎾ゅ崟澶辫触") + return + + def on_return_order(self, data: List[Dict[str, str]]) -> None: + """""" + for d in data: + entrust_no = d["entrust_no"] + if entrust_no not in self.entrust_batch_id: + return + + batch_no = self.entrust_batch_id[entrust_no] + order = self.orders[batch_no] + order.status = STATUS_HSOPTION2VT.get(d["entrust_status"], Status.SUBMITTING) + + self.gateway.on_order(order) + + def on_return_trade(self, data: List[Dict[str, str]]) -> None: + """""" + for d in data: + traded = int(float(d["business_amount"])) + + entrust_no = d["entrust_no"] + batch_no = self.entrust_batch_id[entrust_no] + + if traded > 0: + trade = TradeData( + accountid=self.userid, + symbol=d["option_code"], + exchange=EXCHANGE_HSOPTION2VT[d["exchange_type"]], + orderid=batch_no, + tradeid=d["business_id"], + direction=DIRECTION_HSOPTION2VT[d["entrust_bs"]], + offset=OFFSET_HSOPTION2VT[d["entrust_oc"]], + price=float(d["opt_business_price"]), + volume=traded, + datetime=generate_datetime(d["business_time"]), + gateway_name=self.gateway_name, + ) + self.gateway.on_trade(trade) + + order = self.orders[batch_no] + + if traded > 0: + order.traded += traded + order.status = STATUS_HSOPTION2VT[d["entrust_status"]] + self.gateway.on_order(order) + + def on_error(self, error: dict) -> None: + """""" + self.gateway.write_log(f"瑙﹀彂閿欒锛歿str(error)}") + + def on_callback(self, function: int, data: dict) -> None: + """""" + try: + func = self.callbacks[function] + func(data) + except Exception: + traceback.print_exc() + + def send_req(self, function: int, req: dict) -> int: + """""" + packer = py_t2sdk.pyIF2Packer() + packer.BeginPack() + + self.gateway.write_log(f'\n鍔熻兘鍙:{function} \n{print_dict(req)}') + + for Field in req.keys(): + packer.AddField(Field) + + for value in req.values(): + packer.AddStr(str(value)) + + packer.EndPack() + + msg = py_t2sdk.pyIBizMessage() + msg.SetFunction(function) + msg.SetPacketType(0) + msg.SetContent(packer.GetPackBuf(), packer.GetPackLen()) + + n = self.connection.SendBizMsg(msg, 1) + + packer.FreeMem() + packer.Release() + msg.Release() + + return n + + def generate_req(self) -> Dict[str, str]: + """""" + req = { + "op_branch_no": self.branch_no, + "op_entrust_way": "3", + "op_station": self.op_station, + "fund_account": self.userid, + "branch_no": self.branch_no, + "client_id": self.client_id, + "password": self.password, + "password_type": "2", + "asset_prop": self.asset_prop, + "sysnode_Id": self.sysnode_id + } + + return req + + def generate_op_station(self): + """""" + company = 'SHWN' + software = "VNPY;2.0.0" + + f = requests.request("GET", "http://myip.dnsomatic.com") + iip = f.text + + c = wmi.WMI() + + try: + for interface in c.Win32_NetworkAdapterConfiguration(IPEnabled=1): + mac = interface.MACAddress + lip = interface.IPAddress[0] + except Exception as ex: + mac = "" + lip = "" + mac = mac.replace(':',"") + try: + for processor in c.Win32_Processor(): + cpu = processor.Processorid.strip() + except Exception as ex: + cpu = "" + + try: + hd = "" + vol = "" + for disk in c.Win32_DiskDrive(): + if disk.SerialNumber is None: + continue + hd = disk.SerialNumber.strip().replace(',', '').replace(".","") + for partition in disk.associators("Win32_DiskDriveToDiskPartition"): + for logical_disk in partition.associators("Win32_LogicalDiskToPartition"): + vol = "^" + str(logical_disk.VolumeSerialNumber).replace(":","") + break + except Exception as ex: + if len(hd) == 0: + hd = "W-DXW1D5AR07323" + if len(vol) == 0: + vol = '^C^2ADBE693^NTFS^475.66' + try: + for disk in c.Win32_LogicalDisk(DriveType=3): + pi = "^".join([str(disk.Caption).replace(':', ""), + str(disk.FileSystem), + str(round(int(disk.Size) / (1024 * 1024 * 1024), 2))+'G']) + + except Exception as ex: + pi = ',' + pi = pi.replace(',','\,') + try: + pcn = socket.gethostname() + except Exception as ex: + pcn = 'vnpy_trade' + + op_station = f"PC;IIP={iip};IPORT=53039;LIP={lip};MAC={mac};HD={hd};PCN={pcn};CPU={cpu};PI={pi};VOL={vol}@{software};VPN;QQ-{self.gateway.user_upper_name}" + + return op_station + + def login(self) -> int: + """""" + req = { + "password_type": "2", + "input_content": "1", + "op_entrust_way": "3", + "password": self.password, + "account_content": self.userid, + "op_station":self.op_station + } + #self.gateway.write_log('{}:{}'.format(FUNCTION_USER_LOGIN, print_dict(req))) + self.send_req(FUNCTION_USER_LOGIN, req) + + def send_order(self, req: OrderRequest) -> int: + """ + Send new order. + """ + td_req = self.generate_req() + td_req["exchange_type"] = EXCHANGE_VT2HSOPTION[req.exchange] + td_req["option_code"] = req.symbol + td_req["entrust_amount"] = str(req.volume) + td_req["opt_entrust_price"] = str(req.price) + td_req["entrust_bs"] = DIRECTION_VT2HSOPTION[req.direction] + td_req["entrust_oc"] = OFFSET_VT2HSOPTION[req.offset] + td_req["covered_flag"] = "" + td_req["entrust_prop"] = ORDERTYPE_VT2HSOPTION[req.type] + + self.batch_no += 1 + batch_no = str(self.batch_no) + td_req["batch_no"] = batch_no + + #self.gateway.write_log('{}:{}'.format(FUNCTION_SEND_ORDER, print_dict(td_req))) + self.send_req(FUNCTION_SEND_ORDER, td_req) + + order = req.create_order_data(batch_no, self.gateway_name) + order.accountid = self.userid + self.gateway.on_order(order) + + self.orders[batch_no] = order + + return order.vt_orderid + + def subcribe_topic(self, biz_name: str, topic_name: str) -> int: + """""" + # Create subscrbe callback + sub_callback = py_t2sdk.pySubCallBack( + "vnpy.gateway.hsoption.hsoption_gateway", + "TdSubCallback" + ) + sub_callback.initInstance() + + # Create subscriber + ret, subscriber = self.connection.NewSubscriber( + sub_callback, + biz_name, + 5000 + ) + if ret != 0: + error_msg = str(self.connection.GetMCLastError(), encoding="gbk") + msg = f"璁㈤槄鎺ㄩ佸け璐ワ細{error_msg}" + self.gateway.write_log(msg) + return + + # Set subscribe parameters + sub_param = py_t2sdk.pySubscribeParamInterface() + sub_param.SetTopicName(topic_name) + sub_param.SetFilter("branch_no", str(self.branch_no)) + sub_param.SetFilter("fund_account", str(self.userid)) + + # Pack data + packer = py_t2sdk.pyIF2Packer() + packer.BeginPack() + packer.AddField("fund_account") + packer.AddField("password") + packer.AddStr(self.userid) + packer.AddStr(self.password) + packer.EndPack() + + # Start subcribe + unpacker = py_t2sdk.pyIF2UnPacker() + result = subscriber.SubscribeTopic(sub_param, 5000, unpacker, packer) + + packer.FreeMem() + packer.Release() + unpacker.Release() + sub_param.Release() + + return result + + def cancel_order(self, req: CancelRequest) -> None: + """ + Cancel existing order. + """ + batch_no = req.orderid + + if batch_no not in self.batch_entrust_id: + self.cancels[batch_no] = req + return + + td_req = self.generate_req() + entrust_no = self.batch_entrust_id[batch_no] + td_req["entrust_no"] = entrust_no + + self.send_req(FUNCTION_CANCEL_ORDER, td_req) + + if batch_no in self.cancels: + del self.cancels[batch_no] + + def query_account(self) -> int: + """""" + if not self.login_status: + return + + req = self.generate_req() + self.send_req(FUNCTION_QUERY_ACCOUNT, req) + + def query_position(self) -> int: + """""" + if not self.login_status: + return + + req = self.generate_req() + self.send_req(FUNCTION_QUERY_POSITION, req) + + def query_trade(self) -> int: + """""" + req = self.generate_req() + req["request_num"] = "10000" + self.send_req(FUNCTION_QUERY_TRADE, req) + + def query_order(self) -> int: + """""" + req = self.generate_req() + req["request_num"] = "10000" + self.send_req(FUNCTION_QUERY_ORDER, req) + + def query_contract(self, position_str: str = None) -> int: + """""" + req = self.generate_req() + req["request_num"] = "10000" + + if position_str: + req["position_str"] = position_str + + self.send_req(FUNCTION_QUERY_CONTRACT, req) + + def subcribe_order(self) -> None: + """""" + n = self.subcribe_topic("order_subcriber", ISSUE_ORDER) + if n <= 0: + msg = f"濮旀墭璁㈤槄澶辫触锛屽師鍥爗self.connection.GetErrorMsg(n)}" + self.gateway.write_log(msg) + else: + self.gateway.write_log("濮旀墭鍥炴姤璁㈤槄鎴愬姛") + + def subcribe_trade(self) -> None: + """""" + n = self.subcribe_topic("trade_subcriber", ISSUE_TRADE) + if n is None or n <= 0: + msg = f"鎴愪氦璁㈤槄澶辫触锛屽師鍥爗self.connection.GetErrorMsg(n)}" + self.gateway.write_log(msg) + else: + self.gateway.write_log("鎴愪氦鍥炴姤璁㈤槄鎴愬姛") + + +class TdAsyncCallback: + """""" + + def __init__(self): + """""" + global td_api + self.td_api: TdApi = td_api + + def OnRegister(self) -> None: + """""" + pass + + def OnClose(self) -> None: + """""" + pass + + def OnReceivedBizMsg(self, hSend, sBuff, iLenght) -> None: + """""" + biz_msg = py_t2sdk.pyIBizMessage() + biz_msg.SetBuff(sBuff, iLenght) + ret = biz_msg.GetReturnCode() + + if not ret: + function = biz_msg.GetFunction() + buf, len = biz_msg.GetContent() + + unpacker = py_t2sdk.pyIF2UnPacker() + unpacker.Open(buf, len) + data = unpack_data(unpacker) + self.td_api.on_callback(function, data) + + unpacker.Release() + else: + buf, len = biz_msg.GetContent() + unpacker = py_t2sdk.pyIF2UnPacker() + unpacker.Open(buf, len) + + if unpacker: + data = unpack_data(unpacker) + self.td_api.on_error(data) + unpacker.Release() + else: + error_msg = str(biz_msg.GetErrorInfo(), encoding="gbk") + msg = f"璇锋眰澶辫触锛屼俊鎭細{error_msg}" + self.td_api.gateway.write_log(msg) + + biz_msg.Release() + + +class TdSubCallback: + """""" + + def __init__(self): + """""" + global td_api + self.td_api: TdApi = td_api + + def OnReceived(self, topic, sBuff, iLen) -> None: + """""" + biz_msg = py_t2sdk.pyIBizMessage() + biz_msg.SetBuff(sBuff, iLen) + buf, len = biz_msg.GetContent() + + unpacker = py_t2sdk.pyIF2UnPacker() + unpacker.Open(buf, len) + data = unpack_data(unpacker) + self.td_api.on_callback(topic, data) + + unpacker.Release() + biz_msg.Release() + + +def unpack_data(unpacker: py_t2sdk.pyIF2UnPacker) -> List[Dict[str, str]]: + """""" + row_count = unpacker.GetRowCount() + col_count = unpacker.GetColCount() + + data = [] + for row_index in range(row_count): + d = {} + for col_index in range(col_count): + name = unpacker.GetColName(col_index) + value = unpacker.GetStrByIndex(col_index) + d[name] = value + + unpacker.Next() + data.append(d) + + return data + + +def get_option_index(strike_price: float, exchange_instrument_id: str) -> str: + """""" + exchange_instrument_id = exchange_instrument_id.replace(" ", "") + + if "M" in exchange_instrument_id: + n = exchange_instrument_id.index("M") + elif "A" in exchange_instrument_id: + n = exchange_instrument_id.index("A") + elif "B" in exchange_instrument_id: + n = exchange_instrument_id.index("B") + else: + return str(strike_price) + + index = exchange_instrument_id[n:] + option_index = f"{strike_price:.3f}-{index}" + + return option_index + + +td_api = None + + +def generate_datetime(time: str) -> datetime: + """""" + time = time.rjust(6, "0") + today = datetime.now().strftime("%Y%m%d") + timestamp = f"{today} {time}" + if ':' in timestamp: + dt = datetime.strptime(timestamp, "%Y%m%d %H:%M:%S") + else: + dt = datetime.strptime(timestamp, "%Y%m%d %H%M%S") + dt = CHINA_TZ.localize(dt) + return dt diff --git a/vnpy/gateway/hsoption/s2013.pfx b/vnpy/gateway/hsoption/s2013.pfx new file mode 100644 index 00000000..5a091528 Binary files /dev/null and b/vnpy/gateway/hsoption/s2013.pfx differ diff --git a/vnpy/gateway/sopt/sopt_gateway.py b/vnpy/gateway/sopt/sopt_gateway.py index 9099041a..7794942d 100644 --- a/vnpy/gateway/sopt/sopt_gateway.py +++ b/vnpy/gateway/sopt/sopt_gateway.py @@ -282,12 +282,12 @@ class SoptGateway(BaseGateway): self.td_api.close() self.md_api.close() - def write_error(self, msg: str, error: dict): - """""" - error_id = error["ErrorID"] - error_msg = error["ErrorMsg"] - msg = f"{msg}锛屼唬鐮侊細{error_id}锛屼俊鎭細{error_msg}" - self.write_log(msg) + #def write_error(self, msg: str, error: dict): + # """""" + # error_id = error["ErrorID"] + # error_msg = error["ErrorMsg"] + # msg = f"{msg}锛屼唬鐮侊細{error_id}锛屼俊鎭細{error_msg}" + # self.write_log(msg) def process_timer_event(self, event): """""" @@ -597,7 +597,7 @@ class SoptTdApi(TdApi): ) self.gateway.on_order(order) - self.gateway.write_error("浜ゆ槗濮旀墭澶辫触", error) + self.gateway.write_error(f"浜ゆ槗濮旀墭澶辫触:{symbol} {order.direction.value} {order.offset.value} {order.price}, {order.volume}", error) def onRspOrderAction(self, data: dict, error: dict, reqid: int, last: bool): """""" @@ -630,6 +630,7 @@ class SoptTdApi(TdApi): position = PositionData( accountid=self.userid, symbol=data["InstrumentID"], + name=symbol_name_map[data["InstrumentID"]], exchange=symbol_exchange_map[data["InstrumentID"]], direction=DIRECTION_SOPT2VT[data["PosiDirection"]], gateway_name=self.gateway_name @@ -805,7 +806,7 @@ class SoptTdApi(TdApi): timestamp = f"{data['InsertDate']} {data['InsertTime']}" dt = datetime.strptime(timestamp, "%Y%m%d %H:%M:%S") - dt = CHINA_TZ.localize(dt) + #dt = CHINA_TZ.localize(dt) order = OrderData( accountid=self.userid, diff --git a/vnpy/trader/constant.py b/vnpy/trader/constant.py index cb43a3d2..c6d99b7c 100644 --- a/vnpy/trader/constant.py +++ b/vnpy/trader/constant.py @@ -57,6 +57,7 @@ class Product(Enum): FOREX = "澶栨眹" SPOT = "鐜拌揣" ETF = "ETF" + LOF = "LOF" BOND = "鍊哄埜" WARRANT = "鏉冭瘉" SPREAD = "浠峰樊" diff --git a/vnpy/trader/utility.py b/vnpy/trader/utility.py index f40ad200..5ba33d35 100644 --- a/vnpy/trader/utility.py +++ b/vnpy/trader/utility.py @@ -413,14 +413,14 @@ def import_module_by_str(import_module_name): mod = import_module(loaded_modules) comp = modules[-1] - if not hasattr(mod, comp): - loaded_modules = '.'.join([loaded_modules, comp]) - print('realod {}'.format(loaded_modules)) - mod = reload(loaded_modules) - else: - print('from {} import {}'.format(loaded_modules, comp)) - mod = getattr(mod, comp) - return mod + #if not hasattr(mod, comp): + # loaded_modules = '.'.join([loaded_modules, comp]) + print('realod {}'.format(loaded_modules)) + mod = reload(mod) + #else: + # print('from {} import {}'.format(loaded_modules, comp)) + comp = getattr(mod, comp) + return comp except Exception as ex: print('import {} fail,{},{}'.format(import_module_name, str(ex), traceback.format_exc()))