/* Generated by Cython 3.2.2 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "include_dirs": [ "/host/tmp/libpq.build/include" ], "libraries": [ "pq" ], "library_dirs": [ "/host/tmp/libpq.build/lib" ], "name": "psycopg_binary.pq", "sources": [ "psycopg_binary/pq.pyx" ] }, "module_name": "psycopg_binary.pq" } END: Cython Metadata */ #ifndef PY_SSIZE_T_CLEAN #define PY_SSIZE_T_CLEAN #endif /* PY_SSIZE_T_CLEAN */ /* InitLimitedAPI */ #if defined(Py_LIMITED_API) #if !defined(CYTHON_LIMITED_API) #define CYTHON_LIMITED_API 1 #endif #elif defined(CYTHON_LIMITED_API) #ifdef _MSC_VER #pragma message ("Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead.") #else #warning Limited API usage is enabled with 'CYTHON_LIMITED_API' but 'Py_LIMITED_API' does not define a Python target version. Consider setting 'Py_LIMITED_API' instead. #endif #endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x03080000 #error Cython requires Python 3.8+. #else #define __PYX_ABI_VERSION "3_2_2" #define CYTHON_HEX_VERSION 0x030202F0 #define CYTHON_FUTURE_DIVISION 1 /* CModulePreamble */ #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #define __PYX_COMMA , #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX #if defined(GRAALVM_PYTHON) /* For very preliminary testing purposes. Most variables are set the same as PyPy. The existence of this section does not imply that anything works or is even tested */ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 1 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #undef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 1 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(PYPY_VERSION) #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #undef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 1 #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #ifndef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 1 #endif #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 0 #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #if PY_VERSION_HEX < 0x03090000 #undef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #undef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #undef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING 0 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) #endif #undef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND 0 #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_NUM >= 0x07031100) #endif #undef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 0 #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 #elif defined(CYTHON_LIMITED_API) #ifdef Py_LIMITED_API #undef __PYX_LIMITED_VERSION_HEX #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API #endif #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 0 #define CYTHON_COMPILING_IN_LIMITED_API 1 #define CYTHON_COMPILING_IN_GRAAL 0 #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 0 #undef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 1 #undef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 0 #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #undef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 0 #ifndef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #endif #undef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 0 #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #endif #undef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 0 #undef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 0 #undef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 0 #undef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 0 #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #undef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) #undef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 0 #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #undef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING 0 #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 #endif #ifndef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) #endif #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #undef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 0 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS 1 #endif #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #define CYTHON_COMPILING_IN_LIMITED_API 0 #define CYTHON_COMPILING_IN_GRAAL 0 #ifdef Py_GIL_DISABLED #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 #else #define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 #endif #if PY_VERSION_HEX < 0x030A0000 #undef CYTHON_USE_TYPE_SLOTS #define CYTHON_USE_TYPE_SLOTS 1 #elif !defined(CYTHON_USE_TYPE_SLOTS) #define CYTHON_USE_TYPE_SLOTS 1 #endif #ifndef CYTHON_USE_TYPE_SPECS #define CYTHON_USE_TYPE_SPECS 0 #endif #ifndef CYTHON_USE_PYTYPE_LOOKUP #define CYTHON_USE_PYTYPE_LOOKUP 1 #endif #ifndef CYTHON_USE_PYLONG_INTERNALS #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_USE_PYLIST_INTERNALS #define CYTHON_USE_PYLIST_INTERNALS 0 #elif !defined(CYTHON_USE_PYLIST_INTERNALS) #define CYTHON_USE_PYLIST_INTERNALS 1 #endif #ifndef CYTHON_USE_UNICODE_INTERNALS #define CYTHON_USE_UNICODE_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 #undef CYTHON_USE_UNICODE_WRITER #define CYTHON_USE_UNICODE_WRITER 0 #elif !defined(CYTHON_USE_UNICODE_WRITER) #define CYTHON_USE_UNICODE_WRITER 1 #endif #ifndef CYTHON_AVOID_BORROWED_REFS #define CYTHON_AVOID_BORROWED_REFS 0 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 #elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) #define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 #endif #ifndef CYTHON_ASSUME_SAFE_MACROS #define CYTHON_ASSUME_SAFE_MACROS 1 #endif #ifndef CYTHON_ASSUME_SAFE_SIZE #define CYTHON_ASSUME_SAFE_SIZE 1 #endif #ifndef CYTHON_UNPACK_METHODS #define CYTHON_UNPACK_METHODS 1 #endif #ifndef CYTHON_FAST_THREAD_STATE #define CYTHON_FAST_THREAD_STATE 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_FAST_GIL #define CYTHON_FAST_GIL 0 #elif !defined(CYTHON_FAST_GIL) #define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) #endif #ifndef CYTHON_METH_FASTCALL #define CYTHON_METH_FASTCALL 1 #endif #ifndef CYTHON_FAST_PYCALL #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP487_INIT_SUBCLASS #define CYTHON_PEP487_INIT_SUBCLASS 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT #define CYTHON_PEP489_MULTI_PHASE_INIT 1 #endif #ifndef CYTHON_USE_MODULE_STATE #define CYTHON_USE_MODULE_STATE 0 #endif #ifndef CYTHON_USE_SYS_MONITORING #define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 1 #endif #ifndef CYTHON_USE_AM_SEND #define CYTHON_USE_AM_SEND 1 #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #undef CYTHON_USE_DICT_VERSIONS #define CYTHON_USE_DICT_VERSIONS 0 #elif !defined(CYTHON_USE_DICT_VERSIONS) #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) #endif #ifndef CYTHON_USE_EXC_INFO_STACK #define CYTHON_USE_EXC_INFO_STACK 1 #endif #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 #endif #ifndef CYTHON_USE_FREELISTS #define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) #endif #if defined(CYTHON_IMMORTAL_CONSTANTS) && PY_VERSION_HEX < 0x030C0000 #undef CYTHON_IMMORTAL_CONSTANTS #define CYTHON_IMMORTAL_CONSTANTS 0 // definitely won't work #elif !defined(CYTHON_IMMORTAL_CONSTANTS) #define CYTHON_IMMORTAL_CONSTANTS (PY_VERSION_HEX >= 0x030C0000 && !CYTHON_USE_MODULE_STATE && CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) #endif #endif #ifndef CYTHON_COMPRESS_STRINGS #define CYTHON_COMPRESS_STRINGS 1 #endif #ifndef CYTHON_FAST_PYCCALL #define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL #endif #ifndef CYTHON_VECTORCALL #if CYTHON_COMPILING_IN_LIMITED_API #define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) #else #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL) #endif #endif #if CYTHON_USE_PYLONG_INTERNALS #undef SHIFT #undef BASE #undef MASK #ifdef SIZEOF_VOID_P enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #ifndef __has_cpp_attribute #define __has_cpp_attribute(x) 0 #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #ifndef CYTHON_UNUSED #if defined(__cplusplus) /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(maybe_unused) #define CYTHON_UNUSED [[maybe_unused]] #endif #endif #endif #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_UNUSED_VAR # if defined(__cplusplus) template void CYTHON_UNUSED_VAR( const T& ) { } # else # define CYTHON_UNUSED_VAR(x) (void)(x) # endif #endif #ifndef CYTHON_MAYBE_UNUSED_VAR #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif #ifndef CYTHON_USE_CPP_STD_MOVE #if defined(__cplusplus) && (\ __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define CYTHON_USE_CPP_STD_MOVE 1 #else #define CYTHON_USE_CPP_STD_MOVE 0 #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #include typedef uintptr_t __pyx_uintptr_t; #ifndef CYTHON_FALLTHROUGH #if defined(__cplusplus) /* for clang __has_cpp_attribute(fallthrough) is true even before C++17 * but leads to warnings with -pedantic, since it is a C++17 feature */ #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) #if __has_cpp_attribute(fallthrough) #define CYTHON_FALLTHROUGH [[fallthrough]] #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_cpp_attribute(clang::fallthrough) #define CYTHON_FALLTHROUGH [[clang::fallthrough]] #elif __has_cpp_attribute(gnu::fallthrough) #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] #endif #endif #endif #ifndef CYTHON_FALLTHROUGH #if __has_attribute(fallthrough) #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) #else #define CYTHON_FALLTHROUGH #endif #endif #if defined(__clang__) && defined(__apple_build_version__) #if __apple_build_version__ < 7000000 #undef CYTHON_FALLTHROUGH #define CYTHON_FALLTHROUGH #endif #endif #endif #ifndef Py_UNREACHABLE #define Py_UNREACHABLE() assert(0); abort() #endif #ifdef __cplusplus template struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL::value) #else #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) #endif #if CYTHON_COMPILING_IN_PYPY == 1 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x030A0000) #else #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX < 0x03090000) #endif #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) /* CInitCode */ #ifndef CYTHON_INLINE #if defined(__clang__) #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) #elif defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif /* PythonCompatibility */ #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_DefaultClassType PyType_Type #if CYTHON_COMPILING_IN_LIMITED_API #ifndef CO_OPTIMIZED static int CO_OPTIMIZED; #endif #ifndef CO_NEWLOCALS static int CO_NEWLOCALS; #endif #ifndef CO_VARARGS static int CO_VARARGS; #endif #ifndef CO_VARKEYWORDS static int CO_VARKEYWORDS; #endif #ifndef CO_ASYNC_GENERATOR static int CO_ASYNC_GENERATOR; #endif #ifndef CO_GENERATOR static int CO_GENERATOR; #endif #ifndef CO_COROUTINE static int CO_COROUTINE; #endif #else #ifndef CO_COROUTINE #define CO_COROUTINE 0x80 #endif #ifndef CO_ASYNC_GENERATOR #define CO_ASYNC_GENERATOR 0x200 #endif #endif static int __Pyx_init_co_variables(void); #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) #else #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) #define __Pyx_Py_Is(x, y) Py_Is(x, y) #else #define __Pyx_Py_Is(x, y) ((x) == (y)) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) #define __Pyx_Py_IsNone(ob) Py_IsNone(ob) #else #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) #else #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) #endif #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) #else #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) #endif #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) #else #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #ifndef Py_TPFLAGS_SEQUENCE #define Py_TPFLAGS_SEQUENCE 0 #endif #ifndef Py_TPFLAGS_MAPPING #define Py_TPFLAGS_MAPPING 0 #endif #ifndef Py_TPFLAGS_IMMUTABLETYPE #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8) #endif #ifndef Py_TPFLAGS_DISALLOW_INSTANTIATION #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7) #endif #ifndef METH_STACKLESS #define METH_STACKLESS 0 #endif #ifndef METH_FASTCALL #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 #endif typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames); #else #if PY_VERSION_HEX >= 0x030d00A4 # define __Pyx_PyCFunctionFast PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords #else # define __Pyx_PyCFunctionFast _PyCFunctionFast # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords #endif #endif #if CYTHON_METH_FASTCALL #define __Pyx_METH_FASTCALL METH_FASTCALL #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords #else #define __Pyx_METH_FASTCALL METH_VARARGS #define __Pyx_PyCFunction_FastCall PyCFunction #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords #endif #if CYTHON_VECTORCALL #define __pyx_vectorcallfunc vectorcallfunc #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) #else #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) #endif #if PY_VERSION_HEX >= 0x030900B1 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) #else #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) #endif #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) #elif !CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; } #endif static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void (*cfunc)(void)) { #if CYTHON_COMPILING_IN_LIMITED_API return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; #else return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; #endif } #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) #if PY_VERSION_HEX < 0x03090000 || (CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000) #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); #else #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) #define __Pyx_PyCMethod PyCMethod #endif #ifndef METH_METHOD #define METH_METHOD 0x200 #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyFrame_SetLineNumber(frame, lineno) #elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) GraalPyFrame_SetLineNumber((frame), (lineno)) #elif CYTHON_COMPILING_IN_GRAAL #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) #else #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyThreadState_Current PyThreadState_Get() #elif !CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_Current PyThreadState_GET() #elif PY_VERSION_HEX >= 0x030d00A1 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() #else #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() #endif #if CYTHON_USE_MODULE_STATE static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) { void *result; result = PyModule_GetState(op); if (!result) Py_FatalError("Couldn't find the module state"); return result; } #define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) #else #define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) #endif #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) #define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) #define __Pyx_PyObject_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(Py_TYPE(obj), sub, name, func_ctype) #define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) #define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) #define __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) #define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) __Pyx_PyType_GetSubSlot(type, sub, name, func_ctype) #else #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) #define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ ((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ (PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ __Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) #define __Pyx_PyType_GetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_GetSlot(obj, name, func_ctype) #define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) #endif #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) #else #define __Pyx_PyDict_NewPresized(n) PyDict_New() #endif #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_UNICODE_INTERNALS #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); if (res == NULL) PyErr_Clear(); return res; } #elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError #define __Pyx_PyDict_GetItemStr PyDict_GetItem #else static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { #if CYTHON_COMPILING_IN_PYPY return PyDict_GetItem(dict, name); #else PyDictEntry *ep; PyDictObject *mp = (PyDictObject*) dict; long hash = ((PyStringObject *) name)->ob_shash; assert(hash != -1); ep = (mp->ma_lookup)(mp, name, hash); if (ep == NULL) { return NULL; } return ep->me_value; #endif } #define __Pyx_PyDict_GetItemStr PyDict_GetItem #endif #if CYTHON_USE_TYPE_SLOTS #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) #else #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) #endif #define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) #if CYTHON_USE_TYPE_SPECS #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ PyTypeObject *type = Py_TYPE((PyObject*)obj);\ assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ PyObject_GC_Del(obj);\ Py_DECREF(type);\ } #else #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) #endif #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) #define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) #define __Pyx_PyUnicode_DATA(u) ((void*)u) #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) #else #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_READY(op) (0) #else #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #endif #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) #if PY_VERSION_HEX >= 0x030C0000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) #else #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) #else #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) #endif #endif #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY #if !defined(PyUnicode_DecodeUnicodeEscape) #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) #endif #if !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #if !defined(PyByteArray_Check) #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) #endif #if !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif #endif #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && PyUnstable_Object_IsUniquelyReferenced(obj)) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PySequence_ListKeepNew(obj)\ (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) #else #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) #endif #if PY_VERSION_HEX >= 0x030900A4 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) #else #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) #endif enum __Pyx_ReferenceSharing { __Pyx_ReferenceSharing_DefinitelyUnique, // We created it so we know it's unshared - no need to check __Pyx_ReferenceSharing_OwnStrongReference, __Pyx_ReferenceSharing_FunctionArgument, __Pyx_ReferenceSharing_SharedReference, // Never trust it to be unshared because it's a global or similar }; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && PY_VERSION_HEX >= 0x030E0000 #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing)\ (sharing == __Pyx_ReferenceSharing_DefinitelyUnique ? 1 :\ (sharing == __Pyx_ReferenceSharing_FunctionArgument ? PyUnstable_Object_IsUniqueReferencedTemporary(o) :\ (sharing == __Pyx_ReferenceSharing_OwnStrongReference ? PyUnstable_Object_IsUniquelyReferenced(o) : 0))) #elif (CYTHON_COMPILING_IN_CPYTHON && !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)sharing), Py_REFCNT(o) == 1) #else #define __Pyx_IS_UNIQUELY_REFERENCED(o, sharing) (((void)o), ((void)sharing), 0) #endif #if CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyList_GetItemRef(o, i) (likely((i) >= 0) ? PySequence_GetItem(o, i) : (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) #else #define __Pyx_PyList_GetItemRef(o, i) PySequence_ITEM(o, i) #endif #elif CYTHON_COMPILING_IN_LIMITED_API || !CYTHON_ASSUME_SAFE_MACROS #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) #else #define __Pyx_PyList_GetItemRef(o, i) __Pyx_XNewRef(PyList_GetItem(o, i)) #endif #else #define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) #endif #if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && !CYTHON_COMPILING_IN_LIMITED_API && CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) (__Pyx_IS_UNIQUELY_REFERENCED(o, unsafe_shared) ?\ __Pyx_NewRef(PyList_GET_ITEM(o, i)) : __Pyx_PyList_GetItemRef(o, i)) #else #define __Pyx_PyList_GetItemRefFast(o, i, unsafe_shared) __Pyx_PyList_GetItemRef(o, i) #endif #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { *result = PyObject_GetItem(dict, key); if (*result == NULL) { if (PyErr_ExceptionMatches(PyExc_KeyError)) { PyErr_Clear(); return 0; } return -1; } return 1; } #else static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { *result = PyDict_GetItemWithError(dict, key); if (*result == NULL) { return PyErr_Occurred() ? -1 : 0; } Py_INCREF(*result); return 1; } #endif #if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST #define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) #else #define __Pyx_VISIT_CONST(obj) #endif #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) #define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) #else #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) #define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) #define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) #endif #if CYTHON_ASSUME_SAFE_SIZE #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) #else #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) #define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t #define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t #if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 #define __Pyx_PySendResult PySendResult #else typedef enum { PYGEN_RETURN = 0, PYGEN_ERROR = -1, PYGEN_NEXT = 1, } __Pyx_PySendResult; #endif #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); #else #define __Pyx_pyiter_sendfunc sendfunc #endif #if !CYTHON_USE_AM_SEND #define __PYX_HAS_PY_AM_SEND 0 #elif __PYX_LIMITED_VERSION_HEX >= 0x030A0000 #define __PYX_HAS_PY_AM_SEND 1 #else #define __PYX_HAS_PY_AM_SEND 2 // our own backported implementation #endif #if __PYX_HAS_PY_AM_SEND < 2 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #else typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; __Pyx_pyiter_sendfunc am_send; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)(s)) #endif #if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 #define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) #else #define __Pyx_TPFLAGS_HAVE_AM_SEND (0) #endif #if PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyInterpreterState_Get() PyInterpreterState_Get() #else #define __Pyx_PyInterpreterState_Get() PyThreadState_Get()->interp #endif #if CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030A0000 #ifdef __cplusplus extern "C" #endif PyAPI_FUNC(void *) PyMem_Calloc(size_t nelem, size_t elsize); #endif #if CYTHON_COMPILING_IN_LIMITED_API static int __Pyx_init_co_variable(PyObject *inspect, const char* name, int *write_to) { int value; PyObject *py_value = PyObject_GetAttrString(inspect, name); if (!py_value) return 0; value = (int) PyLong_AsLong(py_value); Py_DECREF(py_value); *write_to = value; return value != -1 || !PyErr_Occurred(); } static int __Pyx_init_co_variables(void) { PyObject *inspect; int result; inspect = PyImport_ImportModule("inspect"); result = #if !defined(CO_OPTIMIZED) __Pyx_init_co_variable(inspect, "CO_OPTIMIZED", &CO_OPTIMIZED) && #endif #if !defined(CO_NEWLOCALS) __Pyx_init_co_variable(inspect, "CO_NEWLOCALS", &CO_NEWLOCALS) && #endif #if !defined(CO_VARARGS) __Pyx_init_co_variable(inspect, "CO_VARARGS", &CO_VARARGS) && #endif #if !defined(CO_VARKEYWORDS) __Pyx_init_co_variable(inspect, "CO_VARKEYWORDS", &CO_VARKEYWORDS) && #endif #if !defined(CO_ASYNC_GENERATOR) __Pyx_init_co_variable(inspect, "CO_ASYNC_GENERATOR", &CO_ASYNC_GENERATOR) && #endif #if !defined(CO_GENERATOR) __Pyx_init_co_variable(inspect, "CO_GENERATOR", &CO_GENERATOR) && #endif #if !defined(CO_COROUTINE) __Pyx_init_co_variable(inspect, "CO_COROUTINE", &CO_COROUTINE) && #endif 1; Py_DECREF(inspect); return result ? 0 : -1; } #else static int __Pyx_init_co_variables(void) { return 0; // It's a limited API-only feature } #endif /* MathInitCode */ #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) #ifndef _USE_MATH_DEFINES #define _USE_MATH_DEFINES #endif #endif #include #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) #define __Pyx_truncl trunc #else #define __Pyx_truncl truncl #endif #ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME #define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 0 #endif #ifndef CYTHON_CLINE_IN_TRACEBACK #define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME #endif #if CYTHON_CLINE_IN_TRACEBACK #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; __pyx_clineno = __LINE__; (void) __pyx_clineno; } #else #define __PYX_MARK_ERR_POS(f_index, lineno) { __pyx_filename = __pyx_f[f_index]; (void) __pyx_filename; __pyx_lineno = lineno; (void) __pyx_lineno; (void) __pyx_clineno; } #endif #define __PYX_ERR(f_index, lineno, Ln_error) \ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } #ifdef CYTHON_EXTERN_C #undef __PYX_EXTERN_C #define __PYX_EXTERN_C CYTHON_EXTERN_C #elif defined(__PYX_EXTERN_C) #ifdef _MSC_VER #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") #else #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. #endif #else #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__psycopg_binary__pq #define __PYX_HAVE_API__psycopg_binary__pq /* Early includes */ #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) typedef signed pid_t; #else #include #endif #include "stdio.h" #include "pg_config.h" #include "libpq-fe.h" /* Hack to allow the use of old libpq versions */ #if PG_VERSION_NUM < 100000 #define PQencryptPasswordConn(conn, passwd, user, algorithm) NULL #endif #if PG_VERSION_NUM < 120000 #define PQhostaddr(conn) NULL #endif #if PG_VERSION_NUM < 140000 #define PGRES_PIPELINE_SYNC 10 #define PGRES_PIPELINE_ABORTED 11 typedef enum { PQ_PIPELINE_OFF, PQ_PIPELINE_ON, PQ_PIPELINE_ABORTED } PGpipelineStatus; #define PQpipelineStatus(conn) PQ_PIPELINE_OFF #define PQenterPipelineMode(conn) 0 #define PQexitPipelineMode(conn) 1 #define PQpipelineSync(conn) 0 #define PQsendFlushRequest(conn) 0 #define PQsetTraceFlags(conn, stream) do {} while (0) #endif #if PG_VERSION_NUM < 160000 #define PQconnectionUsedGSSAPI(conn) 0 #endif #if PG_VERSION_NUM < 170000 typedef struct pg_cancel_conn PGcancelConn; #define PQchangePassword(conn, user, passwd) NULL #define PQclosePrepared(conn, name) NULL #define PQclosePortal(conn, name) NULL #define PQsendClosePrepared(conn, name) 0 #define PQsendClosePortal(conn, name) 0 #define PQcancelCreate(conn) NULL #define PQcancelStart(cancelConn) 0 #define PQcancelBlocking(cancelConn) 0 #define PQcancelPoll(cancelConn) CONNECTION_OK #define PQcancelStatus(cancelConn) 0 #define PQcancelSocket(cancelConn) -1 #define PQcancelErrorMessage(cancelConn) NULL #define PQcancelReset(cancelConn) 0 #define PQcancelFinish(cancelConn) 0 #define PQsetChunkedRowsMode(conn, chunkSize) 0 #endif #if PG_VERSION_NUM < 180000 #define PQfullProtocolVersion(conn) 0 #endif #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) /* We don't need a real definition for this because Windows is not affected * by the issue caused by closing the fds after fork. */ #define getpid() (0) #else #include #endif #include #include #ifdef _OPENMP #include #endif /* _OPENMP */ #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) #define CYTHON_WITHOUT_ASSERTIONS #endif #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { return (size_t) i < (size_t) limit; } #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) #define __Pyx_PyByteArray_AsString(s) PyByteArray_AS_STRING(s) #else #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) #define __Pyx_PyByteArray_AsString(s) PyByteArray_AsString(s) #endif #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) return Py_NewRef(obj); #else Py_INCREF(obj); return obj; #endif } static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) return Py_XNewRef(obj); #else Py_XINCREF(obj); return obj; #endif } static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #if CYTHON_ASSUME_SAFE_MACROS #define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) #else #define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) #endif #define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) #if CYTHON_USE_PYLONG_INTERNALS #if PY_VERSION_HEX >= 0x030C00A7 #ifndef _PyLong_SIGN_MASK #define _PyLong_SIGN_MASK 3 #endif #ifndef _PyLong_NON_SIZE_BITS #define _PyLong_NON_SIZE_BITS 3 #endif #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_SignedDigitCount(x)\ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) #else #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; #else #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) #define __Pyx_PyLong_CompactValue(x)\ ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) typedef sdigit __Pyx_compact_pylong; typedef digit __Pyx_compact_upylong; #endif #if PY_VERSION_HEX >= 0x030C00A5 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) #else #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) #endif #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ /* PretendToInitialize */ #ifdef __cplusplus #if __cplusplus > 201103L #include #endif template static void __Pyx_pretend_to_initialize(T* ptr) { #if __cplusplus > 201103L if ((std::is_trivially_default_constructible::value)) #endif *ptr = T(); (void)ptr; } #else static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } #endif #if !CYTHON_USE_MODULE_STATE static PyObject *__pyx_m = NULL; #endif static int __pyx_lineno; static int __pyx_clineno = 0; static const char * const __pyx_cfilenm = __FILE__; static const char *__pyx_filename; /* #### Code section: filename_table ### */ static const char* const __pyx_f[] = { "psycopg_binary/pq.pyx", "psycopg_binary/pq/pgconn.pyx", "", "psycopg_binary/pq/pgresult.pyx", "psycopg_binary/pq/pgcancel.pyx", "psycopg_binary/pq/conninfo.pyx", "psycopg_binary/pq/escaping.pyx", "psycopg_binary/pq/pqbuffer.pyx", "cpython/type.pxd", }; /* #### Code section: utility_code_proto_before_types ### */ /* Atomics.proto (used by UnpackUnboundCMethod) */ #include #ifndef CYTHON_ATOMICS #define CYTHON_ATOMICS 1 #endif #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS #define __PYX_GET_CYTHON_COMPILING_IN_CPYTHON_FREETHREADING() CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __pyx_atomic_int_type int #define __pyx_nonatomic_int_type int #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__)) #include #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ (defined(_MSC_VER) && _MSC_VER >= 1700))) #include #endif #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\ (__STDC_VERSION__ >= 201112L) &&\ !defined(__STDC_NO_ATOMICS__) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type atomic_int #define __pyx_atomic_ptr_type atomic_uintptr_t #define __pyx_nonatomic_ptr_type uintptr_t #define __pyx_atomic_incr_relaxed(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed) #define __pyx_atomic_incr_acq_rel(value) atomic_fetch_add_explicit(value, 1, memory_order_acq_rel) #define __pyx_atomic_decr_acq_rel(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel) #define __pyx_atomic_sub(value, arg) atomic_fetch_sub(value, arg) #define __pyx_atomic_int_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) #define __pyx_atomic_load(value) atomic_load(value) #define __pyx_atomic_store(value, new_value) atomic_store(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) atomic_load_explicit(value, memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) atomic_load_explicit(value, memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C atomics" #endif #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\ (__cplusplus >= 201103L) ||\ \ (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\ ATOMIC_INT_LOCK_FREE == 2) #undef __pyx_atomic_int_type #define __pyx_atomic_int_type std::atomic_int #define __pyx_atomic_ptr_type std::atomic_uintptr_t #define __pyx_nonatomic_ptr_type uintptr_t #define __pyx_atomic_incr_relaxed(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed) #define __pyx_atomic_incr_acq_rel(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_acq_rel) #define __pyx_atomic_decr_acq_rel(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel) #define __pyx_atomic_sub(value, arg) std::atomic_fetch_sub(value, arg) #define __pyx_atomic_int_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) #define __pyx_atomic_load(value) std::atomic_load(value) #define __pyx_atomic_store(value, new_value) std::atomic_store(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) std::atomic_load_explicit(value, std::memory_order_relaxed) #define __pyx_atomic_pointer_load_acquire(value) std::atomic_load_explicit(value, std::memory_order_acquire) #define __pyx_atomic_pointer_exchange(value, new_value) std::atomic_exchange(value, (__pyx_nonatomic_ptr_type)new_value) #define __pyx_atomic_pointer_cmp_exchange(value, expected, desired) std::atomic_compare_exchange_strong(value, expected, desired) #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER) #pragma message ("Using standard C++ atomics") #elif defined(__PYX_DEBUG_ATOMICS) #warning "Using standard C++ atomics" #endif #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\ (__GNUC_MINOR__ > 1 ||\ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2)))) #define __pyx_atomic_ptr_type void* #define __pyx_nonatomic_ptr_type void* #define __pyx_atomic_incr_relaxed(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_incr_acq_rel(value) __sync_fetch_and_add(value, 1) #define __pyx_atomic_decr_acq_rel(value) __sync_fetch_and_sub(value, 1) #define __pyx_atomic_sub(value, arg) __sync_fetch_and_sub(value, arg) static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { __pyx_nonatomic_int_type old = __sync_val_compare_and_swap(value, *expected, desired); int result = old == *expected; *expected = old; return result; } #define __pyx_atomic_load(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_store(value, new_value) __sync_lock_test_and_set(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_load_acquire(value) __sync_fetch_and_add(value, 0) #define __pyx_atomic_pointer_exchange(value, new_value) __sync_lock_test_and_set(value, (__pyx_atomic_ptr_type)new_value) static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { __pyx_nonatomic_ptr_type old = __sync_val_compare_and_swap(value, *expected, desired); int result = old == *expected; *expected = old; return result; } #ifdef __PYX_DEBUG_ATOMICS #warning "Using GNU atomics" #endif #elif CYTHON_ATOMICS && defined(_MSC_VER) #include #undef __pyx_atomic_int_type #define __pyx_atomic_int_type long #define __pyx_atomic_ptr_type void* #undef __pyx_nonatomic_int_type #define __pyx_nonatomic_int_type long #define __pyx_nonatomic_ptr_type void* #pragma intrinsic (_InterlockedExchangeAdd, _InterlockedExchange, _InterlockedCompareExchange, _InterlockedCompareExchangePointer, _InterlockedExchangePointer) #define __pyx_atomic_incr_relaxed(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_incr_acq_rel(value) _InterlockedExchangeAdd(value, 1) #define __pyx_atomic_decr_acq_rel(value) _InterlockedExchangeAdd(value, -1) #define __pyx_atomic_sub(value, arg) _InterlockedExchangeAdd(value, -arg) static CYTHON_INLINE int __pyx_atomic_int_cmp_exchange(__pyx_atomic_int_type* value, __pyx_nonatomic_int_type* expected, __pyx_nonatomic_int_type desired) { __pyx_nonatomic_int_type old = _InterlockedCompareExchange(value, desired, *expected); int result = old == *expected; *expected = old; return result; } #define __pyx_atomic_load(value) _InterlockedExchangeAdd(value, 0) #define __pyx_atomic_store(value, new_value) _InterlockedExchange(value, new_value) #define __pyx_atomic_pointer_load_relaxed(value) *(void * volatile *)value #define __pyx_atomic_pointer_load_acquire(value) _InterlockedCompareExchangePointer(value, 0, 0) #define __pyx_atomic_pointer_exchange(value, new_value) _InterlockedExchangePointer(value, (__pyx_atomic_ptr_type)new_value) static CYTHON_INLINE int __pyx_atomic_pointer_cmp_exchange(__pyx_atomic_ptr_type* value, __pyx_nonatomic_ptr_type* expected, __pyx_nonatomic_ptr_type desired) { __pyx_atomic_ptr_type old = _InterlockedCompareExchangePointer(value, desired, *expected); int result = old == *expected; *expected = old; return result; } #ifdef __PYX_DEBUG_ATOMICS #pragma message ("Using MSVC atomics") #endif #else #undef CYTHON_ATOMICS #define CYTHON_ATOMICS 0 #ifdef __PYX_DEBUG_ATOMICS #warning "Not using atomics" #endif #endif /* CriticalSectionsDefinition.proto (used by CriticalSections) */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection void* #define __Pyx_PyCriticalSection2 void* #define __Pyx_PyCriticalSection_End(cs) #define __Pyx_PyCriticalSection2_End(cs) #else #define __Pyx_PyCriticalSection PyCriticalSection #define __Pyx_PyCriticalSection2 PyCriticalSection2 #define __Pyx_PyCriticalSection_End PyCriticalSection_End #define __Pyx_PyCriticalSection2_End PyCriticalSection2_End #endif /* CriticalSections.proto (used by ParseKeywordsImpl) */ #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyCriticalSection_Begin(cs, arg) (void)(cs) #define __Pyx_PyCriticalSection2_Begin(cs, arg1, arg2) (void)(cs) #else #define __Pyx_PyCriticalSection_Begin PyCriticalSection_Begin #define __Pyx_PyCriticalSection2_Begin PyCriticalSection2_Begin #endif #if PY_VERSION_HEX < 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_BEGIN_CRITICAL_SECTION(o) { #define __Pyx_END_CRITICAL_SECTION() } #else #define __Pyx_BEGIN_CRITICAL_SECTION Py_BEGIN_CRITICAL_SECTION #define __Pyx_END_CRITICAL_SECTION Py_END_CRITICAL_SECTION #endif /* NoFastGil.proto */ #define __Pyx_PyGILState_Ensure PyGILState_Ensure #define __Pyx_PyGILState_Release PyGILState_Release #define __Pyx_FastGIL_Remember() #define __Pyx_FastGIL_Forget() #define __Pyx_FastGilFuncInit() /* ForceInitThreads.proto */ #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif /* IncludeStructmemberH.proto */ #include /* #### Code section: numeric_typedefs ### */ /* #### Code section: complex_type_declarations ### */ /* #### Code section: type_declarations ### */ /*--- Type declarations ---*/ struct __pyx_obj_14psycopg_binary_2pq_PGconn; struct __pyx_obj_14psycopg_binary_2pq_PGresult; struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn; struct __pyx_obj_14psycopg_binary_2pq_PGcancel; struct __pyx_obj_14psycopg_binary_2pq_Escaping; struct __pyx_obj_14psycopg_binary_2pq_PQBuffer; struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer; struct __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc; typedef struct __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc; /* "psycopg_binary/pq.pxd":16 * from psycopg_binary.pq cimport libpq * * ctypedef char *(*conn_bytes_f) (const libpq.PGconn *) # <<<<<<<<<<<<<< * ctypedef int(*conn_int_f) (const libpq.PGconn *) * */ typedef char *(*__pyx_t_14psycopg_binary_2pq_conn_bytes_f)(PGconn const *); /* "psycopg_binary/pq.pxd":17 * * ctypedef char *(*conn_bytes_f) (const libpq.PGconn *) * ctypedef int(*conn_int_f) (const libpq.PGconn *) # <<<<<<<<<<<<<< * * */ typedef int (*__pyx_t_14psycopg_binary_2pq_conn_int_f)(PGconn const *); /* "psycopg_binary/pq/pgconn.pyx":766 * * * cdef (Py_ssize_t, libpq.Oid *, char * const*, int *, int *) _query_params_args( # <<<<<<<<<<<<<< * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None, */ struct __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc { Py_ssize_t f0; Oid *f1; char *const *f2; int *f3; int *f4; }; /* "psycopg_binary/pq.pxd":20 * * * cdef class PGconn: # <<<<<<<<<<<<<< * cdef libpq.PGconn* _pgconn_ptr * cdef object __weakref__ */ struct __pyx_obj_14psycopg_binary_2pq_PGconn { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_PGconn *__pyx_vtab; PGconn *_pgconn_ptr; PyObject *__weakref__; PyObject *notice_handler; PyObject *notify_handler; pid_t _procpid; }; /* "psycopg_binary/pq.pxd":34 * * * cdef class PGresult: # <<<<<<<<<<<<<< * cdef libpq.PGresult* _pgresult_ptr * */ struct __pyx_obj_14psycopg_binary_2pq_PGresult { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_PGresult *__pyx_vtab; PGresult *_pgresult_ptr; }; /* "psycopg_binary/pq.pxd":41 * * * cdef class PGcancelConn: # <<<<<<<<<<<<<< * cdef libpq.PGcancelConn* pgcancelconn_ptr * */ struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancelConn *__pyx_vtab; PGcancelConn *pgcancelconn_ptr; }; /* "psycopg_binary/pq.pxd":48 * * * cdef class PGcancel: # <<<<<<<<<<<<<< * cdef libpq.PGcancel* pgcancel_ptr * */ struct __pyx_obj_14psycopg_binary_2pq_PGcancel { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancel *__pyx_vtab; PGcancel *pgcancel_ptr; }; /* "psycopg_binary/pq.pxd":55 * * * cdef class Escaping: # <<<<<<<<<<<<<< * cdef PGconn conn * */ struct __pyx_obj_14psycopg_binary_2pq_Escaping { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_Escaping *__pyx_vtab; struct __pyx_obj_14psycopg_binary_2pq_PGconn *conn; }; /* "psycopg_binary/pq.pxd":65 * * * cdef class PQBuffer: # <<<<<<<<<<<<<< * cdef unsigned char *buf * cdef Py_ssize_t len */ struct __pyx_obj_14psycopg_binary_2pq_PQBuffer { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_PQBuffer *__pyx_vtab; unsigned char *buf; Py_ssize_t len; }; /* "psycopg_binary/pq.pxd":73 * * * cdef class ViewBuffer: # <<<<<<<<<<<<<< * cdef unsigned char *buf * cdef Py_ssize_t len */ struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer { PyObject_HEAD struct __pyx_vtabstruct_14psycopg_binary_2pq_ViewBuffer *__pyx_vtab; unsigned char *buf; Py_ssize_t len; PyObject *obj; }; /* "psycopg_binary/pq/pgconn.pyx":47 * ) * * cdef class PGconn: # <<<<<<<<<<<<<< * @staticmethod * cdef PGconn _from_ptr(libpq.PGconn *ptr): */ struct __pyx_vtabstruct_14psycopg_binary_2pq_PGconn { struct __pyx_obj_14psycopg_binary_2pq_PGconn *(*_from_ptr)(PGconn *); int (*flush)(struct __pyx_obj_14psycopg_binary_2pq_PGconn *, int __pyx_skip_dispatch); PyObject *(*notifies)(struct __pyx_obj_14psycopg_binary_2pq_PGconn *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGconn *__pyx_vtabptr_14psycopg_binary_2pq_PGconn; /* "psycopg_binary/pq/pgresult.pyx":14 * * * @cython.freelist(8) # <<<<<<<<<<<<<< * cdef class PGresult: * def __cinit__(self): */ struct __pyx_vtabstruct_14psycopg_binary_2pq_PGresult { struct __pyx_obj_14psycopg_binary_2pq_PGresult *(*_from_ptr)(PGresult *); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGresult *__pyx_vtabptr_14psycopg_binary_2pq_PGresult; /* "psycopg_binary/pq/pgcancel.pyx":8 * * * cdef class PGcancelConn: # <<<<<<<<<<<<<< * def __cinit__(self): * self.pgcancelconn_ptr = NULL */ struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancelConn { struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *(*_from_ptr)(PGcancelConn *); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancelConn *__pyx_vtabptr_14psycopg_binary_2pq_PGcancelConn; /* "psycopg_binary/pq/pgcancel.pyx":79 * * * cdef class PGcancel: # <<<<<<<<<<<<<< * def __cinit__(self): * self.pgcancel_ptr = NULL */ struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancel { struct __pyx_obj_14psycopg_binary_2pq_PGcancel *(*_from_ptr)(PGcancel *); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancel *__pyx_vtabptr_14psycopg_binary_2pq_PGcancel; /* "psycopg_binary/pq/escaping.pyx":11 * * * cdef class Escaping: # <<<<<<<<<<<<<< * def __init__(self, PGconn conn = None): * self.conn = conn */ struct __pyx_vtabstruct_14psycopg_binary_2pq_Escaping { PyObject *(*escape_literal)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch); PyObject *(*escape_identifier)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch); PyObject *(*escape_string)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch); PyObject *(*escape_bytea)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch); PyObject *(*unescape_bytea)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, unsigned char const *, int __pyx_skip_dispatch); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_Escaping *__pyx_vtabptr_14psycopg_binary_2pq_Escaping; /* "psycopg_binary/pq/pqbuffer.pyx":13 * * * @cython.freelist(32) # <<<<<<<<<<<<<< * cdef class PQBuffer: * """ */ struct __pyx_vtabstruct_14psycopg_binary_2pq_PQBuffer { struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *(*_from_buffer)(unsigned char *, Py_ssize_t); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_PQBuffer *__pyx_vtabptr_14psycopg_binary_2pq_PQBuffer; /* "psycopg_binary/pq/pqbuffer.pyx":56 * * * @cython.freelist(32) # <<<<<<<<<<<<<< * cdef class ViewBuffer: * """ */ struct __pyx_vtabstruct_14psycopg_binary_2pq_ViewBuffer { struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *(*_from_buffer)(PyObject *, unsigned char *, Py_ssize_t); }; static struct __pyx_vtabstruct_14psycopg_binary_2pq_ViewBuffer *__pyx_vtabptr_14psycopg_binary_2pq_ViewBuffer; /* #### Code section: utility_code_proto ### */ /* --- Runtime support code (head) --- */ /* Refnanny.proto */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, Py_ssize_t); void (*DECREF)(void*, PyObject*, Py_ssize_t); void (*GOTREF)(void*, PyObject*, Py_ssize_t); void (*GIVEREF)(void*, PyObject*, Py_ssize_t); void* (*SetupContext)(const char*, Py_ssize_t, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContextNogil() {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __Pyx_RefNannyFinishContext();\ PyGILState_Release(__pyx_gilstate_save);\ } #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContextNogil() #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_Py_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; Py_XDECREF(tmp);\ } while (0) #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) /* PyErrExceptionMatches.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); #else #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) #endif /* PyThreadStateGet.proto (used by PyErrFetchRestore) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; #if PY_VERSION_HEX >= 0x030C00A6 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) #else #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) #endif #else #define __Pyx_PyThreadState_declare #define __Pyx_PyThreadState_assign #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() #endif /* PyErrFetchRestore.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) #else #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #endif #else #define __Pyx_PyErr_Clear() PyErr_Clear() #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif /* PyObjectGetAttrStr.proto (used by PyObjectGetAttrStrNoError) */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif /* PyObjectGetAttrStrNoError.proto (used by GetBuiltinName) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); /* GetBuiltinName.proto */ static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* TupleAndListFromArray.proto (used by fastcall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); #endif #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); #endif /* IncludeStringH.proto (used by BytesEquals) */ #include /* BytesEquals.proto (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /* UnicodeEquals.proto (used by fastcall) */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /* fastcall.proto */ #if CYTHON_AVOID_BORROWED_REFS #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_PySequence_ITEM(args, i) #elif CYTHON_ASSUME_SAFE_MACROS #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_NewRef(__Pyx_PyTuple_GET_ITEM(args, i)) #else #define __Pyx_ArgRef_VARARGS(args, i) __Pyx_XNewRef(PyTuple_GetItem(args, i)) #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) #if CYTHON_METH_FASTCALL #define __Pyx_ArgRef_FASTCALL(args, i) __Pyx_NewRef(args[i]) #define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif #else #define __Pyx_ArgRef_FASTCALL __Pyx_ArgRef_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS #endif #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) #if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(args + start, stop - start) #else #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) #endif /* PyDictVersioning.proto (used by GetModuleGlobalName) */ #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ (version_var) = __PYX_GET_DICT_VERSION(dict);\ (cache_var) = (value); #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ (VAR) = __Pyx_XNewRef(__pyx_dict_cached_value);\ } else {\ (VAR) = __pyx_dict_cached_value = (LOOKUP);\ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ }\ } static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); #else #define __PYX_GET_DICT_VERSION(dict) (0) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); #endif /* GetModuleGlobalName.proto */ #if CYTHON_USE_DICT_VERSIONS #define __Pyx_GetModuleGlobalName(var, name) do {\ static PY_UINT64_T __pyx_dict_version = 0;\ static PyObject *__pyx_dict_cached_value = NULL;\ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ PY_UINT64_T __pyx_dict_version;\ PyObject *__pyx_dict_cached_value;\ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ } while(0) static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); #else #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); #endif /* PyObjectFormatSimple.proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ PyObject_Format(s, f)) #elif CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\ likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\ PyObject_Format(s, f)) #else #define __Pyx_PyObject_FormatSimple(s, f) (\ likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\ PyObject_Format(s, f)) #endif /* PyObjectCall.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif /* PyObjectCallMethO.proto (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif /* PyObjectFastCall.proto (used by PyObjectCallOneArg) */ #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs); /* PyObjectCallOneArg.proto */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* JoinPyUnicode.export */ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); /* RaiseException.export */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /* 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); /* py_dict_items.proto (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /* CallCFunction.proto (used by CallUnboundCMethod0) */ #define __Pyx_CallCFunction(cfunc, self, args)\ ((PyCFunction)(void(*)(void))(cfunc)->func)(self, args) #define __Pyx_CallCFunctionWithKeywords(cfunc, self, args, kwargs)\ ((PyCFunctionWithKeywords)(void(*)(void))(cfunc)->func)(self, args, kwargs) #define __Pyx_CallCFunctionFast(cfunc, self, args, nargs)\ ((__Pyx_PyCFunctionFast)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs) #define __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, nargs, kwnames)\ ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))(PyCFunction)(cfunc)->func)(self, args, nargs, kwnames) /* UnpackUnboundCMethod.proto (used by CallUnboundCMethod0) */ typedef struct { PyObject *type; PyObject **method_name; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && CYTHON_ATOMICS __pyx_atomic_int_type initialized; #endif PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING static CYTHON_INLINE int __Pyx_CachedCFunction_GetAndSetInitializing(__Pyx_CachedCFunction *cfunc) { #if !CYTHON_ATOMICS return 1; #else __pyx_nonatomic_int_type expected = 0; if (__pyx_atomic_int_cmp_exchange(&cfunc->initialized, &expected, 1)) { return 0; } return expected; #endif } static CYTHON_INLINE void __Pyx_CachedCFunction_SetFinishedInitializing(__Pyx_CachedCFunction *cfunc) { #if CYTHON_ATOMICS __pyx_atomic_store(&cfunc->initialized, 2); #endif } #else #define __Pyx_CachedCFunction_GetAndSetInitializing(cfunc) 2 #define __Pyx_CachedCFunction_SetFinishedInitializing(cfunc) #endif /* CallUnboundCMethod0.proto */ CYTHON_UNUSED static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #else #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif /* py_dict_values.proto (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /* OwnedDictNext.proto (used by RejectKeywords) */ #if CYTHON_AVOID_BORROWED_REFS static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue); #else CYTHON_INLINE static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue); #endif /* RejectKeywords.export */ static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds); /* PyObjectFastCallMethod.proto */ #if CYTHON_VECTORCALL && PY_VERSION_HEX >= 0x03090000 #define __Pyx_PyObject_FastCallMethod(name, args, nargsf) PyObject_VectorcallMethod(name, args, nargsf, NULL) #else static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf); #endif /* WriteUnraisableException.proto */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil); /* PyObjectFormat.proto */ #if CYTHON_USE_UNICODE_WRITER static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); #else #define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) #endif /* PyMemoryError_Check.proto */ #define __Pyx_PyExc_MemoryError_Check(obj) __Pyx_TypeCheck(obj, PyExc_MemoryError) /* pyint_simplify.proto */ static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none); /* AssertionsEnabled.proto */ #if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000 static int __pyx_assertions_enabled_flag; #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag) #if __clang__ || __GNUC__ __attribute__((no_sanitize("thread"))) #endif static int __Pyx_init_assertions_enabled(void) { PyObject *builtins, *debug, *debug_str; int flag; builtins = PyEval_GetBuiltins(); if (!builtins) goto bad; debug_str = PyUnicode_FromStringAndSize("__debug__", 9); if (!debug_str) goto bad; debug = PyObject_GetItem(builtins, debug_str); Py_DECREF(debug_str); if (!debug) goto bad; flag = PyObject_IsTrue(debug); Py_DECREF(debug); if (flag == -1) goto bad; __pyx_assertions_enabled_flag = flag; return 0; bad: __pyx_assertions_enabled_flag = 1; return -1; } #else #define __Pyx_init_assertions_enabled() (0) #define __pyx_assertions_enabled() (!Py_OptimizeFlag) #endif /* PyAssertionError_Check.proto */ #define __Pyx_PyExc_AssertionError_Check(obj) __Pyx_TypeCheck(obj, PyExc_AssertionError) /* RaiseDoubleKeywords.proto (used by ParseKeywordsImpl) */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /* ParseKeywordsImpl.export */ static int __Pyx_ParseKeywordsTuple( PyObject *kwds, PyObject * const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs ); static int __Pyx_ParseKeywordDictToDict( PyObject *kwds, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name ); static int __Pyx_ParseKeywordDict( PyObject *kwds, PyObject ** const argnames[], PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs ); /* CallUnboundCMethod2.proto */ CYTHON_UNUSED static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); #else #define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) #endif /* ParseKeywords.proto */ static CYTHON_INLINE int __Pyx_ParseKeywords( PyObject *kwds, PyObject *const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs ); /* ArgTypeTestFunc.export */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /* ArgTypeTest.proto */ #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\ __Pyx__ArgTypeTest(obj, type, name, exact)) /* RaiseUnexpectedTypeError.proto */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj); /* RaiseUnboundLocalError.proto */ static void __Pyx_RaiseUnboundLocalError(const char *varname); /* PyTypeError_Check.proto */ #define __Pyx_PyExc_TypeError_Check(obj) __Pyx_TypeCheck(obj, PyExc_TypeError) /* ExtTypeTest.proto */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /* GetTopmostException.proto (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); #endif /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); #else #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) #endif /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); #endif /* SwapException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb) static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); #endif /* PyValueError_Check.proto */ #define __Pyx_PyExc_ValueError_Check(obj) __Pyx_TypeCheck(obj, PyExc_ValueError) /* BuildPyUnicode.proto (used by COrdinalToPyUnicode) */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, int prepend_sign, char padding_char); /* COrdinalToPyUnicode.proto (used by CIntToPyUnicode) */ static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value); static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t width, char padding_char); /* GCCDiagnostics.proto (used by CIntToPyUnicode) */ #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) #define __Pyx_HAS_GCC_DIAGNOSTIC #endif /* IncludeStdlibH.proto (used by CIntToPyUnicode) */ #include /* CIntToPyUnicode.proto */ #define __Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char) (\ ((format_char) == ('c')) ?\ __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char) :\ __Pyx____Pyx_PyUnicode_From_Py_ssize_t(value, width, padding_char, format_char)\ ) static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char); static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck, unsafe_shared) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck, int unsafe_shared); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck, has_gil, unsafe_shared)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck, unsafe_shared) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck, int unsafe_shared); static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck, int unsafe_shared); /* decode_c_string_utf16.proto (used by decode_c_string) */ 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)); /* 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); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 L->ob_item[len] = x; #else PyList_SET_ITEM(list, len, x); #endif __Pyx_SET_SIZE(list, len + 1); return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif /* PyObjectVectorCallKwBuilder.proto */ CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); #if CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03090000 #define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall #else #define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall #endif #define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); #else #define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict #define __Pyx_MakeVectorcallBuilderKwds(n) __Pyx_PyDict_NewPresized(n) #define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) #define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) #endif /* GetAttr3.proto */ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /* AllocateExtensionType.proto */ static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final); /* CallTypeTraverse.proto */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 #else static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); #endif /* CheckTypeForFreelists.proto */ #if CYTHON_USE_FREELISTS #if CYTHON_USE_TYPE_SPECS #define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t) == (expected_tp))) #define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS Py_TPFLAGS_IS_ABSTRACT #else #define __PYX_CHECK_FINAL_TYPE_FOR_FREELISTS(t, expected_tp, expected_size) ((int) ((t)->tp_basicsize == (expected_size))) #define __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE) #endif #define __PYX_CHECK_TYPE_FOR_FREELISTS(t, expected_tp, expected_size)\ (__PYX_CHECK_FINAL_TYPE_FOR_FREELISTS((t), (expected_tp), (expected_size)) &\ (int) (!__Pyx_PyType_HasFeature((t), __PYX_CHECK_TYPE_FOR_FREELIST_FLAGS))) #endif /* FunctionExport.proto */ static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig); /* GetApiDict.proto */ static PyObject *__Pyx_ApiExport_GetApiDict(void); /* LimitedApiGetTypeDict.proto (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp); #endif /* SetItemOnTypeDict.proto (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v); #define __Pyx_SetItemOnTypeDict(tp, k, v) __Pyx__SetItemOnTypeDict((PyTypeObject*)tp, k, v) /* FixUpExtensionType.proto */ static CYTHON_INLINE int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); /* PyObjectCallNoArg.proto (used by PyObjectCallMethod0) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /* PyObjectGetMethod.proto (used by PyObjectCallMethod0) */ #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); #endif /* PyObjectCallMethod0.proto (used by PyType_Ready) */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /* ValidateBasesTuple.proto (used by PyType_Ready) */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases); #endif /* PyType_Ready.proto */ CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t); /* SetVTable.proto */ static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable); /* GetVTable.proto (used by MergeVTables) */ static void* __Pyx_GetVtable(PyTypeObject *type); /* MergeVTables.proto */ static int __Pyx_MergeVtables(PyTypeObject *type); /* DelItemOnTypeDict.proto (used by SetupReduce) */ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k); #define __Pyx_DelItemOnTypeDict(tp, k) __Pyx__DelItemOnTypeDict((PyTypeObject*)tp, k) /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); /* TypeImport.proto */ #ifndef __PYX_HAVE_RT_ImportType_proto_3_2_2 #define __PYX_HAVE_RT_ImportType_proto_3_2_2 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L #define __PYX_GET_STRUCT_ALIGNMENT_3_2_2(s) alignof(s) #else #define __PYX_GET_STRUCT_ALIGNMENT_3_2_2(s) sizeof(void*) #endif enum __Pyx_ImportType_CheckSize_3_2_2 { __Pyx_ImportType_CheckSize_Error_3_2_2 = 0, __Pyx_ImportType_CheckSize_Warn_3_2_2 = 1, __Pyx_ImportType_CheckSize_Ignore_3_2_2 = 2 }; static PyTypeObject *__Pyx_ImportType_3_2_2(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_2 check_size); #endif /* HasAttr.proto (used by ImportImpl) */ #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_HasAttr(o, n) PyObject_HasAttrWithError(o, n) #else static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); #endif /* ImportImpl.export */ static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level); /* Import.proto */ static CYTHON_INLINE PyObject *__Pyx_Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, int level); /* ImportFrom.proto */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /* dict_setdefault.proto (used by FetchCommonType) */ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value); /* AddModuleRef.proto (used by FetchSharedCythonModule) */ #if ((CYTHON_COMPILING_IN_CPYTHON_FREETHREADING ) ||\ __PYX_LIMITED_VERSION_HEX < 0x030d0000) static PyObject *__Pyx_PyImport_AddModuleRef(const char *name); #else #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #endif /* FetchSharedCythonModule.proto (used by FetchCommonType) */ static PyObject *__Pyx_FetchSharedCythonABIModule(void); /* FetchCommonType.proto (used by CommonTypesMetaclass) */ static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases); /* CommonTypesMetaclass.proto (used by CythonFunctionShared) */ static int __pyx_CommonTypesMetaclass_init(PyObject *module); #define __Pyx_CommonTypesMetaclass_USED /* PyMethodNew.proto (used by CythonFunctionShared) */ static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); /* PyVectorcallFastCallDict.proto (used by CythonFunctionShared) */ #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); #endif /* CythonFunctionShared.proto (used by CythonFunction) */ #define __Pyx_CyFunction_USED #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CYFUNCTION_COROUTINE 0x08 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #else #define __Pyx_CyFunction_GetClassObj(f)\ ((PyObject*) ((PyCMethodObject *) (f))->mm_class) #endif #define __Pyx_CyFunction_SetClassObj(f, classobj)\ __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { #if CYTHON_COMPILING_IN_LIMITED_API PyObject_HEAD PyObject *func; #elif PY_VERSION_HEX < 0x030900B1 PyCFunctionObject func; #else PyCMethodObject func; #endif #if CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL __pyx_vectorcallfunc func_vectorcall; #endif #if CYTHON_COMPILING_IN_LIMITED_API PyObject *func_weakreflist; #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_dict; #endif PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API PyObject *func_classobj; #endif PyObject *defaults; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; PyObject *func_is_coroutine; } __pyx_CyFunctionObject; #undef __Pyx_CyOrPyCFunction_Check #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)); #undef __Pyx_IsSameCFunction #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(PyObject *module); #if CYTHON_METH_FASTCALL static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) #else #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) #endif #endif /* CythonFunction.proto */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject *globals, PyObject* code); /* ClassMethod.proto */ #if !CYTHON_COMPILING_IN_LIMITED_API #include "descrobject.h" #endif CYTHON_UNUSED static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* GetNameInClass.proto */ #define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* SetNameInClass.proto */ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) #elif CYTHON_COMPILING_IN_CPYTHON #define __Pyx_SetNameInClass(ns, name, value)\ (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) #else #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) #endif /* CalculateMetaclass.proto (used by Py3ClassCreate) */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); /* PyObjectCall2Args.proto (used by Py3ClassCreate) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* PyObjectLookupSpecial.proto (used by Py3ClassCreate) */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); #else #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) #endif /* Py3ClassCreate.proto */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /* CLineInTraceback.proto (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); #else #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) #endif /* CodeObjectCache.proto (used by AddTraceback) */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject __Pyx_CachedCodeObjectType; #else typedef PyCodeObject __Pyx_CachedCodeObjectType; #endif typedef struct { __Pyx_CachedCodeObjectType* code_object; int code_line; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_atomic_int_type accessor_count; #endif }; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); /* AddTraceback.proto */ static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); /* CheckUnpickleChecksum.proto */ static CYTHON_INLINE int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); /* CIntFromPy.proto */ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PGPing(PGPing value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ConnStatusType(ConnStatusType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PGTransactionStatusType(PGTransactionStatusType value); /* CIntFromPy.proto */ static CYTHON_INLINE Oid __Pyx_PyLong_As_Oid(PyObject *); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ExecStatusType(ExecStatusType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PGpipelineStatus(PGpipelineStatus value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_Oid(Oid value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PostgresPollingStatusType(PostgresPollingStatusType value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); /* PyObjectCallMethod1.proto */ static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /* UpdateUnpickledDict.proto */ static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index); /* FormatTypeName.proto */ #if CYTHON_COMPILING_IN_LIMITED_API typedef PyObject *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%U" #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyType_GetFullyQualifiedName PyType_GetFullyQualifiedName #else static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp); #endif #else // !LIMITED_API typedef const char *__Pyx_TypeName; #define __Pyx_FMT_TYPENAME "%.200s" #define __Pyx_PyType_GetFullyQualifiedName(tp) ((tp)->tp_name) #define __Pyx_DECREF_TypeName(obj) #endif /* FastTypeChecks.proto */ #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); #else #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); } #endif #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) #ifdef PyExceptionInstance_Check #define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) #else #define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) #endif /* GetRuntimeVersion.proto */ #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 static unsigned long __Pyx_cached_runtime_version = 0; static void __Pyx_init_runtime_version(void); #else #define __Pyx_init_runtime_version() #endif static unsigned long __Pyx_get_runtime_version(void); /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); /* DecompressString.proto */ static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo); /* MultiPhaseInitModuleState.proto */ #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE static PyObject *__Pyx_State_FindModule(void*); static int __Pyx_State_AddModule(PyObject* module, void*); static int __Pyx_State_RemoveModule(void*); #elif CYTHON_USE_MODULE_STATE #define __Pyx_State_FindModule PyState_FindModule #define __Pyx_State_AddModule PyState_AddModule #define __Pyx_State_RemoveModule PyState_RemoveModule #endif /* #### Code section: module_declarations ### */ /* CythonABIVersion.proto */ #if CYTHON_COMPILING_IN_LIMITED_API #if CYTHON_METH_FASTCALL #define __PYX_FASTCALL_ABI_SUFFIX "_fastcall" #else #define __PYX_FASTCALL_ABI_SUFFIX #endif #define __PYX_LIMITED_ABI_SUFFIX "limited" __PYX_FASTCALL_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX #else #define __PYX_LIMITED_ABI_SUFFIX #endif #if __PYX_HAS_PY_AM_SEND == 1 #define __PYX_AM_SEND_ABI_SUFFIX #elif __PYX_HAS_PY_AM_SEND == 2 #define __PYX_AM_SEND_ABI_SUFFIX "amsendbackport" #else #define __PYX_AM_SEND_ABI_SUFFIX "noamsend" #endif #ifndef __PYX_MONITORING_ABI_SUFFIX #define __PYX_MONITORING_ABI_SUFFIX #endif #if CYTHON_USE_TP_FINALIZE #define __PYX_TP_FINALIZE_ABI_SUFFIX #else #define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" #endif #if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) #define __PYX_FREELISTS_ABI_SUFFIX #else #define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" #endif #define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX __PYX_AM_SEND_ABI_SUFFIX #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_f_14psycopg_binary_2pq_6PGconn__from_ptr(PGconn *__pyx_v_ptr); /* proto*/ static int __pyx_f_14psycopg_binary_2pq_6PGconn_flush(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_6PGconn_notifies(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(PGresult *__pyx_v_ptr); /* proto*/ static struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_f_14psycopg_binary_2pq_12PGcancelConn__from_ptr(PGcancelConn *__pyx_v_ptr); /* proto*/ static struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_f_14psycopg_binary_2pq_8PGcancel__from_ptr(PGcancel *__pyx_v_ptr); /* proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_literal(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_identifier(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_string(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_unescape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, unsigned char const *__pyx_v_data, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_f_14psycopg_binary_2pq_8PQBuffer__from_buffer(unsigned char *__pyx_v_buf, Py_ssize_t __pyx_v_length); /* proto*/ static struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_f_14psycopg_binary_2pq_10ViewBuffer__from_buffer(PyObject *__pyx_v_obj, unsigned char *__pyx_v_buf, Py_ssize_t __pyx_v_length); /* proto*/ /* Module declarations from "psycopg_binary.pq.libpq" */ /* Module declarations from "libc.string" */ /* Module declarations from "libc.stdio" */ /* Module declarations from "cpython.mem" */ /* Module declarations from "__builtin__" */ /* Module declarations from "cpython.type" */ /* Module declarations from "cpython" */ /* Module declarations from "cpython.object" */ /* Module declarations from "cpython.bytes" */ /* Module declarations from "cpython.sequence" */ /* Module declarations from "cpython.memoryview" */ /* Module declarations from "cython" */ /* Module declarations from "cpython.buffer" */ /* Module declarations from "psycopg_binary.pq" */ static int __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(PyObject *, char **, Py_ssize_t *); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq__check_supported(PyObject *, int); /*proto*/ static int __pyx_f_14psycopg_binary_2pq__ensure_pgconn(struct __pyx_obj_14psycopg_binary_2pq_PGconn *); /*proto*/ static char *__pyx_f_14psycopg_binary_2pq__call_bytes(struct __pyx_obj_14psycopg_binary_2pq_PGconn *, __pyx_t_14psycopg_binary_2pq_conn_bytes_f); /*proto*/ static int __pyx_f_14psycopg_binary_2pq__call_int(struct __pyx_obj_14psycopg_binary_2pq_PGconn *, __pyx_t_14psycopg_binary_2pq_conn_int_f); /*proto*/ static void __pyx_f_14psycopg_binary_2pq_notice_receiver(void *, PGresult const *); /*proto*/ static __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_f_14psycopg_binary_2pq__query_params_args(PyObject *, PyObject *, PyObject *); /*proto*/ static void __pyx_f_14psycopg_binary_2pq__clear_query_params(Oid *, char *const *, int *, int *); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq__options_from_array(PQconninfoOption *); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq___pyx_unpickle_Escaping__set_state(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *); /*proto*/ /* #### Code section: typeinfo ### */ /* #### Code section: before_global_var ### */ #define __Pyx_MODULE_NAME "psycopg_binary.pq" extern int __pyx_module_is_main_psycopg_binary__pq; int __pyx_module_is_main_psycopg_binary__pq = 0; /* Implementation of "psycopg_binary.pq" */ /* #### Code section: global_var ### */ static PyObject *__pyx_builtin_id; /* #### Code section: string_decls ### */ static const char __pyx_k_w[] = "w"; static const char __pyx_k_UTF8[] = "UTF8"; static const char __pyx_k_conn[] = "conn"; static const char __pyx_k_ignore[] = "ignore"; static const char __pyx_k_replace[] = "replace"; static const char __pyx_k_client_encoding[] = "client_encoding"; static const char __pyx_k_libpq_Python_wrapper_using_cyth[] = "\nlibpq Python wrapper using cython bindings.\n"; /* #### Code section: decls ### */ static PyObject *__pyx_pf_14psycopg_binary_2pq_version(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_6PGconn___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_6PGconn_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4__repr__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pf_14psycopg_binary_2pq_6PGconn_6connect(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, char const *__pyx_v_conninfo); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pf_14psycopg_binary_2pq_6PGconn_8connect_start(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, char const *__pyx_v_conninfo); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_10connect_poll(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_12finish(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_10pgconn_ptr___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4info___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14reset(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_16reset_start(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_18reset_poll(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_20ping(CYTHON_UNUSED PyTypeObject *__pyx_v_self, char const *__pyx_v_conninfo); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_2db___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4user___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_8password___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4host___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_8hostaddr___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4port___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_3tty___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_7options___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_6status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_18transaction_status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_22parameter_status(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_13error_message___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_24get_error_message(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_9_encoding___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_16protocol_version___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_21full_protocol_version___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14server_version___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_6socket___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_11backend_pid___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14needs_password___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_13used_password___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_11used_gssapi___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_10ssl_in_use___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_26exec_(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_28send_query(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_30exec_params(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_types, PyObject *__pyx_v_param_formats, int __pyx_v_result_format); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_32send_query_params(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_types, PyObject *__pyx_v_param_formats, int __pyx_v_result_format); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_34send_prepare(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, char const *__pyx_v_command, PyObject *__pyx_v_param_types); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_36send_query_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_formats, int __pyx_v_result_format); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_38prepare(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, char const *__pyx_v_command, PyObject *__pyx_v_param_types); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_40exec_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_formats, int __pyx_v_result_format); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_42describe_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_44send_describe_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_46describe_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_48send_describe_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_50close_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_52send_close_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_54close_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_56send_close_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_58get_result(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_60consume_input(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_62is_busy(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_11nonblocking___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_6PGconn_11nonblocking_2__set__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_64flush(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_66set_single_row_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_68set_chunked_rows_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_pf_14psycopg_binary_2pq_6PGconn_70cancel_conn(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_pf_14psycopg_binary_2pq_6PGconn_72get_cancel(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_74notifies(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_76put_copy_data(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_buffer); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_78put_copy_end(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_error); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_80get_copy_data(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_v_async_); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_82trace(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_fileno); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_84set_trace_flags(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_flags); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_86untrace(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_88encrypt_password(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_passwd, char const *__pyx_v_user, PyObject *__pyx_v_algorithm); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_90change_password(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_user, char const *__pyx_v_passwd); /* proto */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_92make_empty_result(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_v_exec_status); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_15pipeline_status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_94enter_pipeline_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_96exit_pipeline_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_98pipeline_sync(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_100send_flush_request(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler_2__set__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler_4__del__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler_2__set__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler_4__del__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_102__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_104__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_8PGresult___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_8PGresult_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_4__repr__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_6clear(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_12pgresult_ptr___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_6status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_13error_message___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_8get_error_message(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_10error_field(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_fieldcode); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_7ntuples___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_7nfields___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_12fname(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_14ftable(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_16ftablecol(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_18fformat(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_20ftype(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_22fmod(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_24fsize(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_13binary_tuples___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_26get_value(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_row_number, int __pyx_v_column_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_7nparams___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_28param_type(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_param_number); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_14command_status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_14command_tuples___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_9oid_value___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_30set_attributes(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, PyObject *__pyx_v_descriptions); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_12PGcancelConn___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_4start(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6blocking(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_8poll(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6socket___get__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_13error_message___get__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_10get_error_message(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_12reset(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_14finish(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_16_ensure_pgcancelconn(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_8PGcancel___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_8PGcancel_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_4free(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_6cancel(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Conninfo_get_defaults(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Conninfo_2parse(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, char const *__pyx_v_conninfo); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Conninfo_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_8Escaping___init__(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_conn); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_2escape_literal(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_4escape_identifier(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_6escape_string(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_8escape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_10unescape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, unsigned char const *__pyx_v_data); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_12__reduce_cython__(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_14__setstate_cython__(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_8PQBuffer___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_8PQBuffer_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PQBuffer_4__repr__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_8PQBuffer_6__getbuffer__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_8PQBuffer_8__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PQBuffer_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_8PQBuffer_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_10ViewBuffer___cinit__(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_10ViewBuffer_2__repr__(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self); /* proto */ static int __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_4__getbuffer__(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */ static void __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_6__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_10ViewBuffer_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_10ViewBuffer_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_14psycopg_binary_2pq_2__pyx_unpickle_Escaping(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGconn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGresult(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGcancelConn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGcancel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_Escaping(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PQBuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14psycopg_binary_2pq_ViewBuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ /* SmallCodeConfig */ #ifndef CYTHON_SMALL_CODE #if defined(__clang__) #define CYTHON_SMALL_CODE #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) #define CYTHON_SMALL_CODE __attribute__((cold)) #else #define CYTHON_SMALL_CODE #endif #endif typedef struct { PyObject *__pyx_d; PyObject *__pyx_b; PyObject *__pyx_cython_runtime; PyObject *__pyx_empty_tuple; PyObject *__pyx_empty_bytes; PyObject *__pyx_empty_unicode; PyTypeObject *__pyx_ptype_7cpython_4type_type; PyObject *__pyx_type_14psycopg_binary_2pq_PGconn; PyObject *__pyx_type_14psycopg_binary_2pq_PGresult; PyObject *__pyx_type_14psycopg_binary_2pq_PGcancelConn; PyObject *__pyx_type_14psycopg_binary_2pq_PGcancel; PyObject *__pyx_type_14psycopg_binary_2pq_Escaping; PyObject *__pyx_type_14psycopg_binary_2pq_PQBuffer; PyObject *__pyx_type_14psycopg_binary_2pq_ViewBuffer; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_PGconn; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_PGresult; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_PGcancelConn; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_PGcancel; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_Escaping; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_PQBuffer; PyTypeObject *__pyx_ptype_14psycopg_binary_2pq_ViewBuffer; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values; int __pyx_k__6; int __pyx_k__7; int __pyx_k__8; int __pyx_k__9; PyObject *__pyx_tuple[5]; PyObject *__pyx_codeobj_tab[94]; PyObject *__pyx_string_tab[522]; PyObject *__pyx_number_tab[1]; /* #### Code section: module_state_contents ### */ #if CYTHON_USE_FREELISTS struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_freelist_14psycopg_binary_2pq_PGresult[8]; int __pyx_freecount_14psycopg_binary_2pq_PGresult; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_freelist_14psycopg_binary_2pq_PQBuffer[32]; int __pyx_freecount_14psycopg_binary_2pq_PQBuffer; #endif #if CYTHON_USE_FREELISTS struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_freelist_14psycopg_binary_2pq_ViewBuffer[32]; int __pyx_freecount_14psycopg_binary_2pq_ViewBuffer; #endif /* CommonTypesMetaclass.module_state_decls */ PyTypeObject *__pyx_CommonTypesMetaclassType; /* CachedMethodType.module_state_decls */ #if CYTHON_COMPILING_IN_LIMITED_API PyObject *__Pyx_CachedMethodType; #endif /* CythonFunctionShared.module_state_decls */ PyTypeObject *__pyx_CyFunctionType; /* CodeObjectCache.module_state_decls */ struct __Pyx_CodeObjectCache __pyx_code_cache; /* #### Code section: module_state_end ### */ } __pyx_mstatetype; #if CYTHON_USE_MODULE_STATE #ifdef __cplusplus namespace { extern struct PyModuleDef __pyx_moduledef; } /* anonymous namespace */ #else static struct PyModuleDef __pyx_moduledef; #endif #define __pyx_mstate_global (__Pyx_PyModule_GetState(__Pyx_State_FindModule(&__pyx_moduledef))) #define __pyx_m (__Pyx_State_FindModule(&__pyx_moduledef)) #else static __pyx_mstatetype __pyx_mstate_global_static = #ifdef __cplusplus {}; #else {0}; #endif static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_static; #endif /* #### Code section: constant_name_defines ### */ #define __pyx_kp_u_ __pyx_string_tab[0] #define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[1] #define __pyx_kp_u_PGresult_None __pyx_string_tab[2] #define __pyx_kp_u_PQsendFlushRequest __pyx_string_tab[3] #define __pyx_kp_u_PQsetResultAttrs_failed __pyx_string_tab[4] #define __pyx_kp_u_Sequence_bytes_None __pyx_string_tab[5] #define __pyx_kp_u_Sequence_bytes_None_None __pyx_string_tab[6] #define __pyx_kp_u_Sequence_int_None __pyx_string_tab[7] #define __pyx_kp_u__10 __pyx_string_tab[8] #define __pyx_kp_u__11 __pyx_string_tab[9] #define __pyx_kp_u__12 __pyx_string_tab[10] #define __pyx_kp_u__13 __pyx_string_tab[11] #define __pyx_kp_u__14 __pyx_string_tab[12] #define __pyx_kp_u__15 __pyx_string_tab[13] #define __pyx_kp_u__2 __pyx_string_tab[14] #define __pyx_kp_u__3 __pyx_string_tab[15] #define __pyx_kp_u__4 __pyx_string_tab[16] #define __pyx_kp_u__5 __pyx_string_tab[17] #define __pyx_kp_u_add_note __pyx_string_tab[18] #define __pyx_kp_u_at_0x __pyx_string_tab[19] #define __pyx_kp_u_at_0x_2 __pyx_string_tab[20] #define __pyx_kp_u_available_instead __pyx_string_tab[21] #define __pyx_kp_u_bytes __pyx_string_tab[22] #define __pyx_kp_u_bytes_None __pyx_string_tab[23] #define __pyx_kp_u_bytes_or_buffer_expected_got __pyx_string_tab[24] #define __pyx_kp_u_cancel_connection_not_opened __pyx_string_tab[25] #define __pyx_kp_u_cancel_failed __pyx_string_tab[26] #define __pyx_kp_u_close_prepared_failed __pyx_string_tab[27] #define __pyx_kp_u_connection_not_in_pipeline_mode __pyx_string_tab[28] #define __pyx_kp_u_consuming_input_failed __pyx_string_tab[29] #define __pyx_kp_u_couldn_t_allocate_PGconn __pyx_string_tab[30] #define __pyx_kp_u_couldn_t_allocate_connection_def __pyx_string_tab[31] #define __pyx_kp_u_couldn_t_allocate_connection_inf __pyx_string_tab[32] #define __pyx_kp_u_couldn_t_allocate_empty_PGresult __pyx_string_tab[33] #define __pyx_kp_u_couldn_t_allocate_for_escape_byt __pyx_string_tab[34] #define __pyx_kp_u_couldn_t_allocate_for_unescape_b __pyx_string_tab[35] #define __pyx_kp_u_couldn_t_allocate_on_conninfo_pa __pyx_string_tab[36] #define __pyx_kp_u_couldn_t_create_cancelConn_objec __pyx_string_tab[37] #define __pyx_kp_u_couldn_t_create_cancel_object __pyx_string_tab[38] #define __pyx_kp_u_couldn_t_reset_connection __pyx_string_tab[39] #define __pyx_kp_u_couldn_t_send_cancellation __pyx_string_tab[40] #define __pyx_kp_u_currently_only_supported_on_Linu __pyx_string_tab[41] #define __pyx_kp_u_describe_prepared_failed __pyx_string_tab[42] #define __pyx_kp_u_disable __pyx_string_tab[43] #define __pyx_kp_u_enable __pyx_string_tab[44] #define __pyx_kp_u_error_in_notice_receiver_s __pyx_string_tab[45] #define __pyx_kp_u_escape_identifier_failed __pyx_string_tab[46] #define __pyx_kp_u_escape_identifier_failed_no_conn __pyx_string_tab[47] #define __pyx_kp_u_escape_literal_failed __pyx_string_tab[48] #define __pyx_kp_u_escape_literal_failed_no_connect __pyx_string_tab[49] #define __pyx_kp_u_escape_string_failed __pyx_string_tab[50] #define __pyx_kp_u_executing_prepared_query_failed __pyx_string_tab[51] #define __pyx_kp_u_executing_query_failed __pyx_string_tab[52] #define __pyx_kp_u_failed_to_enter_pipeline_mode __pyx_string_tab[53] #define __pyx_kp_u_failed_to_sync_pipeline __pyx_string_tab[54] #define __pyx_kp_u_flush_request_failed __pyx_string_tab[55] #define __pyx_kp_u_flushing_failed __pyx_string_tab[56] #define __pyx_kp_u_flushing_failed_the_connection_i __pyx_string_tab[57] #define __pyx_kp_u_gc __pyx_string_tab[58] #define __pyx_kp_u_got __pyx_string_tab[59] #define __pyx_kp_u_isenabled __pyx_string_tab[60] #define __pyx_kp_u_list_ConninfoOption __pyx_string_tab[61] #define __pyx_kp_u_list_PGresAttDesc __pyx_string_tab[62] #define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[63] #define __pyx_kp_u_on_the_client_version __pyx_string_tab[64] #define __pyx_kp_u_param_formats_2 __pyx_string_tab[65] #define __pyx_kp_u_param_types_2 __pyx_string_tab[66] #define __pyx_kp_u_param_values_but __pyx_string_tab[67] #define __pyx_kp_u_password_encryption_failed __pyx_string_tab[68] #define __pyx_kp_u_preparing_query_failed __pyx_string_tab[69] #define __pyx_kp_u_psycopg_binary_pq_conninfo_pyx __pyx_string_tab[70] #define __pyx_kp_u_psycopg_binary_pq_escaping_pyx __pyx_string_tab[71] #define __pyx_kp_u_psycopg_binary_pq_pgcancel_pyx __pyx_string_tab[72] #define __pyx_kp_u_psycopg_binary_pq_pgconn_pyx __pyx_string_tab[73] #define __pyx_kp_u_psycopg_binary_pq_pgresult_pyx __pyx_string_tab[74] #define __pyx_kp_u_psycopg_binary_pq_pyx __pyx_string_tab[75] #define __pyx_kp_u_receiving_copy_data_failed __pyx_string_tab[76] #define __pyx_kp_u_requires_libpq_from_PostgreSQL __pyx_string_tab[77] #define __pyx_kp_u_self_conn_is_not_None __pyx_string_tab[78] #define __pyx_kp_u_sending_close_prepared_failed __pyx_string_tab[79] #define __pyx_kp_u_sending_copy_data_failed __pyx_string_tab[80] #define __pyx_kp_u_sending_copy_end_failed __pyx_string_tab[81] #define __pyx_kp_u_sending_describe_prepared_failed __pyx_string_tab[82] #define __pyx_kp_u_sending_prepared_query_failed __pyx_string_tab[83] #define __pyx_kp_u_sending_query_and_params_failed __pyx_string_tab[84] #define __pyx_kp_u_sending_query_failed __pyx_string_tab[85] #define __pyx_kp_u_setting_chunked_rows_mode_failed __pyx_string_tab[86] #define __pyx_kp_u_setting_nonblocking_failed __pyx_string_tab[87] #define __pyx_kp_u_setting_single_row_mode_failed __pyx_string_tab[88] #define __pyx_kp_u_stringsource __pyx_string_tab[89] #define __pyx_kp_u_the_cancel_connection_is_closed __pyx_string_tab[90] #define __pyx_kp_u_the_connection_is_closed __pyx_string_tab[91] #define __pyx_kp_u_the_connection_is_lost __pyx_string_tab[92] #define __pyx_kp_u_tuple_int_memoryview __pyx_string_tab[93] #define __pyx_kp_u_utf_8 __pyx_string_tab[94] #define __pyx_n_u_COMMAND_OK __pyx_string_tab[95] #define __pyx_n_u_Conninfo __pyx_string_tab[96] #define __pyx_n_u_ConninfoOption __pyx_string_tab[97] #define __pyx_n_u_Conninfo___repr __pyx_string_tab[98] #define __pyx_n_u_Conninfo_get_defaults __pyx_string_tab[99] #define __pyx_n_u_Conninfo_parse __pyx_string_tab[100] #define __pyx_n_u_Escaping __pyx_string_tab[101] #define __pyx_n_u_Escaping___reduce_cython __pyx_string_tab[102] #define __pyx_n_u_Escaping___setstate_cython __pyx_string_tab[103] #define __pyx_n_u_Escaping_escape_bytea __pyx_string_tab[104] #define __pyx_n_u_Escaping_escape_identifier __pyx_string_tab[105] #define __pyx_n_u_Escaping_escape_literal __pyx_string_tab[106] #define __pyx_n_u_Escaping_escape_string __pyx_string_tab[107] #define __pyx_n_u_Escaping_unescape_bytea __pyx_string_tab[108] #define __pyx_n_u_ExecStatus __pyx_string_tab[109] #define __pyx_n_u_Format __pyx_string_tab[110] #define __pyx_n_u_None __pyx_string_tab[111] #define __pyx_n_u_NotSupportedError __pyx_string_tab[112] #define __pyx_n_u_OperationalError __pyx_string_tab[113] #define __pyx_n_u_PGcancel __pyx_string_tab[114] #define __pyx_n_u_PGcancelConn __pyx_string_tab[115] #define __pyx_n_u_PGcancelConn___reduce_cython __pyx_string_tab[116] #define __pyx_n_u_PGcancelConn___setstate_cython __pyx_string_tab[117] #define __pyx_n_u_PGcancelConn__ensure_pgcancelcon __pyx_string_tab[118] #define __pyx_n_u_PGcancelConn_blocking __pyx_string_tab[119] #define __pyx_n_u_PGcancelConn_finish __pyx_string_tab[120] #define __pyx_n_u_PGcancelConn_get_error_message __pyx_string_tab[121] #define __pyx_n_u_PGcancelConn_poll __pyx_string_tab[122] #define __pyx_n_u_PGcancelConn_reset __pyx_string_tab[123] #define __pyx_n_u_PGcancelConn_start __pyx_string_tab[124] #define __pyx_n_u_PGcancel___reduce_cython __pyx_string_tab[125] #define __pyx_n_u_PGcancel___setstate_cython __pyx_string_tab[126] #define __pyx_n_u_PGcancel_cancel __pyx_string_tab[127] #define __pyx_n_u_PGcancel_free __pyx_string_tab[128] #define __pyx_n_u_PGconn __pyx_string_tab[129] #define __pyx_n_u_PGconn___reduce_cython __pyx_string_tab[130] #define __pyx_n_u_PGconn___setstate_cython __pyx_string_tab[131] #define __pyx_n_u_PGconn_cancel_conn __pyx_string_tab[132] #define __pyx_n_u_PGconn_change_password __pyx_string_tab[133] #define __pyx_n_u_PGconn_close_portal __pyx_string_tab[134] #define __pyx_n_u_PGconn_close_prepared __pyx_string_tab[135] #define __pyx_n_u_PGconn_connect __pyx_string_tab[136] #define __pyx_n_u_PGconn_connect_poll __pyx_string_tab[137] #define __pyx_n_u_PGconn_connect_start __pyx_string_tab[138] #define __pyx_n_u_PGconn_consume_input __pyx_string_tab[139] #define __pyx_n_u_PGconn_describe_portal __pyx_string_tab[140] #define __pyx_n_u_PGconn_describe_prepared __pyx_string_tab[141] #define __pyx_n_u_PGconn_encrypt_password __pyx_string_tab[142] #define __pyx_n_u_PGconn_enter_pipeline_mode __pyx_string_tab[143] #define __pyx_n_u_PGconn_exec __pyx_string_tab[144] #define __pyx_n_u_PGconn_exec_params __pyx_string_tab[145] #define __pyx_n_u_PGconn_exec_prepared __pyx_string_tab[146] #define __pyx_n_u_PGconn_exit_pipeline_mode __pyx_string_tab[147] #define __pyx_n_u_PGconn_finish __pyx_string_tab[148] #define __pyx_n_u_PGconn_flush __pyx_string_tab[149] #define __pyx_n_u_PGconn_get_cancel __pyx_string_tab[150] #define __pyx_n_u_PGconn_get_copy_data __pyx_string_tab[151] #define __pyx_n_u_PGconn_get_error_message __pyx_string_tab[152] #define __pyx_n_u_PGconn_get_result __pyx_string_tab[153] #define __pyx_n_u_PGconn_is_busy __pyx_string_tab[154] #define __pyx_n_u_PGconn_make_empty_result __pyx_string_tab[155] #define __pyx_n_u_PGconn_notifies __pyx_string_tab[156] #define __pyx_n_u_PGconn_parameter_status __pyx_string_tab[157] #define __pyx_n_u_PGconn_ping __pyx_string_tab[158] #define __pyx_n_u_PGconn_pipeline_sync __pyx_string_tab[159] #define __pyx_n_u_PGconn_prepare __pyx_string_tab[160] #define __pyx_n_u_PGconn_put_copy_data __pyx_string_tab[161] #define __pyx_n_u_PGconn_put_copy_end __pyx_string_tab[162] #define __pyx_n_u_PGconn_reset __pyx_string_tab[163] #define __pyx_n_u_PGconn_reset_poll __pyx_string_tab[164] #define __pyx_n_u_PGconn_reset_start __pyx_string_tab[165] #define __pyx_n_u_PGconn_send_close_portal __pyx_string_tab[166] #define __pyx_n_u_PGconn_send_close_prepared __pyx_string_tab[167] #define __pyx_n_u_PGconn_send_describe_portal __pyx_string_tab[168] #define __pyx_n_u_PGconn_send_describe_prepared __pyx_string_tab[169] #define __pyx_n_u_PGconn_send_flush_request __pyx_string_tab[170] #define __pyx_n_u_PGconn_send_prepare __pyx_string_tab[171] #define __pyx_n_u_PGconn_send_query __pyx_string_tab[172] #define __pyx_n_u_PGconn_send_query_params __pyx_string_tab[173] #define __pyx_n_u_PGconn_send_query_prepared __pyx_string_tab[174] #define __pyx_n_u_PGconn_set_chunked_rows_mode __pyx_string_tab[175] #define __pyx_n_u_PGconn_set_single_row_mode __pyx_string_tab[176] #define __pyx_n_u_PGconn_set_trace_flags __pyx_string_tab[177] #define __pyx_n_u_PGconn_trace __pyx_string_tab[178] #define __pyx_n_u_PGconn_untrace __pyx_string_tab[179] #define __pyx_n_u_PGnotify __pyx_string_tab[180] #define __pyx_n_u_PGresAttDesc __pyx_string_tab[181] #define __pyx_n_u_PGresult __pyx_string_tab[182] #define __pyx_n_u_PGresult___reduce_cython __pyx_string_tab[183] #define __pyx_n_u_PGresult___setstate_cython __pyx_string_tab[184] #define __pyx_n_u_PGresult_clear __pyx_string_tab[185] #define __pyx_n_u_PGresult_error_field __pyx_string_tab[186] #define __pyx_n_u_PGresult_fformat __pyx_string_tab[187] #define __pyx_n_u_PGresult_fmod __pyx_string_tab[188] #define __pyx_n_u_PGresult_fname __pyx_string_tab[189] #define __pyx_n_u_PGresult_fsize __pyx_string_tab[190] #define __pyx_n_u_PGresult_ftable __pyx_string_tab[191] #define __pyx_n_u_PGresult_ftablecol __pyx_string_tab[192] #define __pyx_n_u_PGresult_ftype __pyx_string_tab[193] #define __pyx_n_u_PGresult_get_error_message __pyx_string_tab[194] #define __pyx_n_u_PGresult_get_value __pyx_string_tab[195] #define __pyx_n_u_PGresult_param_type __pyx_string_tab[196] #define __pyx_n_u_PGresult_set_attributes __pyx_string_tab[197] #define __pyx_n_u_PQBuffer __pyx_string_tab[198] #define __pyx_n_u_PQBuffer___reduce_cython __pyx_string_tab[199] #define __pyx_n_u_PQBuffer___setstate_cython __pyx_string_tab[200] #define __pyx_n_u_PQcancelCreate __pyx_string_tab[201] #define __pyx_n_u_PQchangePassword __pyx_string_tab[202] #define __pyx_n_u_PQclosePortal __pyx_string_tab[203] #define __pyx_n_u_PQclosePrepared __pyx_string_tab[204] #define __pyx_n_u_PQconnectionUsedGSSAPI __pyx_string_tab[205] #define __pyx_n_u_PQencryptPasswordConn __pyx_string_tab[206] #define __pyx_n_u_PQenterPipelineMode __pyx_string_tab[207] #define __pyx_n_u_PQexitPipelineMode __pyx_string_tab[208] #define __pyx_n_u_PQfullProtocolVersion __pyx_string_tab[209] #define __pyx_n_u_PQhostaddr __pyx_string_tab[210] #define __pyx_n_u_PQpipelineSync __pyx_string_tab[211] #define __pyx_n_u_PQsendClosePortal __pyx_string_tab[212] #define __pyx_n_u_PQsendClosePrepared __pyx_string_tab[213] #define __pyx_n_u_PQsetTraceFlags __pyx_string_tab[214] #define __pyx_n_u_PqFormat __pyx_string_tab[215] #define __pyx_n_u_Pyx_PyDict_NextRef __pyx_string_tab[216] #define __pyx_n_u_TEXT __pyx_string_tab[217] #define __pyx_n_u_Trace __pyx_string_tab[218] #define __pyx_n_u_ViewBuffer __pyx_string_tab[219] #define __pyx_n_u_ViewBuffer___reduce_cython __pyx_string_tab[220] #define __pyx_n_u_ViewBuffer___setstate_cython __pyx_string_tab[221] #define __pyx_n_u_algorithm __pyx_string_tab[222] #define __pyx_n_u_ascii __pyx_string_tab[223] #define __pyx_n_u_async __pyx_string_tab[224] #define __pyx_n_u_asyncio_coroutines __pyx_string_tab[225] #define __pyx_n_u_attrs __pyx_string_tab[226] #define __pyx_n_u_atttypmod __pyx_string_tab[227] #define __pyx_n_u_atypes __pyx_string_tab[228] #define __pyx_n_u_binary __pyx_string_tab[229] #define __pyx_n_u_blocking __pyx_string_tab[230] #define __pyx_n_u_buf __pyx_string_tab[231] #define __pyx_n_u_buffer __pyx_string_tab[232] #define __pyx_n_u_buffer_ptr __pyx_string_tab[233] #define __pyx_n_u_build_version __pyx_string_tab[234] #define __pyx_n_u_bytes_2 __pyx_string_tab[235] #define __pyx_n_u_calgo __pyx_string_tab[236] #define __pyx_n_u_cancel __pyx_string_tab[237] #define __pyx_n_u_cancel_conn __pyx_string_tab[238] #define __pyx_n_u_cbuffer __pyx_string_tab[239] #define __pyx_n_u_ccol __pyx_string_tab[240] #define __pyx_n_u_cerr __pyx_string_tab[241] #define __pyx_n_u_cformats __pyx_string_tab[242] #define __pyx_n_u_change_password __pyx_string_tab[243] #define __pyx_n_u_class __pyx_string_tab[244] #define __pyx_n_u_clean_error_message __pyx_string_tab[245] #define __pyx_n_u_clear __pyx_string_tab[246] #define __pyx_n_u_clengths __pyx_string_tab[247] #define __pyx_n_u_cline_in_traceback __pyx_string_tab[248] #define __pyx_n_u_close_portal __pyx_string_tab[249] #define __pyx_n_u_close_prepared __pyx_string_tab[250] #define __pyx_n_u_cls __pyx_string_tab[251] #define __pyx_n_u_cnparams __pyx_string_tab[252] #define __pyx_n_u_column_number __pyx_string_tab[253] #define __pyx_n_u_columnid __pyx_string_tab[254] #define __pyx_n_u_command __pyx_string_tab[255] #define __pyx_n_u_compiled __pyx_string_tab[256] #define __pyx_n_u_conn __pyx_string_tab[257] #define __pyx_n_u_connect __pyx_string_tab[258] #define __pyx_n_u_connect_poll __pyx_string_tab[259] #define __pyx_n_u_connect_start __pyx_string_tab[260] #define __pyx_n_u_connection_summary __pyx_string_tab[261] #define __pyx_n_u_conninfo __pyx_string_tab[262] #define __pyx_n_u_consume_input __pyx_string_tab[263] #define __pyx_n_u_crow __pyx_string_tab[264] #define __pyx_n_u_ctypes __pyx_string_tab[265] #define __pyx_n_u_cvalues __pyx_string_tab[266] #define __pyx_n_u_data __pyx_string_tab[267] #define __pyx_n_u_decode __pyx_string_tab[268] #define __pyx_n_u_descr __pyx_string_tab[269] #define __pyx_n_u_describe_portal __pyx_string_tab[270] #define __pyx_n_u_describe_prepared __pyx_string_tab[271] #define __pyx_n_u_descriptions __pyx_string_tab[272] #define __pyx_n_u_dict __pyx_string_tab[273] #define __pyx_n_u_dict_2 __pyx_string_tab[274] #define __pyx_n_u_dispchar __pyx_string_tab[275] #define __pyx_n_u_dispsize __pyx_string_tab[276] #define __pyx_n_u_doc __pyx_string_tab[277] #define __pyx_n_u_e __pyx_string_tab[278] #define __pyx_n_u_encoding __pyx_string_tab[279] #define __pyx_n_u_encoding_2 __pyx_string_tab[280] #define __pyx_n_u_encrypt_password __pyx_string_tab[281] #define __pyx_n_u_ensure_pgcancelconn __pyx_string_tab[282] #define __pyx_n_u_enter_pipeline_mode __pyx_string_tab[283] #define __pyx_n_u_envvar __pyx_string_tab[284] #define __pyx_n_u_errmsg __pyx_string_tab[285] #define __pyx_n_u_error __pyx_string_tab[286] #define __pyx_n_u_error_field __pyx_string_tab[287] #define __pyx_n_u_error_message __pyx_string_tab[288] #define __pyx_n_u_errors __pyx_string_tab[289] #define __pyx_n_u_escape_bytea __pyx_string_tab[290] #define __pyx_n_u_escape_identifier __pyx_string_tab[291] #define __pyx_n_u_escape_literal __pyx_string_tab[292] #define __pyx_n_u_escape_string __pyx_string_tab[293] #define __pyx_n_u_exc __pyx_string_tab[294] #define __pyx_n_u_exception __pyx_string_tab[295] #define __pyx_n_u_exec __pyx_string_tab[296] #define __pyx_n_u_exec_params __pyx_string_tab[297] #define __pyx_n_u_exec_prepared __pyx_string_tab[298] #define __pyx_n_u_exec_status __pyx_string_tab[299] #define __pyx_n_u_exit_pipeline_mode __pyx_string_tab[300] #define __pyx_n_u_fformat __pyx_string_tab[301] #define __pyx_n_u_fieldcode __pyx_string_tab[302] #define __pyx_n_u_fileno __pyx_string_tab[303] #define __pyx_n_u_finish __pyx_string_tab[304] #define __pyx_n_u_flags __pyx_string_tab[305] #define __pyx_n_u_flush __pyx_string_tab[306] #define __pyx_n_u_fmod __pyx_string_tab[307] #define __pyx_n_u_fname __pyx_string_tab[308] #define __pyx_n_u_format __pyx_string_tab[309] #define __pyx_n_u_free __pyx_string_tab[310] #define __pyx_n_u_fsize __pyx_string_tab[311] #define __pyx_n_u_ftable __pyx_string_tab[312] #define __pyx_n_u_ftablecol __pyx_string_tab[313] #define __pyx_n_u_ftype __pyx_string_tab[314] #define __pyx_n_u_func __pyx_string_tab[315] #define __pyx_n_u_getLogger __pyx_string_tab[316] #define __pyx_n_u_get_cancel __pyx_string_tab[317] #define __pyx_n_u_get_copy_data __pyx_string_tab[318] #define __pyx_n_u_get_defaults __pyx_string_tab[319] #define __pyx_n_u_get_error_message __pyx_string_tab[320] #define __pyx_n_u_get_result __pyx_string_tab[321] #define __pyx_n_u_get_value __pyx_string_tab[322] #define __pyx_n_u_getstate __pyx_string_tab[323] #define __pyx_n_u_i __pyx_string_tab[324] #define __pyx_n_u_id __pyx_string_tab[325] #define __pyx_n_u_impl __pyx_string_tab[326] #define __pyx_n_u_int __pyx_string_tab[327] #define __pyx_n_u_is_busy __pyx_string_tab[328] #define __pyx_n_u_is_coroutine __pyx_string_tab[329] #define __pyx_n_u_items __pyx_string_tab[330] #define __pyx_n_u_keyword __pyx_string_tab[331] #define __pyx_n_u_label __pyx_string_tab[332] #define __pyx_n_u_length __pyx_string_tab[333] #define __pyx_n_u_linux __pyx_string_tab[334] #define __pyx_n_u_logger __pyx_string_tab[335] #define __pyx_n_u_logging __pyx_string_tab[336] #define __pyx_n_u_main __pyx_string_tab[337] #define __pyx_n_u_make_empty_result __pyx_string_tab[338] #define __pyx_n_u_metaclass __pyx_string_tab[339] #define __pyx_n_u_module __pyx_string_tab[340] #define __pyx_n_u_name __pyx_string_tab[341] #define __pyx_n_u_name_2 __pyx_string_tab[342] #define __pyx_n_u_nbytes __pyx_string_tab[343] #define __pyx_n_u_new __pyx_string_tab[344] #define __pyx_n_u_notifies __pyx_string_tab[345] #define __pyx_n_u_nparams __pyx_string_tab[346] #define __pyx_n_u_num __pyx_string_tab[347] #define __pyx_n_u_opts __pyx_string_tab[348] #define __pyx_n_u_out __pyx_string_tab[349] #define __pyx_n_u_param_formats __pyx_string_tab[350] #define __pyx_n_u_param_number __pyx_string_tab[351] #define __pyx_n_u_param_type __pyx_string_tab[352] #define __pyx_n_u_param_types __pyx_string_tab[353] #define __pyx_n_u_param_values __pyx_string_tab[354] #define __pyx_n_u_parameter_status __pyx_string_tab[355] #define __pyx_n_u_parse __pyx_string_tab[356] #define __pyx_n_u_passwd __pyx_string_tab[357] #define __pyx_n_u_pg2pyenc __pyx_string_tab[358] #define __pyx_n_u_pgconn __pyx_string_tab[359] #define __pyx_n_u_pgresult __pyx_string_tab[360] #define __pyx_n_u_ping __pyx_string_tab[361] #define __pyx_n_u_pipeline_sync __pyx_string_tab[362] #define __pyx_n_u_platform __pyx_string_tab[363] #define __pyx_n_u_poll __pyx_string_tab[364] #define __pyx_n_u_pop __pyx_string_tab[365] #define __pyx_n_u_prepare __pyx_string_tab[366] #define __pyx_n_u_prepare_2 __pyx_string_tab[367] #define __pyx_n_u_psycopg __pyx_string_tab[368] #define __pyx_n_u_psycopg__encodings __pyx_string_tab[369] #define __pyx_n_u_psycopg_binary_pq __pyx_string_tab[370] #define __pyx_n_u_psycopg_pq __pyx_string_tab[371] #define __pyx_n_u_psycopg_pq__enums __pyx_string_tab[372] #define __pyx_n_u_psycopg_pq_misc __pyx_string_tab[373] #define __pyx_n_u_ptr __pyx_string_tab[374] #define __pyx_n_u_put_copy_data __pyx_string_tab[375] #define __pyx_n_u_put_copy_end __pyx_string_tab[376] #define __pyx_n_u_pyx_capi __pyx_string_tab[377] #define __pyx_n_u_pyx_checksum __pyx_string_tab[378] #define __pyx_n_u_pyx_result __pyx_string_tab[379] #define __pyx_n_u_pyx_state __pyx_string_tab[380] #define __pyx_n_u_pyx_type __pyx_string_tab[381] #define __pyx_n_u_pyx_unpickle_Escaping __pyx_string_tab[382] #define __pyx_n_u_pyx_vtable __pyx_string_tab[383] #define __pyx_n_u_qualname __pyx_string_tab[384] #define __pyx_n_u_reduce __pyx_string_tab[385] #define __pyx_n_u_reduce_cython __pyx_string_tab[386] #define __pyx_n_u_reduce_ex __pyx_string_tab[387] #define __pyx_n_u_repr __pyx_string_tab[388] #define __pyx_n_u_res __pyx_string_tab[389] #define __pyx_n_u_reset __pyx_string_tab[390] #define __pyx_n_u_reset_poll __pyx_string_tab[391] #define __pyx_n_u_reset_start __pyx_string_tab[392] #define __pyx_n_u_result_format __pyx_string_tab[393] #define __pyx_n_u_return __pyx_string_tab[394] #define __pyx_n_u_row_number __pyx_string_tab[395] #define __pyx_n_u_rv __pyx_string_tab[396] #define __pyx_n_u_self __pyx_string_tab[397] #define __pyx_n_u_send_close_portal __pyx_string_tab[398] #define __pyx_n_u_send_close_prepared __pyx_string_tab[399] #define __pyx_n_u_send_describe_portal __pyx_string_tab[400] #define __pyx_n_u_send_describe_prepared __pyx_string_tab[401] #define __pyx_n_u_send_flush_request __pyx_string_tab[402] #define __pyx_n_u_send_prepare __pyx_string_tab[403] #define __pyx_n_u_send_query __pyx_string_tab[404] #define __pyx_n_u_send_query_params __pyx_string_tab[405] #define __pyx_n_u_send_query_prepared __pyx_string_tab[406] #define __pyx_n_u_set_attributes __pyx_string_tab[407] #define __pyx_n_u_set_chunked_rows_mode __pyx_string_tab[408] #define __pyx_n_u_set_name __pyx_string_tab[409] #define __pyx_n_u_set_single_row_mode __pyx_string_tab[410] #define __pyx_n_u_set_trace_flags __pyx_string_tab[411] #define __pyx_n_u_setdefault __pyx_string_tab[412] #define __pyx_n_u_setstate __pyx_string_tab[413] #define __pyx_n_u_setstate_cython __pyx_string_tab[414] #define __pyx_n_u_size __pyx_string_tab[415] #define __pyx_n_u_ssl __pyx_string_tab[416] #define __pyx_n_u_start __pyx_string_tab[417] #define __pyx_n_u_state __pyx_string_tab[418] #define __pyx_n_u_status __pyx_string_tab[419] #define __pyx_n_u_str __pyx_string_tab[420] #define __pyx_n_u_stream __pyx_string_tab[421] #define __pyx_n_u_sys __pyx_string_tab[422] #define __pyx_n_u_tableid __pyx_string_tab[423] #define __pyx_n_u_test __pyx_string_tab[424] #define __pyx_n_u_trace __pyx_string_tab[425] #define __pyx_n_u_types_fast __pyx_string_tab[426] #define __pyx_n_u_typid __pyx_string_tab[427] #define __pyx_n_u_typlen __pyx_string_tab[428] #define __pyx_n_u_unescape_bytea __pyx_string_tab[429] #define __pyx_n_u_untrace __pyx_string_tab[430] #define __pyx_n_u_update __pyx_string_tab[431] #define __pyx_n_u_use_setstate __pyx_string_tab[432] #define __pyx_n_u_user __pyx_string_tab[433] #define __pyx_n_u_v __pyx_string_tab[434] #define __pyx_n_u_val __pyx_string_tab[435] #define __pyx_n_u_values __pyx_string_tab[436] #define __pyx_n_u_version __pyx_string_tab[437] #define __pyx_n_u_version_pretty __pyx_string_tab[438] #define __pyx_n_u_x __pyx_string_tab[439] #define __pyx_kp_b__5 __pyx_string_tab[440] #define __pyx_kp_b_int_PyObject_char_Py_ssize_t__bu __pyx_string_tab[441] #define __pyx_kp_b_iso88591_0_aq_Qd_3c_A_z __pyx_string_tab[442] #define __pyx_kp_b_iso88591_1_IQd_2 __pyx_string_tab[443] #define __pyx_kp_b_iso88591_1_aq_l_4_Q_4q_A_q __pyx_string_tab[444] #define __pyx_kp_b_iso88591_1_c_1_E_aq_L_HE_KuA_L_Q_Je1_IU __pyx_string_tab[445] #define __pyx_kp_b_iso88591_1_nAT_q_A_7_a_A_at3EQ_gQ_Q_7_1 __pyx_string_tab[446] #define __pyx_kp_b_iso88591_2_A_aq_7q_N_3c_A_z __pyx_string_tab[447] #define __pyx_kp_b_iso88591_31_aq_8_1_3c_A_AT1C1_z __pyx_string_tab[448] #define __pyx_kp_b_iso88591_4A_1_4A_4q_Qa_z __pyx_string_tab[449] #define __pyx_kp_b_iso88591_4A_aq_5Qd_3gQ_1_1 __pyx_string_tab[450] #define __pyx_kp_b_iso88591_4_Cq_AQ_81D_3b_A_8_Oq_q __pyx_string_tab[451] #define __pyx_kp_b_iso88591_4_G1_4q_q __pyx_string_tab[452] #define __pyx_kp_b_iso88591_4_Q_A __pyx_string_tab[453] #define __pyx_kp_b_iso88591_5Q_a_aq_Qd_4q_A_1_6H __pyx_string_tab[454] #define __pyx_kp_b_iso88591_5Q_aq_4_Q_3c_A_AT1C1_z __pyx_string_tab[455] #define __pyx_kp_b_iso88591_6_1A_q_N_3b_A_1D0B_q __pyx_string_tab[456] #define __pyx_kp_b_iso88591_7q_0_aq_q_N_4q_A_1_6H __pyx_string_tab[457] #define __pyx_kp_b_iso88591_8_aq_0_1_4q_A_4AT9K1 __pyx_string_tab[458] #define __pyx_kp_b_iso88591_9_Qd_A_at3EQ __pyx_string_tab[459] #define __pyx_kp_b_iso88591_9_nA_AQ __pyx_string_tab[460] #define __pyx_kp_b_iso88591_A45_4q_Qa_Zq __pyx_string_tab[461] #define __pyx_kp_b_iso88591_A_0_at1_3c_A_q __pyx_string_tab[462] #define __pyx_kp_b_iso88591_A_1D_8 __pyx_string_tab[463] #define __pyx_kp_b_iso88591_A_1_5_1_Qa_AQ_q __pyx_string_tab[464] #define __pyx_kp_b_iso88591_A_1_6Fa_3gQ_1_1 __pyx_string_tab[465] #define __pyx_kp_b_iso88591_A_4q_1_3j_9Cq_1A_1_1 __pyx_string_tab[466] #define __pyx_kp_b_iso88591_A_4vS_AQ_4uM_A_AQ_6_q_1D_5_4s_A __pyx_string_tab[467] #define __pyx_kp_b_iso88591_A_4vWA_t5_S_a_7q_aq_4s_Q_3aq_S_q __pyx_string_tab[468] #define __pyx_kp_b_iso88591_A_4vWE_T_m3a_AQ_6_q_4vWA_E_8_XQa __pyx_string_tab[469] #define __pyx_kp_b_iso88591_A_6_q_4vS_AQ_4uM_A_AQ_at5_e1_4s __pyx_string_tab[470] #define __pyx_kp_b_iso88591_A_6_q_4vWA_t5_S_a_hl_7_Bb_a_E_y __pyx_string_tab[471] #define __pyx_kp_b_iso88591_A_AT_4q_AQ_z __pyx_string_tab[472] #define __pyx_kp_b_iso88591_A_A_11A_AQ_5_1_wc_k_a_waxq_q_a_A __pyx_string_tab[473] #define __pyx_kp_b_iso88591_A_A_2_1_A_nHF_4q_A_at3EQ_U_1_q_q __pyx_string_tab[474] #define __pyx_kp_b_iso88591_A_A_a_A_aq_8J_q_M_N_5_Yj_1HIZq_9 __pyx_string_tab[475] #define __pyx_kp_b_iso88591_A_A_a_A_aq_8J_q_N_5_Yj_1HIZq_4q __pyx_string_tab[476] #define __pyx_kp_b_iso88591_A_A_aq_wa_a_aq_1_axr_U_1_auH_A_j __pyx_string_tab[477] #define __pyx_kp_b_iso88591_A_A_aq_wa_a_aq_1_axr_U_1_auH_A_n __pyx_string_tab[478] #define __pyx_kp_b_iso88591_A_G1A __pyx_string_tab[479] #define __pyx_kp_b_iso88591_A_Jat_31 __pyx_string_tab[480] #define __pyx_kp_b_iso88591_A_Q_AT_vQ_q_S_A_at3EQ __pyx_string_tab[481] #define __pyx_kp_b_iso88591_A_Qa_4q_Qa_Zq __pyx_string_tab[482] #define __pyx_kp_b_iso88591_A_a_9Cq_1_z __pyx_string_tab[483] #define __pyx_kp_b_iso88591_A_a_A_aq_8J_N_Z7LA_A_1HIZq_4q_A __pyx_string_tab[484] #define __pyx_kp_b_iso88591_A_a_A_aq_8J_oQ_N_Q_Q_A_1HIZq_3c __pyx_string_tab[485] #define __pyx_kp_b_iso88591_A_aq_G1D_a_9Cq_A_4_A_z __pyx_string_tab[486] #define __pyx_kp_b_iso88591_A_q_1D_c_AT_1 __pyx_string_tab[487] #define __pyx_kp_b_iso88591_A_s_4q_hgQa __pyx_string_tab[488] #define __pyx_kp_b_iso88591_A_y_0 __pyx_string_tab[489] #define __pyx_kp_b_iso88591_G1D_0 __pyx_string_tab[490] #define __pyx_kp_b_iso88591_HAT_1 __pyx_string_tab[491] #define __pyx_kp_b_iso88591_HA_3j_1_Qa_q_Qd __pyx_string_tab[492] #define __pyx_kp_b_iso88591_IQd_gQ_4q_A_WAXQ __pyx_string_tab[493] #define __pyx_kp_b_iso88591_Q __pyx_string_tab[494] #define __pyx_kp_b_iso88591_Q_0_AT_s_AQ __pyx_string_tab[495] #define __pyx_kp_b_iso88591_Q_1_O1D_4q_AQ_Qa __pyx_string_tab[496] #define __pyx_kp_b_iso88591_Q_2 __pyx_string_tab[497] #define __pyx_kp_b_iso88591_Q_9M_a_AQ __pyx_string_tab[498] #define __pyx_kp_b_iso88591_Q_9_q_A_AQ __pyx_string_tab[499] #define __pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_Qg_q_Qg __pyx_string_tab[500] #define __pyx_kp_b_iso88591_XQd_3gQ_1_1 __pyx_string_tab[501] #define __pyx_kp_b_iso88591_Zq_A_Qd __pyx_string_tab[502] #define __pyx_kp_b_iso88591_a_1D0_a_1_5V1_1Ba_L_5V1_q_q __pyx_string_tab[503] #define __pyx_kp_b_iso88591_a_4_A_AQ __pyx_string_tab[504] #define __pyx_kp_b_iso88591_a_4_WA_at1 __pyx_string_tab[505] #define __pyx_kp_b_iso88591_a_L_5Q __pyx_string_tab[506] #define __pyx_kp_b_iso88591_a_M_a __pyx_string_tab[507] #define __pyx_kp_b_iso88591_a_y_0 __pyx_string_tab[508] #define __pyx_kp_b_iso88591_aq_2_4_Q_4q_A_4AT9K1 __pyx_string_tab[509] #define __pyx_kp_b_iso88591_avQ __pyx_string_tab[510] #define __pyx_kp_b_iso88591_iq_A_q __pyx_string_tab[511] #define __pyx_kp_b_iso88591_q_0_kQR_881A_7_nA_1 __pyx_string_tab[512] #define __pyx_kp_b_iso88591_q_1D __pyx_string_tab[513] #define __pyx_kp_b_iso88591_q_1D_8_D __pyx_string_tab[514] #define __pyx_kp_b_iso88591_q_1_a_3c_AQ_3c_AQ __pyx_string_tab[515] #define __pyx_kp_b_iso88591_q_2X_AT_A_4_A __pyx_string_tab[516] #define __pyx_kp_b_iso88591_q_4_gQ_a __pyx_string_tab[517] #define __pyx_kp_b_iso88591_q_81IQa_9E_3b_A_AT1C1_q __pyx_string_tab[518] #define __pyx_kp_b_iso88591_q_9N_4q_A_at3EQ __pyx_string_tab[519] #define __pyx_kp_b_iso88591_q_A __pyx_string_tab[520] #define __pyx_kp_b_iso88591_q_aq_Qd __pyx_string_tab[521] #define __pyx_int_8405287 __pyx_number_tab[0] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { __pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); if (!clear_module_state) return 0; Py_CLEAR(clear_module_state->__pyx_d); Py_CLEAR(clear_module_state->__pyx_b); Py_CLEAR(clear_module_state->__pyx_cython_runtime); Py_CLEAR(clear_module_state->__pyx_empty_tuple); Py_CLEAR(clear_module_state->__pyx_empty_bytes); Py_CLEAR(clear_module_state->__pyx_empty_unicode); #if CYTHON_PEP489_MULTI_PHASE_INIT __Pyx_State_RemoveModule(NULL); #endif Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_PGconn); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_PGconn); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_PGresult); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_PGresult); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_PGcancelConn); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_PGcancel); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_PGcancel); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_Escaping); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_Escaping); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_PQBuffer); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_PQBuffer); Py_CLEAR(clear_module_state->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer); Py_CLEAR(clear_module_state->__pyx_type_14psycopg_binary_2pq_ViewBuffer); for (int i=0; i<5; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } for (int i=0; i<94; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } for (int i=0; i<522; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } for (int i=0; i<1; ++i) { Py_CLEAR(clear_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_clear_contents ### */ /* CommonTypesMetaclass.module_state_clear */ Py_CLEAR(clear_module_state->__pyx_CommonTypesMetaclassType); /* CythonFunctionShared.module_state_clear */ Py_CLEAR(clear_module_state->__pyx_CyFunctionType); /* #### Code section: module_state_clear_end ### */ return 0; } #endif /* #### Code section: module_state_traverse ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { __pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); if (!traverse_module_state) return 0; Py_VISIT(traverse_module_state->__pyx_d); Py_VISIT(traverse_module_state->__pyx_b); Py_VISIT(traverse_module_state->__pyx_cython_runtime); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); __Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_PGconn); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_PGconn); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_PGresult); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_PGresult); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_PGcancelConn); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_PGcancel); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_PGcancel); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_Escaping); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_Escaping); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_PQBuffer); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_PQBuffer); Py_VISIT(traverse_module_state->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer); Py_VISIT(traverse_module_state->__pyx_type_14psycopg_binary_2pq_ViewBuffer); for (int i=0; i<5; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } for (int i=0; i<94; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } for (int i=0; i<522; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } for (int i=0; i<1; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_number_tab[i]); } /* #### Code section: module_state_traverse_contents ### */ /* CommonTypesMetaclass.module_state_traverse */ Py_VISIT(traverse_module_state->__pyx_CommonTypesMetaclassType); /* CythonFunctionShared.module_state_traverse */ Py_VISIT(traverse_module_state->__pyx_CyFunctionType); /* #### Code section: module_state_traverse_end ### */ return 0; } #endif /* #### Code section: module_code ### */ /* "psycopg_binary/pq.pyx":19 * * * def version(): # <<<<<<<<<<<<<< * return libpq.PQlibVersion() * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_1version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_1version = {"version", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_1version, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_1version(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("version (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_version(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_version(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("version", 0); /* "psycopg_binary/pq.pyx":20 * * def version(): * return libpq.PQlibVersion() # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQlibVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq.pyx":19 * * * def version(): # <<<<<<<<<<<<<< * return libpq.PQlibVersion() * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.version", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":39 * * * cdef object _check_supported(fname, int pgversion): # <<<<<<<<<<<<<< * if libpq.PG_VERSION_NUM < pgversion: * raise e.NotSupportedError( */ static PyObject *__pyx_f_14psycopg_binary_2pq__check_supported(PyObject *__pyx_v_fname, int __pyx_v_pgversion) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10[6]; size_t __pyx_t_11; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_check_supported", 0); /* "psycopg_binary/pq/pgconn.pyx":40 * * cdef object _check_supported(fname, int pgversion): * if libpq.PG_VERSION_NUM < pgversion: # <<<<<<<<<<<<<< * raise e.NotSupportedError( * f"{fname} requires libpq from PostgreSQL {version_pretty(pgversion)}" */ __pyx_t_1 = (PG_VERSION_NUM < __pyx_v_pgversion); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":41 * cdef object _check_supported(fname, int pgversion): * if libpq.PG_VERSION_NUM < pgversion: * raise e.NotSupportedError( # <<<<<<<<<<<<<< * f"{fname} requires libpq from PostgreSQL {version_pretty(pgversion)}" * f" on the client; version {version_pretty(libpq.PG_VERSION_NUM)}" */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":42 * if libpq.PG_VERSION_NUM < pgversion: * raise e.NotSupportedError( * f"{fname} requires libpq from PostgreSQL {version_pretty(pgversion)}" # <<<<<<<<<<<<<< * f" on the client; version {version_pretty(libpq.PG_VERSION_NUM)}" * " available instead" */ __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_fname, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_version_pretty); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_pgversion); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* "psycopg_binary/pq/pgconn.pyx":43 * raise e.NotSupportedError( * f"{fname} requires libpq from PostgreSQL {version_pretty(pgversion)}" * f" on the client; version {version_pretty(libpq.PG_VERSION_NUM)}" # <<<<<<<<<<<<<< * " available instead" * ) */ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_mstate_global->__pyx_n_u_version_pretty); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_6 = __Pyx_PyLong_From_int(PG_VERSION_NUM); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10[0] = __pyx_t_4; __pyx_t_10[1] = __pyx_mstate_global->__pyx_kp_u_requires_libpq_from_PostgreSQL; __pyx_t_10[2] = __pyx_t_7; __pyx_t_10[3] = __pyx_mstate_global->__pyx_kp_u_on_the_client_version; __pyx_t_10[4] = __pyx_t_6; __pyx_t_10[5] = __pyx_mstate_global->__pyx_kp_u_available_instead; /* "psycopg_binary/pq/pgconn.pyx":42 * if libpq.PG_VERSION_NUM < pgversion: * raise e.NotSupportedError( * f"{fname} requires libpq from PostgreSQL {version_pretty(pgversion)}" # <<<<<<<<<<<<<< * f" on the client; version {version_pretty(libpq.PG_VERSION_NUM)}" * " available instead" */ __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_10, 6, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 32 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7) + 24 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 18, 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_11 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_11, (2-__pyx_t_11) | (__pyx_t_11*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 41, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":40 * * cdef object _check_supported(fname, int pgversion): * if libpq.PG_VERSION_NUM < pgversion: # <<<<<<<<<<<<<< * raise e.NotSupportedError( * f"{fname} requires libpq from PostgreSQL {version_pretty(pgversion)}" */ } /* "psycopg_binary/pq/pgconn.pyx":39 * * * cdef object _check_supported(fname, int pgversion): # <<<<<<<<<<<<<< * if libpq.PG_VERSION_NUM < pgversion: * raise e.NotSupportedError( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("psycopg_binary.pq._check_supported", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":48 * * cdef class PGconn: * @staticmethod # <<<<<<<<<<<<<< * cdef PGconn _from_ptr(libpq.PGconn *ptr): * cdef PGconn rv = PGconn.__new__(PGconn) */ static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_f_14psycopg_binary_2pq_6PGconn__from_ptr(PGconn *__pyx_v_ptr) { struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_rv = 0; struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_ptr", 0); /* "psycopg_binary/pq/pgconn.pyx":50 * @staticmethod * cdef PGconn _from_ptr(libpq.PGconn *ptr): * cdef PGconn rv = PGconn.__new__(PGconn) # <<<<<<<<<<<<<< * rv._pgconn_ptr = ptr * */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_14psycopg_binary_2pq_PGconn(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_rv = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":51 * cdef PGconn _from_ptr(libpq.PGconn *ptr): * cdef PGconn rv = PGconn.__new__(PGconn) * rv._pgconn_ptr = ptr # <<<<<<<<<<<<<< * * libpq.PQsetNoticeReceiver( */ __pyx_v_rv->_pgconn_ptr = __pyx_v_ptr; /* "psycopg_binary/pq/pgconn.pyx":53 * rv._pgconn_ptr = ptr * * libpq.PQsetNoticeReceiver( # <<<<<<<<<<<<<< * ptr, notice_receiver, rv) * return rv */ (void)(PQsetNoticeReceiver(__pyx_v_ptr, ((PQnoticeReceiver)__pyx_f_14psycopg_binary_2pq_notice_receiver), ((void *)__pyx_v_rv))); /* "psycopg_binary/pq/pgconn.pyx":55 * libpq.PQsetNoticeReceiver( * ptr, notice_receiver, rv) * return rv # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":48 * * cdef class PGconn: * @staticmethod # <<<<<<<<<<<<<< * cdef PGconn _from_ptr(libpq.PGconn *ptr): * cdef PGconn rv = PGconn.__new__(PGconn) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn._from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rv); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":57 * return rv * * def __cinit__(self): # <<<<<<<<<<<<<< * self._pgconn_ptr = NULL * self._procpid = getpid() */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return -1; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn___cinit__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_6PGconn___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_r; /* "psycopg_binary/pq/pgconn.pyx":58 * * def __cinit__(self): * self._pgconn_ptr = NULL # <<<<<<<<<<<<<< * self._procpid = getpid() * */ __pyx_v_self->_pgconn_ptr = NULL; /* "psycopg_binary/pq/pgconn.pyx":59 * def __cinit__(self): * self._pgconn_ptr = NULL * self._procpid = getpid() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->_procpid = getpid(); /* "psycopg_binary/pq/pgconn.pyx":57 * return rv * * def __cinit__(self): # <<<<<<<<<<<<<< * self._pgconn_ptr = NULL * self._procpid = getpid() */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":61 * self._procpid = getpid() * * def __dealloc__(self): # <<<<<<<<<<<<<< * # Close the connection only if it was created in this process, * # not if this object is being GC'd after fork. */ /* Python wrapper */ static void __pyx_pw_14psycopg_binary_2pq_6PGconn_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_14psycopg_binary_2pq_6PGconn_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_6PGconn_2__dealloc__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_6PGconn_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "psycopg_binary/pq/pgconn.pyx":64 * # Close the connection only if it was created in this process, * # not if this object is being GC'd after fork. * if self._procpid == getpid(): # <<<<<<<<<<<<<< * self.finish() * */ __pyx_t_1 = (__pyx_v_self->_procpid == getpid()); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":65 * # not if this object is being GC'd after fork. * if self._procpid == getpid(): * self.finish() # <<<<<<<<<<<<<< * * def __repr__(self) -> str: */ __pyx_t_3 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":64 * # Close the connection only if it was created in this process, * # not if this object is being GC'd after fork. * if self._procpid == getpid(): # <<<<<<<<<<<<<< * self.finish() * */ } /* "psycopg_binary/pq/pgconn.pyx":61 * self._procpid = getpid() * * def __dealloc__(self): # <<<<<<<<<<<<<< * # Close the connection only if it was created in this process, * # not if this object is being GC'd after fork. */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_WriteUnraisable("psycopg_binary.pq.PGconn.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "psycopg_binary/pq/pgconn.pyx":67 * self.finish() * * def __repr__(self) -> str: # <<<<<<<<<<<<<< * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * info = connection_summary(self) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_5__repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_4__repr__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4__repr__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_v_cls = NULL; PyObject *__pyx_v_info = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4[3]; size_t __pyx_t_5; PyObject *__pyx_t_6[7]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "psycopg_binary/pq/pgconn.pyx":68 * * def __repr__(self) -> str: * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" # <<<<<<<<<<<<<< * info = connection_summary(self) * return f"<{cls} {info} at 0x{id(self):x}>" */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_module); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_qualname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4[0] = __pyx_t_1; __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_4[2] = __pyx_t_2; __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __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_cls = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "psycopg_binary/pq/pgconn.pyx":69 * def __repr__(self) -> str: * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * info = connection_summary(self) # <<<<<<<<<<<<<< * return f"<{cls} {info} at 0x{id(self):x}>" * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_connection_summary); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_info = __pyx_t_3; __pyx_t_3 = 0; /* "psycopg_binary/pq/pgconn.pyx":70 * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * info = connection_summary(self) * return f"<{cls} {info} at 0x{id(self):x}>" # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_info, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Format(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6[0] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_6[1] = __pyx_v_cls; __pyx_t_6[2] = __pyx_mstate_global->__pyx_kp_u__3; __pyx_t_6[3] = __pyx_t_3; __pyx_t_6[4] = __pyx_mstate_global->__pyx_kp_u_at_0x; __pyx_t_6[5] = __pyx_t_2; __pyx_t_6[6] = __pyx_mstate_global->__pyx_kp_u__4; __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_6, 7, 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_cls) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 6 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_cls) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 70, __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_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":67 * self.finish() * * def __repr__(self) -> str: # <<<<<<<<<<<<<< * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * info = connection_summary(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cls); __Pyx_XDECREF(__pyx_v_info); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":72 * return f"<{cls} {info} at 0x{id(self):x}>" * * @classmethod # <<<<<<<<<<<<<< * def connect(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pw_14psycopg_binary_2pq_6PGconn_7connect(PyObject *__pyx_v_cls, PyObject *__pyx_arg_conninfo); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_7connect = {"connect", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_7connect, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pw_14psycopg_binary_2pq_6PGconn_7connect(PyObject *__pyx_v_cls, PyObject *__pyx_arg_conninfo) { char const *__pyx_v_conninfo; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_conninfo); { __pyx_v_conninfo = __Pyx_PyObject_AsString(__pyx_arg_conninfo); if (unlikely((!__pyx_v_conninfo) && PyErr_Occurred())) __PYX_ERR(1, 73, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_6connect(((PyTypeObject*)__pyx_v_cls), ((char const *)__pyx_v_conninfo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pf_14psycopg_binary_2pq_6PGconn_6connect(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, char const *__pyx_v_conninfo) { PGconn *__pyx_v_pgconn; struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 0); /* "psycopg_binary/pq/pgconn.pyx":74 * @classmethod * def connect(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) # <<<<<<<<<<<<<< * if not pgconn: * raise MemoryError("couldn't allocate PGconn") */ __pyx_v_pgconn = PQconnectdb(__pyx_v_conninfo); /* "psycopg_binary/pq/pgconn.pyx":75 * def connect(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) * if not pgconn: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate PGconn") * */ __pyx_t_1 = (!(__pyx_v_pgconn != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":76 * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) * if not pgconn: * raise MemoryError("couldn't allocate PGconn") # <<<<<<<<<<<<<< * * return PGconn._from_ptr(pgconn) */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_PGconn}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 76, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":75 * def connect(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) * if not pgconn: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate PGconn") * */ } /* "psycopg_binary/pq/pgconn.pyx":78 * raise MemoryError("couldn't allocate PGconn") * * return PGconn._from_ptr(pgconn) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_6PGconn__from_ptr(__pyx_v_pgconn)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":72 * return f"<{cls} {info} at 0x{id(self):x}>" * * @classmethod # <<<<<<<<<<<<<< * def connect(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.connect", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":80 * return PGconn._from_ptr(pgconn) * * @classmethod # <<<<<<<<<<<<<< * def connect_start(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pw_14psycopg_binary_2pq_6PGconn_9connect_start(PyObject *__pyx_v_cls, PyObject *__pyx_arg_conninfo); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_9connect_start = {"connect_start", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_9connect_start, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pw_14psycopg_binary_2pq_6PGconn_9connect_start(PyObject *__pyx_v_cls, PyObject *__pyx_arg_conninfo) { char const *__pyx_v_conninfo; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_start (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_conninfo); { __pyx_v_conninfo = __Pyx_PyObject_AsString(__pyx_arg_conninfo); if (unlikely((!__pyx_v_conninfo) && PyErr_Occurred())) __PYX_ERR(1, 81, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.connect_start", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_8connect_start(((PyTypeObject*)__pyx_v_cls), ((char const *)__pyx_v_conninfo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_pf_14psycopg_binary_2pq_6PGconn_8connect_start(CYTHON_UNUSED PyTypeObject *__pyx_v_cls, char const *__pyx_v_conninfo) { PGconn *__pyx_v_pgconn; struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect_start", 0); /* "psycopg_binary/pq/pgconn.pyx":82 * @classmethod * def connect_start(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) # <<<<<<<<<<<<<< * if not pgconn: * raise MemoryError("couldn't allocate PGconn") */ __pyx_v_pgconn = PQconnectStart(__pyx_v_conninfo); /* "psycopg_binary/pq/pgconn.pyx":83 * def connect_start(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) * if not pgconn: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate PGconn") * */ __pyx_t_1 = (!(__pyx_v_pgconn != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":84 * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) * if not pgconn: * raise MemoryError("couldn't allocate PGconn") # <<<<<<<<<<<<<< * * return PGconn._from_ptr(pgconn) */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_PGconn}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 84, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":83 * def connect_start(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) * if not pgconn: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate PGconn") * */ } /* "psycopg_binary/pq/pgconn.pyx":86 * raise MemoryError("couldn't allocate PGconn") * * return PGconn._from_ptr(pgconn) # <<<<<<<<<<<<<< * * def connect_poll(self) -> int: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_6PGconn__from_ptr(__pyx_v_pgconn)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":80 * return PGconn._from_ptr(pgconn) * * @classmethod # <<<<<<<<<<<<<< * def connect_start(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.connect_start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":88 * return PGconn._from_ptr(pgconn) * * def connect_poll(self) -> int: # <<<<<<<<<<<<<< * return _call_int(self, libpq.PQconnectPoll) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11connect_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_11connect_poll = {"connect_poll", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_11connect_poll, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11connect_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("connect_poll (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_10connect_poll(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_10connect_poll(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect_poll", 0); /* "psycopg_binary/pq/pgconn.pyx":89 * * def connect_poll(self) -> int: * return _call_int(self, libpq.PQconnectPoll) # <<<<<<<<<<<<<< * * def finish(self) -> None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, ((__pyx_t_14psycopg_binary_2pq_conn_int_f)PQconnectPoll)); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 89, __pyx_L1_error) __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(1, 89, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":88 * return PGconn._from_ptr(pgconn) * * def connect_poll(self) -> int: # <<<<<<<<<<<<<< * return _call_int(self, libpq.PQconnectPoll) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.connect_poll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":91 * return _call_int(self, libpq.PQconnectPoll) * * def finish(self) -> None: # <<<<<<<<<<<<<< * if self._pgconn_ptr is not NULL: * libpq.PQfinish(self._pgconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_13finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_13finish = {"finish", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_13finish, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_13finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("finish (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_12finish(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_12finish(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("finish", 0); /* "psycopg_binary/pq/pgconn.pyx":92 * * def finish(self) -> None: * if self._pgconn_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQfinish(self._pgconn_ptr) * self._pgconn_ptr = NULL */ __pyx_t_1 = (__pyx_v_self->_pgconn_ptr != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":93 * def finish(self) -> None: * if self._pgconn_ptr is not NULL: * libpq.PQfinish(self._pgconn_ptr) # <<<<<<<<<<<<<< * self._pgconn_ptr = NULL * */ PQfinish(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":94 * if self._pgconn_ptr is not NULL: * libpq.PQfinish(self._pgconn_ptr) * self._pgconn_ptr = NULL # <<<<<<<<<<<<<< * * @property */ __pyx_v_self->_pgconn_ptr = NULL; /* "psycopg_binary/pq/pgconn.pyx":92 * * def finish(self) -> None: * if self._pgconn_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQfinish(self._pgconn_ptr) * self._pgconn_ptr = NULL */ } /* "psycopg_binary/pq/pgconn.pyx":91 * return _call_int(self, libpq.PQconnectPoll) * * def finish(self) -> None: # <<<<<<<<<<<<<< * if self._pgconn_ptr is not NULL: * libpq.PQfinish(self._pgconn_ptr) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":96 * self._pgconn_ptr = NULL * * @property # <<<<<<<<<<<<<< * def pgconn_ptr(self) -> int | None: * if self._pgconn_ptr: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_10pgconn_ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_10pgconn_ptr_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_10pgconn_ptr___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_10pgconn_ptr___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":98 * @property * def pgconn_ptr(self) -> int | None: * if self._pgconn_ptr: # <<<<<<<<<<<<<< * return self._pgconn_ptr * else: */ __pyx_t_1 = (__pyx_v_self->_pgconn_ptr != 0); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":99 * def pgconn_ptr(self) -> int | None: * if self._pgconn_ptr: * return self._pgconn_ptr # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyLong_From_PY_LONG_LONG(((PY_LONG_LONG)((void *)__pyx_v_self->_pgconn_ptr))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":98 * @property * def pgconn_ptr(self) -> int | None: * if self._pgconn_ptr: # <<<<<<<<<<<<<< * return self._pgconn_ptr * else: */ } /* "psycopg_binary/pq/pgconn.pyx":101 * return self._pgconn_ptr * else: * return None # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgconn.pyx":96 * self._pgconn_ptr = NULL * * @property # <<<<<<<<<<<<<< * def pgconn_ptr(self) -> int | None: * if self._pgconn_ptr: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.pgconn_ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":103 * return None * * @property # <<<<<<<<<<<<<< * def info(self) -> list[ConninfoOption]: * _ensure_pgconn(self) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4info_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4info_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_4info___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4info___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PQconninfoOption *__pyx_v_opts; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":105 * @property * def info(self) -> list[ConninfoOption]: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef libpq.PQconninfoOption *opts = libpq.PQconninfo(self._pgconn_ptr) * if opts is NULL: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 105, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":106 * def info(self) -> list[ConninfoOption]: * _ensure_pgconn(self) * cdef libpq.PQconninfoOption *opts = libpq.PQconninfo(self._pgconn_ptr) # <<<<<<<<<<<<<< * if opts is NULL: * raise MemoryError("couldn't allocate connection info") */ __pyx_v_opts = PQconninfo(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":107 * _ensure_pgconn(self) * cdef libpq.PQconninfoOption *opts = libpq.PQconninfo(self._pgconn_ptr) * if opts is NULL: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate connection info") * rv = _options_from_array(opts) */ __pyx_t_2 = (__pyx_v_opts == NULL); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":108 * cdef libpq.PQconninfoOption *opts = libpq.PQconninfo(self._pgconn_ptr) * if opts is NULL: * raise MemoryError("couldn't allocate connection info") # <<<<<<<<<<<<<< * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) */ __pyx_t_4 = NULL; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_connection_inf}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 108, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":107 * _ensure_pgconn(self) * cdef libpq.PQconninfoOption *opts = libpq.PQconninfo(self._pgconn_ptr) * if opts is NULL: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate connection info") * rv = _options_from_array(opts) */ } /* "psycopg_binary/pq/pgconn.pyx":109 * if opts is NULL: * raise MemoryError("couldn't allocate connection info") * rv = _options_from_array(opts) # <<<<<<<<<<<<<< * libpq.PQconninfoFree(opts) * return rv */ __pyx_t_3 = __pyx_f_14psycopg_binary_2pq__options_from_array(__pyx_v_opts); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_rv = __pyx_t_3; __pyx_t_3 = 0; /* "psycopg_binary/pq/pgconn.pyx":110 * raise MemoryError("couldn't allocate connection info") * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) # <<<<<<<<<<<<<< * return rv * */ PQconninfoFree(__pyx_v_opts); /* "psycopg_binary/pq/pgconn.pyx":111 * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) * return rv # <<<<<<<<<<<<<< * * def reset(self) -> None: */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":103 * return None * * @property # <<<<<<<<<<<<<< * def info(self) -> list[ConninfoOption]: * _ensure_pgconn(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.info.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":113 * return rv * * def reset(self) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * libpq.PQreset(self._pgconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_15reset = {"reset", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_15reset, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_15reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14reset(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14reset(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "psycopg_binary/pq/pgconn.pyx":114 * * def reset(self) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * libpq.PQreset(self._pgconn_ptr) * */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 114, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":115 * def reset(self) -> None: * _ensure_pgconn(self) * libpq.PQreset(self._pgconn_ptr) # <<<<<<<<<<<<<< * * def reset_start(self) -> None: */ PQreset(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":113 * return rv * * def reset(self) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * libpq.PQreset(self._pgconn_ptr) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":117 * libpq.PQreset(self._pgconn_ptr) * * def reset_start(self) -> None: # <<<<<<<<<<<<<< * if not libpq.PQresetStart(self._pgconn_ptr): * raise e.OperationalError("couldn't reset connection") */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_17reset_start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_17reset_start = {"reset_start", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_17reset_start, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_17reset_start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset_start (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_16reset_start(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_16reset_start(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_start", 0); /* "psycopg_binary/pq/pgconn.pyx":118 * * def reset_start(self) -> None: * if not libpq.PQresetStart(self._pgconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError("couldn't reset connection") * */ __pyx_t_1 = (!(PQresetStart(__pyx_v_self->_pgconn_ptr) != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":119 * def reset_start(self) -> None: * if not libpq.PQresetStart(self._pgconn_ptr): * raise e.OperationalError("couldn't reset connection") # <<<<<<<<<<<<<< * * def reset_poll(self) -> int: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_reset_connection}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 119, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":118 * * def reset_start(self) -> None: * if not libpq.PQresetStart(self._pgconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError("couldn't reset connection") * */ } /* "psycopg_binary/pq/pgconn.pyx":117 * libpq.PQreset(self._pgconn_ptr) * * def reset_start(self) -> None: # <<<<<<<<<<<<<< * if not libpq.PQresetStart(self._pgconn_ptr): * raise e.OperationalError("couldn't reset connection") */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.reset_start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":121 * raise e.OperationalError("couldn't reset connection") * * def reset_poll(self) -> int: # <<<<<<<<<<<<<< * return _call_int(self, libpq.PQresetPoll) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_19reset_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_19reset_poll = {"reset_poll", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_19reset_poll, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_19reset_poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset_poll (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_18reset_poll(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_18reset_poll(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset_poll", 0); /* "psycopg_binary/pq/pgconn.pyx":122 * * def reset_poll(self) -> int: * return _call_int(self, libpq.PQresetPoll) # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, ((__pyx_t_14psycopg_binary_2pq_conn_int_f)PQresetPoll)); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 122, __pyx_L1_error) __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (__Pyx_PyInt_FromNumber(&__pyx_t_2, NULL, 0) < (0)) __PYX_ERR(1, 122, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":121 * raise e.OperationalError("couldn't reset connection") * * def reset_poll(self) -> int: # <<<<<<<<<<<<<< * return _call_int(self, libpq.PQresetPoll) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.reset_poll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":124 * return _call_int(self, libpq.PQresetPoll) * * @classmethod # <<<<<<<<<<<<<< * def ping(self, const char *conninfo) -> int: * return libpq.PQping(conninfo) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_21ping(PyObject *__pyx_v_self, PyObject *__pyx_arg_conninfo); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_21ping = {"ping", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_21ping, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_21ping(PyObject *__pyx_v_self, PyObject *__pyx_arg_conninfo) { char const *__pyx_v_conninfo; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ping (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_conninfo); { __pyx_v_conninfo = __Pyx_PyObject_AsString(__pyx_arg_conninfo); if (unlikely((!__pyx_v_conninfo) && PyErr_Occurred())) __PYX_ERR(1, 125, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.ping", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_20ping(((PyTypeObject*)__pyx_v_self), ((char const *)__pyx_v_conninfo)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_20ping(CYTHON_UNUSED PyTypeObject *__pyx_v_self, char const *__pyx_v_conninfo) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ping", 0); /* "psycopg_binary/pq/pgconn.pyx":126 * @classmethod * def ping(self, const char *conninfo) -> int: * return libpq.PQping(conninfo) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_PGPing(PQping(__pyx_v_conninfo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(1, 126, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":124 * return _call_int(self, libpq.PQresetPoll) * * @classmethod # <<<<<<<<<<<<<< * def ping(self, const char *conninfo) -> int: * return libpq.PQping(conninfo) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.ping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":128 * return libpq.PQping(conninfo) * * @property # <<<<<<<<<<<<<< * def db(self) -> bytes: * return _call_bytes(self, libpq.PQdb) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_2db_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_2db_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_2db___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_2db___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":130 * @property * def db(self) -> bytes: * return _call_bytes(self, libpq.PQdb) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQdb); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 130, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":128 * return libpq.PQping(conninfo) * * @property # <<<<<<<<<<<<<< * def db(self) -> bytes: * return _call_bytes(self, libpq.PQdb) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.db.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":132 * return _call_bytes(self, libpq.PQdb) * * @property # <<<<<<<<<<<<<< * def user(self) -> bytes: * return _call_bytes(self, libpq.PQuser) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4user_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4user_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_4user___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4user___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":134 * @property * def user(self) -> bytes: * return _call_bytes(self, libpq.PQuser) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQuser); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 134, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":132 * return _call_bytes(self, libpq.PQdb) * * @property # <<<<<<<<<<<<<< * def user(self) -> bytes: * return _call_bytes(self, libpq.PQuser) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.user.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":136 * return _call_bytes(self, libpq.PQuser) * * @property # <<<<<<<<<<<<<< * def password(self) -> bytes: * return _call_bytes(self, libpq.PQpass) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_8password_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_8password_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_8password___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_8password___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":138 * @property * def password(self) -> bytes: * return _call_bytes(self, libpq.PQpass) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQpass); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 138, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":136 * return _call_bytes(self, libpq.PQuser) * * @property # <<<<<<<<<<<<<< * def password(self) -> bytes: * return _call_bytes(self, libpq.PQpass) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.password.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":140 * return _call_bytes(self, libpq.PQpass) * * @property # <<<<<<<<<<<<<< * def host(self) -> bytes: * return _call_bytes(self, libpq.PQhost) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4host_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4host_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_4host___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4host___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":142 * @property * def host(self) -> bytes: * return _call_bytes(self, libpq.PQhost) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQhost); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 142, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":140 * return _call_bytes(self, libpq.PQpass) * * @property # <<<<<<<<<<<<<< * def host(self) -> bytes: * return _call_bytes(self, libpq.PQhost) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.host.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":144 * return _call_bytes(self, libpq.PQhost) * * @property # <<<<<<<<<<<<<< * def hostaddr(self) -> bytes: * _check_supported("PQhostaddr", 120000) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_8hostaddr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_8hostaddr_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_8hostaddr___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_8hostaddr___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { char *__pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":146 * @property * def hostaddr(self) -> bytes: * _check_supported("PQhostaddr", 120000) # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef char *rv = libpq.PQhostaddr(self._pgconn_ptr) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQhostaddr, 0x1D4C0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":147 * def hostaddr(self) -> bytes: * _check_supported("PQhostaddr", 120000) * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef char *rv = libpq.PQhostaddr(self._pgconn_ptr) * assert rv is not NULL */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 147, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":148 * _check_supported("PQhostaddr", 120000) * _ensure_pgconn(self) * cdef char *rv = libpq.PQhostaddr(self._pgconn_ptr) # <<<<<<<<<<<<<< * assert rv is not NULL * return rv */ __pyx_v_rv = PQhostaddr(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":149 * _ensure_pgconn(self) * cdef char *rv = libpq.PQhostaddr(self._pgconn_ptr) * assert rv is not NULL # <<<<<<<<<<<<<< * return rv * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(__pyx_assertions_enabled())) { __pyx_t_3 = (__pyx_v_rv != NULL); if (unlikely(!__pyx_t_3)) { __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_AssertionError))), 0, 0, 0); __PYX_ERR(1, 149, __pyx_L1_error) } } #else if ((1)); else __PYX_ERR(1, 149, __pyx_L1_error) #endif /* "psycopg_binary/pq/pgconn.pyx":150 * cdef char *rv = libpq.PQhostaddr(self._pgconn_ptr) * assert rv is not NULL * return rv # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_rv); 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; /* "psycopg_binary/pq/pgconn.pyx":144 * return _call_bytes(self, libpq.PQhost) * * @property # <<<<<<<<<<<<<< * def hostaddr(self) -> bytes: * _check_supported("PQhostaddr", 120000) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.hostaddr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":152 * return rv * * @property # <<<<<<<<<<<<<< * def port(self) -> bytes: * return _call_bytes(self, libpq.PQport) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4port_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_4port_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_4port___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_4port___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":154 * @property * def port(self) -> bytes: * return _call_bytes(self, libpq.PQport) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQport); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 154, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":152 * return rv * * @property # <<<<<<<<<<<<<< * def port(self) -> bytes: * return _call_bytes(self, libpq.PQport) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.port.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":156 * return _call_bytes(self, libpq.PQport) * * @property # <<<<<<<<<<<<<< * def tty(self) -> bytes: * return _call_bytes(self, libpq.PQtty) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_3tty_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_3tty_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_3tty___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_3tty___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":158 * @property * def tty(self) -> bytes: * return _call_bytes(self, libpq.PQtty) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQtty); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 158, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":156 * return _call_bytes(self, libpq.PQport) * * @property # <<<<<<<<<<<<<< * def tty(self) -> bytes: * return _call_bytes(self, libpq.PQtty) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.tty.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":160 * return _call_bytes(self, libpq.PQtty) * * @property # <<<<<<<<<<<<<< * def options(self) -> bytes: * return _call_bytes(self, libpq.PQoptions) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_7options_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_7options_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_7options___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_7options___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":162 * @property * def options(self) -> bytes: * return _call_bytes(self, libpq.PQoptions) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_bytes(__pyx_v_self, PQoptions); if (unlikely(__pyx_t_1 == ((void *)NULL))) __PYX_ERR(1, 162, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":160 * return _call_bytes(self, libpq.PQtty) * * @property # <<<<<<<<<<<<<< * def options(self) -> bytes: * return _call_bytes(self, libpq.PQoptions) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.options.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":164 * return _call_bytes(self, libpq.PQoptions) * * @property # <<<<<<<<<<<<<< * def status(self) -> int: * return libpq.PQstatus(self._pgconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_6status_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_6status___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_6status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":166 * @property * def status(self) -> int: * return libpq.PQstatus(self._pgconn_ptr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_ConnStatusType(PQstatus(__pyx_v_self->_pgconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":164 * return _call_bytes(self, libpq.PQoptions) * * @property # <<<<<<<<<<<<<< * def status(self) -> int: * return libpq.PQstatus(self._pgconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":168 * return libpq.PQstatus(self._pgconn_ptr) * * @property # <<<<<<<<<<<<<< * def transaction_status(self) -> int: * return libpq.PQtransactionStatus(self._pgconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_18transaction_status_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_18transaction_status_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_18transaction_status___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_18transaction_status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":170 * @property * def transaction_status(self) -> int: * return libpq.PQtransactionStatus(self._pgconn_ptr) # <<<<<<<<<<<<<< * * def parameter_status(self, const char *name) -> bytes | None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_PGTransactionStatusType(PQtransactionStatus(__pyx_v_self->_pgconn_ptr)); 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; /* "psycopg_binary/pq/pgconn.pyx":168 * return libpq.PQstatus(self._pgconn_ptr) * * @property # <<<<<<<<<<<<<< * def transaction_status(self) -> int: * return libpq.PQtransactionStatus(self._pgconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.transaction_status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":172 * return libpq.PQtransactionStatus(self._pgconn_ptr) * * def parameter_status(self, const char *name) -> bytes | None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_23parameter_status(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_23parameter_status = {"parameter_status", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_23parameter_status, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_23parameter_status(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parameter_status (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 172, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.parameter_status", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_22parameter_status(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_22parameter_status(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { char const *__pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parameter_status", 0); /* "psycopg_binary/pq/pgconn.pyx":173 * * def parameter_status(self, const char *name) -> bytes | None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) * if rv is not NULL: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 173, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":174 * def parameter_status(self, const char *name) -> bytes | None: * _ensure_pgconn(self) * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if rv is not NULL: * return rv */ __pyx_v_rv = PQparameterStatus(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":175 * _ensure_pgconn(self) * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ __pyx_t_2 = (__pyx_v_rv != NULL); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":176 * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) * if rv is not NULL: * return rv # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_rv); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":175 * _ensure_pgconn(self) * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ } /* "psycopg_binary/pq/pgconn.pyx":178 * return rv * else: * return None # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgconn.pyx":172 * return libpq.PQtransactionStatus(self._pgconn_ptr) * * def parameter_status(self, const char *name) -> bytes | None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.parameter_status", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":180 * return None * * @property # <<<<<<<<<<<<<< * def error_message(self) -> bytes: * return libpq.PQerrorMessage(self._pgconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_13error_message_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_13error_message_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_13error_message___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_13error_message___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":182 * @property * def error_message(self) -> bytes: * return libpq.PQerrorMessage(self._pgconn_ptr) # <<<<<<<<<<<<<< * * def get_error_message(self, encoding: str = "") -> str: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(PQerrorMessage(__pyx_v_self->_pgconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":180 * return None * * @property # <<<<<<<<<<<<<< * def error_message(self) -> bytes: * return libpq.PQerrorMessage(self._pgconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.error_message.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":184 * return libpq.PQerrorMessage(self._pgconn_ptr) * * def get_error_message(self, encoding: str = "") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding or self._encoding) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_25get_error_message(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_25get_error_message = {"get_error_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_25get_error_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_25get_error_message(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_encoding = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_error_message (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoding,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 184, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 184, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_error_message", 0) < (0)) __PYX_ERR(1, 184, __pyx_L3_error) if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_kp_u__5)); } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 184, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_kp_u__5)); } __pyx_v_encoding = ((PyObject*)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_error_message", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 184, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.get_error_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoding), (&PyUnicode_Type), 0, "encoding", 2))) __PYX_ERR(1, 184, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_24get_error_message(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_encoding); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_24get_error_message(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_encoding) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_message", 0); /* "psycopg_binary/pq/pgconn.pyx":185 * * def get_error_message(self, encoding: str = "") -> str: * return _clean_error_message(self.error_message, encoding or self._encoding) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clean_error_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_error_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_encoding); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 185, __pyx_L1_error) if (!__pyx_t_6) { } else { __Pyx_INCREF(__pyx_v_encoding); __pyx_t_5 = __pyx_v_encoding; goto __pyx_L3_bool_binop_done; } __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_encoding_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_7); __pyx_t_5 = __pyx_t_7; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_L3_bool_binop_done:; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(1, 185, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":184 * return libpq.PQerrorMessage(self._pgconn_ptr) * * def get_error_message(self, encoding: str = "") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding or self._encoding) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.get_error_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":187 * return _clean_error_message(self.error_message, encoding or self._encoding) * * @property # <<<<<<<<<<<<<< * def _encoding(self) -> str: * cdef const char *pgenc */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_9_encoding_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_9_encoding_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_9_encoding___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_9_encoding___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { char const *__pyx_v_pgenc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":190 * def _encoding(self) -> str: * cdef const char *pgenc * if libpq.PQstatus(self._pgconn_ptr) == libpq.CONNECTION_OK: # <<<<<<<<<<<<<< * pgenc = libpq.PQparameterStatus(self._pgconn_ptr, b"client_encoding") * if pgenc is NULL: */ __pyx_t_1 = (PQstatus(__pyx_v_self->_pgconn_ptr) == CONNECTION_OK); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":191 * cdef const char *pgenc * if libpq.PQstatus(self._pgconn_ptr) == libpq.CONNECTION_OK: * pgenc = libpq.PQparameterStatus(self._pgconn_ptr, b"client_encoding") # <<<<<<<<<<<<<< * if pgenc is NULL: * pgenc = b"UTF8" */ __pyx_v_pgenc = PQparameterStatus(__pyx_v_self->_pgconn_ptr, __pyx_k_client_encoding); /* "psycopg_binary/pq/pgconn.pyx":192 * if libpq.PQstatus(self._pgconn_ptr) == libpq.CONNECTION_OK: * pgenc = libpq.PQparameterStatus(self._pgconn_ptr, b"client_encoding") * if pgenc is NULL: # <<<<<<<<<<<<<< * pgenc = b"UTF8" * return pg2pyenc(pgenc) */ __pyx_t_1 = (__pyx_v_pgenc == NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":193 * pgenc = libpq.PQparameterStatus(self._pgconn_ptr, b"client_encoding") * if pgenc is NULL: * pgenc = b"UTF8" # <<<<<<<<<<<<<< * return pg2pyenc(pgenc) * else: */ __pyx_v_pgenc = __pyx_k_UTF8; /* "psycopg_binary/pq/pgconn.pyx":192 * if libpq.PQstatus(self._pgconn_ptr) == libpq.CONNECTION_OK: * pgenc = libpq.PQparameterStatus(self._pgconn_ptr, b"client_encoding") * if pgenc is NULL: # <<<<<<<<<<<<<< * pgenc = b"UTF8" * return pg2pyenc(pgenc) */ } /* "psycopg_binary/pq/pgconn.pyx":194 * if pgenc is NULL: * pgenc = b"UTF8" * return pg2pyenc(pgenc) # <<<<<<<<<<<<<< * else: * return "utf-8" */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pg2pyenc); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_pgenc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":190 * def _encoding(self) -> str: * cdef const char *pgenc * if libpq.PQstatus(self._pgconn_ptr) == libpq.CONNECTION_OK: # <<<<<<<<<<<<<< * pgenc = libpq.PQparameterStatus(self._pgconn_ptr, b"client_encoding") * if pgenc is NULL: */ } /* "psycopg_binary/pq/pgconn.pyx":196 * return pg2pyenc(pgenc) * else: * return "utf-8" # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_utf_8); __pyx_r = __pyx_mstate_global->__pyx_kp_u_utf_8; goto __pyx_L0; } /* "psycopg_binary/pq/pgconn.pyx":187 * return _clean_error_message(self.error_message, encoding or self._encoding) * * @property # <<<<<<<<<<<<<< * def _encoding(self) -> str: * cdef const char *pgenc */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn._encoding.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":198 * return "utf-8" * * @property # <<<<<<<<<<<<<< * def protocol_version(self) -> int: * return _call_int(self, libpq.PQprotocolVersion) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_16protocol_version_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_16protocol_version_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_16protocol_version___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_16protocol_version___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":200 * @property * def protocol_version(self) -> int: * return _call_int(self, libpq.PQprotocolVersion) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, PQprotocolVersion); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 200, __pyx_L1_error) __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":198 * return "utf-8" * * @property # <<<<<<<<<<<<<< * def protocol_version(self) -> int: * return _call_int(self, libpq.PQprotocolVersion) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.protocol_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":202 * return _call_int(self, libpq.PQprotocolVersion) * * @property # <<<<<<<<<<<<<< * def full_protocol_version(self) -> int: * _check_supported("PQfullProtocolVersion", 180000) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_21full_protocol_version_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_21full_protocol_version_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_21full_protocol_version___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_21full_protocol_version___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":204 * @property * def full_protocol_version(self) -> int: * _check_supported("PQfullProtocolVersion", 180000) # <<<<<<<<<<<<<< * _ensure_pgconn(self) * return libpq.PQfullProtocolVersion(self._pgconn_ptr) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQfullProtocolVersion, 0x2BF20); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":205 * def full_protocol_version(self) -> int: * _check_supported("PQfullProtocolVersion", 180000) * _ensure_pgconn(self) # <<<<<<<<<<<<<< * return libpq.PQfullProtocolVersion(self._pgconn_ptr) * */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 205, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":206 * _check_supported("PQfullProtocolVersion", 180000) * _ensure_pgconn(self) * return libpq.PQfullProtocolVersion(self._pgconn_ptr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQfullProtocolVersion(__pyx_v_self->_pgconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":202 * return _call_int(self, libpq.PQprotocolVersion) * * @property # <<<<<<<<<<<<<< * def full_protocol_version(self) -> int: * _check_supported("PQfullProtocolVersion", 180000) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.full_protocol_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":208 * return libpq.PQfullProtocolVersion(self._pgconn_ptr) * * @property # <<<<<<<<<<<<<< * def server_version(self) -> int: * return _call_int(self, libpq.PQserverVersion) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14server_version_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14server_version_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14server_version___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14server_version___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":210 * @property * def server_version(self) -> int: * return _call_int(self, libpq.PQserverVersion) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, PQserverVersion); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 210, __pyx_L1_error) __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":208 * return libpq.PQfullProtocolVersion(self._pgconn_ptr) * * @property # <<<<<<<<<<<<<< * def server_version(self) -> int: * return _call_int(self, libpq.PQserverVersion) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.server_version.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":212 * return _call_int(self, libpq.PQserverVersion) * * @property # <<<<<<<<<<<<<< * def socket(self) -> int: * rv = _call_int(self, libpq.PQsocket) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_6socket_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_6socket_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_6socket___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_6socket___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":214 * @property * def socket(self) -> int: * rv = _call_int(self, libpq.PQsocket) # <<<<<<<<<<<<<< * if rv == -1: * raise e.OperationalError("the connection is lost") */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, PQsocket); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 214, __pyx_L1_error) __pyx_v_rv = __pyx_t_1; /* "psycopg_binary/pq/pgconn.pyx":215 * def socket(self) -> int: * rv = _call_int(self, libpq.PQsocket) * if rv == -1: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is lost") * return rv */ __pyx_t_2 = (__pyx_v_rv == -1L); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":216 * rv = _call_int(self, libpq.PQsocket) * if rv == -1: * raise e.OperationalError("the connection is lost") # <<<<<<<<<<<<<< * return rv * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_the_connection_is_lost}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 216, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":215 * def socket(self) -> int: * rv = _call_int(self, libpq.PQsocket) * if rv == -1: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is lost") * return rv */ } /* "psycopg_binary/pq/pgconn.pyx":217 * if rv == -1: * raise e.OperationalError("the connection is lost") * return rv # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_rv); 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; /* "psycopg_binary/pq/pgconn.pyx":212 * return _call_int(self, libpq.PQserverVersion) * * @property # <<<<<<<<<<<<<< * def socket(self) -> int: * rv = _call_int(self, libpq.PQsocket) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.socket.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":219 * return rv * * @property # <<<<<<<<<<<<<< * def backend_pid(self) -> int: * return _call_int(self, libpq.PQbackendPID) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11backend_pid_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11backend_pid_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_11backend_pid___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_11backend_pid___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":221 * @property * def backend_pid(self) -> int: * return _call_int(self, libpq.PQbackendPID) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, PQbackendPID); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 221, __pyx_L1_error) __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 221, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":219 * return rv * * @property # <<<<<<<<<<<<<< * def backend_pid(self) -> int: * return _call_int(self, libpq.PQbackendPID) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.backend_pid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":223 * return _call_int(self, libpq.PQbackendPID) * * @property # <<<<<<<<<<<<<< * def needs_password(self) -> bool: * return bool(libpq.PQconnectionNeedsPassword(self._pgconn_ptr)) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14needs_password_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14needs_password_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14needs_password___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14needs_password___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":225 * @property * def needs_password(self) -> bool: * return bool(libpq.PQconnectionNeedsPassword(self._pgconn_ptr)) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(PQconnectionNeedsPassword(__pyx_v_self->_pgconn_ptr) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":223 * return _call_int(self, libpq.PQbackendPID) * * @property # <<<<<<<<<<<<<< * def needs_password(self) -> bool: * return bool(libpq.PQconnectionNeedsPassword(self._pgconn_ptr)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.needs_password.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":227 * return bool(libpq.PQconnectionNeedsPassword(self._pgconn_ptr)) * * @property # <<<<<<<<<<<<<< * def used_password(self) -> bool: * return bool(libpq.PQconnectionUsedPassword(self._pgconn_ptr)) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_13used_password_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_13used_password_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_13used_password___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_13used_password___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":229 * @property * def used_password(self) -> bool: * return bool(libpq.PQconnectionUsedPassword(self._pgconn_ptr)) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(PQconnectionUsedPassword(__pyx_v_self->_pgconn_ptr) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":227 * return bool(libpq.PQconnectionNeedsPassword(self._pgconn_ptr)) * * @property # <<<<<<<<<<<<<< * def used_password(self) -> bool: * return bool(libpq.PQconnectionUsedPassword(self._pgconn_ptr)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.used_password.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":231 * return bool(libpq.PQconnectionUsedPassword(self._pgconn_ptr)) * * @property # <<<<<<<<<<<<<< * def used_gssapi(self) -> bool: * _check_supported("PQconnectionUsedGSSAPI", 160000) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11used_gssapi_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11used_gssapi_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_11used_gssapi___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_11used_gssapi___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":233 * @property * def used_gssapi(self) -> bool: * _check_supported("PQconnectionUsedGSSAPI", 160000) # <<<<<<<<<<<<<< * return bool(libpq.PQconnectionUsedGSSAPI(self._pgconn_ptr)) * */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQconnectionUsedGSSAPI, 0x27100); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":234 * def used_gssapi(self) -> bool: * _check_supported("PQconnectionUsedGSSAPI", 160000) * return bool(libpq.PQconnectionUsedGSSAPI(self._pgconn_ptr)) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBool_FromLong((!(!(PQconnectionUsedGSSAPI(__pyx_v_self->_pgconn_ptr) != 0)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":231 * return bool(libpq.PQconnectionUsedPassword(self._pgconn_ptr)) * * @property # <<<<<<<<<<<<<< * def used_gssapi(self) -> bool: * _check_supported("PQconnectionUsedGSSAPI", 160000) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.used_gssapi.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":236 * return bool(libpq.PQconnectionUsedGSSAPI(self._pgconn_ptr)) * * @property # <<<<<<<<<<<<<< * def ssl_in_use(self) -> bool: * return bool(_call_int(self, libpq.PQsslInUse)) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_10ssl_in_use_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_10ssl_in_use_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_10ssl_in_use___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_10ssl_in_use___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":238 * @property * def ssl_in_use(self) -> bool: * return bool(_call_int(self, libpq.PQsslInUse)) # <<<<<<<<<<<<<< * * def exec_(self, const char *command) -> PGresult: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__call_int(__pyx_v_self, ((__pyx_t_14psycopg_binary_2pq_conn_int_f)PQsslInUse)); if (unlikely(__pyx_t_1 == ((int)-2))) __PYX_ERR(1, 238, __pyx_L1_error) __pyx_t_2 = __Pyx_PyBool_FromLong((!(!(__pyx_t_1 != 0)))); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":236 * return bool(libpq.PQconnectionUsedGSSAPI(self._pgconn_ptr)) * * @property # <<<<<<<<<<<<<< * def ssl_in_use(self) -> bool: * return bool(_call_int(self, libpq.PQsslInUse)) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.ssl_in_use.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":240 * return bool(_call_int(self, libpq.PQsslInUse)) * * def exec_(self, const char *command) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *pgresult */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_27exec_(PyObject *__pyx_v_self, PyObject *__pyx_arg_command); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_27exec_ = {"exec_", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_27exec_, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_27exec_(PyObject *__pyx_v_self, PyObject *__pyx_arg_command) { char const *__pyx_v_command; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exec_ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_command); { __pyx_v_command = __Pyx_PyObject_AsString(__pyx_arg_command); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 240, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exec_", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_26exec_(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_command)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_26exec_(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command) { PGresult *__pyx_v_pgresult; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exec_", 0); /* "psycopg_binary/pq/pgconn.pyx":241 * * def exec_(self, const char *command) -> PGresult: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef libpq.PGresult *pgresult * with nogil: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 241, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":243 * _ensure_pgconn(self) * cdef libpq.PGresult *pgresult * with nogil: # <<<<<<<<<<<<<< * pgresult = libpq.PQexec(self._pgconn_ptr, command) * if pgresult is NULL: */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":244 * cdef libpq.PGresult *pgresult * with nogil: * pgresult = libpq.PQexec(self._pgconn_ptr, command) # <<<<<<<<<<<<<< * if pgresult is NULL: * raise e.OperationalError( */ __pyx_v_pgresult = PQexec(__pyx_v_self->_pgconn_ptr, __pyx_v_command); } /* "psycopg_binary/pq/pgconn.pyx":243 * _ensure_pgconn(self) * cdef libpq.PGresult *pgresult * with nogil: # <<<<<<<<<<<<<< * pgresult = libpq.PQexec(self._pgconn_ptr, command) * if pgresult is NULL: */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":245 * with nogil: * pgresult = libpq.PQexec(self._pgconn_ptr, command) * if pgresult is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") */ __pyx_t_2 = (__pyx_v_pgresult == NULL); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":246 * pgresult = libpq.PQexec(self._pgconn_ptr, command) * if pgresult is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"executing query failed: {self.get_error_message()}") * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":247 * if pgresult is NULL: * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * * return PGresult._from_ptr(pgresult) */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_executing_query_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 246, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":245 * with nogil: * pgresult = libpq.PQexec(self._pgconn_ptr, command) * if pgresult is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":249 * f"executing query failed: {self.get_error_message()}") * * return PGresult._from_ptr(pgresult) # <<<<<<<<<<<<<< * * def send_query(self, const char *command) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_pgresult)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":240 * return bool(_call_int(self, libpq.PQsslInUse)) * * def exec_(self, const char *command) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *pgresult */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exec_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":251 * return PGresult._from_ptr(pgresult) * * def send_query(self, const char *command) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_29send_query(PyObject *__pyx_v_self, PyObject *__pyx_arg_command); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_29send_query = {"send_query", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_29send_query, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_29send_query(PyObject *__pyx_v_self, PyObject *__pyx_arg_command) { char const *__pyx_v_command; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_query (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_command); { __pyx_v_command = __Pyx_PyObject_AsString(__pyx_arg_command); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 251, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_28send_query(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_command)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_28send_query(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_query", 0); /* "psycopg_binary/pq/pgconn.pyx":252 * * def send_query(self, const char *command) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef int rv * with nogil: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 252, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":254 * _ensure_pgconn(self) * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendQuery(self._pgconn_ptr, command) * if not rv: */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":255 * cdef int rv * with nogil: * rv = libpq.PQsendQuery(self._pgconn_ptr, command) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_v_rv = PQsendQuery(__pyx_v_self->_pgconn_ptr, __pyx_v_command); } /* "psycopg_binary/pq/pgconn.pyx":254 * _ensure_pgconn(self) * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendQuery(self._pgconn_ptr, command) * if not rv: */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":256 * with nogil: * rv = libpq.PQsendQuery(self._pgconn_ptr, command) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending query failed: {self.get_error_message()}") */ __pyx_t_2 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":257 * rv = libpq.PQsendQuery(self._pgconn_ptr, command) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending query failed: {self.get_error_message()}") * */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":258 * if not rv: * raise e.OperationalError( * f"sending query failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * * def exec_params( */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_query_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 257, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":256 * with nogil: * rv = libpq.PQsendQuery(self._pgconn_ptr, command) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending query failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":251 * return PGresult._from_ptr(pgresult) * * def send_query(self, const char *command) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":260 * f"sending query failed: {self.get_error_message()}") * * def exec_params( # <<<<<<<<<<<<<< * self, * const char *command, */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_31exec_params(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_31exec_params = {"exec_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_31exec_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_31exec_params(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_command; PyObject *__pyx_v_param_values = 0; PyObject *__pyx_v_param_types = 0; PyObject *__pyx_v_param_formats = 0; int __pyx_v_result_format; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exec_params (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_command,&__pyx_mstate_global->__pyx_n_u_param_values,&__pyx_mstate_global->__pyx_n_u_param_types,&__pyx_mstate_global->__pyx_n_u_param_formats,&__pyx_mstate_global->__pyx_n_u_result_format,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 260, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "exec_params", 0) < (0)) __PYX_ERR(1, 260, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":264 * const char *command, * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, # <<<<<<<<<<<<<< * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); /* "psycopg_binary/pq/pgconn.pyx":265 * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> PGresult: */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("exec_params", 0, 2, 5, i); __PYX_ERR(1, 260, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 260, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 260, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 260, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "psycopg_binary/pq/pgconn.pyx":264 * const char *command, * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, # <<<<<<<<<<<<<< * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); /* "psycopg_binary/pq/pgconn.pyx":265 * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> PGresult: */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_command = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 262, __pyx_L3_error) __pyx_v_param_values = values[1]; __pyx_v_param_types = values[2]; __pyx_v_param_formats = values[3]; if (values[4]) { __pyx_v_result_format = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_result_format == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 266, __pyx_L3_error) } else { __pyx_v_result_format = __pyx_mstate_global->__pyx_k__6; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("exec_params", 0, 2, 5, __pyx_nargs); __PYX_ERR(1, 260, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exec_params", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_30exec_params(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_command, __pyx_v_param_values, __pyx_v_param_types, __pyx_v_param_formats, __pyx_v_result_format); /* "psycopg_binary/pq/pgconn.pyx":260 * f"sending query failed: {self.get_error_message()}") * * def exec_params( # <<<<<<<<<<<<<< * self, * const char *command, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_30exec_params(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_types, PyObject *__pyx_v_param_formats, int __pyx_v_result_format) { Py_ssize_t __pyx_v_cnparams; Oid *__pyx_v_ctypes; char *const *__pyx_v_cvalues; int *__pyx_v_clengths; int *__pyx_v_cformats; PGresult *__pyx_v_pgresult; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_t_2; Py_ssize_t __pyx_t_3; Oid *__pyx_t_4; char *const *__pyx_t_5; int *__pyx_t_6; int *__pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; size_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exec_params", 0); /* "psycopg_binary/pq/pgconn.pyx":268 * int result_format = PqFormat.TEXT, * ) -> PGresult: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * * cdef Py_ssize_t cnparams */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 268, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":275 * cdef int *clengths * cdef int *cformats * cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( # <<<<<<<<<<<<<< * param_values, param_types, param_formats) * */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__query_params_args(__pyx_v_param_values, __pyx_v_param_types, __pyx_v_param_formats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 275, __pyx_L1_error) __pyx_t_3 = __pyx_t_2.f0; __pyx_t_4 = __pyx_t_2.f1; __pyx_t_5 = __pyx_t_2.f2; __pyx_t_6 = __pyx_t_2.f3; __pyx_t_7 = __pyx_t_2.f4; __pyx_v_cnparams = __pyx_t_3; __pyx_v_ctypes = __pyx_t_4; __pyx_v_cvalues = __pyx_t_5; __pyx_v_clengths = __pyx_t_6; __pyx_v_cformats = __pyx_t_7; /* "psycopg_binary/pq/pgconn.pyx":279 * * cdef libpq.PGresult *pgresult * with nogil: # <<<<<<<<<<<<<< * pgresult = libpq.PQexecParams( * self._pgconn_ptr, command, cnparams, ctypes, */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":280 * cdef libpq.PGresult *pgresult * with nogil: * pgresult = libpq.PQexecParams( # <<<<<<<<<<<<<< * self._pgconn_ptr, command, cnparams, ctypes, * cvalues, clengths, cformats, result_format) */ __pyx_v_pgresult = PQexecParams(__pyx_v_self->_pgconn_ptr, __pyx_v_command, ((int)__pyx_v_cnparams), __pyx_v_ctypes, ((char const *const *)__pyx_v_cvalues), __pyx_v_clengths, __pyx_v_cformats, __pyx_v_result_format); } /* "psycopg_binary/pq/pgconn.pyx":279 * * cdef libpq.PGresult *pgresult * with nogil: # <<<<<<<<<<<<<< * pgresult = libpq.PQexecParams( * self._pgconn_ptr, command, cnparams, ctypes, */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":283 * self._pgconn_ptr, command, cnparams, ctypes, * cvalues, clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) # <<<<<<<<<<<<<< * if pgresult is NULL: * raise e.OperationalError( */ __pyx_f_14psycopg_binary_2pq__clear_query_params(__pyx_v_ctypes, __pyx_v_cvalues, __pyx_v_clengths, __pyx_v_cformats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 283, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":284 * cvalues, clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) * if pgresult is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") */ __pyx_t_8 = (__pyx_v_pgresult == NULL); if (unlikely(__pyx_t_8)) { /* "psycopg_binary/pq/pgconn.pyx":285 * _clear_query_params(ctypes, cvalues, clengths, cformats) * if pgresult is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"executing query failed: {self.get_error_message()}") * return PGresult._from_ptr(pgresult) */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "psycopg_binary/pq/pgconn.pyx":286 * if pgresult is NULL: * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * return PGresult._from_ptr(pgresult) * */ __pyx_t_13 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_executing_query_failed, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(1, 285, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":284 * cvalues, clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) * if pgresult is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":287 * raise e.OperationalError( * f"executing query failed: {self.get_error_message()}") * return PGresult._from_ptr(pgresult) # <<<<<<<<<<<<<< * * def send_query_params( */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_9 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_pgresult)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":260 * f"sending query failed: {self.get_error_message()}") * * def exec_params( # <<<<<<<<<<<<<< * self, * const char *command, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exec_params", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":289 * return PGresult._from_ptr(pgresult) * * def send_query_params( # <<<<<<<<<<<<<< * self, * const char *command, */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_33send_query_params(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_33send_query_params = {"send_query_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_33send_query_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_33send_query_params(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_command; PyObject *__pyx_v_param_values = 0; PyObject *__pyx_v_param_types = 0; PyObject *__pyx_v_param_formats = 0; int __pyx_v_result_format; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[5] = {0,0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_query_params (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_command,&__pyx_mstate_global->__pyx_n_u_param_values,&__pyx_mstate_global->__pyx_n_u_param_types,&__pyx_mstate_global->__pyx_n_u_param_formats,&__pyx_mstate_global->__pyx_n_u_result_format,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 289, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "send_query_params", 0) < (0)) __PYX_ERR(1, 289, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":293 * const char *command, * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, # <<<<<<<<<<<<<< * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); /* "psycopg_binary/pq/pgconn.pyx":294 * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> None: */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("send_query_params", 0, 2, 5, i); __PYX_ERR(1, 289, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 289, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 289, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } /* "psycopg_binary/pq/pgconn.pyx":293 * const char *command, * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, # <<<<<<<<<<<<<< * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); /* "psycopg_binary/pq/pgconn.pyx":294 * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> None: */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_command = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 291, __pyx_L3_error) __pyx_v_param_values = values[1]; __pyx_v_param_types = values[2]; __pyx_v_param_formats = values[3]; if (values[4]) { __pyx_v_result_format = __Pyx_PyLong_As_int(values[4]); if (unlikely((__pyx_v_result_format == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L3_error) } else { __pyx_v_result_format = __pyx_mstate_global->__pyx_k__7; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("send_query_params", 0, 2, 5, __pyx_nargs); __PYX_ERR(1, 289, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_query_params", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_32send_query_params(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_command, __pyx_v_param_values, __pyx_v_param_types, __pyx_v_param_formats, __pyx_v_result_format); /* "psycopg_binary/pq/pgconn.pyx":289 * return PGresult._from_ptr(pgresult) * * def send_query_params( # <<<<<<<<<<<<<< * self, * const char *command, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_32send_query_params(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_command, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_types, PyObject *__pyx_v_param_formats, int __pyx_v_result_format) { Py_ssize_t __pyx_v_cnparams; Oid *__pyx_v_ctypes; char *const *__pyx_v_cvalues; int *__pyx_v_clengths; int *__pyx_v_cformats; int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_t_2; Py_ssize_t __pyx_t_3; Oid *__pyx_t_4; char *const *__pyx_t_5; int *__pyx_t_6; int *__pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; size_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_query_params", 0); /* "psycopg_binary/pq/pgconn.pyx":297 * int result_format = PqFormat.TEXT, * ) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * * cdef Py_ssize_t cnparams */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 297, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":304 * cdef int *clengths * cdef int *cformats * cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( # <<<<<<<<<<<<<< * param_values, param_types, param_formats) * */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__query_params_args(__pyx_v_param_values, __pyx_v_param_types, __pyx_v_param_formats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L1_error) __pyx_t_3 = __pyx_t_2.f0; __pyx_t_4 = __pyx_t_2.f1; __pyx_t_5 = __pyx_t_2.f2; __pyx_t_6 = __pyx_t_2.f3; __pyx_t_7 = __pyx_t_2.f4; __pyx_v_cnparams = __pyx_t_3; __pyx_v_ctypes = __pyx_t_4; __pyx_v_cvalues = __pyx_t_5; __pyx_v_clengths = __pyx_t_6; __pyx_v_cformats = __pyx_t_7; /* "psycopg_binary/pq/pgconn.pyx":308 * * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendQueryParams( * self._pgconn_ptr, command, cnparams, ctypes, */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":309 * cdef int rv * with nogil: * rv = libpq.PQsendQueryParams( # <<<<<<<<<<<<<< * self._pgconn_ptr, command, cnparams, ctypes, * cvalues, clengths, cformats, result_format) */ __pyx_v_rv = PQsendQueryParams(__pyx_v_self->_pgconn_ptr, __pyx_v_command, ((int)__pyx_v_cnparams), __pyx_v_ctypes, ((char const *const *)__pyx_v_cvalues), __pyx_v_clengths, __pyx_v_cformats, __pyx_v_result_format); } /* "psycopg_binary/pq/pgconn.pyx":308 * * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendQueryParams( * self._pgconn_ptr, command, cnparams, ctypes, */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":312 * self._pgconn_ptr, command, cnparams, ctypes, * cvalues, clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_f_14psycopg_binary_2pq__clear_query_params(__pyx_v_ctypes, __pyx_v_cvalues, __pyx_v_clengths, __pyx_v_cformats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 312, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":313 * cvalues, clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending query and params failed: {self.get_error_message()}" */ __pyx_t_8 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_8)) { /* "psycopg_binary/pq/pgconn.pyx":314 * _clear_query_params(ctypes, cvalues, clengths, cformats) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending query and params failed: {self.get_error_message()}" * ) */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "psycopg_binary/pq/pgconn.pyx":315 * if not rv: * raise e.OperationalError( * f"sending query and params failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_13 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_query_and_params_failed, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(1, 314, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":313 * cvalues, clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending query and params failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":289 * return PGresult._from_ptr(pgresult) * * def send_query_params( # <<<<<<<<<<<<<< * self, * const char *command, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_query_params", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":318 * ) * * def send_prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_35send_prepare(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_35send_prepare = {"send_prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_35send_prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_35send_prepare(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_name; char const *__pyx_v_command; PyObject *__pyx_v_param_types = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_prepare (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_command,&__pyx_mstate_global->__pyx_n_u_param_types,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 318, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 318, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 318, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 318, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "send_prepare", 0) < (0)) __PYX_ERR(1, 318, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":322 * const char *name, * const char *command, * param_types: Sequence[int] | None = None, # <<<<<<<<<<<<<< * ) -> None: * _ensure_pgconn(self) */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("send_prepare", 0, 2, 3, i); __PYX_ERR(1, 318, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 318, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 318, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 318, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_name = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 320, __pyx_L3_error) __pyx_v_command = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 321, __pyx_L3_error) __pyx_v_param_types = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("send_prepare", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 318, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_34send_prepare(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_name, __pyx_v_command, __pyx_v_param_types); /* "psycopg_binary/pq/pgconn.pyx":318 * ) * * def send_prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_34send_prepare(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, char const *__pyx_v_command, PyObject *__pyx_v_param_types) { int __pyx_v_i; PyObject *__pyx_v_types_fast = 0; Py_ssize_t __pyx_v_nparams; Oid *__pyx_v_atypes; int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6; Oid __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; size_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_prepare", 0); /* "psycopg_binary/pq/pgconn.pyx":324 * param_types: Sequence[int] | None = None, * ) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * * cdef int i */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 324, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":328 * cdef int i * cdef types_fast * cdef Py_ssize_t nparams = 0 # <<<<<<<<<<<<<< * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") */ __pyx_v_nparams = 0; /* "psycopg_binary/pq/pgconn.pyx":329 * cdef types_fast * cdef Py_ssize_t nparams = 0 * if param_types is not None: # <<<<<<<<<<<<<< * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(types_fast) */ __pyx_t_2 = (__pyx_v_param_types != Py_None); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":330 * cdef Py_ssize_t nparams = 0 * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") # <<<<<<<<<<<<<< * nparams = PySequence_Fast_GET_SIZE(types_fast) * */ __pyx_t_3 = PySequence_Fast(__pyx_v_param_types, ((char *)"'param_types' is not a sequence")); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_types_fast = __pyx_t_3; __pyx_t_3 = 0; /* "psycopg_binary/pq/pgconn.pyx":331 * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(types_fast) # <<<<<<<<<<<<<< * * cdef libpq.Oid *atypes = NULL */ __pyx_v_nparams = PySequence_Fast_GET_SIZE(__pyx_v_types_fast); /* "psycopg_binary/pq/pgconn.pyx":329 * cdef types_fast * cdef Py_ssize_t nparams = 0 * if param_types is not None: # <<<<<<<<<<<<<< * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(types_fast) */ } /* "psycopg_binary/pq/pgconn.pyx":333 * nparams = PySequence_Fast_GET_SIZE(types_fast) * * cdef libpq.Oid *atypes = NULL # <<<<<<<<<<<<<< * if nparams: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) */ __pyx_v_atypes = NULL; /* "psycopg_binary/pq/pgconn.pyx":334 * * cdef libpq.Oid *atypes = NULL * if nparams: # <<<<<<<<<<<<<< * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): */ __pyx_t_2 = (__pyx_v_nparams != 0); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":335 * cdef libpq.Oid *atypes = NULL * if nparams: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) # <<<<<<<<<<<<<< * for i in range(nparams): * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) */ __pyx_v_atypes = ((Oid *)PyMem_Malloc((__pyx_v_nparams * (sizeof(Oid))))); /* "psycopg_binary/pq/pgconn.pyx":336 * if nparams: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): # <<<<<<<<<<<<<< * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) * */ __pyx_t_4 = __pyx_v_nparams; __pyx_t_5 = __pyx_t_4; for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_5; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; /* "psycopg_binary/pq/pgconn.pyx":337 * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) # <<<<<<<<<<<<<< * * cdef int rv */ if (unlikely(!__pyx_v_types_fast)) { __Pyx_RaiseUnboundLocalError("types_fast"); __PYX_ERR(1, 337, __pyx_L1_error) } __pyx_t_6 = PySequence_Fast_GET_ITEM(__pyx_v_types_fast, __pyx_v_i); __pyx_t_7 = __Pyx_PyLong_As_Oid(((PyObject *)__pyx_t_6)); if (unlikely((__pyx_t_7 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(1, 337, __pyx_L1_error) (__pyx_v_atypes[__pyx_v_i]) = __pyx_t_7; } /* "psycopg_binary/pq/pgconn.pyx":334 * * cdef libpq.Oid *atypes = NULL * if nparams: # <<<<<<<<<<<<<< * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): */ } /* "psycopg_binary/pq/pgconn.pyx":340 * * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendPrepare( * self._pgconn_ptr, name, command, nparams, atypes */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":341 * cdef int rv * with nogil: * rv = libpq.PQsendPrepare( # <<<<<<<<<<<<<< * self._pgconn_ptr, name, command, nparams, atypes * ) */ __pyx_v_rv = PQsendPrepare(__pyx_v_self->_pgconn_ptr, __pyx_v_name, __pyx_v_command, ((int)__pyx_v_nparams), __pyx_v_atypes); } /* "psycopg_binary/pq/pgconn.pyx":340 * * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendPrepare( * self._pgconn_ptr, name, command, nparams, atypes */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L9; } __pyx_L9:; } } /* "psycopg_binary/pq/pgconn.pyx":344 * self._pgconn_ptr, name, command, nparams, atypes * ) * PyMem_Free(atypes) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ PyMem_Free(__pyx_v_atypes); /* "psycopg_binary/pq/pgconn.pyx":345 * ) * PyMem_Free(atypes) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending query and params failed: {self.get_error_message()}" */ __pyx_t_2 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":346 * PyMem_Free(atypes) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending query and params failed: {self.get_error_message()}" * ) */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "psycopg_binary/pq/pgconn.pyx":347 * if not rv: * raise e.OperationalError( * f"sending query and params failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_11 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_query_and_params_failed, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_12 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 346, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":345 * ) * PyMem_Free(atypes) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending query and params failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":318 * ) * * def send_prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_types_fast); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":350 * ) * * def send_query_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_37send_query_prepared(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_37send_query_prepared = {"send_query_prepared", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_37send_query_prepared, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_37send_query_prepared(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_name; PyObject *__pyx_v_param_values = 0; PyObject *__pyx_v_param_formats = 0; int __pyx_v_result_format; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_query_prepared (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_param_values,&__pyx_mstate_global->__pyx_n_u_param_formats,&__pyx_mstate_global->__pyx_n_u_result_format,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 350, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "send_query_prepared", 0) < (0)) __PYX_ERR(1, 350, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":354 * const char *name, * param_values: Sequence[bytes | None] | None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> None: */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("send_query_prepared", 0, 2, 4, i); __PYX_ERR(1, 350, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 350, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 350, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 350, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_name = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 352, __pyx_L3_error) __pyx_v_param_values = values[1]; __pyx_v_param_formats = values[2]; if (values[3]) { __pyx_v_result_format = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_result_format == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L3_error) } else { __pyx_v_result_format = __pyx_mstate_global->__pyx_k__8; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("send_query_prepared", 0, 2, 4, __pyx_nargs); __PYX_ERR(1, 350, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_query_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_36send_query_prepared(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_name, __pyx_v_param_values, __pyx_v_param_formats, __pyx_v_result_format); /* "psycopg_binary/pq/pgconn.pyx":350 * ) * * def send_query_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_36send_query_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_formats, int __pyx_v_result_format) { Py_ssize_t __pyx_v_cnparams; Oid *__pyx_v_ctypes; char *const *__pyx_v_cvalues; int *__pyx_v_clengths; int *__pyx_v_cformats; int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_t_2; Py_ssize_t __pyx_t_3; Oid *__pyx_t_4; char *const *__pyx_t_5; int *__pyx_t_6; int *__pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; size_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_query_prepared", 0); /* "psycopg_binary/pq/pgconn.pyx":357 * int result_format = PqFormat.TEXT, * ) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * * cdef Py_ssize_t cnparams */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 357, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":364 * cdef int *clengths * cdef int *cformats * cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( # <<<<<<<<<<<<<< * param_values, None, param_formats) * */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__query_params_args(__pyx_v_param_values, Py_None, __pyx_v_param_formats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 364, __pyx_L1_error) __pyx_t_3 = __pyx_t_2.f0; __pyx_t_4 = __pyx_t_2.f1; __pyx_t_5 = __pyx_t_2.f2; __pyx_t_6 = __pyx_t_2.f3; __pyx_t_7 = __pyx_t_2.f4; __pyx_v_cnparams = __pyx_t_3; __pyx_v_ctypes = __pyx_t_4; __pyx_v_cvalues = __pyx_t_5; __pyx_v_clengths = __pyx_t_6; __pyx_v_cformats = __pyx_t_7; /* "psycopg_binary/pq/pgconn.pyx":368 * * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendQueryPrepared( * self._pgconn_ptr, name, cnparams, cvalues, */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":369 * cdef int rv * with nogil: * rv = libpq.PQsendQueryPrepared( # <<<<<<<<<<<<<< * self._pgconn_ptr, name, cnparams, cvalues, * clengths, cformats, result_format) */ __pyx_v_rv = PQsendQueryPrepared(__pyx_v_self->_pgconn_ptr, __pyx_v_name, ((int)__pyx_v_cnparams), ((char const *const *)__pyx_v_cvalues), __pyx_v_clengths, __pyx_v_cformats, __pyx_v_result_format); } /* "psycopg_binary/pq/pgconn.pyx":368 * * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQsendQueryPrepared( * self._pgconn_ptr, name, cnparams, cvalues, */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":372 * self._pgconn_ptr, name, cnparams, cvalues, * clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_f_14psycopg_binary_2pq__clear_query_params(__pyx_v_ctypes, __pyx_v_cvalues, __pyx_v_clengths, __pyx_v_cformats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 372, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":373 * clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending prepared query failed: {self.get_error_message()}" */ __pyx_t_8 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_8)) { /* "psycopg_binary/pq/pgconn.pyx":374 * _clear_query_params(ctypes, cvalues, clengths, cformats) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending prepared query failed: {self.get_error_message()}" * ) */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "psycopg_binary/pq/pgconn.pyx":375 * if not rv: * raise e.OperationalError( * f"sending prepared query failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_13 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_prepared_query_failed, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(1, 374, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":373 * clengths, cformats, result_format) * _clear_query_params(ctypes, cvalues, clengths, cformats) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending prepared query failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":350 * ) * * def send_query_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_query_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":378 * ) * * def prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_39prepare(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_39prepare = {"prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_39prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_39prepare(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_name; char const *__pyx_v_command; PyObject *__pyx_v_param_types = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("prepare (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_command,&__pyx_mstate_global->__pyx_n_u_param_types,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 378, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 378, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 378, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 378, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "prepare", 0) < (0)) __PYX_ERR(1, 378, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":382 * const char *name, * const char *command, * param_types: Sequence[int] | None = None, # <<<<<<<<<<<<<< * ) -> PGresult: * _ensure_pgconn(self) */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("prepare", 0, 2, 3, i); __PYX_ERR(1, 378, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 378, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 378, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 378, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_name = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 380, __pyx_L3_error) __pyx_v_command = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_command) && PyErr_Occurred())) __PYX_ERR(1, 381, __pyx_L3_error) __pyx_v_param_types = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("prepare", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 378, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_38prepare(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_name, __pyx_v_command, __pyx_v_param_types); /* "psycopg_binary/pq/pgconn.pyx":378 * ) * * def prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_38prepare(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, char const *__pyx_v_command, PyObject *__pyx_v_param_types) { int __pyx_v_i; PyObject *__pyx_v_types_fast = 0; Py_ssize_t __pyx_v_nparams; Oid *__pyx_v_atypes; PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6; Oid __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; size_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prepare", 0); /* "psycopg_binary/pq/pgconn.pyx":384 * param_types: Sequence[int] | None = None, * ) -> PGresult: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * * cdef int i */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 384, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":388 * cdef int i * cdef types_fast * cdef Py_ssize_t nparams = 0 # <<<<<<<<<<<<<< * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") */ __pyx_v_nparams = 0; /* "psycopg_binary/pq/pgconn.pyx":389 * cdef types_fast * cdef Py_ssize_t nparams = 0 * if param_types is not None: # <<<<<<<<<<<<<< * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(types_fast) */ __pyx_t_2 = (__pyx_v_param_types != Py_None); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":390 * cdef Py_ssize_t nparams = 0 * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") # <<<<<<<<<<<<<< * nparams = PySequence_Fast_GET_SIZE(types_fast) * */ __pyx_t_3 = PySequence_Fast(__pyx_v_param_types, ((char *)"'param_types' is not a sequence")); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_types_fast = __pyx_t_3; __pyx_t_3 = 0; /* "psycopg_binary/pq/pgconn.pyx":391 * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(types_fast) # <<<<<<<<<<<<<< * * cdef libpq.Oid *atypes = NULL */ __pyx_v_nparams = PySequence_Fast_GET_SIZE(__pyx_v_types_fast); /* "psycopg_binary/pq/pgconn.pyx":389 * cdef types_fast * cdef Py_ssize_t nparams = 0 * if param_types is not None: # <<<<<<<<<<<<<< * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(types_fast) */ } /* "psycopg_binary/pq/pgconn.pyx":393 * nparams = PySequence_Fast_GET_SIZE(types_fast) * * cdef libpq.Oid *atypes = NULL # <<<<<<<<<<<<<< * if nparams: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) */ __pyx_v_atypes = NULL; /* "psycopg_binary/pq/pgconn.pyx":394 * * cdef libpq.Oid *atypes = NULL * if nparams: # <<<<<<<<<<<<<< * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): */ __pyx_t_2 = (__pyx_v_nparams != 0); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":395 * cdef libpq.Oid *atypes = NULL * if nparams: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) # <<<<<<<<<<<<<< * for i in range(nparams): * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) */ __pyx_v_atypes = ((Oid *)PyMem_Malloc((__pyx_v_nparams * (sizeof(Oid))))); /* "psycopg_binary/pq/pgconn.pyx":396 * if nparams: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): # <<<<<<<<<<<<<< * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) * */ __pyx_t_4 = __pyx_v_nparams; __pyx_t_5 = __pyx_t_4; for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_5; __pyx_t_1+=1) { __pyx_v_i = __pyx_t_1; /* "psycopg_binary/pq/pgconn.pyx":397 * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) # <<<<<<<<<<<<<< * * cdef libpq.PGresult *rv */ if (unlikely(!__pyx_v_types_fast)) { __Pyx_RaiseUnboundLocalError("types_fast"); __PYX_ERR(1, 397, __pyx_L1_error) } __pyx_t_6 = PySequence_Fast_GET_ITEM(__pyx_v_types_fast, __pyx_v_i); __pyx_t_7 = __Pyx_PyLong_As_Oid(((PyObject *)__pyx_t_6)); if (unlikely((__pyx_t_7 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(1, 397, __pyx_L1_error) (__pyx_v_atypes[__pyx_v_i]) = __pyx_t_7; } /* "psycopg_binary/pq/pgconn.pyx":394 * * cdef libpq.Oid *atypes = NULL * if nparams: # <<<<<<<<<<<<<< * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): */ } /* "psycopg_binary/pq/pgconn.pyx":400 * * cdef libpq.PGresult *rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQprepare( * self._pgconn_ptr, name, command, nparams, atypes) */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":401 * cdef libpq.PGresult *rv * with nogil: * rv = libpq.PQprepare( # <<<<<<<<<<<<<< * self._pgconn_ptr, name, command, nparams, atypes) * PyMem_Free(atypes) */ __pyx_v_rv = PQprepare(__pyx_v_self->_pgconn_ptr, __pyx_v_name, __pyx_v_command, ((int)__pyx_v_nparams), __pyx_v_atypes); } /* "psycopg_binary/pq/pgconn.pyx":400 * * cdef libpq.PGresult *rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQprepare( * self._pgconn_ptr, name, command, nparams, atypes) */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L9; } __pyx_L9:; } } /* "psycopg_binary/pq/pgconn.pyx":403 * rv = libpq.PQprepare( * self._pgconn_ptr, name, command, nparams, atypes) * PyMem_Free(atypes) # <<<<<<<<<<<<<< * if rv is NULL: * raise e.OperationalError( */ PyMem_Free(__pyx_v_atypes); /* "psycopg_binary/pq/pgconn.pyx":404 * self._pgconn_ptr, name, command, nparams, atypes) * PyMem_Free(atypes) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"preparing query failed: {self.get_error_message()}") */ __pyx_t_2 = (__pyx_v_rv == NULL); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":405 * PyMem_Free(atypes) * if rv is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"preparing query failed: {self.get_error_message()}") * return PGresult._from_ptr(rv) */ __pyx_t_8 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "psycopg_binary/pq/pgconn.pyx":406 * if rv is NULL: * raise e.OperationalError( * f"preparing query failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * return PGresult._from_ptr(rv) * */ __pyx_t_11 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_11); __pyx_t_12 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL}; __pyx_t_9 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_t_9, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_preparing_query_failed, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_10))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10); assert(__pyx_t_8); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_10, __pyx__function); __pyx_t_12 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_9}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_10, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 405, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":404 * self._pgconn_ptr, name, command, nparams, atypes) * PyMem_Free(atypes) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"preparing query failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":407 * raise e.OperationalError( * f"preparing query failed: {self.get_error_message()}") * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * def exec_prepared( */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":378 * ) * * def prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.prepare", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_types_fast); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":409 * return PGresult._from_ptr(rv) * * def exec_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_41exec_prepared(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_41exec_prepared = {"exec_prepared", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_41exec_prepared, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_41exec_prepared(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_name; PyObject *__pyx_v_param_values = 0; PyObject *__pyx_v_param_formats = 0; int __pyx_v_result_format; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[4] = {0,0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exec_prepared (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_name,&__pyx_mstate_global->__pyx_n_u_param_values,&__pyx_mstate_global->__pyx_n_u_param_formats,&__pyx_mstate_global->__pyx_n_u_result_format,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 409, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "exec_prepared", 0) < (0)) __PYX_ERR(1, 409, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":413 * const char *name, * param_values: Sequence[bytes] | None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> PGresult: */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("exec_prepared", 0, 2, 4, i); __PYX_ERR(1, 409, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(1, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 409, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 409, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 409, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_name = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 411, __pyx_L3_error) __pyx_v_param_values = values[1]; __pyx_v_param_formats = values[2]; if (values[3]) { __pyx_v_result_format = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_result_format == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 414, __pyx_L3_error) } else { __pyx_v_result_format = __pyx_mstate_global->__pyx_k__9; } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("exec_prepared", 0, 2, 4, __pyx_nargs); __PYX_ERR(1, 409, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exec_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_40exec_prepared(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_name, __pyx_v_param_values, __pyx_v_param_formats, __pyx_v_result_format); /* "psycopg_binary/pq/pgconn.pyx":409 * return PGresult._from_ptr(rv) * * def exec_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_40exec_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name, PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_formats, int __pyx_v_result_format) { Py_ssize_t __pyx_v_cnparams; Oid *__pyx_v_ctypes; char *const *__pyx_v_cvalues; int *__pyx_v_clengths; int *__pyx_v_cformats; PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_t_2; Py_ssize_t __pyx_t_3; Oid *__pyx_t_4; char *const *__pyx_t_5; int *__pyx_t_6; int *__pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; size_t __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exec_prepared", 0); /* "psycopg_binary/pq/pgconn.pyx":416 * int result_format = PqFormat.TEXT, * ) -> PGresult: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * * cdef Py_ssize_t cnparams */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 416, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":423 * cdef int *clengths * cdef int *cformats * cnparams, ctypes, cvalues, clengths, cformats = _query_params_args( # <<<<<<<<<<<<<< * param_values, None, param_formats) * */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__query_params_args(__pyx_v_param_values, Py_None, __pyx_v_param_formats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 423, __pyx_L1_error) __pyx_t_3 = __pyx_t_2.f0; __pyx_t_4 = __pyx_t_2.f1; __pyx_t_5 = __pyx_t_2.f2; __pyx_t_6 = __pyx_t_2.f3; __pyx_t_7 = __pyx_t_2.f4; __pyx_v_cnparams = __pyx_t_3; __pyx_v_ctypes = __pyx_t_4; __pyx_v_cvalues = __pyx_t_5; __pyx_v_clengths = __pyx_t_6; __pyx_v_cformats = __pyx_t_7; /* "psycopg_binary/pq/pgconn.pyx":427 * * cdef libpq.PGresult *rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQexecPrepared( * self._pgconn_ptr, name, cnparams, */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":428 * cdef libpq.PGresult *rv * with nogil: * rv = libpq.PQexecPrepared( # <<<<<<<<<<<<<< * self._pgconn_ptr, name, cnparams, * cvalues, */ __pyx_v_rv = PQexecPrepared(__pyx_v_self->_pgconn_ptr, __pyx_v_name, ((int)__pyx_v_cnparams), ((char const *const *)__pyx_v_cvalues), __pyx_v_clengths, __pyx_v_cformats, __pyx_v_result_format); } /* "psycopg_binary/pq/pgconn.pyx":427 * * cdef libpq.PGresult *rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQexecPrepared( * self._pgconn_ptr, name, cnparams, */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":433 * clengths, cformats, result_format) * * _clear_query_params(ctypes, cvalues, clengths, cformats) # <<<<<<<<<<<<<< * if rv is NULL: * raise e.OperationalError( */ __pyx_f_14psycopg_binary_2pq__clear_query_params(__pyx_v_ctypes, __pyx_v_cvalues, __pyx_v_clengths, __pyx_v_cformats); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 433, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":434 * * _clear_query_params(ctypes, cvalues, clengths, cformats) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"executing prepared query failed: {self.get_error_message()}" */ __pyx_t_8 = (__pyx_v_rv == NULL); if (unlikely(__pyx_t_8)) { /* "psycopg_binary/pq/pgconn.pyx":435 * _clear_query_params(ctypes, cvalues, clengths, cformats) * if rv is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"executing prepared query failed: {self.get_error_message()}" * ) */ __pyx_t_10 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; /* "psycopg_binary/pq/pgconn.pyx":436 * if rv is NULL: * raise e.OperationalError( * f"executing prepared query failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * return PGresult._from_ptr(rv) */ __pyx_t_13 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_13); __pyx_t_14 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL}; __pyx_t_11 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_14, (1-__pyx_t_14) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); } __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_t_11, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_executing_prepared_query_failed, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_12))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_12); assert(__pyx_t_10); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_12); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_12, __pyx__function); __pyx_t_14 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_11}; __pyx_t_9 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_12, __pyx_callargs+__pyx_t_14, (2-__pyx_t_14) | (__pyx_t_14*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); } __Pyx_Raise(__pyx_t_9, 0, 0, 0); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __PYX_ERR(1, 435, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":434 * * _clear_query_params(ctypes, cvalues, clengths, cformats) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"executing prepared query failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":438 * f"executing prepared query failed: {self.get_error_message()}" * ) * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * def describe_prepared(self, const char *name) -> PGresult: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_9 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":409 * return PGresult._from_ptr(rv) * * def exec_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exec_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":440 * return PGresult._from_ptr(rv) * * def describe_prepared(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_43describe_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_43describe_prepared = {"describe_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_43describe_prepared, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_43describe_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("describe_prepared (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 440, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.describe_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_42describe_prepared(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_42describe_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("describe_prepared", 0); /* "psycopg_binary/pq/pgconn.pyx":441 * * def describe_prepared(self, const char *name) -> PGresult: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) * if rv is NULL: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 441, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":442 * def describe_prepared(self, const char *name) -> PGresult: * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if rv is NULL: * raise e.OperationalError( */ __pyx_v_rv = PQdescribePrepared(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":443 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"describe prepared failed: {self.get_error_message()}" */ __pyx_t_2 = (__pyx_v_rv == NULL); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":444 * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) * if rv is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"describe prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":445 * if rv is NULL: * raise e.OperationalError( * f"describe prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * return PGresult._from_ptr(rv) */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_describe_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 444, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":443 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"describe prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":447 * f"describe prepared failed: {self.get_error_message()}" * ) * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * def send_describe_prepared(self, const char *name) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":440 * return PGresult._from_ptr(rv) * * def describe_prepared(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.describe_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":449 * return PGresult._from_ptr(rv) * * def send_describe_prepared(self, const char *name) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_45send_describe_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_45send_describe_prepared = {"send_describe_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_45send_describe_prepared, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_45send_describe_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_describe_prepared (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 449, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_describe_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_44send_describe_prepared(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_44send_describe_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_describe_prepared", 0); /* "psycopg_binary/pq/pgconn.pyx":450 * * def send_describe_prepared(self, const char *name) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) * if not rv: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 450, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":451 * def send_describe_prepared(self, const char *name) -> None: * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_v_rv = PQsendDescribePrepared(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":452 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending describe prepared failed: {self.get_error_message()}" */ __pyx_t_2 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":453 * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending describe prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":454 * if not rv: * raise e.OperationalError( * f"sending describe prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_describe_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 453, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":452 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending describe prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":449 * return PGresult._from_ptr(rv) * * def send_describe_prepared(self, const char *name) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_describe_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":457 * ) * * def describe_portal(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_47describe_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_47describe_portal = {"describe_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_47describe_portal, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_47describe_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("describe_portal (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 457, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.describe_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_46describe_portal(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_46describe_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("describe_portal", 0); /* "psycopg_binary/pq/pgconn.pyx":458 * * def describe_portal(self, const char *name) -> PGresult: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) * if rv is NULL: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 458, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":459 * def describe_portal(self, const char *name) -> PGresult: * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if rv is NULL: * raise e.OperationalError( */ __pyx_v_rv = PQdescribePortal(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":460 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"describe prepared failed: {self.get_error_message()}" */ __pyx_t_2 = (__pyx_v_rv == NULL); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":461 * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) * if rv is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"describe prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":462 * if rv is NULL: * raise e.OperationalError( * f"describe prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * return PGresult._from_ptr(rv) */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_describe_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 461, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":460 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"describe prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":464 * f"describe prepared failed: {self.get_error_message()}" * ) * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * def send_describe_portal(self, const char *name) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_3 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":457 * ) * * def describe_portal(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.describe_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":466 * return PGresult._from_ptr(rv) * * def send_describe_portal(self, const char *name) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_49send_describe_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_49send_describe_portal = {"send_describe_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_49send_describe_portal, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_49send_describe_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_describe_portal (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 466, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_describe_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_48send_describe_portal(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_48send_describe_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_describe_portal", 0); /* "psycopg_binary/pq/pgconn.pyx":467 * * def send_describe_portal(self, const char *name) -> None: * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) * if not rv: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 467, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":468 * def send_describe_portal(self, const char *name) -> None: * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_v_rv = PQsendDescribePortal(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":469 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending describe prepared failed: {self.get_error_message()}" */ __pyx_t_2 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":470 * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending describe prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":471 * if not rv: * raise e.OperationalError( * f"sending describe prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_describe_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 470, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":469 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending describe prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":466 * return PGresult._from_ptr(rv) * * def send_describe_portal(self, const char *name) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_describe_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":474 * ) * * def close_prepared(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _check_supported("PQclosePrepared", 170000) * _ensure_pgconn(self) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_51close_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_51close_prepared = {"close_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_51close_prepared, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_51close_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close_prepared (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 474, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.close_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_50close_prepared(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_50close_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close_prepared", 0); /* "psycopg_binary/pq/pgconn.pyx":475 * * def close_prepared(self, const char *name) -> PGresult: * _check_supported("PQclosePrepared", 170000) # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePrepared(self._pgconn_ptr, name) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQclosePrepared, 0x29810); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":476 * def close_prepared(self, const char *name) -> PGresult: * _check_supported("PQclosePrepared", 170000) * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQclosePrepared(self._pgconn_ptr, name) * if rv is NULL: */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 476, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":477 * _check_supported("PQclosePrepared", 170000) * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePrepared(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if rv is NULL: * raise e.OperationalError( */ __pyx_v_rv = PQclosePrepared(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":478 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePrepared(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"close prepared failed: {self.get_error_message()}" */ __pyx_t_3 = (__pyx_v_rv == NULL); if (unlikely(__pyx_t_3)) { /* "psycopg_binary/pq/pgconn.pyx":479 * cdef libpq.PGresult *rv = libpq.PQclosePrepared(self._pgconn_ptr, name) * if rv is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"close prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":480 * if rv is NULL: * raise e.OperationalError( * f"close prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * return PGresult._from_ptr(rv) */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_close_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 479, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":478 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePrepared(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"close prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":482 * f"close prepared failed: {self.get_error_message()}" * ) * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * def send_close_prepared(self, const char *name) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":474 * ) * * def close_prepared(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _check_supported("PQclosePrepared", 170000) * _ensure_pgconn(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.close_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":484 * return PGresult._from_ptr(rv) * * def send_close_prepared(self, const char *name) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsendClosePrepared", 170000) * _ensure_pgconn(self) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_53send_close_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_53send_close_prepared = {"send_close_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_53send_close_prepared, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_53send_close_prepared(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_close_prepared (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 484, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_close_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_52send_close_prepared(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_52send_close_prepared(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_close_prepared", 0); /* "psycopg_binary/pq/pgconn.pyx":485 * * def send_close_prepared(self, const char *name) -> None: * _check_supported("PQsendClosePrepared", 170000) # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePrepared(self._pgconn_ptr, name) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQsendClosePrepared, 0x29810); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":486 * def send_close_prepared(self, const char *name) -> None: * _check_supported("PQsendClosePrepared", 170000) * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef int rv = libpq.PQsendClosePrepared(self._pgconn_ptr, name) * if not rv: */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 486, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":487 * _check_supported("PQsendClosePrepared", 170000) * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePrepared(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_v_rv = PQsendClosePrepared(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":488 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePrepared(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending close prepared failed: {self.get_error_message()}" */ __pyx_t_3 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_3)) { /* "psycopg_binary/pq/pgconn.pyx":489 * cdef int rv = libpq.PQsendClosePrepared(self._pgconn_ptr, name) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending close prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":490 * if not rv: * raise e.OperationalError( * f"sending close prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_close_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 489, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":488 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePrepared(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending close prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":484 * return PGresult._from_ptr(rv) * * def send_close_prepared(self, const char *name) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsendClosePrepared", 170000) * _ensure_pgconn(self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_close_prepared", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":493 * ) * * def close_portal(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _check_supported("PQclosePortal", 170000) * _ensure_pgconn(self) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_55close_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_55close_portal = {"close_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_55close_portal, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_55close_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close_portal (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 493, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.close_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_54close_portal(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_54close_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close_portal", 0); /* "psycopg_binary/pq/pgconn.pyx":494 * * def close_portal(self, const char *name) -> PGresult: * _check_supported("PQclosePortal", 170000) # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePortal(self._pgconn_ptr, name) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQclosePortal, 0x29810); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":495 * def close_portal(self, const char *name) -> PGresult: * _check_supported("PQclosePortal", 170000) * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQclosePortal(self._pgconn_ptr, name) * if rv is NULL: */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 495, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":496 * _check_supported("PQclosePortal", 170000) * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePortal(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if rv is NULL: * raise e.OperationalError( */ __pyx_v_rv = PQclosePortal(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":497 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePortal(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"close prepared failed: {self.get_error_message()}" */ __pyx_t_3 = (__pyx_v_rv == NULL); if (unlikely(__pyx_t_3)) { /* "psycopg_binary/pq/pgconn.pyx":498 * cdef libpq.PGresult *rv = libpq.PQclosePortal(self._pgconn_ptr, name) * if rv is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"close prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":499 * if rv is NULL: * raise e.OperationalError( * f"close prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * return PGresult._from_ptr(rv) */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_close_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 498, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":497 * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQclosePortal(self._pgconn_ptr, name) * if rv is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"close prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":501 * f"close prepared failed: {self.get_error_message()}" * ) * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * def send_close_portal(self, const char *name) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":493 * ) * * def close_portal(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _check_supported("PQclosePortal", 170000) * _ensure_pgconn(self) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.close_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":503 * return PGresult._from_ptr(rv) * * def send_close_portal(self, const char *name) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsendClosePortal", 170000) * _ensure_pgconn(self) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_57send_close_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_57send_close_portal = {"send_close_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_57send_close_portal, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_57send_close_portal(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) { char const *__pyx_v_name; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_close_portal (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_name); { __pyx_v_name = __Pyx_PyObject_AsString(__pyx_arg_name); if (unlikely((!__pyx_v_name) && PyErr_Occurred())) __PYX_ERR(1, 503, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_close_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_56send_close_portal(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((char const *)__pyx_v_name)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_56send_close_portal(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_name) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_close_portal", 0); /* "psycopg_binary/pq/pgconn.pyx":504 * * def send_close_portal(self, const char *name) -> None: * _check_supported("PQsendClosePortal", 170000) # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePortal(self._pgconn_ptr, name) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQsendClosePortal, 0x29810); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":505 * def send_close_portal(self, const char *name) -> None: * _check_supported("PQsendClosePortal", 170000) * _ensure_pgconn(self) # <<<<<<<<<<<<<< * cdef int rv = libpq.PQsendClosePortal(self._pgconn_ptr, name) * if not rv: */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_self); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 505, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":506 * _check_supported("PQsendClosePortal", 170000) * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePortal(self._pgconn_ptr, name) # <<<<<<<<<<<<<< * if not rv: * raise e.OperationalError( */ __pyx_v_rv = PQsendClosePortal(__pyx_v_self->_pgconn_ptr, __pyx_v_name); /* "psycopg_binary/pq/pgconn.pyx":507 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePortal(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending close prepared failed: {self.get_error_message()}" */ __pyx_t_3 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_3)) { /* "psycopg_binary/pq/pgconn.pyx":508 * cdef int rv = libpq.PQsendClosePortal(self._pgconn_ptr, name) * if not rv: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending close prepared failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":509 * if not rv: * raise e.OperationalError( * f"sending close prepared failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_close_prepared_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 508, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":507 * _ensure_pgconn(self) * cdef int rv = libpq.PQsendClosePortal(self._pgconn_ptr, name) * if not rv: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending close prepared failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":503 * return PGresult._from_ptr(rv) * * def send_close_portal(self, const char *name) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsendClosePortal", 170000) * _ensure_pgconn(self) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_close_portal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":512 * ) * * def get_result(self) -> "PGresult" | None: # <<<<<<<<<<<<<< * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) * if pgresult is NULL: */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_59get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_59get_result = {"get_result", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_59get_result, METH_NOARGS, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_59get_result(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_result (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_58get_result(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_58get_result(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PGresult *__pyx_v_pgresult; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_result", 0); /* "psycopg_binary/pq/pgconn.pyx":513 * * def get_result(self) -> "PGresult" | None: * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) # <<<<<<<<<<<<<< * if pgresult is NULL: * return None */ __pyx_v_pgresult = PQgetResult(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":514 * def get_result(self) -> "PGresult" | None: * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) * if pgresult is NULL: # <<<<<<<<<<<<<< * return None * return PGresult._from_ptr(pgresult) */ __pyx_t_1 = (__pyx_v_pgresult == NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":515 * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) * if pgresult is NULL: * return None # <<<<<<<<<<<<<< * return PGresult._from_ptr(pgresult) * */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":514 * def get_result(self) -> "PGresult" | None: * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) * if pgresult is NULL: # <<<<<<<<<<<<<< * return None * return PGresult._from_ptr(pgresult) */ } /* "psycopg_binary/pq/pgconn.pyx":516 * if pgresult is NULL: * return None * return PGresult._from_ptr(pgresult) # <<<<<<<<<<<<<< * * def consume_input(self) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_pgresult)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":512 * ) * * def get_result(self) -> "PGresult" | None: # <<<<<<<<<<<<<< * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) * if pgresult is NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.get_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":518 * return PGresult._from_ptr(pgresult) * * def consume_input(self) -> None: # <<<<<<<<<<<<<< * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): * raise e.OperationalError( */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_61consume_input(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_61consume_input = {"consume_input", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_61consume_input, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_61consume_input(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("consume_input (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_60consume_input(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_60consume_input(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("consume_input", 0); /* "psycopg_binary/pq/pgconn.pyx":519 * * def consume_input(self) -> None: * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"consuming input failed: {self.get_error_message()}") */ __pyx_t_1 = (1 != PQconsumeInput(__pyx_v_self->_pgconn_ptr)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":520 * def consume_input(self) -> None: * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): * raise e.OperationalError( # <<<<<<<<<<<<<< * f"consuming input failed: {self.get_error_message()}") * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":521 * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): * raise e.OperationalError( * f"consuming input failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * * def is_busy(self) -> int: */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_consuming_input_failed, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 520, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":519 * * def consume_input(self) -> None: * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"consuming input failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":518 * return PGresult._from_ptr(pgresult) * * def consume_input(self) -> None: # <<<<<<<<<<<<<< * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): * raise e.OperationalError( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.consume_input", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":523 * f"consuming input failed: {self.get_error_message()}") * * def is_busy(self) -> int: # <<<<<<<<<<<<<< * cdef int rv * with nogil: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_63is_busy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_63is_busy = {"is_busy", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_63is_busy, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_63is_busy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_busy (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_62is_busy(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_62is_busy(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_busy", 0); /* "psycopg_binary/pq/pgconn.pyx":525 * def is_busy(self) -> int: * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQisBusy(self._pgconn_ptr) * return rv */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":526 * cdef int rv * with nogil: * rv = libpq.PQisBusy(self._pgconn_ptr) # <<<<<<<<<<<<<< * return rv * */ __pyx_v_rv = PQisBusy(__pyx_v_self->_pgconn_ptr); } /* "psycopg_binary/pq/pgconn.pyx":525 * def is_busy(self) -> int: * cdef int rv * with nogil: # <<<<<<<<<<<<<< * rv = libpq.PQisBusy(self._pgconn_ptr) * return rv */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":527 * with nogil: * rv = libpq.PQisBusy(self._pgconn_ptr) * return rv # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(1, 527, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":523 * f"consuming input failed: {self.get_error_message()}") * * def is_busy(self) -> int: # <<<<<<<<<<<<<< * cdef int rv * with nogil: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.is_busy", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":529 * return rv * * @property # <<<<<<<<<<<<<< * def nonblocking(self) -> int: * return libpq.PQisnonblocking(self._pgconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11nonblocking_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_11nonblocking_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_11nonblocking___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_11nonblocking___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":531 * @property * def nonblocking(self) -> int: * return libpq.PQisnonblocking(self._pgconn_ptr) # <<<<<<<<<<<<<< * * @nonblocking.setter */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQisnonblocking(__pyx_v_self->_pgconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":529 * return rv * * @property # <<<<<<<<<<<<<< * def nonblocking(self) -> int: * return libpq.PQisnonblocking(self._pgconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.nonblocking.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":533 * return libpq.PQisnonblocking(self._pgconn_ptr) * * @nonblocking.setter # <<<<<<<<<<<<<< * def nonblocking(self, int arg) -> None: * if 0 > libpq.PQsetnonblocking(self._pgconn_ptr, arg): */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_11nonblocking_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_arg); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_11nonblocking_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_arg) { int __pyx_v_arg; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_arg); { __pyx_v_arg = __Pyx_PyLong_As_int(__pyx_arg_arg); if (unlikely((__pyx_v_arg == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 534, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.nonblocking.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_11nonblocking_2__set__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((int)__pyx_v_arg)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_6PGconn_11nonblocking_2__set__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_v_arg) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "psycopg_binary/pq/pgconn.pyx":535 * @nonblocking.setter * def nonblocking(self, int arg) -> None: * if 0 > libpq.PQsetnonblocking(self._pgconn_ptr, arg): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"setting nonblocking failed: {self.get_error_message()}") */ __pyx_t_1 = (0 > PQsetnonblocking(__pyx_v_self->_pgconn_ptr, __pyx_v_arg)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":536 * def nonblocking(self, int arg) -> None: * if 0 > libpq.PQsetnonblocking(self._pgconn_ptr, arg): * raise e.OperationalError( # <<<<<<<<<<<<<< * f"setting nonblocking failed: {self.get_error_message()}") * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":537 * if 0 > libpq.PQsetnonblocking(self._pgconn_ptr, arg): * raise e.OperationalError( * f"setting nonblocking failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * * cpdef int flush(self) except -1: */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_setting_nonblocking_failed, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 536, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":535 * @nonblocking.setter * def nonblocking(self, int arg) -> None: * if 0 > libpq.PQsetnonblocking(self._pgconn_ptr, arg): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"setting nonblocking failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":533 * return libpq.PQisnonblocking(self._pgconn_ptr) * * @nonblocking.setter # <<<<<<<<<<<<<< * def nonblocking(self, int arg) -> None: * if 0 > libpq.PQsetnonblocking(self._pgconn_ptr, arg): */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.nonblocking.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":539 * f"setting nonblocking failed: {self.get_error_message()}") * * cpdef int flush(self) except -1: # <<<<<<<<<<<<<< * if self._pgconn_ptr == NULL: * raise e.OperationalError("flushing failed: the connection is closed") */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_65flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static int __pyx_f_14psycopg_binary_2pq_6PGconn_flush(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_skip_dispatch) { int __pyx_v_rv; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flush", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_flush); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_6PGconn_65flush)) { __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_6 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/pgconn.pyx":540 * * cpdef int flush(self) except -1: * if self._pgconn_ptr == NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("flushing failed: the connection is closed") * cdef int rv = libpq.PQflush(self._pgconn_ptr) */ __pyx_t_7 = (__pyx_v_self->_pgconn_ptr == NULL); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/pgconn.pyx":541 * cpdef int flush(self) except -1: * if self._pgconn_ptr == NULL: * raise e.OperationalError("flushing failed: the connection is closed") # <<<<<<<<<<<<<< * cdef int rv = libpq.PQflush(self._pgconn_ptr) * if rv < 0: */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_flushing_failed_the_connection_i}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 541, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":540 * * cpdef int flush(self) except -1: * if self._pgconn_ptr == NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("flushing failed: the connection is closed") * cdef int rv = libpq.PQflush(self._pgconn_ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":542 * if self._pgconn_ptr == NULL: * raise e.OperationalError("flushing failed: the connection is closed") * cdef int rv = libpq.PQflush(self._pgconn_ptr) # <<<<<<<<<<<<<< * if rv < 0: * raise e.OperationalError(f"flushing failed: {self.get_error_message()}") */ __pyx_v_rv = PQflush(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":543 * raise e.OperationalError("flushing failed: the connection is closed") * cdef int rv = libpq.PQflush(self._pgconn_ptr) * if rv < 0: # <<<<<<<<<<<<<< * raise e.OperationalError(f"flushing failed: {self.get_error_message()}") * return rv */ __pyx_t_7 = (__pyx_v_rv < 0); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/pgconn.pyx":544 * cdef int rv = libpq.PQflush(self._pgconn_ptr) * if rv < 0: * raise e.OperationalError(f"flushing failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * return rv * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_flushing_failed, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 544, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":543 * raise e.OperationalError("flushing failed: the connection is closed") * cdef int rv = libpq.PQflush(self._pgconn_ptr) * if rv < 0: # <<<<<<<<<<<<<< * raise e.OperationalError(f"flushing failed: {self.get_error_message()}") * return rv */ } /* "psycopg_binary/pq/pgconn.pyx":545 * if rv < 0: * raise e.OperationalError(f"flushing failed: {self.get_error_message()}") * return rv # <<<<<<<<<<<<<< * * def set_single_row_mode(self) -> None: */ __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":539 * f"setting nonblocking failed: {self.get_error_message()}") * * cpdef int flush(self) except -1: # <<<<<<<<<<<<<< * if self._pgconn_ptr == NULL: * raise e.OperationalError("flushing failed: the connection is closed") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_65flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_65flush = {"flush", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_65flush, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_65flush(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("flush (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_64flush(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_64flush(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flush", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_6PGconn_flush(__pyx_v_self, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 539, __pyx_L1_error) __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.flush", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":547 * return rv * * def set_single_row_mode(self) -> None: # <<<<<<<<<<<<<< * if not libpq.PQsetSingleRowMode(self._pgconn_ptr): * raise e.OperationalError("setting single row mode failed") */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_67set_single_row_mode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_67set_single_row_mode = {"set_single_row_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_67set_single_row_mode, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_67set_single_row_mode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_single_row_mode (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_66set_single_row_mode(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_66set_single_row_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_single_row_mode", 0); /* "psycopg_binary/pq/pgconn.pyx":548 * * def set_single_row_mode(self) -> None: * if not libpq.PQsetSingleRowMode(self._pgconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError("setting single row mode failed") * */ __pyx_t_1 = (!(PQsetSingleRowMode(__pyx_v_self->_pgconn_ptr) != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":549 * def set_single_row_mode(self) -> None: * if not libpq.PQsetSingleRowMode(self._pgconn_ptr): * raise e.OperationalError("setting single row mode failed") # <<<<<<<<<<<<<< * * def set_chunked_rows_mode(self, size: int) -> None: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_setting_single_row_mode_failed}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 549, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":548 * * def set_single_row_mode(self) -> None: * if not libpq.PQsetSingleRowMode(self._pgconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError("setting single row mode failed") * */ } /* "psycopg_binary/pq/pgconn.pyx":547 * return rv * * def set_single_row_mode(self) -> None: # <<<<<<<<<<<<<< * if not libpq.PQsetSingleRowMode(self._pgconn_ptr): * raise e.OperationalError("setting single row mode failed") */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.set_single_row_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":551 * raise e.OperationalError("setting single row mode failed") * * def set_chunked_rows_mode(self, size: int) -> None: # <<<<<<<<<<<<<< * if not libpq.PQsetChunkedRowsMode(self._pgconn_ptr, size): * raise e.OperationalError("setting chunked rows mode failed") */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_69set_chunked_rows_mode(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_69set_chunked_rows_mode = {"set_chunked_rows_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_69set_chunked_rows_mode, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_69set_chunked_rows_mode(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_chunked_rows_mode (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_size), (&PyLong_Type), 0, "size", 2))) __PYX_ERR(1, 551, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_68set_chunked_rows_mode(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject*)__pyx_v_size)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; goto __pyx_L5_cleaned_up; __pyx_L0:; __pyx_L5_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_68set_chunked_rows_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_chunked_rows_mode", 0); /* "psycopg_binary/pq/pgconn.pyx":552 * * def set_chunked_rows_mode(self, size: int) -> None: * if not libpq.PQsetChunkedRowsMode(self._pgconn_ptr, size): # <<<<<<<<<<<<<< * raise e.OperationalError("setting chunked rows mode failed") * */ __pyx_t_1 = __Pyx_PyLong_As_int(__pyx_v_size); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 552, __pyx_L1_error) __pyx_t_2 = (!(PQsetChunkedRowsMode(__pyx_v_self->_pgconn_ptr, __pyx_t_1) != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":553 * def set_chunked_rows_mode(self, size: int) -> None: * if not libpq.PQsetChunkedRowsMode(self._pgconn_ptr, size): * raise e.OperationalError("setting chunked rows mode failed") # <<<<<<<<<<<<<< * * def cancel_conn(self) -> PGcancelConn: */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_kp_u_setting_chunked_rows_mode_failed}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 553, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":552 * * def set_chunked_rows_mode(self, size: int) -> None: * if not libpq.PQsetChunkedRowsMode(self._pgconn_ptr, size): # <<<<<<<<<<<<<< * raise e.OperationalError("setting chunked rows mode failed") * */ } /* "psycopg_binary/pq/pgconn.pyx":551 * raise e.OperationalError("setting single row mode failed") * * def set_chunked_rows_mode(self, size: int) -> None: # <<<<<<<<<<<<<< * if not libpq.PQsetChunkedRowsMode(self._pgconn_ptr, size): * raise e.OperationalError("setting chunked rows mode failed") */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.set_chunked_rows_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":555 * raise e.OperationalError("setting chunked rows mode failed") * * def cancel_conn(self) -> PGcancelConn: # <<<<<<<<<<<<<< * _check_supported("PQcancelCreate", 170000) * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_pw_14psycopg_binary_2pq_6PGconn_71cancel_conn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_71cancel_conn = {"cancel_conn", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_71cancel_conn, METH_NOARGS, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_pw_14psycopg_binary_2pq_6PGconn_71cancel_conn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel_conn (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_70cancel_conn(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_pf_14psycopg_binary_2pq_6PGconn_70cancel_conn(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PGcancelConn *__pyx_v_ptr; struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancel_conn", 0); /* "psycopg_binary/pq/pgconn.pyx":556 * * def cancel_conn(self) -> PGcancelConn: * _check_supported("PQcancelCreate", 170000) # <<<<<<<<<<<<<< * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) * if not ptr: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQcancelCreate, 0x29810); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":557 * def cancel_conn(self) -> PGcancelConn: * _check_supported("PQcancelCreate", 170000) * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) # <<<<<<<<<<<<<< * if not ptr: * raise e.OperationalError("couldn't create cancelConn object") */ __pyx_v_ptr = PQcancelCreate(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":558 * _check_supported("PQcancelCreate", 170000) * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) * if not ptr: # <<<<<<<<<<<<<< * raise e.OperationalError("couldn't create cancelConn object") * return PGcancelConn._from_ptr(ptr) */ __pyx_t_2 = (!(__pyx_v_ptr != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":559 * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) * if not ptr: * raise e.OperationalError("couldn't create cancelConn object") # <<<<<<<<<<<<<< * return PGcancelConn._from_ptr(ptr) * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_create_cancelConn_objec}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 559, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":558 * _check_supported("PQcancelCreate", 170000) * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) * if not ptr: # <<<<<<<<<<<<<< * raise e.OperationalError("couldn't create cancelConn object") * return PGcancelConn._from_ptr(ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":560 * if not ptr: * raise e.OperationalError("couldn't create cancelConn object") * return PGcancelConn._from_ptr(ptr) # <<<<<<<<<<<<<< * * def get_cancel(self) -> PGcancel: */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_12PGcancelConn__from_ptr(__pyx_v_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":555 * raise e.OperationalError("setting chunked rows mode failed") * * def cancel_conn(self) -> PGcancelConn: # <<<<<<<<<<<<<< * _check_supported("PQcancelCreate", 170000) * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.cancel_conn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":562 * return PGcancelConn._from_ptr(ptr) * * def get_cancel(self) -> PGcancel: # <<<<<<<<<<<<<< * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) * if not ptr: */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_pw_14psycopg_binary_2pq_6PGconn_73get_cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_73get_cancel = {"get_cancel", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_73get_cancel, METH_NOARGS, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_pw_14psycopg_binary_2pq_6PGconn_73get_cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_cancel (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_72get_cancel(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_pf_14psycopg_binary_2pq_6PGconn_72get_cancel(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PGcancel *__pyx_v_ptr; struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cancel", 0); /* "psycopg_binary/pq/pgconn.pyx":563 * * def get_cancel(self) -> PGcancel: * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) # <<<<<<<<<<<<<< * if not ptr: * raise e.OperationalError("couldn't create cancel object") */ __pyx_v_ptr = PQgetCancel(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":564 * def get_cancel(self) -> PGcancel: * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) * if not ptr: # <<<<<<<<<<<<<< * raise e.OperationalError("couldn't create cancel object") * return PGcancel._from_ptr(ptr) */ __pyx_t_1 = (!(__pyx_v_ptr != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":565 * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) * if not ptr: * raise e.OperationalError("couldn't create cancel object") # <<<<<<<<<<<<<< * return PGcancel._from_ptr(ptr) * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_create_cancel_object}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 565, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":564 * def get_cancel(self) -> PGcancel: * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) * if not ptr: # <<<<<<<<<<<<<< * raise e.OperationalError("couldn't create cancel object") * return PGcancel._from_ptr(ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":566 * if not ptr: * raise e.OperationalError("couldn't create cancel object") * return PGcancel._from_ptr(ptr) # <<<<<<<<<<<<<< * * cpdef object notifies(self): */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGcancel__from_ptr(__pyx_v_ptr)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":562 * return PGcancelConn._from_ptr(ptr) * * def get_cancel(self) -> PGcancel: # <<<<<<<<<<<<<< * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) * if not ptr: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.get_cancel", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":568 * return PGcancel._from_ptr(ptr) * * cpdef object notifies(self): # <<<<<<<<<<<<<< * cdef libpq.PGnotify *ptr * with nogil: */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_75notifies(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_6PGconn_notifies(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_skip_dispatch) { PGnotify *__pyx_v_ptr; PyObject *__pyx_v_ret = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("notifies", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_notifies); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_6PGconn_75notifies)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/pgconn.pyx":570 * cpdef object notifies(self): * cdef libpq.PGnotify *ptr * with nogil: # <<<<<<<<<<<<<< * ptr = libpq.PQnotifies(self._pgconn_ptr) * if ptr: */ { PyThreadState * _save; _save = PyEval_SaveThread(); __Pyx_FastGIL_Remember(); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":571 * cdef libpq.PGnotify *ptr * with nogil: * ptr = libpq.PQnotifies(self._pgconn_ptr) # <<<<<<<<<<<<<< * if ptr: * ret = PGnotify(ptr.relname, ptr.be_pid, ptr.extra) */ __pyx_v_ptr = PQnotifies(__pyx_v_self->_pgconn_ptr); } /* "psycopg_binary/pq/pgconn.pyx":570 * cpdef object notifies(self): * cdef libpq.PGnotify *ptr * with nogil: # <<<<<<<<<<<<<< * ptr = libpq.PQnotifies(self._pgconn_ptr) * if ptr: */ /*finally:*/ { /*normal exit:*/{ __Pyx_FastGIL_Forget(); PyEval_RestoreThread(_save); goto __pyx_L5; } __pyx_L5:; } } /* "psycopg_binary/pq/pgconn.pyx":572 * with nogil: * ptr = libpq.PQnotifies(self._pgconn_ptr) * if ptr: # <<<<<<<<<<<<<< * ret = PGnotify(ptr.relname, ptr.be_pid, ptr.extra) * libpq.PQfreemem(ptr) */ __pyx_t_6 = (__pyx_v_ptr != 0); if (__pyx_t_6) { /* "psycopg_binary/pq/pgconn.pyx":573 * ptr = libpq.PQnotifies(self._pgconn_ptr) * if ptr: * ret = PGnotify(ptr.relname, ptr.be_pid, ptr.extra) # <<<<<<<<<<<<<< * libpq.PQfreemem(ptr) * return ret */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PGnotify); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_ptr->relname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyLong_From_int(__pyx_v_ptr->be_pid); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyBytes_FromString(__pyx_v_ptr->extra); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_t_3, __pyx_t_7, __pyx_t_8}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (4-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_ret = __pyx_t_1; __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":574 * if ptr: * ret = PGnotify(ptr.relname, ptr.be_pid, ptr.extra) * libpq.PQfreemem(ptr) # <<<<<<<<<<<<<< * return ret * else: */ PQfreemem(__pyx_v_ptr); /* "psycopg_binary/pq/pgconn.pyx":575 * ret = PGnotify(ptr.relname, ptr.be_pid, ptr.extra) * libpq.PQfreemem(ptr) * return ret # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_ret); __pyx_r = __pyx_v_ret; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":572 * with nogil: * ptr = libpq.PQnotifies(self._pgconn_ptr) * if ptr: # <<<<<<<<<<<<<< * ret = PGnotify(ptr.relname, ptr.be_pid, ptr.extra) * libpq.PQfreemem(ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":577 * return ret * else: * return None # <<<<<<<<<<<<<< * * def put_copy_data(self, buffer) -> int: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgconn.pyx":568 * return PGcancel._from_ptr(ptr) * * cpdef object notifies(self): # <<<<<<<<<<<<<< * cdef libpq.PGnotify *ptr * with nogil: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.notifies", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ret); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_75notifies(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_75notifies = {"notifies", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_75notifies, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_75notifies(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("notifies (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_74notifies(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_74notifies(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("notifies", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_6PGconn_notifies(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.notifies", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":579 * return None * * def put_copy_data(self, buffer) -> int: # <<<<<<<<<<<<<< * cdef int rv * cdef char *cbuffer */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_77put_copy_data(PyObject *__pyx_v_self, PyObject *__pyx_v_buffer); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_77put_copy_data = {"put_copy_data", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_77put_copy_data, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_77put_copy_data(PyObject *__pyx_v_self, PyObject *__pyx_v_buffer) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("put_copy_data (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_76put_copy_data(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject *)__pyx_v_buffer)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_76put_copy_data(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_buffer) { int __pyx_v_rv; char *__pyx_v_cbuffer; Py_ssize_t __pyx_v_length; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("put_copy_data", 0); /* "psycopg_binary/pq/pgconn.pyx":584 * cdef Py_ssize_t length * * _buffer_as_string_and_size(buffer, &cbuffer, &length) # <<<<<<<<<<<<<< * rv = libpq.PQputCopyData(self._pgconn_ptr, cbuffer, length) * if rv < 0: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(__pyx_v_buffer, (&__pyx_v_cbuffer), (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 584, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":585 * * _buffer_as_string_and_size(buffer, &cbuffer, &length) * rv = libpq.PQputCopyData(self._pgconn_ptr, cbuffer, length) # <<<<<<<<<<<<<< * if rv < 0: * raise e.OperationalError( */ __pyx_v_rv = PQputCopyData(__pyx_v_self->_pgconn_ptr, __pyx_v_cbuffer, ((int)__pyx_v_length)); /* "psycopg_binary/pq/pgconn.pyx":586 * _buffer_as_string_and_size(buffer, &cbuffer, &length) * rv = libpq.PQputCopyData(self._pgconn_ptr, cbuffer, length) * if rv < 0: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending copy data failed: {self.get_error_message()}") */ __pyx_t_2 = (__pyx_v_rv < 0); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":587 * rv = libpq.PQputCopyData(self._pgconn_ptr, cbuffer, length) * if rv < 0: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending copy data failed: {self.get_error_message()}") * return rv */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":588 * if rv < 0: * raise e.OperationalError( * f"sending copy data failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * return rv * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_copy_data_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 587, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":586 * _buffer_as_string_and_size(buffer, &cbuffer, &length) * rv = libpq.PQputCopyData(self._pgconn_ptr, cbuffer, length) * if rv < 0: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending copy data failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":589 * raise e.OperationalError( * f"sending copy data failed: {self.get_error_message()}") * return rv # <<<<<<<<<<<<<< * * def put_copy_end(self, error: bytes | None = None) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(1, 589, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":579 * return None * * def put_copy_data(self, buffer) -> int: # <<<<<<<<<<<<<< * cdef int rv * cdef char *cbuffer */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.put_copy_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":591 * return rv * * def put_copy_end(self, error: bytes | None = None) -> int: # <<<<<<<<<<<<<< * cdef int rv * cdef const char *cerr = NULL */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_79put_copy_end(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_79put_copy_end = {"put_copy_end", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_79put_copy_end, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_79put_copy_end(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_error = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("put_copy_end (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_error,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 591, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 591, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "put_copy_end", 0) < (0)) __PYX_ERR(1, 591, __pyx_L3_error) if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)Py_None)); } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 591, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)Py_None)); } __pyx_v_error = ((PyObject*)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("put_copy_end", 0, 0, 1, __pyx_nargs); __PYX_ERR(1, 591, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.put_copy_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_error), (&PyBytes_Type), 1, "error", 2))) __PYX_ERR(1, 591, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_78put_copy_end(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_error); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_78put_copy_end(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_error) { int __pyx_v_rv; char const *__pyx_v_cerr; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; char *__pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("put_copy_end", 0); /* "psycopg_binary/pq/pgconn.pyx":593 * def put_copy_end(self, error: bytes | None = None) -> int: * cdef int rv * cdef const char *cerr = NULL # <<<<<<<<<<<<<< * if error is not None: * cerr = PyBytes_AsString(error) */ __pyx_v_cerr = NULL; /* "psycopg_binary/pq/pgconn.pyx":594 * cdef int rv * cdef const char *cerr = NULL * if error is not None: # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(error) * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) */ __pyx_t_1 = (__pyx_v_error != ((PyObject*)Py_None)); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":595 * cdef const char *cerr = NULL * if error is not None: * cerr = PyBytes_AsString(error) # <<<<<<<<<<<<<< * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) * if rv < 0: */ __pyx_t_2 = PyBytes_AsString(__pyx_v_error); if (unlikely(__pyx_t_2 == ((void *)NULL))) __PYX_ERR(1, 595, __pyx_L1_error) __pyx_v_cerr = __pyx_t_2; /* "psycopg_binary/pq/pgconn.pyx":594 * cdef int rv * cdef const char *cerr = NULL * if error is not None: # <<<<<<<<<<<<<< * cerr = PyBytes_AsString(error) * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) */ } /* "psycopg_binary/pq/pgconn.pyx":596 * if error is not None: * cerr = PyBytes_AsString(error) * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) # <<<<<<<<<<<<<< * if rv < 0: * raise e.OperationalError( */ __pyx_v_rv = PQputCopyEnd(__pyx_v_self->_pgconn_ptr, __pyx_v_cerr); /* "psycopg_binary/pq/pgconn.pyx":597 * cerr = PyBytes_AsString(error) * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) * if rv < 0: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending copy end failed: {self.get_error_message()}") */ __pyx_t_1 = (__pyx_v_rv < 0); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":598 * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) * if rv < 0: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"sending copy end failed: {self.get_error_message()}") * return rv */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":599 * if rv < 0: * raise e.OperationalError( * f"sending copy end failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * return rv * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_sending_copy_end_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __PYX_ERR(1, 598, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":597 * cerr = PyBytes_AsString(error) * rv = libpq.PQputCopyEnd(self._pgconn_ptr, cerr) * if rv < 0: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"sending copy end failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":600 * raise e.OperationalError( * f"sending copy end failed: {self.get_error_message()}") * return rv # <<<<<<<<<<<<<< * * def get_copy_data(self, int async_) -> tuple[int, memoryview]: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__Pyx_PyInt_FromNumber(&__pyx_t_3, NULL, 0) < (0)) __PYX_ERR(1, 600, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":591 * return rv * * def put_copy_end(self, error: bytes | None = None) -> int: # <<<<<<<<<<<<<< * cdef int rv * cdef const char *cerr = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.put_copy_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":602 * return rv * * def get_copy_data(self, int async_) -> tuple[int, memoryview]: # <<<<<<<<<<<<<< * cdef char *buffer_ptr = NULL * cdef int nbytes */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_81get_copy_data(PyObject *__pyx_v_self, PyObject *__pyx_arg_async_); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_81get_copy_data = {"get_copy_data", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_81get_copy_data, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_81get_copy_data(PyObject *__pyx_v_self, PyObject *__pyx_arg_async_) { int __pyx_v_async_; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_copy_data (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_async_); { __pyx_v_async_ = __Pyx_PyLong_As_int(__pyx_arg_async_); if (unlikely((__pyx_v_async_ == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 602, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.get_copy_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_80get_copy_data(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((int)__pyx_v_async_)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_80get_copy_data(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_v_async_) { char *__pyx_v_buffer_ptr; int __pyx_v_nbytes; PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_copy_data", 0); /* "psycopg_binary/pq/pgconn.pyx":603 * * def get_copy_data(self, int async_) -> tuple[int, memoryview]: * cdef char *buffer_ptr = NULL # <<<<<<<<<<<<<< * cdef int nbytes * nbytes = libpq.PQgetCopyData(self._pgconn_ptr, &buffer_ptr, async_) */ __pyx_v_buffer_ptr = NULL; /* "psycopg_binary/pq/pgconn.pyx":605 * cdef char *buffer_ptr = NULL * cdef int nbytes * nbytes = libpq.PQgetCopyData(self._pgconn_ptr, &buffer_ptr, async_) # <<<<<<<<<<<<<< * if nbytes == -2: * raise e.OperationalError( */ __pyx_v_nbytes = PQgetCopyData(__pyx_v_self->_pgconn_ptr, (&__pyx_v_buffer_ptr), __pyx_v_async_); /* "psycopg_binary/pq/pgconn.pyx":606 * cdef int nbytes * nbytes = libpq.PQgetCopyData(self._pgconn_ptr, &buffer_ptr, async_) * if nbytes == -2: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"receiving copy data failed: {self.get_error_message()}") */ __pyx_t_1 = (__pyx_v_nbytes == -2L); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":607 * nbytes = libpq.PQgetCopyData(self._pgconn_ptr, &buffer_ptr, async_) * if nbytes == -2: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"receiving copy data failed: {self.get_error_message()}") * if buffer_ptr is not NULL: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":608 * if nbytes == -2: * raise e.OperationalError( * f"receiving copy data failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * if buffer_ptr is not NULL: * data = PyMemoryView_FromObject( */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_receiving_copy_data_failed, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 607, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":606 * cdef int nbytes * nbytes = libpq.PQgetCopyData(self._pgconn_ptr, &buffer_ptr, async_) * if nbytes == -2: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"receiving copy data failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":609 * raise e.OperationalError( * f"receiving copy data failed: {self.get_error_message()}") * if buffer_ptr is not NULL: # <<<<<<<<<<<<<< * data = PyMemoryView_FromObject( * PQBuffer._from_buffer(buffer_ptr, nbytes)) */ __pyx_t_1 = (__pyx_v_buffer_ptr != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":611 * if buffer_ptr is not NULL: * data = PyMemoryView_FromObject( * PQBuffer._from_buffer(buffer_ptr, nbytes)) # <<<<<<<<<<<<<< * return nbytes, data * else: */ __pyx_t_2 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PQBuffer__from_buffer(((unsigned char *)__pyx_v_buffer_ptr), __pyx_v_nbytes)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "psycopg_binary/pq/pgconn.pyx":610 * f"receiving copy data failed: {self.get_error_message()}") * if buffer_ptr is not NULL: * data = PyMemoryView_FromObject( # <<<<<<<<<<<<<< * PQBuffer._from_buffer(buffer_ptr, nbytes)) * return nbytes, data */ __pyx_t_5 = PyMemoryView_FromObject(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_data = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":612 * data = PyMemoryView_FromObject( * PQBuffer._from_buffer(buffer_ptr, nbytes)) * return nbytes, data # <<<<<<<<<<<<<< * else: * return nbytes, b"" # won't parse it, doesn't really be memoryview */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyLong_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5) != (0)) __PYX_ERR(1, 612, __pyx_L1_error); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_data) != (0)) __PYX_ERR(1, 612, __pyx_L1_error); __pyx_t_5 = 0; __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":609 * raise e.OperationalError( * f"receiving copy data failed: {self.get_error_message()}") * if buffer_ptr is not NULL: # <<<<<<<<<<<<<< * data = PyMemoryView_FromObject( * PQBuffer._from_buffer(buffer_ptr, nbytes)) */ } /* "psycopg_binary/pq/pgconn.pyx":614 * return nbytes, data * else: * return nbytes, b"" # won't parse it, doesn't really be memoryview # <<<<<<<<<<<<<< * * def trace(self, fileno: int) -> None: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_nbytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2) != (0)) __PYX_ERR(1, 614, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__5); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_kp_b__5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_mstate_global->__pyx_kp_b__5) != (0)) __PYX_ERR(1, 614, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L0; } /* "psycopg_binary/pq/pgconn.pyx":602 * return rv * * def get_copy_data(self, int async_) -> tuple[int, memoryview]: # <<<<<<<<<<<<<< * cdef char *buffer_ptr = NULL * cdef int nbytes */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.get_copy_data", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":616 * return nbytes, b"" # won't parse it, doesn't really be memoryview * * def trace(self, fileno: int) -> None: # <<<<<<<<<<<<<< * if sys.platform != "linux": * raise e.NotSupportedError("currently only supported on Linux") */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_83trace(PyObject *__pyx_v_self, PyObject *__pyx_v_fileno); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_83trace = {"trace", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_83trace, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_83trace(PyObject *__pyx_v_self, PyObject *__pyx_v_fileno) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trace (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fileno), (&PyLong_Type), 0, "fileno", 2))) __PYX_ERR(1, 616, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_82trace(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject*)__pyx_v_fileno)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; goto __pyx_L5_cleaned_up; __pyx_L0:; __pyx_L5_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_82trace(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_fileno) { FILE *__pyx_v_stream; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace", 0); /* "psycopg_binary/pq/pgconn.pyx":617 * * def trace(self, fileno: int) -> None: * if sys.platform != "linux": # <<<<<<<<<<<<<< * raise e.NotSupportedError("currently only supported on Linux") * stream = fdopen(fileno, b"w") */ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_platform); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_linux, Py_NE)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_3)) { /* "psycopg_binary/pq/pgconn.pyx":618 * def trace(self, fileno: int) -> None: * if sys.platform != "linux": * raise e.NotSupportedError("currently only supported on Linux") # <<<<<<<<<<<<<< * stream = fdopen(fileno, b"w") * libpq.PQtrace(self._pgconn_ptr, stream) */ __pyx_t_1 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_NotSupportedError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_1); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_mstate_global->__pyx_kp_u_currently_only_supported_on_Linu}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 618, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":617 * * def trace(self, fileno: int) -> None: * if sys.platform != "linux": # <<<<<<<<<<<<<< * raise e.NotSupportedError("currently only supported on Linux") * stream = fdopen(fileno, b"w") */ } /* "psycopg_binary/pq/pgconn.pyx":619 * if sys.platform != "linux": * raise e.NotSupportedError("currently only supported on Linux") * stream = fdopen(fileno, b"w") # <<<<<<<<<<<<<< * libpq.PQtrace(self._pgconn_ptr, stream) * */ __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_v_fileno); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 619, __pyx_L1_error) __pyx_v_stream = fdopen(__pyx_t_7, __pyx_k_w); /* "psycopg_binary/pq/pgconn.pyx":620 * raise e.NotSupportedError("currently only supported on Linux") * stream = fdopen(fileno, b"w") * libpq.PQtrace(self._pgconn_ptr, stream) # <<<<<<<<<<<<<< * * def set_trace_flags(self, flags: Trace) -> None: */ PQtrace(__pyx_v_self->_pgconn_ptr, __pyx_v_stream); /* "psycopg_binary/pq/pgconn.pyx":616 * return nbytes, b"" # won't parse it, doesn't really be memoryview * * def trace(self, fileno: int) -> None: # <<<<<<<<<<<<<< * if sys.platform != "linux": * raise e.NotSupportedError("currently only supported on Linux") */ /* 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_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.trace", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":622 * libpq.PQtrace(self._pgconn_ptr, stream) * * def set_trace_flags(self, flags: Trace) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsetTraceFlags", 140000) * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_85set_trace_flags(PyObject *__pyx_v_self, PyObject *__pyx_v_flags); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_85set_trace_flags = {"set_trace_flags", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_85set_trace_flags, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_85set_trace_flags(PyObject *__pyx_v_self, PyObject *__pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_trace_flags (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_84set_trace_flags(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject *)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_84set_trace_flags(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_flags) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_trace_flags", 0); /* "psycopg_binary/pq/pgconn.pyx":623 * * def set_trace_flags(self, flags: Trace) -> None: * _check_supported("PQsetTraceFlags", 140000) # <<<<<<<<<<<<<< * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) * */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQsetTraceFlags, 0x222E0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":624 * def set_trace_flags(self, flags: Trace) -> None: * _check_supported("PQsetTraceFlags", 140000) * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) # <<<<<<<<<<<<<< * * def untrace(self) -> None: */ __pyx_t_2 = __Pyx_PyLong_As_int(__pyx_v_flags); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 624, __pyx_L1_error) PQsetTraceFlags(__pyx_v_self->_pgconn_ptr, __pyx_t_2); /* "psycopg_binary/pq/pgconn.pyx":622 * libpq.PQtrace(self._pgconn_ptr, stream) * * def set_trace_flags(self, flags: Trace) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsetTraceFlags", 140000) * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.set_trace_flags", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":626 * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) * * def untrace(self) -> None: # <<<<<<<<<<<<<< * libpq.PQuntrace(self._pgconn_ptr) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_87untrace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_87untrace = {"untrace", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_87untrace, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_87untrace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("untrace (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_86untrace(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_86untrace(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("untrace", 0); /* "psycopg_binary/pq/pgconn.pyx":627 * * def untrace(self) -> None: * libpq.PQuntrace(self._pgconn_ptr) # <<<<<<<<<<<<<< * * def encrypt_password( */ PQuntrace(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":626 * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) * * def untrace(self) -> None: # <<<<<<<<<<<<<< * libpq.PQuntrace(self._pgconn_ptr) * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":629 * libpq.PQuntrace(self._pgconn_ptr) * * def encrypt_password( # <<<<<<<<<<<<<< * self, const char *passwd, const char *user, algorithm = None * ) -> bytes: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_89encrypt_password(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_89encrypt_password = {"encrypt_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_89encrypt_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_89encrypt_password(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_passwd; char const *__pyx_v_user; PyObject *__pyx_v_algorithm = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("encrypt_password (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_passwd,&__pyx_mstate_global->__pyx_n_u_user,&__pyx_mstate_global->__pyx_n_u_algorithm,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 629, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 629, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 629, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 629, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "encrypt_password", 0) < (0)) __PYX_ERR(1, 629, __pyx_L3_error) /* "psycopg_binary/pq/pgconn.pyx":630 * * def encrypt_password( * self, const char *passwd, const char *user, algorithm = None # <<<<<<<<<<<<<< * ) -> bytes: * _check_supported("PQencryptPasswordConn", 100000) */ if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("encrypt_password", 0, 2, 3, i); __PYX_ERR(1, 629, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(1, 629, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 629, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 629, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)Py_None)); } __pyx_v_passwd = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_passwd) && PyErr_Occurred())) __PYX_ERR(1, 630, __pyx_L3_error) __pyx_v_user = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_user) && PyErr_Occurred())) __PYX_ERR(1, 630, __pyx_L3_error) __pyx_v_algorithm = values[2]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("encrypt_password", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 629, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.encrypt_password", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_88encrypt_password(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_passwd, __pyx_v_user, __pyx_v_algorithm); /* "psycopg_binary/pq/pgconn.pyx":629 * libpq.PQuntrace(self._pgconn_ptr) * * def encrypt_password( # <<<<<<<<<<<<<< * self, const char *passwd, const char *user, algorithm = None * ) -> bytes: */ /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_88encrypt_password(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_passwd, char const *__pyx_v_user, PyObject *__pyx_v_algorithm) { char *__pyx_v_out; char const *__pyx_v_calgo; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; char const *__pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("encrypt_password", 0); /* "psycopg_binary/pq/pgconn.pyx":632 * self, const char *passwd, const char *user, algorithm = None * ) -> bytes: * _check_supported("PQencryptPasswordConn", 100000) # <<<<<<<<<<<<<< * * cdef char *out */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQencryptPasswordConn, 0x186A0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":635 * * cdef char *out * cdef const char *calgo = NULL # <<<<<<<<<<<<<< * if algorithm: * calgo = algorithm */ __pyx_v_calgo = NULL; /* "psycopg_binary/pq/pgconn.pyx":636 * cdef char *out * cdef const char *calgo = NULL * if algorithm: # <<<<<<<<<<<<<< * calgo = algorithm * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) */ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_algorithm); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 636, __pyx_L1_error) if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":637 * cdef const char *calgo = NULL * if algorithm: * calgo = algorithm # <<<<<<<<<<<<<< * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) * if not out: */ __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_algorithm); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 637, __pyx_L1_error) __pyx_v_calgo = __pyx_t_3; /* "psycopg_binary/pq/pgconn.pyx":636 * cdef char *out * cdef const char *calgo = NULL * if algorithm: # <<<<<<<<<<<<<< * calgo = algorithm * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) */ } /* "psycopg_binary/pq/pgconn.pyx":638 * if algorithm: * calgo = algorithm * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) # <<<<<<<<<<<<<< * if not out: * raise e.OperationalError( */ __pyx_v_out = PQencryptPasswordConn(__pyx_v_self->_pgconn_ptr, __pyx_v_passwd, __pyx_v_user, __pyx_v_calgo); /* "psycopg_binary/pq/pgconn.pyx":639 * calgo = algorithm * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) * if not out: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"password encryption failed: {self.get_error_message()}" */ __pyx_t_2 = (!(__pyx_v_out != 0)); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":640 * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) * if not out: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"password encryption failed: {self.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "psycopg_binary/pq/pgconn.pyx":641 * if not out: * raise e.OperationalError( * f"password encryption failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_7 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL}; __pyx_t_5 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_8, (1-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); } __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_password_encryption_failed, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 640, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":639 * calgo = algorithm * out = libpq.PQencryptPasswordConn(self._pgconn_ptr, passwd, user, calgo) * if not out: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"password encryption failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":644 * ) * * rv = bytes(out) # <<<<<<<<<<<<<< * libpq.PQfreemem(out) * return rv */ __pyx_t_6 = NULL; __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_out); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_5}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(&PyBytes_Type), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":645 * * rv = bytes(out) * libpq.PQfreemem(out) # <<<<<<<<<<<<<< * return rv * */ PQfreemem(__pyx_v_out); /* "psycopg_binary/pq/pgconn.pyx":646 * rv = bytes(out) * libpq.PQfreemem(out) * return rv # <<<<<<<<<<<<<< * * def change_password( */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":629 * libpq.PQuntrace(self._pgconn_ptr) * * def encrypt_password( # <<<<<<<<<<<<<< * self, const char *passwd, const char *user, algorithm = None * ) -> bytes: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.encrypt_password", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":648 * return rv * * def change_password( # <<<<<<<<<<<<<< * self, const char *user, const char *passwd * ) -> None: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_91change_password(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_91change_password = {"change_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_91change_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_91change_password(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { char const *__pyx_v_user; char const *__pyx_v_passwd; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("change_password (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_user,&__pyx_mstate_global->__pyx_n_u_passwd,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(1, 648, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 648, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 648, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "change_password", 0) < (0)) __PYX_ERR(1, 648, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("change_password", 1, 2, 2, i); __PYX_ERR(1, 648, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(1, 648, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(1, 648, __pyx_L3_error) } __pyx_v_user = __Pyx_PyObject_AsString(values[0]); if (unlikely((!__pyx_v_user) && PyErr_Occurred())) __PYX_ERR(1, 649, __pyx_L3_error) __pyx_v_passwd = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_passwd) && PyErr_Occurred())) __PYX_ERR(1, 649, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("change_password", 1, 2, 2, __pyx_nargs); __PYX_ERR(1, 648, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGconn.change_password", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_90change_password(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), __pyx_v_user, __pyx_v_passwd); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_90change_password(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, char const *__pyx_v_user, char const *__pyx_v_passwd) { PGresult *__pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_password", 0); /* "psycopg_binary/pq/pgconn.pyx":651 * self, const char *user, const char *passwd * ) -> None: * _check_supported("PQchangePassword", 170000) # <<<<<<<<<<<<<< * * cdef libpq.PGresult *res */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQchangePassword, 0x29810); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 651, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":654 * * cdef libpq.PGresult *res * res = libpq.PQchangePassword(self._pgconn_ptr, user, passwd) # <<<<<<<<<<<<<< * if libpq.PQresultStatus(res) != ExecStatus.COMMAND_OK: * raise e.OperationalError( */ __pyx_v_res = PQchangePassword(__pyx_v_self->_pgconn_ptr, __pyx_v_user, __pyx_v_passwd); /* "psycopg_binary/pq/pgconn.pyx":655 * cdef libpq.PGresult *res * res = libpq.PQchangePassword(self._pgconn_ptr, user, passwd) * if libpq.PQresultStatus(res) != ExecStatus.COMMAND_OK: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"password encryption failed: {self.get_error_message()}" */ __pyx_t_1 = __Pyx_PyLong_From_ExecStatusType(PQresultStatus(__pyx_v_res)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_ExecStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_COMMAND_OK); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 655, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_t_4)) { /* "psycopg_binary/pq/pgconn.pyx":656 * res = libpq.PQchangePassword(self._pgconn_ptr, user, passwd) * if libpq.PQresultStatus(res) != ExecStatus.COMMAND_OK: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"password encryption failed: {self.get_error_message()}" * ) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":657 * if libpq.PQresultStatus(res) != ExecStatus.COMMAND_OK: * raise e.OperationalError( * f"password encryption failed: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_password_encryption_failed, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 656, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":655 * cdef libpq.PGresult *res * res = libpq.PQchangePassword(self._pgconn_ptr, user, passwd) * if libpq.PQresultStatus(res) != ExecStatus.COMMAND_OK: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"password encryption failed: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgconn.pyx":648 * return rv * * def change_password( # <<<<<<<<<<<<<< * self, const char *user, const char *passwd * ) -> None: */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.change_password", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":660 * ) * * def make_empty_result(self, int exec_status) -> PGresult: # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQmakeEmptyPGresult( * self._pgconn_ptr, exec_status) */ /* Python wrapper */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_93make_empty_result(PyObject *__pyx_v_self, PyObject *__pyx_arg_exec_status); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_93make_empty_result = {"make_empty_result", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_93make_empty_result, METH_O, 0}; static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pw_14psycopg_binary_2pq_6PGconn_93make_empty_result(PyObject *__pyx_v_self, PyObject *__pyx_arg_exec_status) { int __pyx_v_exec_status; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("make_empty_result (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_exec_status); { __pyx_v_exec_status = __Pyx_PyLong_As_int(__pyx_arg_exec_status); if (unlikely((__pyx_v_exec_status == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 660, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.make_empty_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_92make_empty_result(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((int)__pyx_v_exec_status)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_pf_14psycopg_binary_2pq_6PGconn_92make_empty_result(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, int __pyx_v_exec_status) { PGresult *__pyx_v_rv; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_empty_result", 0); /* "psycopg_binary/pq/pgconn.pyx":661 * * def make_empty_result(self, int exec_status) -> PGresult: * cdef libpq.PGresult *rv = libpq.PQmakeEmptyPGresult( # <<<<<<<<<<<<<< * self._pgconn_ptr, exec_status) * if not rv: */ __pyx_v_rv = PQmakeEmptyPGresult(__pyx_v_self->_pgconn_ptr, ((ExecStatusType)__pyx_v_exec_status)); /* "psycopg_binary/pq/pgconn.pyx":663 * cdef libpq.PGresult *rv = libpq.PQmakeEmptyPGresult( * self._pgconn_ptr, exec_status) * if not rv: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate empty PGresult") * return PGresult._from_ptr(rv) */ __pyx_t_1 = (!(__pyx_v_rv != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":664 * self._pgconn_ptr, exec_status) * if not rv: * raise MemoryError("couldn't allocate empty PGresult") # <<<<<<<<<<<<<< * return PGresult._from_ptr(rv) * */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_empty_PGresult}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 664, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":663 * cdef libpq.PGresult *rv = libpq.PQmakeEmptyPGresult( * self._pgconn_ptr, exec_status) * if not rv: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate empty PGresult") * return PGresult._from_ptr(rv) */ } /* "psycopg_binary/pq/pgconn.pyx":665 * if not rv: * raise MemoryError("couldn't allocate empty PGresult") * return PGresult._from_ptr(rv) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF((PyObject *)__pyx_r); __pyx_t_2 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(__pyx_v_rv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":660 * ) * * def make_empty_result(self, int exec_status) -> PGresult: # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQmakeEmptyPGresult( * self._pgconn_ptr, exec_status) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.make_empty_result", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":667 * return PGresult._from_ptr(rv) * * @property # <<<<<<<<<<<<<< * def pipeline_status(self) -> int: * """The current pipeline mode status. */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_15pipeline_status_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_15pipeline_status_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_15pipeline_status___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_15pipeline_status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_v_status; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgconn.pyx":673 * For libpq < 14.0, always return 0 (PQ_PIPELINE_OFF). * """ * if libpq.PG_VERSION_NUM < 140000: # <<<<<<<<<<<<<< * return libpq.PQ_PIPELINE_OFF * cdef int status = libpq.PQpipelineStatus(self._pgconn_ptr) */ __pyx_t_1 = (PG_VERSION_NUM < 0x222E0); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":674 * """ * if libpq.PG_VERSION_NUM < 140000: * return libpq.PQ_PIPELINE_OFF # <<<<<<<<<<<<<< * cdef int status = libpq.PQpipelineStatus(self._pgconn_ptr) * return status */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyLong_From_PGpipelineStatus(PQ_PIPELINE_OFF); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":673 * For libpq < 14.0, always return 0 (PQ_PIPELINE_OFF). * """ * if libpq.PG_VERSION_NUM < 140000: # <<<<<<<<<<<<<< * return libpq.PQ_PIPELINE_OFF * cdef int status = libpq.PQpipelineStatus(self._pgconn_ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":675 * if libpq.PG_VERSION_NUM < 140000: * return libpq.PQ_PIPELINE_OFF * cdef int status = libpq.PQpipelineStatus(self._pgconn_ptr) # <<<<<<<<<<<<<< * return status * */ __pyx_v_status = PQpipelineStatus(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":676 * return libpq.PQ_PIPELINE_OFF * cdef int status = libpq.PQpipelineStatus(self._pgconn_ptr) * return status # <<<<<<<<<<<<<< * * def enter_pipeline_mode(self) -> None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_status); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":667 * return PGresult._from_ptr(rv) * * @property # <<<<<<<<<<<<<< * def pipeline_status(self) -> int: * """The current pipeline mode status. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.pipeline_status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":678 * return status * * def enter_pipeline_mode(self) -> None: # <<<<<<<<<<<<<< * """Enter pipeline mode. * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_95enter_pipeline_mode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_14psycopg_binary_2pq_6PGconn_94enter_pipeline_mode, "Enter pipeline mode.\n\n :raises ~e.OperationalError: in case of failure to enter the pipeline\n mode.\n "); static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_95enter_pipeline_mode = {"enter_pipeline_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_95enter_pipeline_mode, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_94enter_pipeline_mode}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_95enter_pipeline_mode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("enter_pipeline_mode (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_94enter_pipeline_mode(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_94enter_pipeline_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("enter_pipeline_mode", 0); /* "psycopg_binary/pq/pgconn.pyx":684 * mode. * """ * _check_supported("PQenterPipelineMode", 140000) # <<<<<<<<<<<<<< * if libpq.PQenterPipelineMode(self._pgconn_ptr) != 1: * raise e.OperationalError("failed to enter pipeline mode") */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQenterPipelineMode, 0x222E0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":685 * """ * _check_supported("PQenterPipelineMode", 140000) * if libpq.PQenterPipelineMode(self._pgconn_ptr) != 1: # <<<<<<<<<<<<<< * raise e.OperationalError("failed to enter pipeline mode") * */ __pyx_t_2 = (PQenterPipelineMode(__pyx_v_self->_pgconn_ptr) != 1); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":686 * _check_supported("PQenterPipelineMode", 140000) * if libpq.PQenterPipelineMode(self._pgconn_ptr) != 1: * raise e.OperationalError("failed to enter pipeline mode") # <<<<<<<<<<<<<< * * def exit_pipeline_mode(self) -> None: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_failed_to_enter_pipeline_mode}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 686, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":685 * """ * _check_supported("PQenterPipelineMode", 140000) * if libpq.PQenterPipelineMode(self._pgconn_ptr) != 1: # <<<<<<<<<<<<<< * raise e.OperationalError("failed to enter pipeline mode") * */ } /* "psycopg_binary/pq/pgconn.pyx":678 * return status * * def enter_pipeline_mode(self) -> None: # <<<<<<<<<<<<<< * """Enter pipeline mode. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.enter_pipeline_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":688 * raise e.OperationalError("failed to enter pipeline mode") * * def exit_pipeline_mode(self) -> None: # <<<<<<<<<<<<<< * """Exit pipeline mode. * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_97exit_pipeline_mode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_14psycopg_binary_2pq_6PGconn_96exit_pipeline_mode, "Exit pipeline mode.\n\n :raises ~e.OperationalError: in case of failure to exit the pipeline\n mode.\n "); static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_97exit_pipeline_mode = {"exit_pipeline_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_97exit_pipeline_mode, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_96exit_pipeline_mode}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_97exit_pipeline_mode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("exit_pipeline_mode (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_96exit_pipeline_mode(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_96exit_pipeline_mode(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("exit_pipeline_mode", 0); /* "psycopg_binary/pq/pgconn.pyx":694 * mode. * """ * _check_supported("PQexitPipelineMode", 140000) # <<<<<<<<<<<<<< * if libpq.PQexitPipelineMode(self._pgconn_ptr) != 1: * raise e.OperationalError(self.get_error_message()) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQexitPipelineMode, 0x222E0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":695 * """ * _check_supported("PQexitPipelineMode", 140000) * if libpq.PQexitPipelineMode(self._pgconn_ptr) != 1: # <<<<<<<<<<<<<< * raise e.OperationalError(self.get_error_message()) * */ __pyx_t_2 = (PQexitPipelineMode(__pyx_v_self->_pgconn_ptr) != 1); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":696 * _check_supported("PQexitPipelineMode", 140000) * if libpq.PQexitPipelineMode(self._pgconn_ptr) != 1: * raise e.OperationalError(self.get_error_message()) # <<<<<<<<<<<<<< * * def pipeline_sync(self) -> None: */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 696, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":695 * """ * _check_supported("PQexitPipelineMode", 140000) * if libpq.PQexitPipelineMode(self._pgconn_ptr) != 1: # <<<<<<<<<<<<<< * raise e.OperationalError(self.get_error_message()) * */ } /* "psycopg_binary/pq/pgconn.pyx":688 * raise e.OperationalError("failed to enter pipeline mode") * * def exit_pipeline_mode(self) -> None: # <<<<<<<<<<<<<< * """Exit pipeline mode. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.exit_pipeline_mode", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":698 * raise e.OperationalError(self.get_error_message()) * * def pipeline_sync(self) -> None: # <<<<<<<<<<<<<< * """Mark a synchronization point in a pipeline. * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_99pipeline_sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_14psycopg_binary_2pq_6PGconn_98pipeline_sync, "Mark a synchronization point in a pipeline.\n\n :raises ~e.OperationalError: if the connection is not in pipeline mode\n or if sync failed.\n "); static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_99pipeline_sync = {"pipeline_sync", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_99pipeline_sync, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_98pipeline_sync}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_99pipeline_sync(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("pipeline_sync (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_98pipeline_sync(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_98pipeline_sync(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pipeline_sync", 0); /* "psycopg_binary/pq/pgconn.pyx":704 * or if sync failed. * """ * _check_supported("PQpipelineSync", 140000) # <<<<<<<<<<<<<< * rv = libpq.PQpipelineSync(self._pgconn_ptr) * if rv == 0: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_n_u_PQpipelineSync, 0x222E0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":705 * """ * _check_supported("PQpipelineSync", 140000) * rv = libpq.PQpipelineSync(self._pgconn_ptr) # <<<<<<<<<<<<<< * if rv == 0: * raise e.OperationalError("connection not in pipeline mode") */ __pyx_v_rv = PQpipelineSync(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":706 * _check_supported("PQpipelineSync", 140000) * rv = libpq.PQpipelineSync(self._pgconn_ptr) * if rv == 0: # <<<<<<<<<<<<<< * raise e.OperationalError("connection not in pipeline mode") * if rv != 1: */ __pyx_t_2 = (__pyx_v_rv == 0); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":707 * rv = libpq.PQpipelineSync(self._pgconn_ptr) * if rv == 0: * raise e.OperationalError("connection not in pipeline mode") # <<<<<<<<<<<<<< * if rv != 1: * raise e.OperationalError("failed to sync pipeline") */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_connection_not_in_pipeline_mode}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 707, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":706 * _check_supported("PQpipelineSync", 140000) * rv = libpq.PQpipelineSync(self._pgconn_ptr) * if rv == 0: # <<<<<<<<<<<<<< * raise e.OperationalError("connection not in pipeline mode") * if rv != 1: */ } /* "psycopg_binary/pq/pgconn.pyx":708 * if rv == 0: * raise e.OperationalError("connection not in pipeline mode") * if rv != 1: # <<<<<<<<<<<<<< * raise e.OperationalError("failed to sync pipeline") * */ __pyx_t_2 = (__pyx_v_rv != 1); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":709 * raise e.OperationalError("connection not in pipeline mode") * if rv != 1: * raise e.OperationalError("failed to sync pipeline") # <<<<<<<<<<<<<< * * def send_flush_request(self) -> None: */ __pyx_t_5 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_5); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_failed_to_sync_pipeline}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 709, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":708 * if rv == 0: * raise e.OperationalError("connection not in pipeline mode") * if rv != 1: # <<<<<<<<<<<<<< * raise e.OperationalError("failed to sync pipeline") * */ } /* "psycopg_binary/pq/pgconn.pyx":698 * raise e.OperationalError(self.get_error_message()) * * def pipeline_sync(self) -> None: # <<<<<<<<<<<<<< * """Mark a synchronization point in a pipeline. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.pipeline_sync", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":711 * raise e.OperationalError("failed to sync pipeline") * * def send_flush_request(self) -> None: # <<<<<<<<<<<<<< * """Sends a request for the server to flush its output buffer. * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_101send_flush_request(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_14psycopg_binary_2pq_6PGconn_100send_flush_request, "Sends a request for the server to flush its output buffer.\n\n :raises ~e.OperationalError: if the flush request failed.\n "); static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_101send_flush_request = {"send_flush_request", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_101send_flush_request, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_100send_flush_request}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_101send_flush_request(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_flush_request (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_100send_flush_request(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_100send_flush_request(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_flush_request", 0); /* "psycopg_binary/pq/pgconn.pyx":716 * :raises ~e.OperationalError: if the flush request failed. * """ * _check_supported("PQsendFlushRequest ", 140000) # <<<<<<<<<<<<<< * cdef int rv = libpq.PQsendFlushRequest(self._pgconn_ptr) * if rv == 0: */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__check_supported(__pyx_mstate_global->__pyx_kp_u_PQsendFlushRequest, 0x222E0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":717 * """ * _check_supported("PQsendFlushRequest ", 140000) * cdef int rv = libpq.PQsendFlushRequest(self._pgconn_ptr) # <<<<<<<<<<<<<< * if rv == 0: * raise e.OperationalError( */ __pyx_v_rv = PQsendFlushRequest(__pyx_v_self->_pgconn_ptr); /* "psycopg_binary/pq/pgconn.pyx":718 * _check_supported("PQsendFlushRequest ", 140000) * cdef int rv = libpq.PQsendFlushRequest(self._pgconn_ptr) * if rv == 0: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"flush request failed: {self.get_error_message()}") */ __pyx_t_2 = (__pyx_v_rv == 0); if (unlikely(__pyx_t_2)) { /* "psycopg_binary/pq/pgconn.pyx":719 * cdef int rv = libpq.PQsendFlushRequest(self._pgconn_ptr) * if rv == 0: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"flush request failed: {self.get_error_message()}") * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":720 * if rv == 0: * raise e.OperationalError( * f"flush request failed: {self.get_error_message()}") # <<<<<<<<<<<<<< * * */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_flush_request_failed, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 719, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __PYX_ERR(1, 719, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":718 * _check_supported("PQsendFlushRequest ", 140000) * cdef int rv = libpq.PQsendFlushRequest(self._pgconn_ptr) * if rv == 0: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"flush request failed: {self.get_error_message()}") */ } /* "psycopg_binary/pq/pgconn.pyx":711 * raise e.OperationalError("failed to sync pipeline") * * def send_flush_request(self) -> None: # <<<<<<<<<<<<<< * """Sends a request for the server to flush its output buffer. * */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGconn.send_flush_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq.pxd":23 * cdef libpq.PGconn* _pgconn_ptr * cdef object __weakref__ * cdef public object notice_handler # <<<<<<<<<<<<<< * cdef public object notify_handler * cdef pid_t _procpid */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->notice_handler); __pyx_r = __pyx_v_self->notice_handler; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler_2__set__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler_2__set__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->notice_handler); __Pyx_DECREF(__pyx_v_self->notice_handler); __pyx_v_self->notice_handler = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler_4__del__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notice_handler_4__del__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->notice_handler); __Pyx_DECREF(__pyx_v_self->notice_handler); __pyx_v_self->notice_handler = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq.pxd":24 * cdef object __weakref__ * cdef public object notice_handler * cdef public object notify_handler # <<<<<<<<<<<<<< * cdef pid_t _procpid * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler___get__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->notify_handler); __pyx_r = __pyx_v_self->notify_handler; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler_2__set__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler_2__set__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->notify_handler); __Pyx_DECREF(__pyx_v_self->notify_handler); __pyx_v_self->notify_handler = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_5__del__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler_4__del__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_6PGconn_14notify_handler_4__del__(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->notify_handler); __Pyx_DECREF(__pyx_v_self->notify_handler); __pyx_v_self->notify_handler = Py_None; /* function exit code */ __pyx_r = 0; __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_14psycopg_binary_2pq_6PGconn_103__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_103__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_103__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_103__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_102__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_102__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.__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_14psycopg_binary_2pq_6PGconn_105__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_6PGconn_105__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_105__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_6PGconn_105__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_6PGconn_104__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_6PGconn_104__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGconn.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":723 * * * cdef int _ensure_pgconn(PGconn pgconn) except 0: # <<<<<<<<<<<<<< * if pgconn._pgconn_ptr is not NULL: * return 1 */ static int __pyx_f_14psycopg_binary_2pq__ensure_pgconn(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_pgconn) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_pgconn", 0); /* "psycopg_binary/pq/pgconn.pyx":724 * * cdef int _ensure_pgconn(PGconn pgconn) except 0: * if pgconn._pgconn_ptr is not NULL: # <<<<<<<<<<<<<< * return 1 * */ __pyx_t_1 = (__pyx_v_pgconn->_pgconn_ptr != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":725 * cdef int _ensure_pgconn(PGconn pgconn) except 0: * if pgconn._pgconn_ptr is not NULL: * return 1 # <<<<<<<<<<<<<< * * raise e.OperationalError("the connection is closed") */ __pyx_r = 1; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":724 * * cdef int _ensure_pgconn(PGconn pgconn) except 0: * if pgconn._pgconn_ptr is not NULL: # <<<<<<<<<<<<<< * return 1 * */ } /* "psycopg_binary/pq/pgconn.pyx":727 * return 1 * * raise e.OperationalError("the connection is closed") # <<<<<<<<<<<<<< * * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_the_connection_is_closed}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 727, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":723 * * * cdef int _ensure_pgconn(PGconn pgconn) except 0: # <<<<<<<<<<<<<< * if pgconn._pgconn_ptr is not NULL: * return 1 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq._ensure_pgconn", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":730 * * * cdef char *_call_bytes(PGconn pgconn, conn_bytes_f func) except NULL: # <<<<<<<<<<<<<< * """ * Call one of the pgconn libpq functions returning a bytes pointer. */ static char *__pyx_f_14psycopg_binary_2pq__call_bytes(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_pgconn, __pyx_t_14psycopg_binary_2pq_conn_bytes_f __pyx_v_func) { char *__pyx_v_rv; char *__pyx_r; int __pyx_t_1; int __pyx_t_2; char *__pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "psycopg_binary/pq/pgconn.pyx":734 * Call one of the pgconn libpq functions returning a bytes pointer. * """ * if not _ensure_pgconn(pgconn): # <<<<<<<<<<<<<< * return NULL * cdef char *rv = func(pgconn._pgconn_ptr) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_pgconn); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 734, __pyx_L1_error) __pyx_t_2 = (!(__pyx_t_1 != 0)); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":735 * """ * if not _ensure_pgconn(pgconn): * return NULL # <<<<<<<<<<<<<< * cdef char *rv = func(pgconn._pgconn_ptr) * if rv is not NULL: */ __pyx_r = NULL; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":734 * Call one of the pgconn libpq functions returning a bytes pointer. * """ * if not _ensure_pgconn(pgconn): # <<<<<<<<<<<<<< * return NULL * cdef char *rv = func(pgconn._pgconn_ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":736 * if not _ensure_pgconn(pgconn): * return NULL * cdef char *rv = func(pgconn._pgconn_ptr) # <<<<<<<<<<<<<< * if rv is not NULL: * return rv */ __pyx_t_3 = __pyx_v_func(__pyx_v_pgconn->_pgconn_ptr); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 736, __pyx_L1_error) __pyx_v_rv = __pyx_t_3; /* "psycopg_binary/pq/pgconn.pyx":737 * return NULL * cdef char *rv = func(pgconn._pgconn_ptr) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ __pyx_t_2 = (__pyx_v_rv != NULL); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":738 * cdef char *rv = func(pgconn._pgconn_ptr) * if rv is not NULL: * return rv # <<<<<<<<<<<<<< * else: * return b"" */ __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":737 * return NULL * cdef char *rv = func(pgconn._pgconn_ptr) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ } /* "psycopg_binary/pq/pgconn.pyx":740 * return rv * else: * return b"" # <<<<<<<<<<<<<< * * */ /*else*/ { __pyx_r = ((char *)""); goto __pyx_L0; } /* "psycopg_binary/pq/pgconn.pyx":730 * * * cdef char *_call_bytes(PGconn pgconn, conn_bytes_f func) except NULL: # <<<<<<<<<<<<<< * """ * Call one of the pgconn libpq functions returning a bytes pointer. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq._call_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":743 * * * cdef int _call_int(PGconn pgconn, conn_int_f func) except -2: # <<<<<<<<<<<<<< * """ * Call one of the pgconn libpq functions returning an int. */ static int __pyx_f_14psycopg_binary_2pq__call_int(struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_pgconn, __pyx_t_14psycopg_binary_2pq_conn_int_f __pyx_v_func) { int __pyx_r; int __pyx_t_1; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* "psycopg_binary/pq/pgconn.pyx":747 * Call one of the pgconn libpq functions returning an int. * """ * if not _ensure_pgconn(pgconn): # <<<<<<<<<<<<<< * return -2 * return func(pgconn._pgconn_ptr) */ __pyx_t_1 = __pyx_f_14psycopg_binary_2pq__ensure_pgconn(__pyx_v_pgconn); if (unlikely(__pyx_t_1 == ((int)0))) __PYX_ERR(1, 747, __pyx_L1_error) __pyx_t_2 = (!(__pyx_t_1 != 0)); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":748 * """ * if not _ensure_pgconn(pgconn): * return -2 # <<<<<<<<<<<<<< * return func(pgconn._pgconn_ptr) * */ __pyx_r = -2; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":747 * Call one of the pgconn libpq functions returning an int. * """ * if not _ensure_pgconn(pgconn): # <<<<<<<<<<<<<< * return -2 * return func(pgconn._pgconn_ptr) */ } /* "psycopg_binary/pq/pgconn.pyx":749 * if not _ensure_pgconn(pgconn): * return -2 * return func(pgconn._pgconn_ptr) # <<<<<<<<<<<<<< * * */ __pyx_t_1 = __pyx_v_func(__pyx_v_pgconn->_pgconn_ptr); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":743 * * * cdef int _call_int(PGconn pgconn, conn_int_f func) except -2: # <<<<<<<<<<<<<< * """ * Call one of the pgconn libpq functions returning an int. */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq._call_int", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -2; __pyx_L0:; return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":752 * * * cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) noexcept with gil: # <<<<<<<<<<<<<< * cdef PGconn pgconn = arg * if pgconn.notice_handler is None: */ static void __pyx_f_14psycopg_binary_2pq_notice_receiver(void *__pyx_v_arg, PGresult const *__pyx_v_res_ptr) { struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_pgconn = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_res = 0; PyObject *__pyx_v_e = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_t_9; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; char const *__pyx_t_15; PyObject *__pyx_t_16 = NULL; PyObject *__pyx_t_17 = NULL; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; PyObject *__pyx_t_21 = NULL; char const *__pyx_t_22; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); __Pyx_RefNannySetupContext("notice_receiver", 0); /* "psycopg_binary/pq/pgconn.pyx":753 * * cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) noexcept with gil: * cdef PGconn pgconn = arg # <<<<<<<<<<<<<< * if pgconn.notice_handler is None: * return */ __pyx_t_1 = ((PyObject *)__pyx_v_arg); __Pyx_INCREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn))))) __PYX_ERR(1, 753, __pyx_L1_error) __pyx_v_pgconn = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":754 * cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) noexcept with gil: * cdef PGconn pgconn = arg * if pgconn.notice_handler is None: # <<<<<<<<<<<<<< * return * */ __pyx_t_2 = (__pyx_v_pgconn->notice_handler == Py_None); if (__pyx_t_2) { /* "psycopg_binary/pq/pgconn.pyx":755 * cdef PGconn pgconn = arg * if pgconn.notice_handler is None: * return # <<<<<<<<<<<<<< * * cdef PGresult res = PGresult._from_ptr(res_ptr) */ goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":754 * cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) noexcept with gil: * cdef PGconn pgconn = arg * if pgconn.notice_handler is None: # <<<<<<<<<<<<<< * return * */ } /* "psycopg_binary/pq/pgconn.pyx":757 * return * * cdef PGresult res = PGresult._from_ptr(res_ptr) # <<<<<<<<<<<<<< * try: * pgconn.notice_handler(res) */ __pyx_t_1 = ((PyObject *)__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(((PGresult *)__pyx_v_res_ptr))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":758 * * cdef PGresult res = PGresult._from_ptr(res_ptr) * try: # <<<<<<<<<<<<<< * pgconn.notice_handler(res) * except Exception as e: */ /*try:*/ { { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":759 * cdef PGresult res = PGresult._from_ptr(res_ptr) * try: * pgconn.notice_handler(res) # <<<<<<<<<<<<<< * except Exception as e: * logger.exception("error in notice receiver: %s", e) */ __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_pgconn->notice_handler); __pyx_t_7 = __pyx_v_pgconn->notice_handler; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); assert(__pyx_t_6); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_7, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_6, ((PyObject *)__pyx_v_res)}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 759, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgconn.pyx":758 * * cdef PGresult res = PGresult._from_ptr(res_ptr) * try: # <<<<<<<<<<<<<< * pgconn.notice_handler(res) * except Exception as e: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L12_try_end; __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; /* "psycopg_binary/pq/pgconn.pyx":760 * try: * pgconn.notice_handler(res) * except Exception as e: # <<<<<<<<<<<<<< * logger.exception("error in notice receiver: %s", e) * finally: */ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception)))); if (__pyx_t_9) { __Pyx_AddTraceback("psycopg_binary.pq.notice_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename); if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(1, 760, __pyx_L9_except_error) __Pyx_XGOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __pyx_v_e = __pyx_t_7; /*try:*/ { /* "psycopg_binary/pq/pgconn.pyx":761 * pgconn.notice_handler(res) * except Exception as e: * logger.exception("error in notice receiver: %s", e) # <<<<<<<<<<<<<< * finally: * res._pgresult_ptr = NULL # avoid destroying the pgresult_ptr */ __pyx_t_11 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 761, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_mstate_global->__pyx_n_u_exception); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 761, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_13))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_13); assert(__pyx_t_11); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_13, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_mstate_global->__pyx_kp_u_error_in_notice_receiver_s, __pyx_v_e}; __pyx_t_10 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_13, __pyx_callargs+__pyx_t_8, (3-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 761, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } /* "psycopg_binary/pq/pgconn.pyx":760 * try: * pgconn.notice_handler(res) * except Exception as e: # <<<<<<<<<<<<<< * logger.exception("error in notice receiver: %s", e) * finally: */ /*finally:*/ { /*normal exit:*/{ __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; goto __pyx_L19; } __pyx_L18_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_ExceptionSwap(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21); if ( unlikely(__Pyx_GetException(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18) < 0)) __Pyx_ErrFetch(&__pyx_t_16, &__pyx_t_17, &__pyx_t_18); __Pyx_XGOTREF(__pyx_t_16); __Pyx_XGOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_t_19); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_21); __pyx_t_9 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_15 = __pyx_filename; { __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0; } __Pyx_XGIVEREF(__pyx_t_19); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_21); __Pyx_ExceptionReset(__pyx_t_19, __pyx_t_20, __pyx_t_21); __Pyx_XGIVEREF(__pyx_t_16); __Pyx_XGIVEREF(__pyx_t_17); __Pyx_XGIVEREF(__pyx_t_18); __Pyx_ErrRestore(__pyx_t_16, __pyx_t_17, __pyx_t_18); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_15; goto __pyx_L9_except_error; } __pyx_L19:; } __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L8_exception_handled; } goto __pyx_L9_except_error; /* "psycopg_binary/pq/pgconn.pyx":758 * * cdef PGresult res = PGresult._from_ptr(res_ptr) * try: # <<<<<<<<<<<<<< * pgconn.notice_handler(res) * except Exception as e: */ __pyx_L9_except_error:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); goto __pyx_L5_error; __pyx_L8_exception_handled:; __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5); __pyx_L12_try_end:; } } /* "psycopg_binary/pq/pgconn.pyx":763 * logger.exception("error in notice receiver: %s", e) * finally: * res._pgresult_ptr = NULL # avoid destroying the pgresult_ptr # <<<<<<<<<<<<<< * * */ /*finally:*/ { /*normal exit:*/{ __pyx_v_res->_pgresult_ptr = NULL; goto __pyx_L6; } __pyx_L5_error:; /*exception exit:*/{ __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19); if ( unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3); __Pyx_XGOTREF(__pyx_t_5); __Pyx_XGOTREF(__pyx_t_4); __Pyx_XGOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_t_21); __Pyx_XGOTREF(__pyx_t_20); __Pyx_XGOTREF(__pyx_t_19); __pyx_t_14 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_22 = __pyx_filename; { __pyx_v_res->_pgresult_ptr = NULL; } __Pyx_XGIVEREF(__pyx_t_21); __Pyx_XGIVEREF(__pyx_t_20); __Pyx_XGIVEREF(__pyx_t_19); __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19); __Pyx_XGIVEREF(__pyx_t_5); __Pyx_XGIVEREF(__pyx_t_4); __Pyx_XGIVEREF(__pyx_t_3); __Pyx_ErrRestore(__pyx_t_5, __pyx_t_4, __pyx_t_3); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_22; goto __pyx_L1_error; } __pyx_L6:; } /* "psycopg_binary/pq/pgconn.pyx":752 * * * cdef void notice_receiver(void *arg, const libpq.PGresult *res_ptr) noexcept with gil: # <<<<<<<<<<<<<< * cdef PGconn pgconn = arg * if pgconn.notice_handler is None: */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_WriteUnraisable("psycopg_binary.pq.notice_receiver", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_pgconn); __Pyx_XDECREF((PyObject *)__pyx_v_res); __Pyx_XDECREF(__pyx_v_e); __Pyx_RefNannyFinishContext(); __Pyx_PyGILState_Release(__pyx_gilstate_save); } /* "psycopg_binary/pq/pgconn.pyx":766 * * * cdef (Py_ssize_t, libpq.Oid *, char * const*, int *, int *) _query_params_args( # <<<<<<<<<<<<<< * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None, */ static __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_f_14psycopg_binary_2pq__query_params_args(PyObject *__pyx_v_param_values, PyObject *__pyx_v_param_types, PyObject *__pyx_v_param_formats) { int __pyx_v_i; PyObject *__pyx_v_values_fast = 0; PyObject *__pyx_v_types_fast = 0; PyObject *__pyx_v_formats_fast = 0; Py_ssize_t __pyx_v_nparams; char **__pyx_v_aparams; int *__pyx_v_alenghts; char *__pyx_v_ptr; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_obj; Oid *__pyx_v_atypes; int *__pyx_v_aformats; __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7[5]; PyObject *__pyx_t_8 = NULL; size_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; int __pyx_t_12; PyObject *__pyx_t_13; Oid __pyx_t_14; __pyx_ctuple_9512b6__Py_ssize_t__and_Oid__ptr__and_char__ptrconst____etc __pyx_t_15; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_query_params_args", 0); /* "psycopg_binary/pq/pgconn.pyx":777 * cdef formats_fast * * cdef Py_ssize_t nparams = 0 # <<<<<<<<<<<<<< * if param_values is not None: * values_fast = PySequence_Fast(param_values, "'param_values' is not a sequence") */ __pyx_v_nparams = 0; /* "psycopg_binary/pq/pgconn.pyx":778 * * cdef Py_ssize_t nparams = 0 * if param_values is not None: # <<<<<<<<<<<<<< * values_fast = PySequence_Fast(param_values, "'param_values' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(values_fast) */ __pyx_t_1 = (__pyx_v_param_values != Py_None); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":779 * cdef Py_ssize_t nparams = 0 * if param_values is not None: * values_fast = PySequence_Fast(param_values, "'param_values' is not a sequence") # <<<<<<<<<<<<<< * nparams = PySequence_Fast_GET_SIZE(values_fast) * */ __pyx_t_2 = PySequence_Fast(__pyx_v_param_values, ((char *)"'param_values' is not a sequence")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_values_fast = __pyx_t_2; __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":780 * if param_values is not None: * values_fast = PySequence_Fast(param_values, "'param_values' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(values_fast) # <<<<<<<<<<<<<< * * if param_types is not None: */ __pyx_v_nparams = PySequence_Fast_GET_SIZE(__pyx_v_values_fast); /* "psycopg_binary/pq/pgconn.pyx":778 * * cdef Py_ssize_t nparams = 0 * if param_values is not None: # <<<<<<<<<<<<<< * values_fast = PySequence_Fast(param_values, "'param_values' is not a sequence") * nparams = PySequence_Fast_GET_SIZE(values_fast) */ } /* "psycopg_binary/pq/pgconn.pyx":782 * nparams = PySequence_Fast_GET_SIZE(values_fast) * * if param_types is not None: # <<<<<<<<<<<<<< * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * if PySequence_Fast_GET_SIZE(types_fast) != nparams: */ __pyx_t_1 = (__pyx_v_param_types != Py_None); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":783 * * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") # <<<<<<<<<<<<<< * if PySequence_Fast_GET_SIZE(types_fast) != nparams: * raise ValueError( */ __pyx_t_2 = PySequence_Fast(__pyx_v_param_types, ((char *)"'param_types' is not a sequence")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_types_fast = __pyx_t_2; __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":784 * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * if PySequence_Fast_GET_SIZE(types_fast) != nparams: # <<<<<<<<<<<<<< * raise ValueError( * f"got {nparams} param_values but {len(param_types)} param_types" */ __pyx_t_1 = (PySequence_Fast_GET_SIZE(__pyx_v_types_fast) != __pyx_v_nparams); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":785 * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * if PySequence_Fast_GET_SIZE(types_fast) != nparams: * raise ValueError( # <<<<<<<<<<<<<< * f"got {nparams} param_values but {len(param_types)} param_types" * ) */ __pyx_t_3 = NULL; /* "psycopg_binary/pq/pgconn.pyx":786 * if PySequence_Fast_GET_SIZE(types_fast) != nparams: * raise ValueError( * f"got {nparams} param_values but {len(param_types)} param_types" # <<<<<<<<<<<<<< * ) * */ __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_nparams, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_Length(__pyx_v_param_types); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 786, __pyx_L1_error) __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_5, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_got; __pyx_t_7[1] = __pyx_t_4; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_param_values_but; __pyx_t_7[3] = __pyx_t_6; __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_param_types_2; __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 12, 127); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_8}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 785, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":784 * if param_types is not None: * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * if PySequence_Fast_GET_SIZE(types_fast) != nparams: # <<<<<<<<<<<<<< * raise ValueError( * f"got {nparams} param_values but {len(param_types)} param_types" */ } /* "psycopg_binary/pq/pgconn.pyx":782 * nparams = PySequence_Fast_GET_SIZE(values_fast) * * if param_types is not None: # <<<<<<<<<<<<<< * types_fast = PySequence_Fast(param_types, "'param_types' is not a sequence") * if PySequence_Fast_GET_SIZE(types_fast) != nparams: */ } /* "psycopg_binary/pq/pgconn.pyx":789 * ) * * if param_formats is not None: # <<<<<<<<<<<<<< * formats_fast = PySequence_Fast( * param_formats, "'param_formats' is not a sequence") */ __pyx_t_1 = (__pyx_v_param_formats != Py_None); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":790 * * if param_formats is not None: * formats_fast = PySequence_Fast( # <<<<<<<<<<<<<< * param_formats, "'param_formats' is not a sequence") * if PySequence_Fast_GET_SIZE(formats_fast) != nparams: */ __pyx_t_2 = PySequence_Fast(__pyx_v_param_formats, ((char *)"'param_formats' is not a sequence")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_formats_fast = __pyx_t_2; __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":792 * formats_fast = PySequence_Fast( * param_formats, "'param_formats' is not a sequence") * if PySequence_Fast_GET_SIZE(formats_fast) != nparams: # <<<<<<<<<<<<<< * raise ValueError( * f"got {nparams} param_values but {len(param_formats)} param_formats" */ __pyx_t_1 = (PySequence_Fast_GET_SIZE(__pyx_v_formats_fast) != __pyx_v_nparams); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgconn.pyx":793 * param_formats, "'param_formats' is not a sequence") * if PySequence_Fast_GET_SIZE(formats_fast) != nparams: * raise ValueError( # <<<<<<<<<<<<<< * f"got {nparams} param_values but {len(param_formats)} param_formats" * ) */ __pyx_t_8 = NULL; /* "psycopg_binary/pq/pgconn.pyx":794 * if PySequence_Fast_GET_SIZE(formats_fast) != nparams: * raise ValueError( * f"got {nparams} param_values but {len(param_formats)} param_formats" # <<<<<<<<<<<<<< * ) * */ __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_nparams, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = PyObject_Length(__pyx_v_param_formats); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 794, __pyx_L1_error) __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_5, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u_got; __pyx_t_7[1] = __pyx_t_3; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u_param_values_but; __pyx_t_7[3] = __pyx_t_6; __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_param_formats_2; __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, 4 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3) + 18 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6) + 14, 127); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_ValueError)), __pyx_callargs+__pyx_t_9, (2-__pyx_t_9) | (__pyx_t_9*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(1, 793, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":792 * formats_fast = PySequence_Fast( * param_formats, "'param_formats' is not a sequence") * if PySequence_Fast_GET_SIZE(formats_fast) != nparams: # <<<<<<<<<<<<<< * raise ValueError( * f"got {nparams} param_values but {len(param_formats)} param_formats" */ } /* "psycopg_binary/pq/pgconn.pyx":789 * ) * * if param_formats is not None: # <<<<<<<<<<<<<< * formats_fast = PySequence_Fast( * param_formats, "'param_formats' is not a sequence") */ } /* "psycopg_binary/pq/pgconn.pyx":797 * ) * * cdef char **aparams = NULL # <<<<<<<<<<<<<< * cdef int *alenghts = NULL * cdef char *ptr */ __pyx_v_aparams = NULL; /* "psycopg_binary/pq/pgconn.pyx":798 * * cdef char **aparams = NULL * cdef int *alenghts = NULL # <<<<<<<<<<<<<< * cdef char *ptr * cdef Py_ssize_t length */ __pyx_v_alenghts = NULL; /* "psycopg_binary/pq/pgconn.pyx":802 * cdef Py_ssize_t length * * if nparams: # <<<<<<<<<<<<<< * aparams = PyMem_Malloc(nparams * sizeof(char *)) * alenghts = PyMem_Malloc(nparams * sizeof(int)) */ __pyx_t_1 = (__pyx_v_nparams != 0); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":803 * * if nparams: * aparams = PyMem_Malloc(nparams * sizeof(char *)) # <<<<<<<<<<<<<< * alenghts = PyMem_Malloc(nparams * sizeof(int)) * for i in range(nparams): */ __pyx_v_aparams = ((char **)PyMem_Malloc((__pyx_v_nparams * (sizeof(char *))))); /* "psycopg_binary/pq/pgconn.pyx":804 * if nparams: * aparams = PyMem_Malloc(nparams * sizeof(char *)) * alenghts = PyMem_Malloc(nparams * sizeof(int)) # <<<<<<<<<<<<<< * for i in range(nparams): * obj = PySequence_Fast_GET_ITEM(values_fast, i) */ __pyx_v_alenghts = ((int *)PyMem_Malloc((__pyx_v_nparams * (sizeof(int))))); /* "psycopg_binary/pq/pgconn.pyx":805 * aparams = PyMem_Malloc(nparams * sizeof(char *)) * alenghts = PyMem_Malloc(nparams * sizeof(int)) * for i in range(nparams): # <<<<<<<<<<<<<< * obj = PySequence_Fast_GET_ITEM(values_fast, i) * if obj != None: */ __pyx_t_5 = __pyx_v_nparams; __pyx_t_10 = __pyx_t_5; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "psycopg_binary/pq/pgconn.pyx":806 * alenghts = PyMem_Malloc(nparams * sizeof(int)) * for i in range(nparams): * obj = PySequence_Fast_GET_ITEM(values_fast, i) # <<<<<<<<<<<<<< * if obj != None: * # TODO: it is a leak if this fails (but it should only fail */ if (unlikely(!__pyx_v_values_fast)) { __Pyx_RaiseUnboundLocalError("values_fast"); __PYX_ERR(1, 806, __pyx_L1_error) } __pyx_v_obj = PySequence_Fast_GET_ITEM(__pyx_v_values_fast, __pyx_v_i); /* "psycopg_binary/pq/pgconn.pyx":807 * for i in range(nparams): * obj = PySequence_Fast_GET_ITEM(values_fast, i) * if obj != None: # <<<<<<<<<<<<<< * # TODO: it is a leak if this fails (but it should only fail * # on internal error, e.g. if obj is not a buffer) */ __pyx_t_1 = (__pyx_v_obj != ((PyObject *)Py_None)); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":810 * # TODO: it is a leak if this fails (but it should only fail * # on internal error, e.g. if obj is not a buffer) * _buffer_as_string_and_size(obj, &ptr, &length) # <<<<<<<<<<<<<< * aparams[i] = ptr * alenghts[i] = length */ __pyx_t_12 = __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(((PyObject *)__pyx_v_obj), (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(1, 810, __pyx_L1_error) /* "psycopg_binary/pq/pgconn.pyx":811 * # on internal error, e.g. if obj is not a buffer) * _buffer_as_string_and_size(obj, &ptr, &length) * aparams[i] = ptr # <<<<<<<<<<<<<< * alenghts[i] = length * else: */ (__pyx_v_aparams[__pyx_v_i]) = __pyx_v_ptr; /* "psycopg_binary/pq/pgconn.pyx":812 * _buffer_as_string_and_size(obj, &ptr, &length) * aparams[i] = ptr * alenghts[i] = length # <<<<<<<<<<<<<< * else: * aparams[i] = NULL */ (__pyx_v_alenghts[__pyx_v_i]) = ((int)__pyx_v_length); /* "psycopg_binary/pq/pgconn.pyx":807 * for i in range(nparams): * obj = PySequence_Fast_GET_ITEM(values_fast, i) * if obj != None: # <<<<<<<<<<<<<< * # TODO: it is a leak if this fails (but it should only fail * # on internal error, e.g. if obj is not a buffer) */ goto __pyx_L11; } /* "psycopg_binary/pq/pgconn.pyx":814 * alenghts[i] = length * else: * aparams[i] = NULL # <<<<<<<<<<<<<< * alenghts[i] = 0 * */ /*else*/ { (__pyx_v_aparams[__pyx_v_i]) = NULL; /* "psycopg_binary/pq/pgconn.pyx":815 * else: * aparams[i] = NULL * alenghts[i] = 0 # <<<<<<<<<<<<<< * * cdef libpq.Oid *atypes = NULL */ (__pyx_v_alenghts[__pyx_v_i]) = 0; } __pyx_L11:; } /* "psycopg_binary/pq/pgconn.pyx":802 * cdef Py_ssize_t length * * if nparams: # <<<<<<<<<<<<<< * aparams = PyMem_Malloc(nparams * sizeof(char *)) * alenghts = PyMem_Malloc(nparams * sizeof(int)) */ } /* "psycopg_binary/pq/pgconn.pyx":817 * alenghts[i] = 0 * * cdef libpq.Oid *atypes = NULL # <<<<<<<<<<<<<< * if param_types is not None: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) */ __pyx_v_atypes = NULL; /* "psycopg_binary/pq/pgconn.pyx":818 * * cdef libpq.Oid *atypes = NULL * if param_types is not None: # <<<<<<<<<<<<<< * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): */ __pyx_t_1 = (__pyx_v_param_types != Py_None); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":819 * cdef libpq.Oid *atypes = NULL * if param_types is not None: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) # <<<<<<<<<<<<<< * for i in range(nparams): * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) */ __pyx_v_atypes = ((Oid *)PyMem_Malloc((__pyx_v_nparams * (sizeof(Oid))))); /* "psycopg_binary/pq/pgconn.pyx":820 * if param_types is not None: * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): # <<<<<<<<<<<<<< * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) * */ __pyx_t_5 = __pyx_v_nparams; __pyx_t_10 = __pyx_t_5; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "psycopg_binary/pq/pgconn.pyx":821 * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) # <<<<<<<<<<<<<< * * cdef int *aformats = NULL */ if (unlikely(!__pyx_v_types_fast)) { __Pyx_RaiseUnboundLocalError("types_fast"); __PYX_ERR(1, 821, __pyx_L1_error) } __pyx_t_13 = PySequence_Fast_GET_ITEM(__pyx_v_types_fast, __pyx_v_i); __pyx_t_14 = __Pyx_PyLong_As_Oid(((PyObject *)__pyx_t_13)); if (unlikely((__pyx_t_14 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(1, 821, __pyx_L1_error) (__pyx_v_atypes[__pyx_v_i]) = __pyx_t_14; } /* "psycopg_binary/pq/pgconn.pyx":818 * * cdef libpq.Oid *atypes = NULL * if param_types is not None: # <<<<<<<<<<<<<< * atypes = PyMem_Malloc(nparams * sizeof(libpq.Oid)) * for i in range(nparams): */ } /* "psycopg_binary/pq/pgconn.pyx":823 * atypes[i] = PySequence_Fast_GET_ITEM(types_fast, i) * * cdef int *aformats = NULL # <<<<<<<<<<<<<< * if param_formats is not None: * aformats = PyMem_Malloc(nparams * sizeof(int *)) */ __pyx_v_aformats = NULL; /* "psycopg_binary/pq/pgconn.pyx":824 * * cdef int *aformats = NULL * if param_formats is not None: # <<<<<<<<<<<<<< * aformats = PyMem_Malloc(nparams * sizeof(int *)) * for i in range(nparams): */ __pyx_t_1 = (__pyx_v_param_formats != Py_None); if (__pyx_t_1) { /* "psycopg_binary/pq/pgconn.pyx":825 * cdef int *aformats = NULL * if param_formats is not None: * aformats = PyMem_Malloc(nparams * sizeof(int *)) # <<<<<<<<<<<<<< * for i in range(nparams): * aformats[i] = PySequence_Fast_GET_ITEM(formats_fast, i) */ __pyx_v_aformats = ((int *)PyMem_Malloc((__pyx_v_nparams * (sizeof(int *))))); /* "psycopg_binary/pq/pgconn.pyx":826 * if param_formats is not None: * aformats = PyMem_Malloc(nparams * sizeof(int *)) * for i in range(nparams): # <<<<<<<<<<<<<< * aformats[i] = PySequence_Fast_GET_ITEM(formats_fast, i) * */ __pyx_t_5 = __pyx_v_nparams; __pyx_t_10 = __pyx_t_5; for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; /* "psycopg_binary/pq/pgconn.pyx":827 * aformats = PyMem_Malloc(nparams * sizeof(int *)) * for i in range(nparams): * aformats[i] = PySequence_Fast_GET_ITEM(formats_fast, i) # <<<<<<<<<<<<<< * * return (nparams, atypes, aparams, alenghts, aformats) */ if (unlikely(!__pyx_v_formats_fast)) { __Pyx_RaiseUnboundLocalError("formats_fast"); __PYX_ERR(1, 827, __pyx_L1_error) } __pyx_t_13 = PySequence_Fast_GET_ITEM(__pyx_v_formats_fast, __pyx_v_i); __pyx_t_12 = __Pyx_PyLong_As_int(((PyObject *)__pyx_t_13)); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 827, __pyx_L1_error) (__pyx_v_aformats[__pyx_v_i]) = __pyx_t_12; } /* "psycopg_binary/pq/pgconn.pyx":824 * * cdef int *aformats = NULL * if param_formats is not None: # <<<<<<<<<<<<<< * aformats = PyMem_Malloc(nparams * sizeof(int *)) * for i in range(nparams): */ } /* "psycopg_binary/pq/pgconn.pyx":829 * aformats[i] = PySequence_Fast_GET_ITEM(formats_fast, i) * * return (nparams, atypes, aparams, alenghts, aformats) # <<<<<<<<<<<<<< * * */ __pyx_t_15.f0 = __pyx_v_nparams; __pyx_t_15.f1 = __pyx_v_atypes; __pyx_t_15.f2 = __pyx_v_aparams; __pyx_t_15.f3 = __pyx_v_alenghts; __pyx_t_15.f4 = __pyx_v_aformats; __pyx_r = __pyx_t_15; goto __pyx_L0; /* "psycopg_binary/pq/pgconn.pyx":766 * * * cdef (Py_ssize_t, libpq.Oid *, char * const*, int *, int *) _query_params_args( # <<<<<<<<<<<<<< * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None, */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("psycopg_binary.pq._query_params_args", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_pretend_to_initialize(&__pyx_r); __pyx_L0:; __Pyx_XDECREF(__pyx_v_values_fast); __Pyx_XDECREF(__pyx_v_types_fast); __Pyx_XDECREF(__pyx_v_formats_fast); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgconn.pyx":832 * * * cdef void _clear_query_params( # <<<<<<<<<<<<<< * libpq.Oid *ctypes, char *const *cvalues, int *clenghst, int *cformats * ): */ static void __pyx_f_14psycopg_binary_2pq__clear_query_params(Oid *__pyx_v_ctypes, char *const *__pyx_v_cvalues, int *__pyx_v_clenghst, int *__pyx_v_cformats) { /* "psycopg_binary/pq/pgconn.pyx":835 * libpq.Oid *ctypes, char *const *cvalues, int *clenghst, int *cformats * ): * PyMem_Free(ctypes) # <<<<<<<<<<<<<< * PyMem_Free(cvalues) * PyMem_Free(clenghst) */ PyMem_Free(__pyx_v_ctypes); /* "psycopg_binary/pq/pgconn.pyx":836 * ): * PyMem_Free(ctypes) * PyMem_Free(cvalues) # <<<<<<<<<<<<<< * PyMem_Free(clenghst) * PyMem_Free(cformats) */ PyMem_Free(((char **)__pyx_v_cvalues)); /* "psycopg_binary/pq/pgconn.pyx":837 * PyMem_Free(ctypes) * PyMem_Free(cvalues) * PyMem_Free(clenghst) # <<<<<<<<<<<<<< * PyMem_Free(cformats) */ PyMem_Free(__pyx_v_clenghst); /* "psycopg_binary/pq/pgconn.pyx":838 * PyMem_Free(cvalues) * PyMem_Free(clenghst) * PyMem_Free(cformats) # <<<<<<<<<<<<<< */ PyMem_Free(__pyx_v_cformats); /* "psycopg_binary/pq/pgconn.pyx":832 * * * cdef void _clear_query_params( # <<<<<<<<<<<<<< * libpq.Oid *ctypes, char *const *cvalues, int *clenghst, int *cformats * ): */ /* function exit code */ } /* "psycopg_binary/pq/pgresult.pyx":16 * @cython.freelist(8) * cdef class PGresult: * def __cinit__(self): # <<<<<<<<<<<<<< * self._pgresult_ptr = NULL * */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_8PGresult_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_8PGresult_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return -1; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult___cinit__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_8PGresult___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { int __pyx_r; /* "psycopg_binary/pq/pgresult.pyx":17 * cdef class PGresult: * def __cinit__(self): * self._pgresult_ptr = NULL # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->_pgresult_ptr = NULL; /* "psycopg_binary/pq/pgresult.pyx":16 * @cython.freelist(8) * cdef class PGresult: * def __cinit__(self): # <<<<<<<<<<<<<< * self._pgresult_ptr = NULL * */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":19 * self._pgresult_ptr = NULL * * @staticmethod # <<<<<<<<<<<<<< * cdef PGresult _from_ptr(libpq.PGresult *ptr): * cdef PGresult rv = PGresult.__new__(PGresult) */ static struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr(PGresult *__pyx_v_ptr) { struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_rv = 0; struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_ptr", 0); /* "psycopg_binary/pq/pgresult.pyx":21 * @staticmethod * cdef PGresult _from_ptr(libpq.PGresult *ptr): * cdef PGresult rv = PGresult.__new__(PGresult) # <<<<<<<<<<<<<< * rv._pgresult_ptr = ptr * return rv */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_14psycopg_binary_2pq_PGresult(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 21, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_rv = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgresult.pyx":22 * cdef PGresult _from_ptr(libpq.PGresult *ptr): * cdef PGresult rv = PGresult.__new__(PGresult) * rv._pgresult_ptr = ptr # <<<<<<<<<<<<<< * return rv * */ __pyx_v_rv->_pgresult_ptr = __pyx_v_ptr; /* "psycopg_binary/pq/pgresult.pyx":23 * cdef PGresult rv = PGresult.__new__(PGresult) * rv._pgresult_ptr = ptr * return rv # <<<<<<<<<<<<<< * * def __dealloc__(self) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":19 * self._pgresult_ptr = NULL * * @staticmethod # <<<<<<<<<<<<<< * cdef PGresult _from_ptr(libpq.PGresult *ptr): * cdef PGresult rv = PGresult.__new__(PGresult) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult._from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rv); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":25 * return rv * * def __dealloc__(self) -> None: # <<<<<<<<<<<<<< * self.clear() * */ /* Python wrapper */ static void __pyx_pw_14psycopg_binary_2pq_8PGresult_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_14psycopg_binary_2pq_8PGresult_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_8PGresult_2__dealloc__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_8PGresult_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "psycopg_binary/pq/pgresult.pyx":26 * * def __dealloc__(self) -> None: * self.clear() # <<<<<<<<<<<<<< * * def __repr__(self) -> str: */ __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_clear, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgresult.pyx":25 * return rv * * def __dealloc__(self) -> None: # <<<<<<<<<<<<<< * self.clear() * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("psycopg_binary.pq.PGresult.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "psycopg_binary/pq/pgresult.pyx":28 * self.clear() * * def __repr__(self) -> str: # <<<<<<<<<<<<<< * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * status = ExecStatus(self.status) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_5__repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_4__repr__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_4__repr__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_v_cls = NULL; PyObject *__pyx_v_status = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4[3]; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; PyObject *__pyx_t_7[7]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "psycopg_binary/pq/pgresult.pyx":29 * * def __repr__(self) -> str: * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" # <<<<<<<<<<<<<< * status = ExecStatus(self.status) * return f"<{cls} [{status.name}] at 0x{id(self):x}>" */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_module); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_qualname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4[0] = __pyx_t_1; __pyx_t_4[1] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_4[2] = __pyx_t_2; __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 29, __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_cls = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "psycopg_binary/pq/pgresult.pyx":30 * def __repr__(self) -> str: * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * status = ExecStatus(self.status) # <<<<<<<<<<<<<< * return f"<{cls} [{status.name}] at 0x{id(self):x}>" * */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_ExecStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_status); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_1, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_5}; __pyx_t_3 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_1, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_v_status = __pyx_t_3; __pyx_t_3 = 0; /* "psycopg_binary/pq/pgresult.pyx":31 * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * status = ExecStatus(self.status) * return f"<{cls} [{status.name}] at 0x{id(self):x}>" # <<<<<<<<<<<<<< * * def clear(self) -> None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_status, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __Pyx_PyObject_Format(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7[0] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_7[1] = __pyx_v_cls; __pyx_t_7[2] = __pyx_mstate_global->__pyx_kp_u__10; __pyx_t_7[3] = __pyx_t_1; __pyx_t_7[4] = __pyx_mstate_global->__pyx_kp_u_at_0x_2; __pyx_t_7[5] = __pyx_t_5; __pyx_t_7[6] = __pyx_mstate_global->__pyx_kp_u__4; __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, 1 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_v_cls) + 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 7 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_cls) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":28 * self.clear() * * def __repr__(self) -> str: # <<<<<<<<<<<<<< * cls = f"{self.__class__.__module__}.{self.__class__.__qualname__}" * status = ExecStatus(self.status) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_cls); __Pyx_XDECREF(__pyx_v_status); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":33 * return f"<{cls} [{status.name}] at 0x{id(self):x}>" * * def clear(self) -> None: # <<<<<<<<<<<<<< * if self._pgresult_ptr is not NULL: * libpq.PQclear(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_7clear = {"clear", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_7clear, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clear (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_6clear(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_6clear(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("clear", 0); /* "psycopg_binary/pq/pgresult.pyx":34 * * def clear(self) -> None: * if self._pgresult_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQclear(self._pgresult_ptr) * self._pgresult_ptr = NULL */ __pyx_t_1 = (__pyx_v_self->_pgresult_ptr != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":35 * def clear(self) -> None: * if self._pgresult_ptr is not NULL: * libpq.PQclear(self._pgresult_ptr) # <<<<<<<<<<<<<< * self._pgresult_ptr = NULL * */ PQclear(__pyx_v_self->_pgresult_ptr); /* "psycopg_binary/pq/pgresult.pyx":36 * if self._pgresult_ptr is not NULL: * libpq.PQclear(self._pgresult_ptr) * self._pgresult_ptr = NULL # <<<<<<<<<<<<<< * * @property */ __pyx_v_self->_pgresult_ptr = NULL; /* "psycopg_binary/pq/pgresult.pyx":34 * * def clear(self) -> None: * if self._pgresult_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQclear(self._pgresult_ptr) * self._pgresult_ptr = NULL */ } /* "psycopg_binary/pq/pgresult.pyx":33 * return f"<{cls} [{status.name}] at 0x{id(self):x}>" * * def clear(self) -> None: # <<<<<<<<<<<<<< * if self._pgresult_ptr is not NULL: * libpq.PQclear(self._pgresult_ptr) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":38 * self._pgresult_ptr = NULL * * @property # <<<<<<<<<<<<<< * def pgresult_ptr(self) -> int | None: * if self._pgresult_ptr: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_12pgresult_ptr_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_12pgresult_ptr_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_12pgresult_ptr___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_12pgresult_ptr___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":40 * @property * def pgresult_ptr(self) -> int | None: * if self._pgresult_ptr: # <<<<<<<<<<<<<< * return self._pgresult_ptr * else: */ __pyx_t_1 = (__pyx_v_self->_pgresult_ptr != 0); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":41 * def pgresult_ptr(self) -> int | None: * if self._pgresult_ptr: * return self._pgresult_ptr # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyLong_From_PY_LONG_LONG(((PY_LONG_LONG)((void *)__pyx_v_self->_pgresult_ptr))); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":40 * @property * def pgresult_ptr(self) -> int | None: * if self._pgresult_ptr: # <<<<<<<<<<<<<< * return self._pgresult_ptr * else: */ } /* "psycopg_binary/pq/pgresult.pyx":43 * return self._pgresult_ptr * else: * return None # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgresult.pyx":38 * self._pgresult_ptr = NULL * * @property # <<<<<<<<<<<<<< * def pgresult_ptr(self) -> int | None: * if self._pgresult_ptr: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.pgresult_ptr.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":45 * return None * * @property # <<<<<<<<<<<<<< * def status(self) -> int: * return libpq.PQresultStatus(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_6status_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_6status___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_6status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":47 * @property * def status(self) -> int: * return libpq.PQresultStatus(self._pgresult_ptr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_ExecStatusType(PQresultStatus(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":45 * return None * * @property # <<<<<<<<<<<<<< * def status(self) -> int: * return libpq.PQresultStatus(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":49 * return libpq.PQresultStatus(self._pgresult_ptr) * * @property # <<<<<<<<<<<<<< * def error_message(self) -> bytes: * return libpq.PQresultErrorMessage(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_13error_message_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_13error_message_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_13error_message___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_13error_message___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":51 * @property * def error_message(self) -> bytes: * return libpq.PQresultErrorMessage(self._pgresult_ptr) # <<<<<<<<<<<<<< * * def get_error_message(self, encoding: str = "utf-8") -> str: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(PQresultErrorMessage(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":49 * return libpq.PQresultStatus(self._pgresult_ptr) * * @property # <<<<<<<<<<<<<< * def error_message(self) -> bytes: * return libpq.PQresultErrorMessage(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.error_message.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":53 * return libpq.PQresultErrorMessage(self._pgresult_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_9get_error_message(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_9get_error_message = {"get_error_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_8PGresult_9get_error_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_9get_error_message(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_encoding = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_error_message (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoding,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 53, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 53, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_error_message", 0) < (0)) __PYX_ERR(3, 53, __pyx_L3_error) if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_kp_u_utf_8)); } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 53, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_kp_u_utf_8)); } __pyx_v_encoding = ((PyObject*)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_error_message", 0, 0, 1, __pyx_nargs); __PYX_ERR(3, 53, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGresult.get_error_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoding), (&PyUnicode_Type), 0, "encoding", 2))) __PYX_ERR(3, 53, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_8get_error_message(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), __pyx_v_encoding); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_8get_error_message(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, PyObject *__pyx_v_encoding) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_message", 0); /* "psycopg_binary/pq/pgresult.pyx":54 * * def get_error_message(self, encoding: str = "utf-8") -> str: * return _clean_error_message(self.error_message, encoding) # <<<<<<<<<<<<<< * * def error_field(self, int fieldcode) -> bytes | None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clean_error_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_error_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_encoding}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(3, 54, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":53 * return libpq.PQresultErrorMessage(self._pgresult_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.get_error_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":56 * return _clean_error_message(self.error_message, encoding) * * def error_field(self, int fieldcode) -> bytes | None: # <<<<<<<<<<<<<< * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) * if rv is not NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_11error_field(PyObject *__pyx_v_self, PyObject *__pyx_arg_fieldcode); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_11error_field = {"error_field", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_11error_field, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_11error_field(PyObject *__pyx_v_self, PyObject *__pyx_arg_fieldcode) { int __pyx_v_fieldcode; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("error_field (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_fieldcode); { __pyx_v_fieldcode = __Pyx_PyLong_As_int(__pyx_arg_fieldcode); if (unlikely((__pyx_v_fieldcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 56, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.error_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_10error_field(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_fieldcode)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_10error_field(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_fieldcode) { char *__pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("error_field", 0); /* "psycopg_binary/pq/pgresult.pyx":57 * * def error_field(self, int fieldcode) -> bytes | None: * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) # <<<<<<<<<<<<<< * if rv is not NULL: * return rv */ __pyx_v_rv = PQresultErrorField(__pyx_v_self->_pgresult_ptr, __pyx_v_fieldcode); /* "psycopg_binary/pq/pgresult.pyx":58 * def error_field(self, int fieldcode) -> bytes | None: * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ __pyx_t_1 = (__pyx_v_rv != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":59 * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) * if rv is not NULL: * return rv # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_rv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":58 * def error_field(self, int fieldcode) -> bytes | None: * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ } /* "psycopg_binary/pq/pgresult.pyx":61 * return rv * else: * return None # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgresult.pyx":56 * return _clean_error_message(self.error_message, encoding) * * def error_field(self, int fieldcode) -> bytes | None: # <<<<<<<<<<<<<< * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) * if rv is not NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.error_field", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":63 * return None * * @property # <<<<<<<<<<<<<< * def ntuples(self) -> int: * return libpq.PQntuples(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7ntuples_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7ntuples_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_7ntuples___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_7ntuples___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":65 * @property * def ntuples(self) -> int: * return libpq.PQntuples(self._pgresult_ptr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQntuples(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":63 * return None * * @property # <<<<<<<<<<<<<< * def ntuples(self) -> int: * return libpq.PQntuples(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ntuples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":67 * return libpq.PQntuples(self._pgresult_ptr) * * @property # <<<<<<<<<<<<<< * def nfields(self) -> int: * return libpq.PQnfields(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7nfields_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7nfields_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_7nfields___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_7nfields___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":69 * @property * def nfields(self) -> int: * return libpq.PQnfields(self._pgresult_ptr) # <<<<<<<<<<<<<< * * def fname(self, int column_number) -> bytes | None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQnfields(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":67 * return libpq.PQntuples(self._pgresult_ptr) * * @property # <<<<<<<<<<<<<< * def nfields(self) -> int: * return libpq.PQnfields(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.nfields.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":71 * return libpq.PQnfields(self._pgresult_ptr) * * def fname(self, int column_number) -> bytes | None: # <<<<<<<<<<<<<< * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) * if rv is not NULL: */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_13fname(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_13fname = {"fname", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_13fname, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_13fname(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fname (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 71, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fname", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_12fname(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_12fname(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { char *__pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fname", 0); /* "psycopg_binary/pq/pgresult.pyx":72 * * def fname(self, int column_number) -> bytes | None: * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * if rv is not NULL: * return rv */ __pyx_v_rv = PQfname(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number); /* "psycopg_binary/pq/pgresult.pyx":73 * def fname(self, int column_number) -> bytes | None: * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ __pyx_t_1 = (__pyx_v_rv != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":74 * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) * if rv is not NULL: * return rv # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_rv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":73 * def fname(self, int column_number) -> bytes | None: * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ } /* "psycopg_binary/pq/pgresult.pyx":76 * return rv * else: * return None # <<<<<<<<<<<<<< * * def ftable(self, int column_number) -> int: */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgresult.pyx":71 * return libpq.PQnfields(self._pgresult_ptr) * * def fname(self, int column_number) -> bytes | None: # <<<<<<<<<<<<<< * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) * if rv is not NULL: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fname", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":78 * return None * * def ftable(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftable(self._pgresult_ptr, column_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_15ftable(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_15ftable = {"ftable", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_15ftable, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_15ftable(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ftable (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 78, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ftable", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_14ftable(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_14ftable(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ftable", 0); /* "psycopg_binary/pq/pgresult.pyx":79 * * def ftable(self, int column_number) -> int: * return libpq.PQftable(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * * def ftablecol(self, int column_number) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_Oid(PQftable(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 79, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":78 * return None * * def ftable(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftable(self._pgresult_ptr, column_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ftable", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":81 * return libpq.PQftable(self._pgresult_ptr, column_number) * * def ftablecol(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftablecol(self._pgresult_ptr, column_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_17ftablecol(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_17ftablecol = {"ftablecol", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_17ftablecol, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_17ftablecol(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ftablecol (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 81, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ftablecol", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_16ftablecol(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_16ftablecol(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ftablecol", 0); /* "psycopg_binary/pq/pgresult.pyx":82 * * def ftablecol(self, int column_number) -> int: * return libpq.PQftablecol(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * * def fformat(self, int column_number) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQftablecol(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 82, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":81 * return libpq.PQftable(self._pgresult_ptr, column_number) * * def ftablecol(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftablecol(self._pgresult_ptr, column_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ftablecol", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":84 * return libpq.PQftablecol(self._pgresult_ptr, column_number) * * def fformat(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfformat(self._pgresult_ptr, column_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_19fformat(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_19fformat = {"fformat", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_19fformat, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_19fformat(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fformat (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 84, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_18fformat(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_18fformat(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fformat", 0); /* "psycopg_binary/pq/pgresult.pyx":85 * * def fformat(self, int column_number) -> int: * return libpq.PQfformat(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * * def ftype(self, int column_number) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQfformat(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 85, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":84 * return libpq.PQftablecol(self._pgresult_ptr, column_number) * * def fformat(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfformat(self._pgresult_ptr, column_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":87 * return libpq.PQfformat(self._pgresult_ptr, column_number) * * def ftype(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftype(self._pgresult_ptr, column_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_21ftype(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_21ftype = {"ftype", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_21ftype, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_21ftype(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ftype (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 87, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ftype", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_20ftype(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_20ftype(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ftype", 0); /* "psycopg_binary/pq/pgresult.pyx":88 * * def ftype(self, int column_number) -> int: * return libpq.PQftype(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * * def fmod(self, int column_number) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_Oid(PQftype(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 88, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":87 * return libpq.PQfformat(self._pgresult_ptr, column_number) * * def ftype(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftype(self._pgresult_ptr, column_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.ftype", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":90 * return libpq.PQftype(self._pgresult_ptr, column_number) * * def fmod(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfmod(self._pgresult_ptr, column_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_23fmod(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_23fmod = {"fmod", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_23fmod, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_23fmod(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fmod (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 90, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fmod", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_22fmod(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_22fmod(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fmod", 0); /* "psycopg_binary/pq/pgresult.pyx":91 * * def fmod(self, int column_number) -> int: * return libpq.PQfmod(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * * def fsize(self, int column_number) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQfmod(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 91, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":90 * return libpq.PQftype(self._pgresult_ptr, column_number) * * def fmod(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfmod(self._pgresult_ptr, column_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fmod", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":93 * return libpq.PQfmod(self._pgresult_ptr, column_number) * * def fsize(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfsize(self._pgresult_ptr, column_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_25fsize(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_25fsize = {"fsize", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_25fsize, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_25fsize(PyObject *__pyx_v_self, PyObject *__pyx_arg_column_number) { int __pyx_v_column_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fsize (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_column_number); { __pyx_v_column_number = __Pyx_PyLong_As_int(__pyx_arg_column_number); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 93, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fsize", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_24fsize(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_column_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_24fsize(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_column_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fsize", 0); /* "psycopg_binary/pq/pgresult.pyx":94 * * def fsize(self, int column_number) -> int: * return libpq.PQfsize(self._pgresult_ptr, column_number) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQfsize(__pyx_v_self->_pgresult_ptr, __pyx_v_column_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 94, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 94, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":93 * return libpq.PQfmod(self._pgresult_ptr, column_number) * * def fsize(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfsize(self._pgresult_ptr, column_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.fsize", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":96 * return libpq.PQfsize(self._pgresult_ptr, column_number) * * @property # <<<<<<<<<<<<<< * def binary_tuples(self) -> int: * return libpq.PQbinaryTuples(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_13binary_tuples_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_13binary_tuples_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_13binary_tuples___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_13binary_tuples___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":98 * @property * def binary_tuples(self) -> int: * return libpq.PQbinaryTuples(self._pgresult_ptr) # <<<<<<<<<<<<<< * * def get_value(self, int row_number, int column_number) -> bytes | None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQbinaryTuples(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 98, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":96 * return libpq.PQfsize(self._pgresult_ptr, column_number) * * @property # <<<<<<<<<<<<<< * def binary_tuples(self) -> int: * return libpq.PQbinaryTuples(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.binary_tuples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":100 * return libpq.PQbinaryTuples(self._pgresult_ptr) * * def get_value(self, int row_number, int column_number) -> bytes | None: # <<<<<<<<<<<<<< * cdef int crow = row_number * cdef int ccol = column_number */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_27get_value(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_27get_value = {"get_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_8PGresult_27get_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_27get_value(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { int __pyx_v_row_number; int __pyx_v_column_number; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_value (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_row_number,&__pyx_mstate_global->__pyx_n_u_column_number,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(3, 100, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 100, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_value", 0) < (0)) __PYX_ERR(3, 100, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_value", 1, 2, 2, i); __PYX_ERR(3, 100, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(3, 100, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(3, 100, __pyx_L3_error) } __pyx_v_row_number = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_row_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 100, __pyx_L3_error) __pyx_v_column_number = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_column_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 100, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_value", 1, 2, 2, __pyx_nargs); __PYX_ERR(3, 100, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGresult.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_26get_value(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), __pyx_v_row_number, __pyx_v_column_number); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_26get_value(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_row_number, int __pyx_v_column_number) { int __pyx_v_crow; int __pyx_v_ccol; int __pyx_v_length; char *__pyx_v_v; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_value", 0); /* "psycopg_binary/pq/pgresult.pyx":101 * * def get_value(self, int row_number, int column_number) -> bytes | None: * cdef int crow = row_number # <<<<<<<<<<<<<< * cdef int ccol = column_number * cdef int length = libpq.PQgetlength(self._pgresult_ptr, crow, ccol) */ __pyx_v_crow = __pyx_v_row_number; /* "psycopg_binary/pq/pgresult.pyx":102 * def get_value(self, int row_number, int column_number) -> bytes | None: * cdef int crow = row_number * cdef int ccol = column_number # <<<<<<<<<<<<<< * cdef int length = libpq.PQgetlength(self._pgresult_ptr, crow, ccol) * cdef char *v */ __pyx_v_ccol = __pyx_v_column_number; /* "psycopg_binary/pq/pgresult.pyx":103 * cdef int crow = row_number * cdef int ccol = column_number * cdef int length = libpq.PQgetlength(self._pgresult_ptr, crow, ccol) # <<<<<<<<<<<<<< * cdef char *v * if length: */ __pyx_v_length = PQgetlength(__pyx_v_self->_pgresult_ptr, __pyx_v_crow, __pyx_v_ccol); /* "psycopg_binary/pq/pgresult.pyx":105 * cdef int length = libpq.PQgetlength(self._pgresult_ptr, crow, ccol) * cdef char *v * if length: # <<<<<<<<<<<<<< * v = libpq.PQgetvalue(self._pgresult_ptr, crow, ccol) * # TODO: avoid copy */ __pyx_t_1 = (__pyx_v_length != 0); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":106 * cdef char *v * if length: * v = libpq.PQgetvalue(self._pgresult_ptr, crow, ccol) # <<<<<<<<<<<<<< * # TODO: avoid copy * return v[:length] */ __pyx_v_v = PQgetvalue(__pyx_v_self->_pgresult_ptr, __pyx_v_crow, __pyx_v_ccol); /* "psycopg_binary/pq/pgresult.pyx":108 * v = libpq.PQgetvalue(self._pgresult_ptr, crow, ccol) * # TODO: avoid copy * return v[:length] # <<<<<<<<<<<<<< * else: * if libpq.PQgetisnull(self._pgresult_ptr, crow, ccol): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_v + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":105 * cdef int length = libpq.PQgetlength(self._pgresult_ptr, crow, ccol) * cdef char *v * if length: # <<<<<<<<<<<<<< * v = libpq.PQgetvalue(self._pgresult_ptr, crow, ccol) * # TODO: avoid copy */ } /* "psycopg_binary/pq/pgresult.pyx":110 * return v[:length] * else: * if libpq.PQgetisnull(self._pgresult_ptr, crow, ccol): # <<<<<<<<<<<<<< * return None * else: */ /*else*/ { __pyx_t_1 = (PQgetisnull(__pyx_v_self->_pgresult_ptr, __pyx_v_crow, __pyx_v_ccol) != 0); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":111 * else: * if libpq.PQgetisnull(self._pgresult_ptr, crow, ccol): * return None # <<<<<<<<<<<<<< * else: * return b"" */ __Pyx_XDECREF(__pyx_r); __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":110 * return v[:length] * else: * if libpq.PQgetisnull(self._pgresult_ptr, crow, ccol): # <<<<<<<<<<<<<< * return None * else: */ } /* "psycopg_binary/pq/pgresult.pyx":113 * return None * else: * return b"" # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__5); __pyx_r = __pyx_mstate_global->__pyx_kp_b__5; goto __pyx_L0; } } /* "psycopg_binary/pq/pgresult.pyx":100 * return libpq.PQbinaryTuples(self._pgresult_ptr) * * def get_value(self, int row_number, int column_number) -> bytes | None: # <<<<<<<<<<<<<< * cdef int crow = row_number * cdef int ccol = column_number */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":115 * return b"" * * @property # <<<<<<<<<<<<<< * def nparams(self) -> int: * return libpq.PQnparams(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7nparams_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_7nparams_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_7nparams___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_7nparams___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":117 * @property * def nparams(self) -> int: * return libpq.PQnparams(self._pgresult_ptr) # <<<<<<<<<<<<<< * * def param_type(self, int param_number) -> int: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_int(PQnparams(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":115 * return b"" * * @property # <<<<<<<<<<<<<< * def nparams(self) -> int: * return libpq.PQnparams(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.nparams.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":119 * return libpq.PQnparams(self._pgresult_ptr) * * def param_type(self, int param_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQparamtype(self._pgresult_ptr, param_number) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_29param_type(PyObject *__pyx_v_self, PyObject *__pyx_arg_param_number); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_29param_type = {"param_type", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_29param_type, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_29param_type(PyObject *__pyx_v_self, PyObject *__pyx_arg_param_number) { int __pyx_v_param_number; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("param_type (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_param_number); { __pyx_v_param_number = __Pyx_PyLong_As_int(__pyx_arg_param_number); if (unlikely((__pyx_v_param_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 119, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.param_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_28param_type(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((int)__pyx_v_param_number)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_28param_type(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, int __pyx_v_param_number) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("param_type", 0); /* "psycopg_binary/pq/pgresult.pyx":120 * * def param_type(self, int param_number) -> int: * return libpq.PQparamtype(self._pgresult_ptr, param_number) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_Oid(PQparamtype(__pyx_v_self->_pgresult_ptr, __pyx_v_param_number)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(3, 120, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":119 * return libpq.PQnparams(self._pgresult_ptr) * * def param_type(self, int param_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQparamtype(self._pgresult_ptr, param_number) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.param_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":122 * return libpq.PQparamtype(self._pgresult_ptr, param_number) * * @property # <<<<<<<<<<<<<< * def command_status(self) -> bytes | None: * cdef char *rv = libpq.PQcmdStatus(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_14command_status_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_14command_status_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_14command_status___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_14command_status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { char *__pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":124 * @property * def command_status(self) -> bytes | None: * cdef char *rv = libpq.PQcmdStatus(self._pgresult_ptr) # <<<<<<<<<<<<<< * if rv is not NULL: * return rv */ __pyx_v_rv = PQcmdStatus(__pyx_v_self->_pgresult_ptr); /* "psycopg_binary/pq/pgresult.pyx":125 * def command_status(self) -> bytes | None: * cdef char *rv = libpq.PQcmdStatus(self._pgresult_ptr) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ __pyx_t_1 = (__pyx_v_rv != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":126 * cdef char *rv = libpq.PQcmdStatus(self._pgresult_ptr) * if rv is not NULL: * return rv # <<<<<<<<<<<<<< * else: * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_rv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":125 * def command_status(self) -> bytes | None: * cdef char *rv = libpq.PQcmdStatus(self._pgresult_ptr) * if rv is not NULL: # <<<<<<<<<<<<<< * return rv * else: */ } /* "psycopg_binary/pq/pgresult.pyx":128 * return rv * else: * return None # <<<<<<<<<<<<<< * * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; } /* "psycopg_binary/pq/pgresult.pyx":122 * return libpq.PQparamtype(self._pgresult_ptr, param_number) * * @property # <<<<<<<<<<<<<< * def command_status(self) -> bytes | None: * cdef char *rv = libpq.PQcmdStatus(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.command_status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":130 * return None * * @property # <<<<<<<<<<<<<< * def command_tuples(self) -> int | None: * cdef char *rv = libpq.PQcmdTuples(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_14command_tuples_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_14command_tuples_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_14command_tuples___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_14command_tuples___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { char *__pyx_v_rv; PyObject *__pyx_v_brv = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":132 * @property * def command_tuples(self) -> int | None: * cdef char *rv = libpq.PQcmdTuples(self._pgresult_ptr) # <<<<<<<<<<<<<< * if rv is NULL: * return None */ __pyx_v_rv = PQcmdTuples(__pyx_v_self->_pgresult_ptr); /* "psycopg_binary/pq/pgresult.pyx":133 * def command_tuples(self) -> int | None: * cdef char *rv = libpq.PQcmdTuples(self._pgresult_ptr) * if rv is NULL: # <<<<<<<<<<<<<< * return None * cdef bytes brv = rv */ __pyx_t_1 = (__pyx_v_rv == NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgresult.pyx":134 * cdef char *rv = libpq.PQcmdTuples(self._pgresult_ptr) * if rv is NULL: * return None # <<<<<<<<<<<<<< * cdef bytes brv = rv * return int(brv) if brv else None */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":133 * def command_tuples(self) -> int | None: * cdef char *rv = libpq.PQcmdTuples(self._pgresult_ptr) * if rv is NULL: # <<<<<<<<<<<<<< * return None * cdef bytes brv = rv */ } /* "psycopg_binary/pq/pgresult.pyx":135 * if rv is NULL: * return None * cdef bytes brv = rv # <<<<<<<<<<<<<< * return int(brv) if brv else None * */ __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_rv); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_brv = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":136 * return None * cdef bytes brv = rv * return int(brv) if brv else None # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); { Py_ssize_t __pyx_temp = __Pyx_PyBytes_GET_SIZE(__pyx_v_brv); if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(3, 136, __pyx_L1_error) __pyx_t_1 = (__pyx_temp != 0); } if (__pyx_t_1) { __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_v_brv); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_2 = Py_None; } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":130 * return None * * @property # <<<<<<<<<<<<<< * def command_tuples(self) -> int | None: * cdef char *rv = libpq.PQcmdTuples(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.command_tuples.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_brv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":138 * return int(brv) if brv else None * * @property # <<<<<<<<<<<<<< * def oid_value(self) -> int: * return libpq.PQoidValue(self._pgresult_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_9oid_value_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_9oid_value_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_9oid_value___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_9oid_value___get__(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgresult.pyx":140 * @property * def oid_value(self) -> int: * return libpq.PQoidValue(self._pgresult_ptr) # <<<<<<<<<<<<<< * * def set_attributes(self, descriptions: list[PGresAttDesc]): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_Oid(PQoidValue(__pyx_v_self->_pgresult_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgresult.pyx":138 * return int(brv) if brv else None * * @property # <<<<<<<<<<<<<< * def oid_value(self) -> int: * return libpq.PQoidValue(self._pgresult_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.oid_value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgresult.pyx":142 * return libpq.PQoidValue(self._pgresult_ptr) * * def set_attributes(self, descriptions: list[PGresAttDesc]): # <<<<<<<<<<<<<< * cdef Py_ssize_t num = len(descriptions) * cdef libpq.PGresAttDesc *attrs = PyMem_Malloc( */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_31set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_v_descriptions); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_31set_attributes = {"set_attributes", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_31set_attributes, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_31set_attributes(PyObject *__pyx_v_self, PyObject *__pyx_v_descriptions) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_attributes (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_descriptions), (&PyList_Type), 0, "descriptions", 2))) __PYX_ERR(3, 142, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_30set_attributes(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((PyObject*)__pyx_v_descriptions)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; goto __pyx_L5_cleaned_up; __pyx_L0:; __pyx_L5_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_30set_attributes(struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, PyObject *__pyx_v_descriptions) { Py_ssize_t __pyx_v_num; PGresAttDesc *__pyx_v_attrs; Py_ssize_t __pyx_v_i; PyObject *__pyx_v_descr = NULL; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; Py_ssize_t __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; char *__pyx_t_5; Oid __pyx_t_6; int __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; size_t __pyx_t_12; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_attributes", 0); /* "psycopg_binary/pq/pgresult.pyx":143 * * def set_attributes(self, descriptions: list[PGresAttDesc]): * cdef Py_ssize_t num = len(descriptions) # <<<<<<<<<<<<<< * cdef libpq.PGresAttDesc *attrs = PyMem_Malloc( * num * sizeof(libpq.PGresAttDesc)) */ __pyx_t_1 = __Pyx_PyList_GET_SIZE(__pyx_v_descriptions); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(3, 143, __pyx_L1_error) __pyx_v_num = __pyx_t_1; /* "psycopg_binary/pq/pgresult.pyx":144 * def set_attributes(self, descriptions: list[PGresAttDesc]): * cdef Py_ssize_t num = len(descriptions) * cdef libpq.PGresAttDesc *attrs = PyMem_Malloc( # <<<<<<<<<<<<<< * num * sizeof(libpq.PGresAttDesc)) * */ __pyx_v_attrs = ((PGresAttDesc *)PyMem_Malloc((__pyx_v_num * (sizeof(PGresAttDesc))))); /* "psycopg_binary/pq/pgresult.pyx":147 * num * sizeof(libpq.PGresAttDesc)) * * for i in range(num): # <<<<<<<<<<<<<< * descr = descriptions[i] * attrs[i].name = descr.name */ __pyx_t_1 = __pyx_v_num; __pyx_t_2 = __pyx_t_1; for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; /* "psycopg_binary/pq/pgresult.pyx":148 * * for i in range(num): * descr = descriptions[i] # <<<<<<<<<<<<<< * attrs[i].name = descr.name * attrs[i].tableid = descr.tableid */ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_descriptions, __pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 1, 1, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_descr, __pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":149 * for i in range(num): * descr = descriptions[i] * attrs[i].name = descr.name # <<<<<<<<<<<<<< * attrs[i].tableid = descr.tableid * attrs[i].columnid = descr.columnid */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(3, 149, __pyx_L1_error) (__pyx_v_attrs[__pyx_v_i]).name = __pyx_t_5; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":150 * descr = descriptions[i] * attrs[i].name = descr.name * attrs[i].tableid = descr.tableid # <<<<<<<<<<<<<< * attrs[i].columnid = descr.columnid * attrs[i].format = descr.format */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_tableid); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyLong_As_Oid(__pyx_t_4); if (unlikely((__pyx_t_6 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_attrs[__pyx_v_i]).tableid = __pyx_t_6; /* "psycopg_binary/pq/pgresult.pyx":151 * attrs[i].name = descr.name * attrs[i].tableid = descr.tableid * attrs[i].columnid = descr.columnid # <<<<<<<<<<<<<< * attrs[i].format = descr.format * attrs[i].typid = descr.typid */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_columnid); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_attrs[__pyx_v_i]).columnid = __pyx_t_7; /* "psycopg_binary/pq/pgresult.pyx":152 * attrs[i].tableid = descr.tableid * attrs[i].columnid = descr.columnid * attrs[i].format = descr.format # <<<<<<<<<<<<<< * attrs[i].typid = descr.typid * attrs[i].typlen = descr.typlen */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_attrs[__pyx_v_i]).format = __pyx_t_7; /* "psycopg_binary/pq/pgresult.pyx":153 * attrs[i].columnid = descr.columnid * attrs[i].format = descr.format * attrs[i].typid = descr.typid # <<<<<<<<<<<<<< * attrs[i].typlen = descr.typlen * attrs[i].atttypmod = descr.atttypmod */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_typid); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyLong_As_Oid(__pyx_t_4); if (unlikely((__pyx_t_6 == ((Oid)-1)) && PyErr_Occurred())) __PYX_ERR(3, 153, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_attrs[__pyx_v_i]).typid = __pyx_t_6; /* "psycopg_binary/pq/pgresult.pyx":154 * attrs[i].format = descr.format * attrs[i].typid = descr.typid * attrs[i].typlen = descr.typlen # <<<<<<<<<<<<<< * attrs[i].atttypmod = descr.atttypmod * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_typlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_attrs[__pyx_v_i]).typlen = __pyx_t_7; /* "psycopg_binary/pq/pgresult.pyx":155 * attrs[i].typid = descr.typid * attrs[i].typlen = descr.typlen * attrs[i].atttypmod = descr.atttypmod # <<<<<<<<<<<<<< * * cdef int res = libpq.PQsetResultAttrs(self._pgresult_ptr, num, attrs) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_descr, __pyx_mstate_global->__pyx_n_u_atttypmod); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_attrs[__pyx_v_i]).atttypmod = __pyx_t_7; } /* "psycopg_binary/pq/pgresult.pyx":157 * attrs[i].atttypmod = descr.atttypmod * * cdef int res = libpq.PQsetResultAttrs(self._pgresult_ptr, num, attrs) # <<<<<<<<<<<<<< * PyMem_Free(attrs) * if (res == 0): */ __pyx_v_res = PQsetResultAttrs(__pyx_v_self->_pgresult_ptr, ((int)__pyx_v_num), __pyx_v_attrs); /* "psycopg_binary/pq/pgresult.pyx":158 * * cdef int res = libpq.PQsetResultAttrs(self._pgresult_ptr, num, attrs) * PyMem_Free(attrs) # <<<<<<<<<<<<<< * if (res == 0): * raise e.OperationalError("PQsetResultAttrs failed") */ PyMem_Free(__pyx_v_attrs); /* "psycopg_binary/pq/pgresult.pyx":159 * cdef int res = libpq.PQsetResultAttrs(self._pgresult_ptr, num, attrs) * PyMem_Free(attrs) * if (res == 0): # <<<<<<<<<<<<<< * raise e.OperationalError("PQsetResultAttrs failed") */ __pyx_t_8 = (__pyx_v_res == 0); if (unlikely(__pyx_t_8)) { /* "psycopg_binary/pq/pgresult.pyx":160 * PyMem_Free(attrs) * if (res == 0): * raise e.OperationalError("PQsetResultAttrs failed") # <<<<<<<<<<<<<< */ __pyx_t_9 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_10)) __PYX_ERR(3, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_11)) __PYX_ERR(3, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_12 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_11); assert(__pyx_t_9); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_11, __pyx__function); __pyx_t_12 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_mstate_global->__pyx_kp_u_PQsetResultAttrs_failed}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_11, __pyx_callargs+__pyx_t_12, (2-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(3, 160, __pyx_L1_error) /* "psycopg_binary/pq/pgresult.pyx":159 * cdef int res = libpq.PQsetResultAttrs(self._pgresult_ptr, num, attrs) * PyMem_Free(attrs) * if (res == 0): # <<<<<<<<<<<<<< * raise e.OperationalError("PQsetResultAttrs failed") */ } /* "psycopg_binary/pq/pgresult.pyx":142 * return libpq.PQoidValue(self._pgresult_ptr) * * def set_attributes(self, descriptions: list[PGresAttDesc]): # <<<<<<<<<<<<<< * cdef Py_ssize_t num = len(descriptions) * cdef libpq.PGresAttDesc *attrs = PyMem_Malloc( */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("psycopg_binary.pq.PGresult.set_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_descr); __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_14psycopg_binary_2pq_8PGresult_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_33__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_33__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_32__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.__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_14psycopg_binary_2pq_8PGresult_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGresult_35__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_35__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGresult_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGresult_34__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGresult_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGresult *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGresult.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":9 * * cdef class PGcancelConn: * def __cinit__(self): # <<<<<<<<<<<<<< * self.pgcancelconn_ptr = NULL * */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return -1; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn___cinit__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_12PGcancelConn___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { int __pyx_r; /* "psycopg_binary/pq/pgcancel.pyx":10 * cdef class PGcancelConn: * def __cinit__(self): * self.pgcancelconn_ptr = NULL # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->pgcancelconn_ptr = NULL; /* "psycopg_binary/pq/pgcancel.pyx":9 * * cdef class PGcancelConn: * def __cinit__(self): # <<<<<<<<<<<<<< * self.pgcancelconn_ptr = NULL * */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":12 * self.pgcancelconn_ptr = NULL * * @staticmethod # <<<<<<<<<<<<<< * cdef PGcancelConn _from_ptr(libpq.PGcancelConn *ptr): * cdef PGcancelConn rv = PGcancelConn.__new__(PGcancelConn) */ static struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_f_14psycopg_binary_2pq_12PGcancelConn__from_ptr(PGcancelConn *__pyx_v_ptr) { struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_rv = 0; struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_ptr", 0); /* "psycopg_binary/pq/pgcancel.pyx":14 * @staticmethod * cdef PGcancelConn _from_ptr(libpq.PGcancelConn *ptr): * cdef PGcancelConn rv = PGcancelConn.__new__(PGcancelConn) # <<<<<<<<<<<<<< * rv.pgcancelconn_ptr = ptr * return rv */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_14psycopg_binary_2pq_PGcancelConn(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 14, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_rv = ((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgcancel.pyx":15 * cdef PGcancelConn _from_ptr(libpq.PGcancelConn *ptr): * cdef PGcancelConn rv = PGcancelConn.__new__(PGcancelConn) * rv.pgcancelconn_ptr = ptr # <<<<<<<<<<<<<< * return rv * */ __pyx_v_rv->pgcancelconn_ptr = __pyx_v_ptr; /* "psycopg_binary/pq/pgcancel.pyx":16 * cdef PGcancelConn rv = PGcancelConn.__new__(PGcancelConn) * rv.pgcancelconn_ptr = ptr * return rv # <<<<<<<<<<<<<< * * def __dealloc__(self) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":12 * self.pgcancelconn_ptr = NULL * * @staticmethod # <<<<<<<<<<<<<< * cdef PGcancelConn _from_ptr(libpq.PGcancelConn *ptr): * cdef PGcancelConn rv = PGcancelConn.__new__(PGcancelConn) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn._from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rv); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":18 * return rv * * def __dealloc__(self) -> None: # <<<<<<<<<<<<<< * self.finish() * */ /* Python wrapper */ static void __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_2__dealloc__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "psycopg_binary/pq/pgcancel.pyx":19 * * def __dealloc__(self) -> None: * self.finish() # <<<<<<<<<<<<<< * * def start(self) -> None: */ __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_finish, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgcancel.pyx":18 * return rv * * def __dealloc__(self) -> None: # <<<<<<<<<<<<<< * self.finish() * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("psycopg_binary.pq.PGcancelConn.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "psycopg_binary/pq/pgcancel.pyx":21 * self.finish() * * def start(self) -> None: # <<<<<<<<<<<<<< * """Requests that the server abandons processing of the current command * in a non-blocking manner. */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_5start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_14psycopg_binary_2pq_12PGcancelConn_4start, "Requests that the server abandons processing of the current command\n in a non-blocking manner.\n\n See :pq:`PQcancelStart` for details.\n "); static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_5start = {"start", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_5start, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_12PGcancelConn_4start}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_5start(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("start (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_4start(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_4start(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("start", 0); /* "psycopg_binary/pq/pgcancel.pyx":27 * See :pq:`PQcancelStart` for details. * """ * if not libpq.PQcancelStart(self.pgcancelconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"couldn't send cancellation: {self.get_error_message()}" */ __pyx_t_1 = (!(PQcancelStart(__pyx_v_self->pgcancelconn_ptr) != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgcancel.pyx":28 * """ * if not libpq.PQcancelStart(self.pgcancelconn_ptr): * raise e.OperationalError( # <<<<<<<<<<<<<< * f"couldn't send cancellation: {self.get_error_message()}" * ) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":29 * if not libpq.PQcancelStart(self.pgcancelconn_ptr): * raise e.OperationalError( * f"couldn't send cancellation: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_couldn_t_send_cancellation, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(4, 28, __pyx_L1_error) /* "psycopg_binary/pq/pgcancel.pyx":27 * See :pq:`PQcancelStart` for details. * """ * if not libpq.PQcancelStart(self.pgcancelconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"couldn't send cancellation: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgcancel.pyx":21 * self.finish() * * def start(self) -> None: # <<<<<<<<<<<<<< * """Requests that the server abandons processing of the current command * in a non-blocking manner. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.start", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":32 * ) * * def blocking(self) -> None: # <<<<<<<<<<<<<< * """Requests that the server abandons processing of the current command * in a blocking manner. */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_7blocking(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ PyDoc_STRVAR(__pyx_doc_14psycopg_binary_2pq_12PGcancelConn_6blocking, "Requests that the server abandons processing of the current command\n in a blocking manner.\n\n See :pq:`PQcancelBlocking` for details.\n "); static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_7blocking = {"blocking", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_7blocking, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_12PGcancelConn_6blocking}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_7blocking(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("blocking (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6blocking(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6blocking(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("blocking", 0); /* "psycopg_binary/pq/pgcancel.pyx":38 * See :pq:`PQcancelBlocking` for details. * """ * if not libpq.PQcancelBlocking(self.pgcancelconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"couldn't send cancellation: {self.get_error_message()}" */ __pyx_t_1 = (!(PQcancelBlocking(__pyx_v_self->pgcancelconn_ptr) != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgcancel.pyx":39 * """ * if not libpq.PQcancelBlocking(self.pgcancelconn_ptr): * raise e.OperationalError( # <<<<<<<<<<<<<< * f"couldn't send cancellation: {self.get_error_message()}" * ) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":40 * if not libpq.PQcancelBlocking(self.pgcancelconn_ptr): * raise e.OperationalError( * f"couldn't send cancellation: {self.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_6 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_7, (1-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(4, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_couldn_t_send_cancellation, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_7 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(4, 39, __pyx_L1_error) /* "psycopg_binary/pq/pgcancel.pyx":38 * See :pq:`PQcancelBlocking` for details. * """ * if not libpq.PQcancelBlocking(self.pgcancelconn_ptr): # <<<<<<<<<<<<<< * raise e.OperationalError( * f"couldn't send cancellation: {self.get_error_message()}" */ } /* "psycopg_binary/pq/pgcancel.pyx":32 * ) * * def blocking(self) -> None: # <<<<<<<<<<<<<< * """Requests that the server abandons processing of the current command * in a blocking manner. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.blocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":43 * ) * * def poll(self) -> int: # <<<<<<<<<<<<<< * self._ensure_pgcancelconn() * return libpq.PQcancelPoll(self.pgcancelconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_9poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_9poll = {"poll", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_9poll, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_9poll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("poll (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_8poll(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_8poll(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("poll", 0); /* "psycopg_binary/pq/pgcancel.pyx":44 * * def poll(self) -> int: * self._ensure_pgcancelconn() # <<<<<<<<<<<<<< * return libpq.PQcancelPoll(self.pgcancelconn_ptr) * */ __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_pgcancelconn, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgcancel.pyx":45 * def poll(self) -> int: * self._ensure_pgcancelconn() * return libpq.PQcancelPoll(self.pgcancelconn_ptr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_PostgresPollingStatusType(PQcancelPoll(__pyx_v_self->pgcancelconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyInt_FromNumber(&__pyx_t_1, NULL, 0) < (0)) __PYX_ERR(4, 45, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":43 * ) * * def poll(self) -> int: # <<<<<<<<<<<<<< * self._ensure_pgcancelconn() * return libpq.PQcancelPoll(self.pgcancelconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.poll", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":47 * return libpq.PQcancelPoll(self.pgcancelconn_ptr) * * @property # <<<<<<<<<<<<<< * def status(self) -> int: * return libpq.PQcancelStatus(self.pgcancelconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_6status_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_6status_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6status___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6status___get__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgcancel.pyx":49 * @property * def status(self) -> int: * return libpq.PQcancelStatus(self.pgcancelconn_ptr) # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyLong_From_ConnStatusType(PQcancelStatus(__pyx_v_self->pgcancelconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":47 * return libpq.PQcancelPoll(self.pgcancelconn_ptr) * * @property # <<<<<<<<<<<<<< * def status(self) -> int: * return libpq.PQcancelStatus(self.pgcancelconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":51 * return libpq.PQcancelStatus(self.pgcancelconn_ptr) * * @property # <<<<<<<<<<<<<< * def socket(self) -> int: * rv = libpq.PQcancelSocket(self.pgcancelconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_6socket_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_6socket_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6socket___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_6socket___get__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { int __pyx_v_rv; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgcancel.pyx":53 * @property * def socket(self) -> int: * rv = libpq.PQcancelSocket(self.pgcancelconn_ptr) # <<<<<<<<<<<<<< * if rv == -1: * raise e.OperationalError("cancel connection not opened") */ __pyx_v_rv = PQcancelSocket(__pyx_v_self->pgcancelconn_ptr); /* "psycopg_binary/pq/pgcancel.pyx":54 * def socket(self) -> int: * rv = libpq.PQcancelSocket(self.pgcancelconn_ptr) * if rv == -1: # <<<<<<<<<<<<<< * raise e.OperationalError("cancel connection not opened") * return rv */ __pyx_t_1 = (__pyx_v_rv == -1L); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgcancel.pyx":55 * rv = libpq.PQcancelSocket(self.pgcancelconn_ptr) * if rv == -1: * raise e.OperationalError("cancel connection not opened") # <<<<<<<<<<<<<< * return rv * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_cancel_connection_not_opened}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(4, 55, __pyx_L1_error) /* "psycopg_binary/pq/pgcancel.pyx":54 * def socket(self) -> int: * rv = libpq.PQcancelSocket(self.pgcancelconn_ptr) * if rv == -1: # <<<<<<<<<<<<<< * raise e.OperationalError("cancel connection not opened") * return rv */ } /* "psycopg_binary/pq/pgcancel.pyx":56 * if rv == -1: * raise e.OperationalError("cancel connection not opened") * return rv # <<<<<<<<<<<<<< * * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_rv); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":51 * return libpq.PQcancelStatus(self.pgcancelconn_ptr) * * @property # <<<<<<<<<<<<<< * def socket(self) -> int: * rv = libpq.PQcancelSocket(self.pgcancelconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.socket.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":58 * return rv * * @property # <<<<<<<<<<<<<< * def error_message(self) -> bytes: * return libpq.PQcancelErrorMessage(self.pgcancelconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13error_message_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13error_message_1__get__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_13error_message___get__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_13error_message___get__(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "psycopg_binary/pq/pgcancel.pyx":60 * @property * def error_message(self) -> bytes: * return libpq.PQcancelErrorMessage(self.pgcancelconn_ptr) # <<<<<<<<<<<<<< * * def get_error_message(self, encoding: str = "utf-8") -> str: */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(PQcancelErrorMessage(__pyx_v_self->pgcancelconn_ptr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":58 * return rv * * @property # <<<<<<<<<<<<<< * def error_message(self) -> bytes: * return libpq.PQcancelErrorMessage(self.pgcancelconn_ptr) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.error_message.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":62 * return libpq.PQcancelErrorMessage(self.pgcancelconn_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_11get_error_message(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_11get_error_message = {"get_error_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_11get_error_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_11get_error_message(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_encoding = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_error_message (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_encoding,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(4, 62, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 62, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_error_message", 0) < (0)) __PYX_ERR(4, 62, __pyx_L3_error) if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_kp_u_utf_8)); } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(4, 62, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } if (!values[0]) values[0] = __Pyx_NewRef(((PyObject*)__pyx_mstate_global->__pyx_kp_u_utf_8)); } __pyx_v_encoding = ((PyObject*)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("get_error_message", 0, 0, 1, __pyx_nargs); __PYX_ERR(4, 62, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.get_error_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_encoding), (&PyUnicode_Type), 0, "encoding", 2))) __PYX_ERR(4, 62, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_10get_error_message(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self), __pyx_v_encoding); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_10get_error_message(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self, PyObject *__pyx_v_encoding) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_message", 0); /* "psycopg_binary/pq/pgcancel.pyx":63 * * def get_error_message(self, encoding: str = "utf-8") -> str: * return _clean_error_message(self.error_message, encoding) # <<<<<<<<<<<<<< * * def reset(self) -> None: */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_clean_error_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_error_message); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_t_4, __pyx_v_encoding}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (3-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(4, 63, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":62 * return libpq.PQcancelErrorMessage(self.pgcancelconn_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.get_error_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":65 * return _clean_error_message(self.error_message, encoding) * * def reset(self) -> None: # <<<<<<<<<<<<<< * self._ensure_pgcancelconn() * libpq.PQcancelReset(self.pgcancelconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_13reset = {"reset", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13reset, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_12reset(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_12reset(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reset", 0); /* "psycopg_binary/pq/pgcancel.pyx":66 * * def reset(self) -> None: * self._ensure_pgcancelconn() # <<<<<<<<<<<<<< * libpq.PQcancelReset(self.pgcancelconn_ptr) * */ __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_ensure_pgcancelconn, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgcancel.pyx":67 * def reset(self) -> None: * self._ensure_pgcancelconn() * libpq.PQcancelReset(self.pgcancelconn_ptr) # <<<<<<<<<<<<<< * * def finish(self) -> None: */ PQcancelReset(__pyx_v_self->pgcancelconn_ptr); /* "psycopg_binary/pq/pgcancel.pyx":65 * return _clean_error_message(self.error_message, encoding) * * def reset(self) -> None: # <<<<<<<<<<<<<< * self._ensure_pgcancelconn() * libpq.PQcancelReset(self.pgcancelconn_ptr) */ /* 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_AddTraceback("psycopg_binary.pq.PGcancelConn.reset", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":69 * libpq.PQcancelReset(self.pgcancelconn_ptr) * * def finish(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancelconn_ptr is not NULL: * libpq.PQcancelFinish(self.pgcancelconn_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_15finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_15finish = {"finish", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_15finish, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_15finish(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("finish (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_14finish(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_14finish(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("finish", 0); /* "psycopg_binary/pq/pgcancel.pyx":70 * * def finish(self) -> None: * if self.pgcancelconn_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQcancelFinish(self.pgcancelconn_ptr) * self.pgcancelconn_ptr = NULL */ __pyx_t_1 = (__pyx_v_self->pgcancelconn_ptr != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgcancel.pyx":71 * def finish(self) -> None: * if self.pgcancelconn_ptr is not NULL: * libpq.PQcancelFinish(self.pgcancelconn_ptr) # <<<<<<<<<<<<<< * self.pgcancelconn_ptr = NULL * */ PQcancelFinish(__pyx_v_self->pgcancelconn_ptr); /* "psycopg_binary/pq/pgcancel.pyx":72 * if self.pgcancelconn_ptr is not NULL: * libpq.PQcancelFinish(self.pgcancelconn_ptr) * self.pgcancelconn_ptr = NULL # <<<<<<<<<<<<<< * * def _ensure_pgcancelconn(self) -> None: */ __pyx_v_self->pgcancelconn_ptr = NULL; /* "psycopg_binary/pq/pgcancel.pyx":70 * * def finish(self) -> None: * if self.pgcancelconn_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQcancelFinish(self.pgcancelconn_ptr) * self.pgcancelconn_ptr = NULL */ } /* "psycopg_binary/pq/pgcancel.pyx":69 * libpq.PQcancelReset(self.pgcancelconn_ptr) * * def finish(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancelconn_ptr is not NULL: * libpq.PQcancelFinish(self.pgcancelconn_ptr) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":74 * self.pgcancelconn_ptr = NULL * * def _ensure_pgcancelconn(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancelconn_ptr is NULL: * raise e.OperationalError("the cancel connection is closed") */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_17_ensure_pgcancelconn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_17_ensure_pgcancelconn = {"_ensure_pgcancelconn", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_17_ensure_pgcancelconn, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_17_ensure_pgcancelconn(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_ensure_pgcancelconn (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_16_ensure_pgcancelconn(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_16_ensure_pgcancelconn(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_ensure_pgcancelconn", 0); /* "psycopg_binary/pq/pgcancel.pyx":75 * * def _ensure_pgcancelconn(self) -> None: * if self.pgcancelconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the cancel connection is closed") * */ __pyx_t_1 = (__pyx_v_self->pgcancelconn_ptr == NULL); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgcancel.pyx":76 * def _ensure_pgcancelconn(self) -> None: * if self.pgcancelconn_ptr is NULL: * raise e.OperationalError("the cancel connection is closed") # <<<<<<<<<<<<<< * * */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_the_cancel_connection_is_closed}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 76, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(4, 76, __pyx_L1_error) /* "psycopg_binary/pq/pgcancel.pyx":75 * * def _ensure_pgcancelconn(self) -> None: * if self.pgcancelconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the cancel connection is closed") * */ } /* "psycopg_binary/pq/pgcancel.pyx":74 * self.pgcancelconn_ptr = NULL * * def _ensure_pgcancelconn(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancelconn_ptr is NULL: * raise e.OperationalError("the cancel connection is closed") */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn._ensure_pgcancelconn", __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_14psycopg_binary_2pq_12PGcancelConn_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_19__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_18__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.__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_14psycopg_binary_2pq_12PGcancelConn_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_21__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_12PGcancelConn_20__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_12PGcancelConn_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGcancelConn.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":80 * * cdef class PGcancel: * def __cinit__(self): # <<<<<<<<<<<<<< * self.pgcancel_ptr = NULL * */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_8PGcancel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_8PGcancel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return -1; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGcancel___cinit__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_8PGcancel___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self) { int __pyx_r; /* "psycopg_binary/pq/pgcancel.pyx":81 * cdef class PGcancel: * def __cinit__(self): * self.pgcancel_ptr = NULL # <<<<<<<<<<<<<< * * @staticmethod */ __pyx_v_self->pgcancel_ptr = NULL; /* "psycopg_binary/pq/pgcancel.pyx":80 * * cdef class PGcancel: * def __cinit__(self): # <<<<<<<<<<<<<< * self.pgcancel_ptr = NULL * */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":83 * self.pgcancel_ptr = NULL * * @staticmethod # <<<<<<<<<<<<<< * cdef PGcancel _from_ptr(libpq.PGcancel *ptr): * cdef PGcancel rv = PGcancel.__new__(PGcancel) */ static struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_f_14psycopg_binary_2pq_8PGcancel__from_ptr(PGcancel *__pyx_v_ptr) { struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_rv = 0; struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_ptr", 0); /* "psycopg_binary/pq/pgcancel.pyx":85 * @staticmethod * cdef PGcancel _from_ptr(libpq.PGcancel *ptr): * cdef PGcancel rv = PGcancel.__new__(PGcancel) # <<<<<<<<<<<<<< * rv.pgcancel_ptr = ptr * return rv */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_14psycopg_binary_2pq_PGcancel(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancel), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 85, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_rv = ((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgcancel.pyx":86 * cdef PGcancel _from_ptr(libpq.PGcancel *ptr): * cdef PGcancel rv = PGcancel.__new__(PGcancel) * rv.pgcancel_ptr = ptr # <<<<<<<<<<<<<< * return rv * */ __pyx_v_rv->pgcancel_ptr = __pyx_v_ptr; /* "psycopg_binary/pq/pgcancel.pyx":87 * cdef PGcancel rv = PGcancel.__new__(PGcancel) * rv.pgcancel_ptr = ptr * return rv # <<<<<<<<<<<<<< * * def __dealloc__(self) -> None: */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pgcancel.pyx":83 * self.pgcancel_ptr = NULL * * @staticmethod # <<<<<<<<<<<<<< * cdef PGcancel _from_ptr(libpq.PGcancel *ptr): * cdef PGcancel rv = PGcancel.__new__(PGcancel) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PGcancel._from_ptr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rv); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":89 * return rv * * def __dealloc__(self) -> None: # <<<<<<<<<<<<<< * self.free() * */ /* Python wrapper */ static void __pyx_pw_14psycopg_binary_2pq_8PGcancel_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_14psycopg_binary_2pq_8PGcancel_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_8PGcancel_2__dealloc__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_8PGcancel_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self) { __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; size_t __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "psycopg_binary/pq/pgcancel.pyx":90 * * def __dealloc__(self) -> None: * self.free() # <<<<<<<<<<<<<< * * def free(self) -> None: */ __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_free, __pyx_callargs+__pyx_t_3, (1-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pgcancel.pyx":89 * return rv * * def __dealloc__(self) -> None: # <<<<<<<<<<<<<< * self.free() * */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_WriteUnraisable("psycopg_binary.pq.PGcancel.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_L0:; __Pyx_RefNannyFinishContext(); } /* "psycopg_binary/pq/pgcancel.pyx":92 * self.free() * * def free(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancel_ptr is not NULL: * libpq.PQfreeCancel(self.pgcancel_ptr) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGcancel_5free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGcancel_5free = {"free", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_5free, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGcancel_5free(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("free (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGcancel_4free(((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_4free(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("free", 0); /* "psycopg_binary/pq/pgcancel.pyx":93 * * def free(self) -> None: * if self.pgcancel_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQfreeCancel(self.pgcancel_ptr) * self.pgcancel_ptr = NULL */ __pyx_t_1 = (__pyx_v_self->pgcancel_ptr != NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/pgcancel.pyx":94 * def free(self) -> None: * if self.pgcancel_ptr is not NULL: * libpq.PQfreeCancel(self.pgcancel_ptr) # <<<<<<<<<<<<<< * self.pgcancel_ptr = NULL * */ PQfreeCancel(__pyx_v_self->pgcancel_ptr); /* "psycopg_binary/pq/pgcancel.pyx":95 * if self.pgcancel_ptr is not NULL: * libpq.PQfreeCancel(self.pgcancel_ptr) * self.pgcancel_ptr = NULL # <<<<<<<<<<<<<< * * def cancel(self) -> None: */ __pyx_v_self->pgcancel_ptr = NULL; /* "psycopg_binary/pq/pgcancel.pyx":93 * * def free(self) -> None: * if self.pgcancel_ptr is not NULL: # <<<<<<<<<<<<<< * libpq.PQfreeCancel(self.pgcancel_ptr) * self.pgcancel_ptr = NULL */ } /* "psycopg_binary/pq/pgcancel.pyx":92 * self.free() * * def free(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancel_ptr is not NULL: * libpq.PQfreeCancel(self.pgcancel_ptr) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pgcancel.pyx":97 * self.pgcancel_ptr = NULL * * def cancel(self) -> None: # <<<<<<<<<<<<<< * cdef char buf[256] * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGcancel_7cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGcancel_7cancel = {"cancel", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_7cancel, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGcancel_7cancel(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("cancel (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGcancel_6cancel(((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_6cancel(struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self) { char __pyx_v_buf[256]; int __pyx_v_res; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; Py_ssize_t __pyx_t_6; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancel", 0); /* "psycopg_binary/pq/pgcancel.pyx":99 * def cancel(self) -> None: * cdef char buf[256] * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) # <<<<<<<<<<<<<< * if not res: * raise e.OperationalError( */ __pyx_v_res = PQcancel(__pyx_v_self->pgcancel_ptr, __pyx_v_buf, (sizeof(__pyx_v_buf))); /* "psycopg_binary/pq/pgcancel.pyx":100 * cdef char buf[256] * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) * if not res: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"cancel failed: {buf.decode('utf8', 'ignore')}" */ __pyx_t_1 = (!(__pyx_v_res != 0)); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/pgcancel.pyx":101 * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) * if not res: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"cancel failed: {buf.decode('utf8', 'ignore')}" * ) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":102 * if not res: * raise e.OperationalError( * f"cancel failed: {buf.decode('utf8', 'ignore')}" # <<<<<<<<<<<<<< * ) */ __pyx_t_6 = __Pyx_ssize_strlen(__pyx_v_buf); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(4, 102, __pyx_L1_error) __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_buf, 0, __pyx_t_6, NULL, __pyx_k_ignore, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_cancel_failed, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(4, 102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_8 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(4, 101, __pyx_L1_error) /* "psycopg_binary/pq/pgcancel.pyx":100 * cdef char buf[256] * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) * if not res: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"cancel failed: {buf.decode('utf8', 'ignore')}" */ } /* "psycopg_binary/pq/pgcancel.pyx":97 * self.pgcancel_ptr = NULL * * def cancel(self) -> None: # <<<<<<<<<<<<<< * cdef char buf[256] * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq.PGcancel.cancel", __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_14psycopg_binary_2pq_8PGcancel_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGcancel_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_9__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGcancel_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGcancel_8__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGcancel.__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_14psycopg_binary_2pq_8PGcancel_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PGcancel_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_11__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PGcancel_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PGcancel_10__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PGcancel_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PGcancel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PGcancel.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/conninfo.pyx":11 * * class Conninfo: * @classmethod # <<<<<<<<<<<<<< * def get_defaults(cls) -> list[ConninfoOption]: * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Conninfo_1get_defaults(PyObject *__pyx_self, PyObject *__pyx_v_cls); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Conninfo_1get_defaults = {"get_defaults", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Conninfo_1get_defaults, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Conninfo_1get_defaults(PyObject *__pyx_self, PyObject *__pyx_v_cls) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_defaults (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Conninfo_get_defaults(__pyx_self, ((PyObject *)__pyx_v_cls)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Conninfo_get_defaults(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls) { PQconninfoOption *__pyx_v_opts; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_defaults", 0); /* "psycopg_binary/pq/conninfo.pyx":13 * @classmethod * def get_defaults(cls) -> list[ConninfoOption]: * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() # <<<<<<<<<<<<<< * if opts is NULL : * raise MemoryError("couldn't allocate connection defaults") */ __pyx_v_opts = PQconndefaults(); /* "psycopg_binary/pq/conninfo.pyx":14 * def get_defaults(cls) -> list[ConninfoOption]: * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() * if opts is NULL : # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate connection defaults") * rv = _options_from_array(opts) */ __pyx_t_1 = (__pyx_v_opts == NULL); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/conninfo.pyx":15 * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() * if opts is NULL : * raise MemoryError("couldn't allocate connection defaults") # <<<<<<<<<<<<<< * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_connection_def}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(5, 15, __pyx_L1_error) /* "psycopg_binary/pq/conninfo.pyx":14 * def get_defaults(cls) -> list[ConninfoOption]: * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() * if opts is NULL : # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate connection defaults") * rv = _options_from_array(opts) */ } /* "psycopg_binary/pq/conninfo.pyx":16 * if opts is NULL : * raise MemoryError("couldn't allocate connection defaults") * rv = _options_from_array(opts) # <<<<<<<<<<<<<< * libpq.PQconninfoFree(opts) * return rv */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__options_from_array(__pyx_v_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_rv = __pyx_t_2; __pyx_t_2 = 0; /* "psycopg_binary/pq/conninfo.pyx":17 * raise MemoryError("couldn't allocate connection defaults") * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) # <<<<<<<<<<<<<< * return rv * */ PQconninfoFree(__pyx_v_opts); /* "psycopg_binary/pq/conninfo.pyx":18 * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) * return rv # <<<<<<<<<<<<<< * * @classmethod */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_v_rv; __Pyx_INCREF(__pyx_t_2); if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(5, 18, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/conninfo.pyx":11 * * class Conninfo: * @classmethod # <<<<<<<<<<<<<< * def get_defaults(cls) -> list[ConninfoOption]: * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.Conninfo.get_defaults", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/conninfo.pyx":20 * return rv * * @classmethod # <<<<<<<<<<<<<< * def parse(cls, const char *conninfo) -> list[ConninfoOption]: * cdef char *errmsg = NULL */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Conninfo_3parse(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Conninfo_3parse = {"parse", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_8Conninfo_3parse, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Conninfo_3parse(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { CYTHON_UNUSED PyObject *__pyx_v_cls = 0; char const *__pyx_v_conninfo; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_cls,&__pyx_mstate_global->__pyx_n_u_conninfo,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(5, 20, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 20, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 20, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "parse", 0) < (0)) __PYX_ERR(5, 20, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, i); __PYX_ERR(5, 20, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(5, 20, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(5, 20, __pyx_L3_error) } __pyx_v_cls = values[0]; __pyx_v_conninfo = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_conninfo) && PyErr_Occurred())) __PYX_ERR(5, 21, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("parse", 1, 2, 2, __pyx_nargs); __PYX_ERR(5, 20, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.Conninfo.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Conninfo_2parse(__pyx_self, __pyx_v_cls, __pyx_v_conninfo); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Conninfo_2parse(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_cls, char const *__pyx_v_conninfo) { char *__pyx_v_errmsg; PQconninfoOption *__pyx_v_opts; PyObject *__pyx_v_exc = NULL; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse", 0); /* "psycopg_binary/pq/conninfo.pyx":22 * @classmethod * def parse(cls, const char *conninfo) -> list[ConninfoOption]: * cdef char *errmsg = NULL # <<<<<<<<<<<<<< * cdef libpq.PQconninfoOption *opts = libpq.PQconninfoParse(conninfo, &errmsg) * if opts is NULL: */ __pyx_v_errmsg = NULL; /* "psycopg_binary/pq/conninfo.pyx":23 * def parse(cls, const char *conninfo) -> list[ConninfoOption]: * cdef char *errmsg = NULL * cdef libpq.PQconninfoOption *opts = libpq.PQconninfoParse(conninfo, &errmsg) # <<<<<<<<<<<<<< * if opts is NULL: * if errmsg is NULL: */ __pyx_v_opts = PQconninfoParse(__pyx_v_conninfo, (&__pyx_v_errmsg)); /* "psycopg_binary/pq/conninfo.pyx":24 * cdef char *errmsg = NULL * cdef libpq.PQconninfoOption *opts = libpq.PQconninfoParse(conninfo, &errmsg) * if opts is NULL: # <<<<<<<<<<<<<< * if errmsg is NULL: * raise MemoryError("couldn't allocate on conninfo parse") */ __pyx_t_1 = (__pyx_v_opts == NULL); if (__pyx_t_1) { /* "psycopg_binary/pq/conninfo.pyx":25 * cdef libpq.PQconninfoOption *opts = libpq.PQconninfoParse(conninfo, &errmsg) * if opts is NULL: * if errmsg is NULL: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate on conninfo parse") * else: */ __pyx_t_1 = (__pyx_v_errmsg == NULL); if (unlikely(__pyx_t_1)) { /* "psycopg_binary/pq/conninfo.pyx":26 * if opts is NULL: * if errmsg is NULL: * raise MemoryError("couldn't allocate on conninfo parse") # <<<<<<<<<<<<<< * else: * exc = e.OperationalError(errmsg.decode("utf8", "replace")) */ __pyx_t_3 = NULL; __pyx_t_4 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_on_conninfo_pa}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __PYX_ERR(5, 26, __pyx_L1_error) /* "psycopg_binary/pq/conninfo.pyx":25 * cdef libpq.PQconninfoOption *opts = libpq.PQconninfoParse(conninfo, &errmsg) * if opts is NULL: * if errmsg is NULL: # <<<<<<<<<<<<<< * raise MemoryError("couldn't allocate on conninfo parse") * else: */ } /* "psycopg_binary/pq/conninfo.pyx":28 * raise MemoryError("couldn't allocate on conninfo parse") * else: * exc = e.OperationalError(errmsg.decode("utf8", "replace")) # <<<<<<<<<<<<<< * libpq.PQfreemem(errmsg) * raise exc */ /*else*/ { __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_ssize_strlen(__pyx_v_errmsg); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(5, 28, __pyx_L1_error) __pyx_t_5 = __Pyx_decode_c_string(__pyx_v_errmsg, 0, __pyx_t_7, NULL, __pyx_k_replace, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_6, __pyx__function); __pyx_t_4 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 28, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v_exc = __pyx_t_2; __pyx_t_2 = 0; /* "psycopg_binary/pq/conninfo.pyx":29 * else: * exc = e.OperationalError(errmsg.decode("utf8", "replace")) * libpq.PQfreemem(errmsg) # <<<<<<<<<<<<<< * raise exc * */ PQfreemem(__pyx_v_errmsg); /* "psycopg_binary/pq/conninfo.pyx":30 * exc = e.OperationalError(errmsg.decode("utf8", "replace")) * libpq.PQfreemem(errmsg) * raise exc # <<<<<<<<<<<<<< * * rv = _options_from_array(opts) */ __Pyx_Raise(__pyx_v_exc, 0, 0, 0); __PYX_ERR(5, 30, __pyx_L1_error) } /* "psycopg_binary/pq/conninfo.pyx":24 * cdef char *errmsg = NULL * cdef libpq.PQconninfoOption *opts = libpq.PQconninfoParse(conninfo, &errmsg) * if opts is NULL: # <<<<<<<<<<<<<< * if errmsg is NULL: * raise MemoryError("couldn't allocate on conninfo parse") */ } /* "psycopg_binary/pq/conninfo.pyx":32 * raise exc * * rv = _options_from_array(opts) # <<<<<<<<<<<<<< * libpq.PQconninfoFree(opts) * return rv */ __pyx_t_2 = __pyx_f_14psycopg_binary_2pq__options_from_array(__pyx_v_opts); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_rv = __pyx_t_2; __pyx_t_2 = 0; /* "psycopg_binary/pq/conninfo.pyx":33 * * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) # <<<<<<<<<<<<<< * return rv * */ PQconninfoFree(__pyx_v_opts); /* "psycopg_binary/pq/conninfo.pyx":34 * rv = _options_from_array(opts) * libpq.PQconninfoFree(opts) * return rv # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_v_rv; __Pyx_INCREF(__pyx_t_2); if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("list", __pyx_t_2))) __PYX_ERR(5, 34, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; /* "psycopg_binary/pq/conninfo.pyx":20 * return rv * * @classmethod # <<<<<<<<<<<<<< * def parse(cls, const char *conninfo) -> list[ConninfoOption]: * cdef char *errmsg = NULL */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("psycopg_binary.pq.Conninfo.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_exc); __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/conninfo.pyx":36 * return rv * * def __repr__(self): # <<<<<<<<<<<<<< * return f"<{type(self).__name__} ({self.keyword.decode('ascii')})>" * */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Conninfo_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Conninfo_5__repr__ = {"__repr__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Conninfo_5__repr__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Conninfo_5__repr__(PyObject *__pyx_self, PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Conninfo_4__repr__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Conninfo_4__repr__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4[5]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "psycopg_binary/pq/conninfo.pyx":37 * * def __repr__(self): * return f"<{type(self).__name__} ({self.keyword.decode('ascii')})>" # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_self)), __pyx_mstate_global->__pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_mstate_global->__pyx_n_u_keyword); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_decode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[0], NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4[0] = __pyx_mstate_global->__pyx_kp_u__2; __pyx_t_4[1] = __pyx_t_2; __pyx_t_4[2] = __pyx_mstate_global->__pyx_kp_u__11; __pyx_t_4[3] = __pyx_t_3; __pyx_t_4[4] = __pyx_mstate_global->__pyx_kp_u__12; __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_4, 5, 1 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 2 * 2 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "psycopg_binary/pq/conninfo.pyx":36 * return rv * * def __repr__(self): # <<<<<<<<<<<<<< * return f"<{type(self).__name__} ({self.keyword.decode('ascii')})>" * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.Conninfo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/conninfo.pyx":40 * * * cdef _options_from_array(libpq.PQconninfoOption *opts): # <<<<<<<<<<<<<< * rv = [] * cdef int i = 0 */ static PyObject *__pyx_f_14psycopg_binary_2pq__options_from_array(PQconninfoOption *__pyx_v_opts) { PyObject *__pyx_v_rv = NULL; int __pyx_v_i; PQconninfoOption *__pyx_v_opt; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; size_t __pyx_t_12; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_options_from_array", 0); /* "psycopg_binary/pq/conninfo.pyx":41 * * cdef _options_from_array(libpq.PQconninfoOption *opts): * rv = [] # <<<<<<<<<<<<<< * cdef int i = 0 * cdef libpq.PQconninfoOption* opt */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/conninfo.pyx":42 * cdef _options_from_array(libpq.PQconninfoOption *opts): * rv = [] * cdef int i = 0 # <<<<<<<<<<<<<< * cdef libpq.PQconninfoOption* opt * while True: */ __pyx_v_i = 0; /* "psycopg_binary/pq/conninfo.pyx":44 * cdef int i = 0 * cdef libpq.PQconninfoOption* opt * while True: # <<<<<<<<<<<<<< * opt = opts + i * if opt.keyword is NULL: */ while (1) { /* "psycopg_binary/pq/conninfo.pyx":45 * cdef libpq.PQconninfoOption* opt * while True: * opt = opts + i # <<<<<<<<<<<<<< * if opt.keyword is NULL: * break */ __pyx_v_opt = (__pyx_v_opts + __pyx_v_i); /* "psycopg_binary/pq/conninfo.pyx":46 * while True: * opt = opts + i * if opt.keyword is NULL: # <<<<<<<<<<<<<< * break * rv.append( */ __pyx_t_2 = (__pyx_v_opt->keyword == NULL); if (__pyx_t_2) { /* "psycopg_binary/pq/conninfo.pyx":47 * opt = opts + i * if opt.keyword is NULL: * break # <<<<<<<<<<<<<< * rv.append( * ConninfoOption( */ goto __pyx_L4_break; /* "psycopg_binary/pq/conninfo.pyx":46 * while True: * opt = opts + i * if opt.keyword is NULL: # <<<<<<<<<<<<<< * break * rv.append( */ } /* "psycopg_binary/pq/conninfo.pyx":49 * break * rv.append( * ConninfoOption( # <<<<<<<<<<<<<< * keyword=opt.keyword, * envvar=opt.envvar if opt.envvar is not NULL else None, */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_ConninfoOption); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "psycopg_binary/pq/conninfo.pyx":50 * rv.append( * ConninfoOption( * keyword=opt.keyword, # <<<<<<<<<<<<<< * envvar=opt.envvar if opt.envvar is not NULL else None, * compiled=opt.compiled if opt.compiled is not NULL else None, */ __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_opt->keyword); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "psycopg_binary/pq/conninfo.pyx":51 * ConninfoOption( * keyword=opt.keyword, * envvar=opt.envvar if opt.envvar is not NULL else None, # <<<<<<<<<<<<<< * compiled=opt.compiled if opt.compiled is not NULL else None, * val=opt.val if opt.val is not NULL else None, */ __pyx_t_2 = (__pyx_v_opt->envvar != NULL); if (__pyx_t_2) { __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_opt->envvar); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __pyx_t_7; __pyx_t_7 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_6 = Py_None; } /* "psycopg_binary/pq/conninfo.pyx":52 * keyword=opt.keyword, * envvar=opt.envvar if opt.envvar is not NULL else None, * compiled=opt.compiled if opt.compiled is not NULL else None, # <<<<<<<<<<<<<< * val=opt.val if opt.val is not NULL else None, * label=opt.label if opt.label is not NULL else None, */ __pyx_t_2 = (__pyx_v_opt->compiled != NULL); if (__pyx_t_2) { __pyx_t_8 = __Pyx_PyBytes_FromString(__pyx_v_opt->compiled); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_7 = Py_None; } /* "psycopg_binary/pq/conninfo.pyx":53 * envvar=opt.envvar if opt.envvar is not NULL else None, * compiled=opt.compiled if opt.compiled is not NULL else None, * val=opt.val if opt.val is not NULL else None, # <<<<<<<<<<<<<< * label=opt.label if opt.label is not NULL else None, * dispchar=opt.dispchar if opt.dispchar is not NULL else None, */ __pyx_t_2 = (__pyx_v_opt->val != NULL); if (__pyx_t_2) { __pyx_t_9 = __Pyx_PyBytes_FromString(__pyx_v_opt->val); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = __pyx_t_9; __pyx_t_9 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_8 = Py_None; } /* "psycopg_binary/pq/conninfo.pyx":54 * compiled=opt.compiled if opt.compiled is not NULL else None, * val=opt.val if opt.val is not NULL else None, * label=opt.label if opt.label is not NULL else None, # <<<<<<<<<<<<<< * dispchar=opt.dispchar if opt.dispchar is not NULL else None, * dispsize=opt.dispsize, */ __pyx_t_2 = (__pyx_v_opt->label != NULL); if (__pyx_t_2) { __pyx_t_10 = __Pyx_PyBytes_FromString(__pyx_v_opt->label); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __pyx_t_10; __pyx_t_10 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_9 = Py_None; } /* "psycopg_binary/pq/conninfo.pyx":55 * val=opt.val if opt.val is not NULL else None, * label=opt.label if opt.label is not NULL else None, * dispchar=opt.dispchar if opt.dispchar is not NULL else None, # <<<<<<<<<<<<<< * dispsize=opt.dispsize, * ) */ __pyx_t_2 = (__pyx_v_opt->dispchar != NULL); if (__pyx_t_2) { __pyx_t_11 = __Pyx_PyBytes_FromString(__pyx_v_opt->dispchar); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_10 = __pyx_t_11; __pyx_t_11 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_10 = Py_None; } /* "psycopg_binary/pq/conninfo.pyx":56 * label=opt.label if opt.label is not NULL else None, * dispchar=opt.dispchar if opt.dispchar is not NULL else None, * dispsize=opt.dispsize, # <<<<<<<<<<<<<< * ) * ) */ __pyx_t_11 = __Pyx_PyLong_From_int(__pyx_v_opt->dispsize); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_12 = 0; } #endif { PyObject *__pyx_callargs[2 + ((CYTHON_VECTORCALL) ? 7 : 0)] = {__pyx_t_3, NULL}; __pyx_t_13 = __Pyx_MakeVectorcallBuilderKwds(7); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_keyword, __pyx_t_5, __pyx_t_13, __pyx_callargs+1, 0) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_envvar, __pyx_t_6, __pyx_t_13, __pyx_callargs+1, 1) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_compiled, __pyx_t_7, __pyx_t_13, __pyx_callargs+1, 2) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_val, __pyx_t_8, __pyx_t_13, __pyx_callargs+1, 3) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_label, __pyx_t_9, __pyx_t_13, __pyx_callargs+1, 4) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dispchar, __pyx_t_10, __pyx_t_13, __pyx_callargs+1, 5) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) if (__Pyx_VectorcallBuilder_AddArg(__pyx_mstate_global->__pyx_n_u_dispsize, __pyx_t_11, __pyx_t_13, __pyx_callargs+1, 6) < (0)) __PYX_ERR(5, 49, __pyx_L1_error) __pyx_t_1 = __Pyx_Object_Vectorcall_CallFromBuilder((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_12, (1-__pyx_t_12) | (__pyx_t_12*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET), __pyx_t_13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } /* "psycopg_binary/pq/conninfo.pyx":48 * if opt.keyword is NULL: * break * rv.append( # <<<<<<<<<<<<<< * ConninfoOption( * keyword=opt.keyword, */ __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_rv, __pyx_t_1); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(5, 48, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/conninfo.pyx":59 * ) * ) * i += 1 # <<<<<<<<<<<<<< * * return rv */ __pyx_v_i = (__pyx_v_i + 1); } __pyx_L4_break:; /* "psycopg_binary/pq/conninfo.pyx":61 * i += 1 * * return rv # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/conninfo.pyx":40 * * * cdef _options_from_array(libpq.PQconninfoOption *opts): # <<<<<<<<<<<<<< * rv = [] * cdef int i = 0 */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("psycopg_binary.pq._options_from_array", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/escaping.pyx":12 * * cdef class Escaping: * def __init__(self, PGconn conn = None): # <<<<<<<<<<<<<< * self.conn = conn * */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_8Escaping_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_8Escaping_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_conn = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_conn,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(6, 12, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 12, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__init__", 0) < (0)) __PYX_ERR(6, 12, __pyx_L3_error) if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)Py_None)); } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_VARARGS(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(6, 12, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } if (!values[0]) values[0] = __Pyx_NewRef((PyObject *)((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)Py_None)); } __pyx_v_conn = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(6, 12, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.Escaping.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_conn), __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, 1, "conn", 0))) __PYX_ERR(6, 12, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping___init__(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), __pyx_v_conn); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_8Escaping___init__(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, struct __pyx_obj_14psycopg_binary_2pq_PGconn *__pyx_v_conn) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); /* "psycopg_binary/pq/escaping.pyx":13 * cdef class Escaping: * def __init__(self, PGconn conn = None): * self.conn = conn # <<<<<<<<<<<<<< * * cpdef escape_literal(self, data): */ __Pyx_INCREF((PyObject *)__pyx_v_conn); __Pyx_GIVEREF((PyObject *)__pyx_v_conn); __Pyx_GOTREF((PyObject *)__pyx_v_self->conn); __Pyx_DECREF((PyObject *)__pyx_v_self->conn); __pyx_v_self->conn = __pyx_v_conn; /* "psycopg_binary/pq/escaping.pyx":12 * * cdef class Escaping: * def __init__(self, PGconn conn = None): # <<<<<<<<<<<<<< * self.conn = conn * */ /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/escaping.pyx":15 * self.conn = conn * * cpdef escape_literal(self, data): # <<<<<<<<<<<<<< * cdef char *out * cdef char *ptr */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_3escape_literal(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_literal(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) { char *__pyx_v_out; char *__pyx_v_ptr; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_literal", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_escape_literal); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_8Escaping_3escape_literal)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_data}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/escaping.pyx":20 * cdef Py_ssize_t length * * if self.conn is None: # <<<<<<<<<<<<<< * raise e.OperationalError("escape_literal failed: no connection provided") * if self.conn._pgconn_ptr is NULL: */ __pyx_t_6 = (((PyObject *)__pyx_v_self->conn) == Py_None); if (unlikely(__pyx_t_6)) { /* "psycopg_binary/pq/escaping.pyx":21 * * if self.conn is None: * raise e.OperationalError("escape_literal failed: no connection provided") # <<<<<<<<<<<<<< * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_escape_literal_failed_no_connect}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 21, __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(6, 21, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":20 * cdef Py_ssize_t length * * if self.conn is None: # <<<<<<<<<<<<<< * raise e.OperationalError("escape_literal failed: no connection provided") * if self.conn._pgconn_ptr is NULL: */ } /* "psycopg_binary/pq/escaping.pyx":22 * if self.conn is None: * raise e.OperationalError("escape_literal failed: no connection provided") * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ __pyx_t_6 = (__pyx_v_self->conn->_pgconn_ptr == NULL); if (unlikely(__pyx_t_6)) { /* "psycopg_binary/pq/escaping.pyx":23 * raise e.OperationalError("escape_literal failed: no connection provided") * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") # <<<<<<<<<<<<<< * * _buffer_as_string_and_size(data, &ptr, &length) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 23, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_the_connection_is_closed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 23, __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(6, 23, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":22 * if self.conn is None: * raise e.OperationalError("escape_literal failed: no connection provided") * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ } /* "psycopg_binary/pq/escaping.pyx":25 * raise e.OperationalError("the connection is closed") * * _buffer_as_string_and_size(data, &ptr, &length) # <<<<<<<<<<<<<< * * out = libpq.PQescapeLiteral(self.conn._pgconn_ptr, ptr, length) */ __pyx_t_7 = __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(__pyx_v_data, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(6, 25, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":27 * _buffer_as_string_and_size(data, &ptr, &length) * * out = libpq.PQescapeLiteral(self.conn._pgconn_ptr, ptr, length) # <<<<<<<<<<<<<< * if out is NULL: * raise e.OperationalError( */ __pyx_v_out = PQescapeLiteral(__pyx_v_self->conn->_pgconn_ptr, __pyx_v_ptr, __pyx_v_length); /* "psycopg_binary/pq/escaping.pyx":28 * * out = libpq.PQescapeLiteral(self.conn._pgconn_ptr, ptr, length) * if out is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"escape_literal failed: {self.conn.get_error_message()}" */ __pyx_t_6 = (__pyx_v_out == NULL); if (unlikely(__pyx_t_6)) { /* "psycopg_binary/pq/escaping.pyx":29 * out = libpq.PQescapeLiteral(self.conn._pgconn_ptr, ptr, length) * if out is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"escape_literal failed: {self.conn.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 29, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "psycopg_binary/pq/escaping.pyx":30 * if out is NULL: * raise e.OperationalError( * f"escape_literal failed: {self.conn.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_8 = ((PyObject *)__pyx_v_self->conn); __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_escape_literal_failed, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 29, __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(6, 29, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":28 * * out = libpq.PQescapeLiteral(self.conn._pgconn_ptr, ptr, length) * if out is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"escape_literal failed: {self.conn.get_error_message()}" */ } /* "psycopg_binary/pq/escaping.pyx":33 * ) * * rv = out[:strlen(out)] # <<<<<<<<<<<<<< * libpq.PQfreemem(out) * return rv */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_out + 0, strlen(__pyx_v_out) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/escaping.pyx":34 * * rv = out[:strlen(out)] * libpq.PQfreemem(out) # <<<<<<<<<<<<<< * return rv * */ PQfreemem(__pyx_v_out); /* "psycopg_binary/pq/escaping.pyx":35 * rv = out[:strlen(out)] * libpq.PQfreemem(out) * return rv # <<<<<<<<<<<<<< * * cpdef escape_identifier(self, data): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/escaping.pyx":15 * self.conn = conn * * cpdef escape_literal(self, data): # <<<<<<<<<<<<<< * cdef char *out * cdef char *ptr */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_literal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_3escape_literal(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_3escape_literal = {"escape_literal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_3escape_literal, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_3escape_literal(PyObject *__pyx_v_self, PyObject *__pyx_v_data) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("escape_literal (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_2escape_literal(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), ((PyObject *)__pyx_v_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_2escape_literal(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_literal", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_8Escaping_escape_literal(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_literal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/escaping.pyx":37 * return rv * * cpdef escape_identifier(self, data): # <<<<<<<<<<<<<< * cdef char *out * cdef char *ptr */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_5escape_identifier(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_identifier(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) { char *__pyx_v_out; char *__pyx_v_ptr; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_identifier", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_escape_identifier); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_8Escaping_5escape_identifier)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_data}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/escaping.pyx":42 * cdef Py_ssize_t length * * _buffer_as_string_and_size(data, &ptr, &length) # <<<<<<<<<<<<<< * * if self.conn is None: */ __pyx_t_6 = __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(__pyx_v_data, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 42, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":44 * _buffer_as_string_and_size(data, &ptr, &length) * * if self.conn is None: # <<<<<<<<<<<<<< * raise e.OperationalError("escape_identifier failed: no connection provided") * if self.conn._pgconn_ptr is NULL: */ __pyx_t_7 = (((PyObject *)__pyx_v_self->conn) == Py_None); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":45 * * if self.conn is None: * raise e.OperationalError("escape_identifier failed: no connection provided") # <<<<<<<<<<<<<< * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_escape_identifier_failed_no_conn}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 45, __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(6, 45, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":44 * _buffer_as_string_and_size(data, &ptr, &length) * * if self.conn is None: # <<<<<<<<<<<<<< * raise e.OperationalError("escape_identifier failed: no connection provided") * if self.conn._pgconn_ptr is NULL: */ } /* "psycopg_binary/pq/escaping.pyx":46 * if self.conn is None: * raise e.OperationalError("escape_identifier failed: no connection provided") * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ __pyx_t_7 = (__pyx_v_self->conn->_pgconn_ptr == NULL); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":47 * raise e.OperationalError("escape_identifier failed: no connection provided") * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") # <<<<<<<<<<<<<< * * out = libpq.PQescapeIdentifier(self.conn._pgconn_ptr, ptr, length) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_the_connection_is_closed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 47, __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(6, 47, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":46 * if self.conn is None: * raise e.OperationalError("escape_identifier failed: no connection provided") * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ } /* "psycopg_binary/pq/escaping.pyx":49 * raise e.OperationalError("the connection is closed") * * out = libpq.PQescapeIdentifier(self.conn._pgconn_ptr, ptr, length) # <<<<<<<<<<<<<< * if out is NULL: * raise e.OperationalError( */ __pyx_v_out = PQescapeIdentifier(__pyx_v_self->conn->_pgconn_ptr, __pyx_v_ptr, __pyx_v_length); /* "psycopg_binary/pq/escaping.pyx":50 * * out = libpq.PQescapeIdentifier(self.conn._pgconn_ptr, ptr, length) * if out is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"escape_identifier failed: {self.conn.get_error_message()}" */ __pyx_t_7 = (__pyx_v_out == NULL); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":51 * out = libpq.PQescapeIdentifier(self.conn._pgconn_ptr, ptr, length) * if out is NULL: * raise e.OperationalError( # <<<<<<<<<<<<<< * f"escape_identifier failed: {self.conn.get_error_message()}" * ) */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "psycopg_binary/pq/escaping.pyx":52 * if out is NULL: * raise e.OperationalError( * f"escape_identifier failed: {self.conn.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_8 = ((PyObject *)__pyx_v_self->conn); __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_3 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_escape_identifier_failed, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); assert(__pyx_t_4); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_2, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_2, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 51, __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(6, 51, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":50 * * out = libpq.PQescapeIdentifier(self.conn._pgconn_ptr, ptr, length) * if out is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError( * f"escape_identifier failed: {self.conn.get_error_message()}" */ } /* "psycopg_binary/pq/escaping.pyx":55 * ) * * rv = out[:strlen(out)] # <<<<<<<<<<<<<< * libpq.PQfreemem(out) * return rv */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_out + 0, strlen(__pyx_v_out) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/escaping.pyx":56 * * rv = out[:strlen(out)] * libpq.PQfreemem(out) # <<<<<<<<<<<<<< * return rv * */ PQfreemem(__pyx_v_out); /* "psycopg_binary/pq/escaping.pyx":57 * rv = out[:strlen(out)] * libpq.PQfreemem(out) * return rv # <<<<<<<<<<<<<< * * cpdef escape_string(self, data): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/escaping.pyx":37 * return rv * * cpdef escape_identifier(self, data): # <<<<<<<<<<<<<< * cdef char *out * cdef char *ptr */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_identifier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_5escape_identifier(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_5escape_identifier = {"escape_identifier", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_5escape_identifier, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_5escape_identifier(PyObject *__pyx_v_self, PyObject *__pyx_v_data) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("escape_identifier (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_4escape_identifier(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), ((PyObject *)__pyx_v_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_4escape_identifier(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_identifier", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_8Escaping_escape_identifier(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_identifier", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/escaping.pyx":59 * return rv * * cpdef escape_string(self, data): # <<<<<<<<<<<<<< * cdef int error * cdef size_t len_out */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_7escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_string(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) { int __pyx_v_error; size_t __pyx_v_len_out; char *__pyx_v_ptr; char *__pyx_v_buf_out; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_string", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_escape_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_8Escaping_7escape_string)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_data}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/escaping.pyx":66 * cdef Py_ssize_t length * * _buffer_as_string_and_size(data, &ptr, &length) # <<<<<<<<<<<<<< * * if self.conn is not None: */ __pyx_t_6 = __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(__pyx_v_data, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(6, 66, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":68 * _buffer_as_string_and_size(data, &ptr, &length) * * if self.conn is not None: # <<<<<<<<<<<<<< * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") */ __pyx_t_7 = (((PyObject *)__pyx_v_self->conn) != Py_None); if (__pyx_t_7) { /* "psycopg_binary/pq/escaping.pyx":69 * * if self.conn is not None: * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ __pyx_t_7 = (__pyx_v_self->conn->_pgconn_ptr == NULL); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":70 * if self.conn is not None: * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") # <<<<<<<<<<<<<< * * buf_out = PyMem_Malloc(length * 2 + 1) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_the_connection_is_closed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 70, __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(6, 70, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":69 * * if self.conn is not None: * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ } /* "psycopg_binary/pq/escaping.pyx":72 * raise e.OperationalError("the connection is closed") * * buf_out = PyMem_Malloc(length * 2 + 1) # <<<<<<<<<<<<<< * len_out = libpq.PQescapeStringConn( * self.conn._pgconn_ptr, buf_out, ptr, length, &error */ __pyx_v_buf_out = ((char *)PyMem_Malloc(((__pyx_v_length * 2) + 1))); /* "psycopg_binary/pq/escaping.pyx":73 * * buf_out = PyMem_Malloc(length * 2 + 1) * len_out = libpq.PQescapeStringConn( # <<<<<<<<<<<<<< * self.conn._pgconn_ptr, buf_out, ptr, length, &error * ) */ __pyx_v_len_out = PQescapeStringConn(__pyx_v_self->conn->_pgconn_ptr, __pyx_v_buf_out, __pyx_v_ptr, __pyx_v_length, (&__pyx_v_error)); /* "psycopg_binary/pq/escaping.pyx":76 * self.conn._pgconn_ptr, buf_out, ptr, length, &error * ) * if error: # <<<<<<<<<<<<<< * PyMem_Free(buf_out) * raise e.OperationalError( */ __pyx_t_7 = (__pyx_v_error != 0); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":77 * ) * if error: * PyMem_Free(buf_out) # <<<<<<<<<<<<<< * raise e.OperationalError( * f"escape_string failed: {self.conn.get_error_message()}" */ PyMem_Free(__pyx_v_buf_out); /* "psycopg_binary/pq/escaping.pyx":78 * if error: * PyMem_Free(buf_out) * raise e.OperationalError( # <<<<<<<<<<<<<< * f"escape_string failed: {self.conn.get_error_message()}" * ) */ __pyx_t_3 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/escaping.pyx":79 * PyMem_Free(buf_out) * raise e.OperationalError( * f"escape_string failed: {self.conn.get_error_message()}" # <<<<<<<<<<<<<< * ) * */ __pyx_t_8 = ((PyObject *)__pyx_v_self->conn); __Pyx_INCREF(__pyx_t_8); __pyx_t_5 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_escape_string_failed, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 79, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 78, __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(6, 78, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":76 * self.conn._pgconn_ptr, buf_out, ptr, length, &error * ) * if error: # <<<<<<<<<<<<<< * PyMem_Free(buf_out) * raise e.OperationalError( */ } /* "psycopg_binary/pq/escaping.pyx":68 * _buffer_as_string_and_size(data, &ptr, &length) * * if self.conn is not None: # <<<<<<<<<<<<<< * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") */ goto __pyx_L3; } /* "psycopg_binary/pq/escaping.pyx":83 * * else: * buf_out = PyMem_Malloc(length * 2 + 1) # <<<<<<<<<<<<<< * len_out = libpq.PQescapeString(buf_out, ptr, length) * */ /*else*/ { __pyx_v_buf_out = ((char *)PyMem_Malloc(((__pyx_v_length * 2) + 1))); /* "psycopg_binary/pq/escaping.pyx":84 * else: * buf_out = PyMem_Malloc(length * 2 + 1) * len_out = libpq.PQescapeString(buf_out, ptr, length) # <<<<<<<<<<<<<< * * rv = buf_out[:len_out] */ __pyx_v_len_out = PQescapeString(__pyx_v_buf_out, __pyx_v_ptr, __pyx_v_length); } __pyx_L3:; /* "psycopg_binary/pq/escaping.pyx":86 * len_out = libpq.PQescapeString(buf_out, ptr, length) * * rv = buf_out[:len_out] # <<<<<<<<<<<<<< * PyMem_Free(buf_out) * return rv */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_buf_out + 0, __pyx_v_len_out - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 86, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/escaping.pyx":87 * * rv = buf_out[:len_out] * PyMem_Free(buf_out) # <<<<<<<<<<<<<< * return rv * */ PyMem_Free(__pyx_v_buf_out); /* "psycopg_binary/pq/escaping.pyx":88 * rv = buf_out[:len_out] * PyMem_Free(buf_out) * return rv # <<<<<<<<<<<<<< * * cpdef escape_bytea(self, data): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/escaping.pyx":59 * return rv * * cpdef escape_string(self, data): # <<<<<<<<<<<<<< * cdef int error * cdef size_t len_out */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_7escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_7escape_string = {"escape_string", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_7escape_string, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_7escape_string(PyObject *__pyx_v_self, PyObject *__pyx_v_data) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("escape_string (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_6escape_string(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), ((PyObject *)__pyx_v_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_6escape_string(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_string", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_8Escaping_escape_string(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_string", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/escaping.pyx":90 * return rv * * cpdef escape_bytea(self, data): # <<<<<<<<<<<<<< * cdef size_t len_out * cdef unsigned char *out */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_9escape_bytea(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_escape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data, int __pyx_skip_dispatch) { size_t __pyx_v_len_out; unsigned char *__pyx_v_out; char *__pyx_v_ptr; Py_ssize_t __pyx_v_length; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; size_t __pyx_t_5; int __pyx_t_6; int __pyx_t_7; int __pyx_t_8; Py_ssize_t __pyx_t_9; PyObject *__pyx_t_10[3]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_bytea", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_escape_bytea); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_8Escaping_9escape_bytea)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_data}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/escaping.pyx":96 * cdef Py_ssize_t length * * if self.conn is not None and self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ __pyx_t_7 = (((PyObject *)__pyx_v_self->conn) != Py_None); if (__pyx_t_7) { } else { __pyx_t_6 = __pyx_t_7; goto __pyx_L4_bool_binop_done; } __pyx_t_7 = (__pyx_v_self->conn->_pgconn_ptr == NULL); __pyx_t_6 = __pyx_t_7; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_6)) { /* "psycopg_binary/pq/escaping.pyx":97 * * if self.conn is not None and self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") # <<<<<<<<<<<<<< * * _buffer_as_string_and_size(data, &ptr, &length) */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_3, __pyx__function); __pyx_t_5 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_the_connection_is_closed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_3, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 97, __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(6, 97, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":96 * cdef Py_ssize_t length * * if self.conn is not None and self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ } /* "psycopg_binary/pq/escaping.pyx":99 * raise e.OperationalError("the connection is closed") * * _buffer_as_string_and_size(data, &ptr, &length) # <<<<<<<<<<<<<< * * if self.conn is not None: */ __pyx_t_8 = __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(__pyx_v_data, (&__pyx_v_ptr), (&__pyx_v_length)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(6, 99, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":101 * _buffer_as_string_and_size(data, &ptr, &length) * * if self.conn is not None: # <<<<<<<<<<<<<< * out = libpq.PQescapeByteaConn( * self.conn._pgconn_ptr, ptr, length, &len_out) */ __pyx_t_6 = (((PyObject *)__pyx_v_self->conn) != Py_None); if (__pyx_t_6) { /* "psycopg_binary/pq/escaping.pyx":102 * * if self.conn is not None: * out = libpq.PQescapeByteaConn( # <<<<<<<<<<<<<< * self.conn._pgconn_ptr, ptr, length, &len_out) * else: */ __pyx_v_out = PQescapeByteaConn(__pyx_v_self->conn->_pgconn_ptr, ((unsigned char *)__pyx_v_ptr), __pyx_v_length, (&__pyx_v_len_out)); /* "psycopg_binary/pq/escaping.pyx":101 * _buffer_as_string_and_size(data, &ptr, &length) * * if self.conn is not None: # <<<<<<<<<<<<<< * out = libpq.PQescapeByteaConn( * self.conn._pgconn_ptr, ptr, length, &len_out) */ goto __pyx_L6; } /* "psycopg_binary/pq/escaping.pyx":105 * self.conn._pgconn_ptr, ptr, length, &len_out) * else: * out = libpq.PQescapeBytea(ptr, length, &len_out) # <<<<<<<<<<<<<< * * if out is NULL: */ /*else*/ { __pyx_v_out = PQescapeBytea(((unsigned char *)__pyx_v_ptr), __pyx_v_length, (&__pyx_v_len_out)); } __pyx_L6:; /* "psycopg_binary/pq/escaping.pyx":107 * out = libpq.PQescapeBytea(ptr, length, &len_out) * * if out is NULL: # <<<<<<<<<<<<<< * raise MemoryError( * f"couldn't allocate for escape_bytea of {len(data)} bytes" */ __pyx_t_6 = (__pyx_v_out == NULL); if (unlikely(__pyx_t_6)) { /* "psycopg_binary/pq/escaping.pyx":108 * * if out is NULL: * raise MemoryError( # <<<<<<<<<<<<<< * f"couldn't allocate for escape_bytea of {len(data)} bytes" * ) */ __pyx_t_3 = NULL; /* "psycopg_binary/pq/escaping.pyx":109 * if out is NULL: * raise MemoryError( * f"couldn't allocate for escape_bytea of {len(data)} bytes" # <<<<<<<<<<<<<< * ) * */ __pyx_t_9 = PyObject_Length(__pyx_v_data); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(6, 109, __pyx_L1_error) __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_9, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10[0] = __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_for_escape_byt; __pyx_t_10[1] = __pyx_t_2; __pyx_t_10[2] = __pyx_mstate_global->__pyx_kp_u_bytes; __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_10, 3, 38 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6, 127); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 108, __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(6, 108, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":107 * out = libpq.PQescapeBytea(ptr, length, &len_out) * * if out is NULL: # <<<<<<<<<<<<<< * raise MemoryError( * f"couldn't allocate for escape_bytea of {len(data)} bytes" */ } /* "psycopg_binary/pq/escaping.pyx":112 * ) * * rv = out[:len_out - 1] # out includes final 0 # <<<<<<<<<<<<<< * libpq.PQfreemem(out) * return rv */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((char const *)__pyx_v_out) + 0, (__pyx_v_len_out - 1) - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 112, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/escaping.pyx":113 * * rv = out[:len_out - 1] # out includes final 0 * libpq.PQfreemem(out) # <<<<<<<<<<<<<< * return rv * */ PQfreemem(__pyx_v_out); /* "psycopg_binary/pq/escaping.pyx":114 * rv = out[:len_out - 1] # out includes final 0 * libpq.PQfreemem(out) * return rv # <<<<<<<<<<<<<< * * cpdef unescape_bytea(self, const unsigned char *data): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/escaping.pyx":90 * return rv * * cpdef escape_bytea(self, data): # <<<<<<<<<<<<<< * cdef size_t len_out * cdef unsigned char *out */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_bytea", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_9escape_bytea(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_9escape_bytea = {"escape_bytea", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_9escape_bytea, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_9escape_bytea(PyObject *__pyx_v_self, PyObject *__pyx_v_data) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("escape_bytea (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_8escape_bytea(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), ((PyObject *)__pyx_v_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_8escape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("escape_bytea", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_8Escaping_escape_bytea(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.escape_bytea", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/escaping.pyx":116 * return rv * * cpdef unescape_bytea(self, const unsigned char *data): # <<<<<<<<<<<<<< * # not needed, but let's keep it symmetric with the escaping: * # if a connection is passed in, it must be valid. */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_11unescape_bytea(PyObject *__pyx_v_self, PyObject *__pyx_arg_data); /*proto*/ static PyObject *__pyx_f_14psycopg_binary_2pq_8Escaping_unescape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, unsigned char const *__pyx_v_data, int __pyx_skip_dispatch) { size_t __pyx_v_len_out; unsigned char *__pyx_v_out; PyObject *__pyx_v_rv = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; size_t __pyx_t_6; int __pyx_t_7; Py_ssize_t __pyx_t_8; PyObject *__pyx_t_9[3]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unescape_bytea", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if ( #if !CYTHON_USE_TYPE_SLOTS unlikely(Py_TYPE(((PyObject *)__pyx_v_self)) != __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping && __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), Py_TPFLAGS_HAVE_GC)) #else unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0 || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE))) #endif ) { #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_unescape_bytea); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!__Pyx_IsSameCFunction(__pyx_t_1, (void(*)(void)) __pyx_pw_14psycopg_binary_2pq_8Escaping_11unescape_bytea)) { __Pyx_XDECREF(__pyx_r); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = __Pyx_PyBytes_FromCString(__pyx_v_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); assert(__pyx_t_3); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_4, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_5}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_4, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) { __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } /* "psycopg_binary/pq/escaping.pyx":119 * # not needed, but let's keep it symmetric with the escaping: * # if a connection is passed in, it must be valid. * if self.conn is not None: # <<<<<<<<<<<<<< * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") */ __pyx_t_7 = (((PyObject *)__pyx_v_self->conn) != Py_None); if (__pyx_t_7) { /* "psycopg_binary/pq/escaping.pyx":120 * # if a connection is passed in, it must be valid. * if self.conn is not None: * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ __pyx_t_7 = (__pyx_v_self->conn->_pgconn_ptr == NULL); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":121 * if self.conn is not None: * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") # <<<<<<<<<<<<<< * * cdef size_t len_out */ __pyx_t_2 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_e); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_OperationalError); if (unlikely(!__pyx_t_5)) __PYX_ERR(6, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = 1; #if CYTHON_UNPACK_METHODS if (unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); assert(__pyx_t_2); PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx__function); __Pyx_DECREF_SET(__pyx_t_5, __pyx__function); __pyx_t_6 = 0; } #endif { PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_the_connection_is_closed}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_5, __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 121, __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(6, 121, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":120 * # if a connection is passed in, it must be valid. * if self.conn is not None: * if self.conn._pgconn_ptr is NULL: # <<<<<<<<<<<<<< * raise e.OperationalError("the connection is closed") * */ } /* "psycopg_binary/pq/escaping.pyx":119 * # not needed, but let's keep it symmetric with the escaping: * # if a connection is passed in, it must be valid. * if self.conn is not None: # <<<<<<<<<<<<<< * if self.conn._pgconn_ptr is NULL: * raise e.OperationalError("the connection is closed") */ } /* "psycopg_binary/pq/escaping.pyx":124 * * cdef size_t len_out * cdef unsigned char *out = libpq.PQunescapeBytea(data, &len_out) # <<<<<<<<<<<<<< * if out is NULL: * raise MemoryError( */ __pyx_v_out = PQunescapeBytea(__pyx_v_data, (&__pyx_v_len_out)); /* "psycopg_binary/pq/escaping.pyx":125 * cdef size_t len_out * cdef unsigned char *out = libpq.PQunescapeBytea(data, &len_out) * if out is NULL: # <<<<<<<<<<<<<< * raise MemoryError( * f"couldn't allocate for unescape_bytea of {len(data)} bytes" */ __pyx_t_7 = (__pyx_v_out == NULL); if (unlikely(__pyx_t_7)) { /* "psycopg_binary/pq/escaping.pyx":126 * cdef unsigned char *out = libpq.PQunescapeBytea(data, &len_out) * if out is NULL: * raise MemoryError( # <<<<<<<<<<<<<< * f"couldn't allocate for unescape_bytea of {len(data)} bytes" * ) */ __pyx_t_5 = NULL; /* "psycopg_binary/pq/escaping.pyx":127 * if out is NULL: * raise MemoryError( * f"couldn't allocate for unescape_bytea of {len(data)} bytes" # <<<<<<<<<<<<<< * ) * */ __pyx_t_8 = __Pyx_ssize_strlen(((char const *)__pyx_v_data)); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(6, 127, __pyx_L1_error) __pyx_t_2 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_8, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_9[0] = __pyx_mstate_global->__pyx_kp_u_couldn_t_allocate_for_unescape_b; __pyx_t_9[1] = __pyx_t_2; __pyx_t_9[2] = __pyx_mstate_global->__pyx_kp_u_bytes; __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, 40 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + 6, 127); if (unlikely(!__pyx_t_4)) __PYX_ERR(6, 127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4}; __pyx_t_1 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_MemoryError)), __pyx_callargs+__pyx_t_6, (2-__pyx_t_6) | (__pyx_t_6*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 126, __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(6, 126, __pyx_L1_error) /* "psycopg_binary/pq/escaping.pyx":125 * cdef size_t len_out * cdef unsigned char *out = libpq.PQunescapeBytea(data, &len_out) * if out is NULL: # <<<<<<<<<<<<<< * raise MemoryError( * f"couldn't allocate for unescape_bytea of {len(data)} bytes" */ } /* "psycopg_binary/pq/escaping.pyx":130 * ) * * rv = out[:len_out] # <<<<<<<<<<<<<< * libpq.PQfreemem(out) * return rv */ __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(((char const *)__pyx_v_out) + 0, __pyx_v_len_out - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 130, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_rv = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/escaping.pyx":131 * * rv = out[:len_out] * libpq.PQfreemem(out) # <<<<<<<<<<<<<< * return rv */ PQfreemem(__pyx_v_out); /* "psycopg_binary/pq/escaping.pyx":132 * rv = out[:len_out] * libpq.PQfreemem(out) * return rv # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/escaping.pyx":116 * return rv * * cpdef unescape_bytea(self, const unsigned char *data): # <<<<<<<<<<<<<< * # not needed, but let's keep it symmetric with the escaping: * # if a connection is passed in, it must be valid. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.unescape_bytea", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rv); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_11unescape_bytea(PyObject *__pyx_v_self, PyObject *__pyx_arg_data); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_11unescape_bytea = {"unescape_bytea", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_11unescape_bytea, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_11unescape_bytea(PyObject *__pyx_v_self, PyObject *__pyx_arg_data) { unsigned char const *__pyx_v_data; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("unescape_bytea (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); assert(__pyx_arg_data); { __pyx_v_data = __Pyx_PyObject_AsUString(__pyx_arg_data); if (unlikely((!__pyx_v_data) && PyErr_Occurred())) __PYX_ERR(6, 116, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("psycopg_binary.pq.Escaping.unescape_bytea", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_10unescape_bytea(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), ((unsigned char const *)__pyx_v_data)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_10unescape_bytea(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, unsigned char const *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unescape_bytea", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_14psycopg_binary_2pq_8Escaping_unescape_bytea(__pyx_v_self, __pyx_v_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.unescape_bytea", __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): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_13__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_13__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_12__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_12__reduce_cython__(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":5 * cdef object _dict * cdef bint use_setstate * state = (self.conn,) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None and _dict: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_self->conn); __Pyx_GIVEREF((PyObject *)__pyx_v_self->conn); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->conn)) != (0)) __PYX_ERR(2, 5, __pyx_L1_error); __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.conn,) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None and _dict: * state += (_dict,) */ __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; /* "(tree fragment)":7 * state = (self.conn,) * _dict = getattr(self, '__dict__', None) * if _dict is not None and _dict: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ __pyx_t_3 = (__pyx_v__dict != Py_None); if (__pyx_t_3) { } else { __pyx_t_2 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__dict); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(2, 7, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None and _dict: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict) != (0)) __PYX_ERR(2, 8, __pyx_L1_error); __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; /* "(tree fragment)":9 * if _dict is not None and _dict: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< * else: * use_setstate = ('self.conn is not None',) */ __pyx_v_use_setstate = 1; /* "(tree fragment)":7 * state = (self.conn,) * _dict = getattr(self, '__dict__', None) * if _dict is not None and _dict: # <<<<<<<<<<<<<< * state += (_dict,) * use_setstate = True */ goto __pyx_L3; } /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = ('self.conn is not None',) # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, None), state */ /*else*/ { __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_mstate_global->__pyx_tuple[1]); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 11, __pyx_L1_error) __pyx_v_use_setstate = __pyx_t_2; } __pyx_L3:; /* "(tree fragment)":12 * else: * use_setstate = ('self.conn is not None',) * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Escaping, (type(self), 0x0804127, None), state * else: */ if (__pyx_v_use_setstate) { /* "(tree fragment)":13 * use_setstate = ('self.conn is not None',) * if use_setstate: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, None), state # <<<<<<<<<<<<<< * else: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, state) */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Escaping); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_8405287); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_8405287); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_8405287) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 13, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; /* "(tree fragment)":12 * else: * use_setstate = ('self.conn is not None',) * if use_setstate: # <<<<<<<<<<<<<< * return __pyx_unpickle_Escaping, (type(self), 0x0804127, None), state * else: */ } /* "(tree fragment)":15 * return __pyx_unpickle_Escaping, (type(self), 0x0804127, None), state * else: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, state) # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Escaping__set_state(self, __pyx_state) */ /*else*/ { __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Escaping); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_8405287); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_8405287); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_mstate_global->__pyx_int_8405287) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1) != (0)) __PYX_ERR(2, 15, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_state); __Pyx_XDECREF(__pyx_v__dict); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":16 * else: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Escaping__set_state(self, __pyx_state) */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8Escaping_15__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_15__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8Escaping_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8Escaping_14__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8Escaping_14__setstate_cython__(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":17 * return __pyx_unpickle_Escaping, (type(self), 0x0804127, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Escaping__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ __pyx_t_1 = __pyx_v___pyx_state; __Pyx_INCREF(__pyx_t_1); if (!(likely(PyTuple_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_t_1))) __PYX_ERR(2, 17, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); __PYX_ERR(2, 17, __pyx_L1_error) } __pyx_t_2 = __pyx_f_14psycopg_binary_2pq___pyx_unpickle_Escaping__set_state(__pyx_v_self, ((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Escaping__set_state(self, __pyx_state) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("psycopg_binary.pq.Escaping.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":18 * Wrap a chunk of memory allocated by the libpq and expose it as memoryview. * """ * @staticmethod # <<<<<<<<<<<<<< * cdef PQBuffer _from_buffer(unsigned char *buf, Py_ssize_t length): * cdef PQBuffer rv = PQBuffer.__new__(PQBuffer) */ static struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_f_14psycopg_binary_2pq_8PQBuffer__from_buffer(unsigned char *__pyx_v_buf, Py_ssize_t __pyx_v_length) { struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_rv = 0; struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_buffer", 0); /* "psycopg_binary/pq/pqbuffer.pyx":20 * @staticmethod * cdef PQBuffer _from_buffer(unsigned char *buf, Py_ssize_t length): * cdef PQBuffer rv = PQBuffer.__new__(PQBuffer) # <<<<<<<<<<<<<< * rv.buf = buf * rv.len = length */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_14psycopg_binary_2pq_PQBuffer(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PQBuffer), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 20, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_rv = ((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pqbuffer.pyx":21 * cdef PQBuffer _from_buffer(unsigned char *buf, Py_ssize_t length): * cdef PQBuffer rv = PQBuffer.__new__(PQBuffer) * rv.buf = buf # <<<<<<<<<<<<<< * rv.len = length * return rv */ __pyx_v_rv->buf = __pyx_v_buf; /* "psycopg_binary/pq/pqbuffer.pyx":22 * cdef PQBuffer rv = PQBuffer.__new__(PQBuffer) * rv.buf = buf * rv.len = length # <<<<<<<<<<<<<< * return rv * */ __pyx_v_rv->len = __pyx_v_length; /* "psycopg_binary/pq/pqbuffer.pyx":23 * rv.buf = buf * rv.len = length * return rv # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pqbuffer.pyx":18 * Wrap a chunk of memory allocated by the libpq and expose it as memoryview. * """ * @staticmethod # <<<<<<<<<<<<<< * cdef PQBuffer _from_buffer(unsigned char *buf, Py_ssize_t length): * cdef PQBuffer rv = PQBuffer.__new__(PQBuffer) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.PQBuffer._from_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rv); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":25 * return rv * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.len = 0 */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_8PQBuffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_8PQBuffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return -1; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PQBuffer___cinit__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_8PQBuffer___cinit__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self) { int __pyx_r; /* "psycopg_binary/pq/pqbuffer.pyx":26 * * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * self.len = 0 * */ __pyx_v_self->buf = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":27 * def __cinit__(self): * self.buf = NULL * self.len = 0 # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->len = 0; /* "psycopg_binary/pq/pqbuffer.pyx":25 * return rv * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.len = 0 */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":29 * self.len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.buf: * libpq.PQfreemem(self.buf) */ /* Python wrapper */ static void __pyx_pw_14psycopg_binary_2pq_8PQBuffer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_14psycopg_binary_2pq_8PQBuffer_3__dealloc__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_8PQBuffer_2__dealloc__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_8PQBuffer_2__dealloc__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self) { int __pyx_t_1; /* "psycopg_binary/pq/pqbuffer.pyx":30 * * def __dealloc__(self): * if self.buf: # <<<<<<<<<<<<<< * libpq.PQfreemem(self.buf) * */ __pyx_t_1 = (__pyx_v_self->buf != 0); if (__pyx_t_1) { /* "psycopg_binary/pq/pqbuffer.pyx":31 * def __dealloc__(self): * if self.buf: * libpq.PQfreemem(self.buf) # <<<<<<<<<<<<<< * * def __repr__(self): */ PQfreemem(__pyx_v_self->buf); /* "psycopg_binary/pq/pqbuffer.pyx":30 * * def __dealloc__(self): * if self.buf: # <<<<<<<<<<<<<< * libpq.PQfreemem(self.buf) * */ } /* "psycopg_binary/pq/pqbuffer.pyx":29 * self.len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self.buf: * libpq.PQfreemem(self.buf) */ /* function exit code */ } /* "psycopg_binary/pq/pqbuffer.pyx":33 * libpq.PQfreemem(self.buf) * * def __repr__(self): # <<<<<<<<<<<<<< * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PQBuffer_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_8PQBuffer_5__repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PQBuffer_4__repr__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PQBuffer_4__repr__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5[6]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "psycopg_binary/pq/pqbuffer.pyx":34 * * def __repr__(self): * return ( # <<<<<<<<<<<<<< * f"{self.__class__.__module__}.{self.__class__.__qualname__}" * f"({bytes(self)})" */ __Pyx_XDECREF(__pyx_r); /* "psycopg_binary/pq/pqbuffer.pyx":35 * def __repr__(self): * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" # <<<<<<<<<<<<<< * f"({bytes(self)})" * ) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_module); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_qualname); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "psycopg_binary/pq/pqbuffer.pyx":36 * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" * f"({bytes(self)})" # <<<<<<<<<<<<<< * ) * */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5[0] = __pyx_t_1; __pyx_t_5[1] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_5[2] = __pyx_t_2; __pyx_t_5[3] = __pyx_mstate_global->__pyx_kp_u__13; __pyx_t_5[4] = __pyx_t_4; __pyx_t_5[5] = __pyx_mstate_global->__pyx_kp_u__14; /* "psycopg_binary/pq/pqbuffer.pyx":35 * def __repr__(self): * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" # <<<<<<<<<<<<<< * f"({bytes(self)})" * ) */ __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pqbuffer.pyx":33 * libpq.PQfreemem(self.buf) * * def __repr__(self): # <<<<<<<<<<<<<< * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("psycopg_binary.pq.PQBuffer.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":39 * ) * * def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<< * buffer.buf = self.buf * buffer.obj = self */ /* Python wrapper */ CYTHON_UNUSED static int __pyx_pw_14psycopg_binary_2pq_8PQBuffer_7__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/ CYTHON_UNUSED static int __pyx_pw_14psycopg_binary_2pq_8PQBuffer_7__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PQBuffer_6__getbuffer__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_8PQBuffer_6__getbuffer__(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations unsigned char *__pyx_t_1; Py_ssize_t __pyx_t_2; if (unlikely(__pyx_v_buffer == NULL)) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_buffer->obj); /* "psycopg_binary/pq/pqbuffer.pyx":40 * * def __getbuffer__(self, Py_buffer *buffer, int flags): * buffer.buf = self.buf # <<<<<<<<<<<<<< * buffer.obj = self * buffer.len = self.len */ __pyx_t_1 = __pyx_v_self->buf; __pyx_v_buffer->buf = __pyx_t_1; /* "psycopg_binary/pq/pqbuffer.pyx":41 * def __getbuffer__(self, Py_buffer *buffer, int flags): * buffer.buf = self.buf * buffer.obj = self # <<<<<<<<<<<<<< * buffer.len = self.len * buffer.itemsize = sizeof(unsigned char) */ __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); __Pyx_GOTREF(__pyx_v_buffer->obj); __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self); /* "psycopg_binary/pq/pqbuffer.pyx":42 * buffer.buf = self.buf * buffer.obj = self * buffer.len = self.len # <<<<<<<<<<<<<< * buffer.itemsize = sizeof(unsigned char) * buffer.readonly = 1 */ __pyx_t_2 = __pyx_v_self->len; __pyx_v_buffer->len = __pyx_t_2; /* "psycopg_binary/pq/pqbuffer.pyx":43 * buffer.obj = self * buffer.len = self.len * buffer.itemsize = sizeof(unsigned char) # <<<<<<<<<<<<<< * buffer.readonly = 1 * buffer.ndim = 1 */ __pyx_v_buffer->itemsize = (sizeof(unsigned char)); /* "psycopg_binary/pq/pqbuffer.pyx":44 * buffer.len = self.len * buffer.itemsize = sizeof(unsigned char) * buffer.readonly = 1 # <<<<<<<<<<<<<< * buffer.ndim = 1 * buffer.format = NULL # unsigned char */ __pyx_v_buffer->readonly = 1; /* "psycopg_binary/pq/pqbuffer.pyx":45 * buffer.itemsize = sizeof(unsigned char) * buffer.readonly = 1 * buffer.ndim = 1 # <<<<<<<<<<<<<< * buffer.format = NULL # unsigned char * buffer.shape = &self.len */ __pyx_v_buffer->ndim = 1; /* "psycopg_binary/pq/pqbuffer.pyx":46 * buffer.readonly = 1 * buffer.ndim = 1 * buffer.format = NULL # unsigned char # <<<<<<<<<<<<<< * buffer.shape = &self.len * buffer.strides = NULL */ __pyx_v_buffer->format = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":47 * buffer.ndim = 1 * buffer.format = NULL # unsigned char * buffer.shape = &self.len # <<<<<<<<<<<<<< * buffer.strides = NULL * buffer.suboffsets = NULL */ __pyx_v_buffer->shape = (&__pyx_v_self->len); /* "psycopg_binary/pq/pqbuffer.pyx":48 * buffer.format = NULL # unsigned char * buffer.shape = &self.len * buffer.strides = NULL # <<<<<<<<<<<<<< * buffer.suboffsets = NULL * buffer.internal = NULL */ __pyx_v_buffer->strides = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":49 * buffer.shape = &self.len * buffer.strides = NULL * buffer.suboffsets = NULL # <<<<<<<<<<<<<< * buffer.internal = NULL * */ __pyx_v_buffer->suboffsets = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":50 * buffer.strides = NULL * buffer.suboffsets = NULL * buffer.internal = NULL # <<<<<<<<<<<<<< * * def __releasebuffer__(self, Py_buffer *buffer): */ __pyx_v_buffer->internal = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":39 * ) * * def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<< * buffer.buf = self.buf * buffer.obj = self */ /* function exit code */ __pyx_r = 0; if (__pyx_v_buffer->obj == Py_None) { __Pyx_GOTREF(__pyx_v_buffer->obj); __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0; } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":52 * buffer.internal = NULL * * def __releasebuffer__(self, Py_buffer *buffer): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ CYTHON_UNUSED static void __pyx_pw_14psycopg_binary_2pq_8PQBuffer_9__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/ CYTHON_UNUSED static void __pyx_pw_14psycopg_binary_2pq_8PQBuffer_9__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_8PQBuffer_8__releasebuffer__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_8PQBuffer_8__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) { /* function exit code */ } /* "(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_14psycopg_binary_2pq_8PQBuffer_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PQBuffer_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_11__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PQBuffer_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PQBuffer_10__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PQBuffer_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PQBuffer.__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_14psycopg_binary_2pq_8PQBuffer_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_8PQBuffer_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_13__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_8PQBuffer_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_8PQBuffer_12__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_8PQBuffer_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.PQBuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":61 * Wrap a chunk of memory owned by a different object. * """ * @staticmethod # <<<<<<<<<<<<<< * cdef ViewBuffer _from_buffer( * object obj, unsigned char *buf, Py_ssize_t length */ static struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_f_14psycopg_binary_2pq_10ViewBuffer__from_buffer(PyObject *__pyx_v_obj, unsigned char *__pyx_v_buf, Py_ssize_t __pyx_v_length) { struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_rv = 0; struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_from_buffer", 0); /* "psycopg_binary/pq/pqbuffer.pyx":65 * object obj, unsigned char *buf, Py_ssize_t length * ): * cdef ViewBuffer rv = ViewBuffer.__new__(ViewBuffer) # <<<<<<<<<<<<<< * rv.obj = obj * rv.buf = buf */ __pyx_t_1 = ((PyObject *)__pyx_tp_new_14psycopg_binary_2pq_ViewBuffer(((PyTypeObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer), __pyx_mstate_global->__pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 65, __pyx_L1_error) __Pyx_GOTREF((PyObject *)__pyx_t_1); __pyx_v_rv = ((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_t_1); __pyx_t_1 = 0; /* "psycopg_binary/pq/pqbuffer.pyx":66 * ): * cdef ViewBuffer rv = ViewBuffer.__new__(ViewBuffer) * rv.obj = obj # <<<<<<<<<<<<<< * rv.buf = buf * rv.len = length */ __Pyx_INCREF(__pyx_v_obj); __Pyx_GIVEREF(__pyx_v_obj); __Pyx_GOTREF(__pyx_v_rv->obj); __Pyx_DECREF(__pyx_v_rv->obj); __pyx_v_rv->obj = __pyx_v_obj; /* "psycopg_binary/pq/pqbuffer.pyx":67 * cdef ViewBuffer rv = ViewBuffer.__new__(ViewBuffer) * rv.obj = obj * rv.buf = buf # <<<<<<<<<<<<<< * rv.len = length * return rv */ __pyx_v_rv->buf = __pyx_v_buf; /* "psycopg_binary/pq/pqbuffer.pyx":68 * rv.obj = obj * rv.buf = buf * rv.len = length # <<<<<<<<<<<<<< * return rv * */ __pyx_v_rv->len = __pyx_v_length; /* "psycopg_binary/pq/pqbuffer.pyx":69 * rv.buf = buf * rv.len = length * return rv # <<<<<<<<<<<<<< * * def __cinit__(self): */ __Pyx_XDECREF((PyObject *)__pyx_r); __Pyx_INCREF((PyObject *)__pyx_v_rv); __pyx_r = __pyx_v_rv; goto __pyx_L0; /* "psycopg_binary/pq/pqbuffer.pyx":61 * Wrap a chunk of memory owned by a different object. * """ * @staticmethod # <<<<<<<<<<<<<< * cdef ViewBuffer _from_buffer( * object obj, unsigned char *buf, Py_ssize_t length */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.ViewBuffer._from_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_rv); __Pyx_XGIVEREF((PyObject *)__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":71 * return rv * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.len = 0 */ /* Python wrapper */ static int __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); if (unlikely(__pyx_nargs > 0)) { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, __pyx_nargs); return -1; } const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return -1; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__cinit__", __pyx_kwds); return -1;} __pyx_r = __pyx_pf_14psycopg_binary_2pq_10ViewBuffer___cinit__(((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_10ViewBuffer___cinit__(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self) { int __pyx_r; /* "psycopg_binary/pq/pqbuffer.pyx":72 * * def __cinit__(self): * self.buf = NULL # <<<<<<<<<<<<<< * self.len = 0 * */ __pyx_v_self->buf = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":73 * def __cinit__(self): * self.buf = NULL * self.len = 0 # <<<<<<<<<<<<<< * * def __repr__(self): */ __pyx_v_self->len = 0; /* "psycopg_binary/pq/pqbuffer.pyx":71 * return rv * * def __cinit__(self): # <<<<<<<<<<<<<< * self.buf = NULL * self.len = 0 */ /* function exit code */ __pyx_r = 0; return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":75 * self.len = 0 * * def __repr__(self): # <<<<<<<<<<<<<< * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_3__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_3__repr__(PyObject *__pyx_v_self) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_2__repr__(((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_10ViewBuffer_2__repr__(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5[6]; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "psycopg_binary/pq/pqbuffer.pyx":76 * * def __repr__(self): * return ( # <<<<<<<<<<<<<< * f"{self.__class__.__module__}.{self.__class__.__qualname__}" * f"({bytes(self)})" */ __Pyx_XDECREF(__pyx_r); /* "psycopg_binary/pq/pqbuffer.pyx":77 * def __repr__(self): * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" # <<<<<<<<<<<<<< * f"({bytes(self)})" * ) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_module); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_mstate_global->__pyx_n_u_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_qualname); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(7, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "psycopg_binary/pq/pqbuffer.pyx":78 * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" * f"({bytes(self)})" # <<<<<<<<<<<<<< * ) * */ __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_3, __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5[0] = __pyx_t_1; __pyx_t_5[1] = __pyx_mstate_global->__pyx_kp_u_; __pyx_t_5[2] = __pyx_t_2; __pyx_t_5[3] = __pyx_mstate_global->__pyx_kp_u__13; __pyx_t_5[4] = __pyx_t_4; __pyx_t_5[5] = __pyx_mstate_global->__pyx_kp_u__14; /* "psycopg_binary/pq/pqbuffer.pyx":77 * def __repr__(self): * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" # <<<<<<<<<<<<<< * f"({bytes(self)})" * ) */ __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 6, __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1) + 1 * 3 + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2) + __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4), 127 | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) | __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(7, 77, __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_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "psycopg_binary/pq/pqbuffer.pyx":75 * self.len = 0 * * def __repr__(self): # <<<<<<<<<<<<<< * return ( * f"{self.__class__.__module__}.{self.__class__.__qualname__}" */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("psycopg_binary.pq.ViewBuffer.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":81 * ) * * def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<< * buffer.buf = self.buf * buffer.obj = self */ /* Python wrapper */ CYTHON_UNUSED static int __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_5__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/ CYTHON_UNUSED static int __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_5__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_4__getbuffer__(((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_4__getbuffer__(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) { int __pyx_r; __Pyx_RefNannyDeclarations unsigned char *__pyx_t_1; Py_ssize_t __pyx_t_2; if (unlikely(__pyx_v_buffer == NULL)) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; } __Pyx_RefNannySetupContext("__getbuffer__", 0); __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_buffer->obj); /* "psycopg_binary/pq/pqbuffer.pyx":82 * * def __getbuffer__(self, Py_buffer *buffer, int flags): * buffer.buf = self.buf # <<<<<<<<<<<<<< * buffer.obj = self * buffer.len = self.len */ __pyx_t_1 = __pyx_v_self->buf; __pyx_v_buffer->buf = __pyx_t_1; /* "psycopg_binary/pq/pqbuffer.pyx":83 * def __getbuffer__(self, Py_buffer *buffer, int flags): * buffer.buf = self.buf * buffer.obj = self # <<<<<<<<<<<<<< * buffer.len = self.len * buffer.itemsize = sizeof(unsigned char) */ __Pyx_INCREF((PyObject *)__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_v_self); __Pyx_GOTREF(__pyx_v_buffer->obj); __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self); /* "psycopg_binary/pq/pqbuffer.pyx":84 * buffer.buf = self.buf * buffer.obj = self * buffer.len = self.len # <<<<<<<<<<<<<< * buffer.itemsize = sizeof(unsigned char) * buffer.readonly = 1 */ __pyx_t_2 = __pyx_v_self->len; __pyx_v_buffer->len = __pyx_t_2; /* "psycopg_binary/pq/pqbuffer.pyx":85 * buffer.obj = self * buffer.len = self.len * buffer.itemsize = sizeof(unsigned char) # <<<<<<<<<<<<<< * buffer.readonly = 1 * buffer.ndim = 1 */ __pyx_v_buffer->itemsize = (sizeof(unsigned char)); /* "psycopg_binary/pq/pqbuffer.pyx":86 * buffer.len = self.len * buffer.itemsize = sizeof(unsigned char) * buffer.readonly = 1 # <<<<<<<<<<<<<< * buffer.ndim = 1 * buffer.format = NULL # unsigned char */ __pyx_v_buffer->readonly = 1; /* "psycopg_binary/pq/pqbuffer.pyx":87 * buffer.itemsize = sizeof(unsigned char) * buffer.readonly = 1 * buffer.ndim = 1 # <<<<<<<<<<<<<< * buffer.format = NULL # unsigned char * buffer.shape = &self.len */ __pyx_v_buffer->ndim = 1; /* "psycopg_binary/pq/pqbuffer.pyx":88 * buffer.readonly = 1 * buffer.ndim = 1 * buffer.format = NULL # unsigned char # <<<<<<<<<<<<<< * buffer.shape = &self.len * buffer.strides = NULL */ __pyx_v_buffer->format = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":89 * buffer.ndim = 1 * buffer.format = NULL # unsigned char * buffer.shape = &self.len # <<<<<<<<<<<<<< * buffer.strides = NULL * buffer.suboffsets = NULL */ __pyx_v_buffer->shape = (&__pyx_v_self->len); /* "psycopg_binary/pq/pqbuffer.pyx":90 * buffer.format = NULL # unsigned char * buffer.shape = &self.len * buffer.strides = NULL # <<<<<<<<<<<<<< * buffer.suboffsets = NULL * buffer.internal = NULL */ __pyx_v_buffer->strides = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":91 * buffer.shape = &self.len * buffer.strides = NULL * buffer.suboffsets = NULL # <<<<<<<<<<<<<< * buffer.internal = NULL * */ __pyx_v_buffer->suboffsets = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":92 * buffer.strides = NULL * buffer.suboffsets = NULL * buffer.internal = NULL # <<<<<<<<<<<<<< * * def __releasebuffer__(self, Py_buffer *buffer): */ __pyx_v_buffer->internal = NULL; /* "psycopg_binary/pq/pqbuffer.pyx":81 * ) * * def __getbuffer__(self, Py_buffer *buffer, int flags): # <<<<<<<<<<<<<< * buffer.buf = self.buf * buffer.obj = self */ /* function exit code */ __pyx_r = 0; if (__pyx_v_buffer->obj == Py_None) { __Pyx_GOTREF(__pyx_v_buffer->obj); __Pyx_DECREF(__pyx_v_buffer->obj); __pyx_v_buffer->obj = 0; } __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":94 * buffer.internal = NULL * * def __releasebuffer__(self, Py_buffer *buffer): # <<<<<<<<<<<<<< * pass * */ /* Python wrapper */ CYTHON_UNUSED static void __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_7__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/ CYTHON_UNUSED static void __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_7__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_6__releasebuffer__(((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_6__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) { /* function exit code */ } /* "(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_14psycopg_binary_2pq_10ViewBuffer_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_10ViewBuffer_9__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_9__reduce_cython__, METH_NOARGS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_8__reduce_cython__(((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_10ViewBuffer_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce_cython__", 0); /* "(tree fragment)":2 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 2, __pyx_L1_error) /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.ViewBuffer.__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_14psycopg_binary_2pq_10ViewBuffer_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_10ViewBuffer_11__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_11__setstate_cython__, METH_O, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); __pyx_r = __pyx_pf_14psycopg_binary_2pq_10ViewBuffer_10__setstate_cython__(((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_10ViewBuffer_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setstate_cython__", 0); /* "(tree fragment)":4 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<< */ __Pyx_Raise(((PyObject *)(((PyTypeObject*)PyExc_TypeError))), __pyx_mstate_global->__pyx_kp_u_no_default___reduce___due_to_non, 0, 0); __PYX_ERR(2, 4, __pyx_L1_error) /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("psycopg_binary.pq.ViewBuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "psycopg_binary/pq/pqbuffer.pyx":98 * * * cdef int _buffer_as_string_and_size( # <<<<<<<<<<<<<< * data: "Buffer", char **ptr, Py_ssize_t *length * ) except -1: */ static int __pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size(PyObject *__pyx_v_data, char **__pyx_v_ptr, Py_ssize_t *__pyx_v_length) { Py_buffer __pyx_v_buf; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; size_t __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_buffer_as_string_and_size", 0); /* "psycopg_binary/pq/pqbuffer.pyx":103 * cdef Py_buffer buf * * if isinstance(data, bytes): # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(data, ptr, length) * elif PyObject_CheckBuffer(data): */ __pyx_t_1 = PyBytes_Check(__pyx_v_data); if (__pyx_t_1) { /* "psycopg_binary/pq/pqbuffer.pyx":104 * * if isinstance(data, bytes): * PyBytes_AsStringAndSize(data, ptr, length) # <<<<<<<<<<<<<< * elif PyObject_CheckBuffer(data): * PyObject_GetBuffer(data, &buf, PyBUF_SIMPLE) */ __pyx_t_2 = PyBytes_AsStringAndSize(__pyx_v_data, __pyx_v_ptr, __pyx_v_length); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 104, __pyx_L1_error) /* "psycopg_binary/pq/pqbuffer.pyx":103 * cdef Py_buffer buf * * if isinstance(data, bytes): # <<<<<<<<<<<<<< * PyBytes_AsStringAndSize(data, ptr, length) * elif PyObject_CheckBuffer(data): */ goto __pyx_L3; } /* "psycopg_binary/pq/pqbuffer.pyx":105 * if isinstance(data, bytes): * PyBytes_AsStringAndSize(data, ptr, length) * elif PyObject_CheckBuffer(data): # <<<<<<<<<<<<<< * PyObject_GetBuffer(data, &buf, PyBUF_SIMPLE) * ptr[0] = buf.buf */ __pyx_t_1 = PyObject_CheckBuffer(__pyx_v_data); if (likely(__pyx_t_1)) { /* "psycopg_binary/pq/pqbuffer.pyx":106 * PyBytes_AsStringAndSize(data, ptr, length) * elif PyObject_CheckBuffer(data): * PyObject_GetBuffer(data, &buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<< * ptr[0] = buf.buf * length[0] = buf.len */ __pyx_t_2 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(7, 106, __pyx_L1_error) /* "psycopg_binary/pq/pqbuffer.pyx":107 * elif PyObject_CheckBuffer(data): * PyObject_GetBuffer(data, &buf, PyBUF_SIMPLE) * ptr[0] = buf.buf # <<<<<<<<<<<<<< * length[0] = buf.len * PyBuffer_Release(&buf) */ (__pyx_v_ptr[0]) = ((char *)__pyx_v_buf.buf); /* "psycopg_binary/pq/pqbuffer.pyx":108 * PyObject_GetBuffer(data, &buf, PyBUF_SIMPLE) * ptr[0] = buf.buf * length[0] = buf.len # <<<<<<<<<<<<<< * PyBuffer_Release(&buf) * else: */ __pyx_t_3 = __pyx_v_buf.len; (__pyx_v_length[0]) = __pyx_t_3; /* "psycopg_binary/pq/pqbuffer.pyx":109 * ptr[0] = buf.buf * length[0] = buf.len * PyBuffer_Release(&buf) # <<<<<<<<<<<<<< * else: * raise TypeError(f"bytes or buffer expected, got {type(data)}") */ PyBuffer_Release((&__pyx_v_buf)); /* "psycopg_binary/pq/pqbuffer.pyx":105 * if isinstance(data, bytes): * PyBytes_AsStringAndSize(data, ptr, length) * elif PyObject_CheckBuffer(data): # <<<<<<<<<<<<<< * PyObject_GetBuffer(data, &buf, PyBUF_SIMPLE) * ptr[0] = buf.buf */ goto __pyx_L3; } /* "psycopg_binary/pq/pqbuffer.pyx":111 * PyBuffer_Release(&buf) * else: * raise TypeError(f"bytes or buffer expected, got {type(data)}") # <<<<<<<<<<<<<< */ /*else*/ { __pyx_t_5 = NULL; __pyx_t_6 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_data)), __pyx_mstate_global->__pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(7, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_bytes_or_buffer_expected_got, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(7, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7}; __pyx_t_4 = __Pyx_PyObject_FastCall((PyObject*)(((PyTypeObject*)PyExc_TypeError)), __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(7, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); } __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __PYX_ERR(7, 111, __pyx_L1_error) } __pyx_L3:; /* "psycopg_binary/pq/pqbuffer.pyx":98 * * * cdef int _buffer_as_string_and_size( # <<<<<<<<<<<<<< * data: "Buffer", char **ptr, Py_ssize_t *length * ) except -1: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("psycopg_binary.pq._buffer_as_string_and_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":4 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 * def __pyx_unpickle_Escaping(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_result * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') */ /* Python wrapper */ static PyObject *__pyx_pw_14psycopg_binary_2pq_3__pyx_unpickle_Escaping(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ static PyMethodDef __pyx_mdef_14psycopg_binary_2pq_3__pyx_unpickle_Escaping = {"__pyx_unpickle_Escaping", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_3__pyx_unpickle_Escaping, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_14psycopg_binary_2pq_3__pyx_unpickle_Escaping(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; PyObject *__pyx_v___pyx_state = 0; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject* values[3] = {0,0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__pyx_unpickle_Escaping (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_pyx_type,&__pyx_mstate_global->__pyx_n_u_pyx_checksum,&__pyx_mstate_global->__pyx_n_u_pyx_state,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(2, 4, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "__pyx_unpickle_Escaping", 0) < (0)) __PYX_ERR(2, 4, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Escaping", 1, 3, 3, i); __PYX_ERR(2, 4, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(2, 4, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(2, 4, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(2, 4, __pyx_L3_error) } __pyx_v___pyx_type = values[0]; __pyx_v___pyx_checksum = __Pyx_PyLong_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(2, 4, __pyx_L3_error) __pyx_v___pyx_state = ((PyObject*)values[2]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Escaping", 1, 3, 3, __pyx_nargs); __PYX_ERR(2, 4, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __Pyx_AddTraceback("psycopg_binary.pq.__pyx_unpickle_Escaping", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v___pyx_state), (&PyTuple_Type), 1, "__pyx_state", 1))) __PYX_ERR(2, 4, __pyx_L1_error) __pyx_r = __pyx_pf_14psycopg_binary_2pq_2__pyx_unpickle_Escaping(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } goto __pyx_L7_cleaned_up; __pyx_L0:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } __pyx_L7_cleaned_up:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_14psycopg_binary_2pq_2__pyx_unpickle_Escaping(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; size_t __pyx_t_4; int __pyx_t_5; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Escaping", 0); /* "(tree fragment)":6 * def __pyx_unpickle_Escaping(__pyx_type, long __pyx_checksum, tuple __pyx_state): * cdef object __pyx_result * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') # <<<<<<<<<<<<<< * __pyx_result = Escaping.__new__(__pyx_type) * if __pyx_state is not None: */ __pyx_t_1 = __Pyx_CheckUnpickleChecksum(__pyx_v___pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, __pyx_k_conn); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 6, __pyx_L1_error) /* "(tree fragment)":7 * cdef object __pyx_result * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') * __pyx_result = Escaping.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) */ __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping); __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; { PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v___pyx_type}; __pyx_t_2 = __Pyx_PyObject_FastCallMethod((PyObject*)__pyx_mstate_global->__pyx_n_u_new, __pyx_callargs+__pyx_t_4, (2-__pyx_t_4) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __pyx_v___pyx_result = __pyx_t_2; __pyx_t_2 = 0; /* "(tree fragment)":8 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') * __pyx_result = Escaping.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) * return __pyx_result */ __pyx_t_5 = (__pyx_v___pyx_state != ((PyObject*)Py_None)); if (__pyx_t_5) { /* "(tree fragment)":9 * __pyx_result = Escaping.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Escaping__set_state(Escaping __pyx_result, __pyx_state: tuple): */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "cannot pass None into a C function argument that is declared 'not None'"); __PYX_ERR(2, 9, __pyx_L1_error) } __pyx_t_2 = __pyx_f_14psycopg_binary_2pq___pyx_unpickle_Escaping__set_state(((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)__pyx_v___pyx_result), __pyx_v___pyx_state); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":8 * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') * __pyx_result = Escaping.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) * return __pyx_result */ } /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< * cdef __pyx_unpickle_Escaping__set_state(Escaping __pyx_result, __pyx_state: tuple): * __pyx_result.conn = __pyx_state[0] */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v___pyx_result); __pyx_r = __pyx_v___pyx_result; goto __pyx_L0; /* "(tree fragment)":4 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 * def __pyx_unpickle_Escaping(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_result * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("psycopg_binary.pq.__pyx_unpickle_Escaping", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v___pyx_result); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "(tree fragment)":11 * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Escaping__set_state(Escaping __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< * __pyx_result.conn = __pyx_state[0] * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) */ static PyObject *__pyx_f_14psycopg_binary_2pq___pyx_unpickle_Escaping__set_state(struct __pyx_obj_14psycopg_binary_2pq_Escaping *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_unpickle_Escaping__set_state", 0); /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Escaping__set_state(Escaping __pyx_result, __pyx_state: tuple): * __pyx_result.conn = __pyx_state[0] # <<<<<<<<<<<<<< * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) */ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyLong_From_long, 0, 0, 1, 1, __Pyx_ReferenceSharing_FunctionArgument); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF((PyObject *)__pyx_v___pyx_result->conn); __Pyx_DECREF((PyObject *)__pyx_v___pyx_result->conn); __pyx_v___pyx_result->conn = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)__pyx_t_1); __pyx_t_1 = 0; /* "(tree fragment)":13 * cdef __pyx_unpickle_Escaping__set_state(Escaping __pyx_result, __pyx_state: tuple): * __pyx_result.conn = __pyx_state[0] * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) # <<<<<<<<<<<<<< */ __pyx_t_2 = __Pyx_UpdateUnpickledDict(((PyObject *)__pyx_v___pyx_result), __pyx_v___pyx_state, 1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) /* "(tree fragment)":11 * __pyx_unpickle_Escaping__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Escaping__set_state(Escaping __pyx_result, __pyx_state: tuple): # <<<<<<<<<<<<<< * __pyx_result.conn = __pyx_state[0] * __Pyx_UpdateUnpickledDict(__pyx_result, __pyx_state, 1) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("psycopg_binary.pq.__pyx_unpickle_Escaping__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* #### Code section: module_exttypes ### */ static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGconn __pyx_vtable_14psycopg_binary_2pq_PGconn; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGconn(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_PGconn *p; PyObject *o; o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_PGconn; p->notice_handler = Py_None; Py_INCREF(Py_None); p->notify_handler = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_14psycopg_binary_2pq_6PGconn_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_PGconn(PyObject *o) { struct __pyx_obj_14psycopg_binary_2pq_PGconn *p = (struct __pyx_obj_14psycopg_binary_2pq_PGconn *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_PGconn) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); if (p->__weakref__) PyObject_ClearWeakRefs(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_14psycopg_binary_2pq_6PGconn_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->notice_handler); Py_CLEAR(p->notify_handler); PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static int __pyx_tp_traverse_14psycopg_binary_2pq_PGconn(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_14psycopg_binary_2pq_PGconn *p = (struct __pyx_obj_14psycopg_binary_2pq_PGconn *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->notice_handler) { e = (*v)(p->notice_handler, a); if (e) return e; } if (p->notify_handler) { e = (*v)(p->notify_handler, a); if (e) return e; } return 0; } static int __pyx_tp_clear_14psycopg_binary_2pq_PGconn(PyObject *o) { PyObject* tmp; struct __pyx_obj_14psycopg_binary_2pq_PGconn *p = (struct __pyx_obj_14psycopg_binary_2pq_PGconn *)o; tmp = ((PyObject*)p->notice_handler); p->notice_handler = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->notify_handler); p->notify_handler = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_pgconn_ptr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_10pgconn_ptr_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_info(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_4info_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_db(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_2db_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_user(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_4user_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_password(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_8password_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_host(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_4host_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_hostaddr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_8hostaddr_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_port(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_4port_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_tty(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_3tty_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_options(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_7options_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_status(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_6status_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_transaction_status(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_18transaction_status_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_error_message(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_13error_message_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn__encoding(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_9_encoding_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_protocol_version(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_16protocol_version_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_full_protocol_version(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_21full_protocol_version_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_server_version(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14server_version_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_socket(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_6socket_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_backend_pid(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_11backend_pid_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_needs_password(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14needs_password_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_used_password(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_13used_password_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_used_gssapi(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_11used_gssapi_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_ssl_in_use(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_10ssl_in_use_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_nonblocking(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_11nonblocking_1__get__(o); } static int __pyx_setprop_14psycopg_binary_2pq_6PGconn_nonblocking(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_11nonblocking_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_pipeline_status(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_15pipeline_status_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_notice_handler(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_1__get__(o); } static int __pyx_setprop_14psycopg_binary_2pq_6PGconn_notice_handler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_3__set__(o, v); } else { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14notice_handler_5__del__(o); } } static PyObject *__pyx_getprop_14psycopg_binary_2pq_6PGconn_notify_handler(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_1__get__(o); } static int __pyx_setprop_14psycopg_binary_2pq_6PGconn_notify_handler(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_3__set__(o, v); } else { return __pyx_pw_14psycopg_binary_2pq_6PGconn_14notify_handler_5__del__(o); } } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_PGconn[] = { {"connect", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_7connect, METH_O, 0}, {"connect_start", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_9connect_start, METH_O, 0}, {"connect_poll", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_11connect_poll, METH_NOARGS, 0}, {"finish", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_13finish, METH_NOARGS, 0}, {"reset", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_15reset, METH_NOARGS, 0}, {"reset_start", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_17reset_start, METH_NOARGS, 0}, {"reset_poll", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_19reset_poll, METH_NOARGS, 0}, {"ping", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_21ping, METH_O, 0}, {"parameter_status", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_23parameter_status, METH_O, 0}, {"get_error_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_25get_error_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"exec_", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_27exec_, METH_O, 0}, {"send_query", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_29send_query, METH_O, 0}, {"exec_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_31exec_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"send_query_params", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_33send_query_params, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"send_prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_35send_prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"send_query_prepared", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_37send_query_prepared, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"prepare", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_39prepare, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"exec_prepared", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_41exec_prepared, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"describe_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_43describe_prepared, METH_O, 0}, {"send_describe_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_45send_describe_prepared, METH_O, 0}, {"describe_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_47describe_portal, METH_O, 0}, {"send_describe_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_49send_describe_portal, METH_O, 0}, {"close_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_51close_prepared, METH_O, 0}, {"send_close_prepared", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_53send_close_prepared, METH_O, 0}, {"close_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_55close_portal, METH_O, 0}, {"send_close_portal", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_57send_close_portal, METH_O, 0}, {"get_result", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_59get_result, METH_NOARGS, 0}, {"consume_input", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_61consume_input, METH_NOARGS, 0}, {"is_busy", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_63is_busy, METH_NOARGS, 0}, {"set_single_row_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_67set_single_row_mode, METH_NOARGS, 0}, {"set_chunked_rows_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_69set_chunked_rows_mode, METH_O, 0}, {"cancel_conn", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_71cancel_conn, METH_NOARGS, 0}, {"get_cancel", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_73get_cancel, METH_NOARGS, 0}, {"put_copy_data", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_77put_copy_data, METH_O, 0}, {"put_copy_end", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_79put_copy_end, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"get_copy_data", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_81get_copy_data, METH_O, 0}, {"trace", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_83trace, METH_O, 0}, {"set_trace_flags", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_85set_trace_flags, METH_O, 0}, {"untrace", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_87untrace, METH_NOARGS, 0}, {"encrypt_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_89encrypt_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"change_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_6PGconn_91change_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"make_empty_result", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_93make_empty_result, METH_O, 0}, {"enter_pipeline_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_95enter_pipeline_mode, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_94enter_pipeline_mode}, {"exit_pipeline_mode", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_97exit_pipeline_mode, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_96exit_pipeline_mode}, {"pipeline_sync", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_99pipeline_sync, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_98pipeline_sync}, {"send_flush_request", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_101send_flush_request, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_6PGconn_100send_flush_request}, {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_103__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_6PGconn_105__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_14psycopg_binary_2pq_PGconn[] = { {"pgconn_ptr", __pyx_getprop_14psycopg_binary_2pq_6PGconn_pgconn_ptr, 0, 0, 0}, {"info", __pyx_getprop_14psycopg_binary_2pq_6PGconn_info, 0, 0, 0}, {"db", __pyx_getprop_14psycopg_binary_2pq_6PGconn_db, 0, 0, 0}, {"user", __pyx_getprop_14psycopg_binary_2pq_6PGconn_user, 0, 0, 0}, {"password", __pyx_getprop_14psycopg_binary_2pq_6PGconn_password, 0, 0, 0}, {"host", __pyx_getprop_14psycopg_binary_2pq_6PGconn_host, 0, 0, 0}, {"hostaddr", __pyx_getprop_14psycopg_binary_2pq_6PGconn_hostaddr, 0, 0, 0}, {"port", __pyx_getprop_14psycopg_binary_2pq_6PGconn_port, 0, 0, 0}, {"tty", __pyx_getprop_14psycopg_binary_2pq_6PGconn_tty, 0, 0, 0}, {"options", __pyx_getprop_14psycopg_binary_2pq_6PGconn_options, 0, 0, 0}, {"status", __pyx_getprop_14psycopg_binary_2pq_6PGconn_status, 0, 0, 0}, {"transaction_status", __pyx_getprop_14psycopg_binary_2pq_6PGconn_transaction_status, 0, 0, 0}, {"error_message", __pyx_getprop_14psycopg_binary_2pq_6PGconn_error_message, 0, 0, 0}, {"_encoding", __pyx_getprop_14psycopg_binary_2pq_6PGconn__encoding, 0, 0, 0}, {"protocol_version", __pyx_getprop_14psycopg_binary_2pq_6PGconn_protocol_version, 0, 0, 0}, {"full_protocol_version", __pyx_getprop_14psycopg_binary_2pq_6PGconn_full_protocol_version, 0, 0, 0}, {"server_version", __pyx_getprop_14psycopg_binary_2pq_6PGconn_server_version, 0, 0, 0}, {"socket", __pyx_getprop_14psycopg_binary_2pq_6PGconn_socket, 0, 0, 0}, {"backend_pid", __pyx_getprop_14psycopg_binary_2pq_6PGconn_backend_pid, 0, 0, 0}, {"needs_password", __pyx_getprop_14psycopg_binary_2pq_6PGconn_needs_password, 0, 0, 0}, {"used_password", __pyx_getprop_14psycopg_binary_2pq_6PGconn_used_password, 0, 0, 0}, {"used_gssapi", __pyx_getprop_14psycopg_binary_2pq_6PGconn_used_gssapi, 0, 0, 0}, {"ssl_in_use", __pyx_getprop_14psycopg_binary_2pq_6PGconn_ssl_in_use, 0, 0, 0}, {"nonblocking", __pyx_getprop_14psycopg_binary_2pq_6PGconn_nonblocking, __pyx_setprop_14psycopg_binary_2pq_6PGconn_nonblocking, 0, 0}, {"pipeline_status", __pyx_getprop_14psycopg_binary_2pq_6PGconn_pipeline_status, 0, PyDoc_STR("The current pipeline mode status.\n\n For libpq < 14.0, always return 0 (PQ_PIPELINE_OFF).\n "), 0}, {"notice_handler", __pyx_getprop_14psycopg_binary_2pq_6PGconn_notice_handler, __pyx_setprop_14psycopg_binary_2pq_6PGconn_notice_handler, 0, 0}, {"notify_handler", __pyx_getprop_14psycopg_binary_2pq_6PGconn_notify_handler, __pyx_setprop_14psycopg_binary_2pq_6PGconn_notify_handler, 0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyMemberDef __pyx_type_14psycopg_binary_2pq_PGconn_members[] = { #if !CYTHON_USE_TYPE_SLOTS {"__weaklistoffset__", T_PYSSIZET, offsetof(struct __pyx_obj_14psycopg_binary_2pq_PGconn, __weakref__), READONLY, 0}, #endif {0, 0, 0, 0, 0} }; #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 #if defined(__GNUC__) || defined(__clang__) #warning "psycopg_binary/pq.pxd:22:16: : __weakref__ is unsupported in the Limited API when running on Python <3.9." #elif defined(_MSC_VER) #pragma message("psycopg_binary/pq.pxd:22:16: : __weakref__ is unsupported in the Limited API when running on Python <3.9.") #endif #endif static PyType_Slot __pyx_type_14psycopg_binary_2pq_PGconn_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_PGconn}, {Py_tp_repr, (void *)__pyx_pw_14psycopg_binary_2pq_6PGconn_5__repr__}, {Py_tp_traverse, (void *)__pyx_tp_traverse_14psycopg_binary_2pq_PGconn}, {Py_tp_clear, (void *)__pyx_tp_clear_14psycopg_binary_2pq_PGconn}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_PGconn}, {Py_tp_getset, (void *)__pyx_getsets_14psycopg_binary_2pq_PGconn}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_PGconn}, {Py_tp_members, (void*)__pyx_type_14psycopg_binary_2pq_PGconn_members}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_PGconn_spec = { "psycopg_binary.pq.PGconn", sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGconn), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_14psycopg_binary_2pq_PGconn_slots, }; #else static PyTypeObject __pyx_type_14psycopg_binary_2pq_PGconn = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""PGconn", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGconn), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_PGconn, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ __pyx_pw_14psycopg_binary_2pq_6PGconn_5__repr__, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_14psycopg_binary_2pq_PGconn, /*tp_traverse*/ __pyx_tp_clear_14psycopg_binary_2pq_PGconn, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_14psycopg_binary_2pq_PGconn, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_14psycopg_binary_2pq_PGconn, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_PGconn, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGresult __pyx_vtable_14psycopg_binary_2pq_PGresult; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGresult(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_PGresult *p; PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PGresult > 0) & __PYX_CHECK_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGresult)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_14psycopg_binary_2pq_PGresult[--__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PGresult]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGresult)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif } else #endif { o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_PGresult; if (unlikely(__pyx_pw_14psycopg_binary_2pq_8PGresult_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_PGresult(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_PGresult) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_14psycopg_binary_2pq_8PGresult_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PGresult < 8) & __PYX_CHECK_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGresult)))) { __pyx_mstate_global->__pyx_freelist_14psycopg_binary_2pq_PGresult[__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PGresult++] = ((struct __pyx_obj_14psycopg_binary_2pq_PGresult *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_pgresult_ptr(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_12pgresult_ptr_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_status(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_6status_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_error_message(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_13error_message_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_ntuples(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_7ntuples_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_nfields(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_7nfields_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_binary_tuples(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_13binary_tuples_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_nparams(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_7nparams_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_command_status(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_14command_status_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_command_tuples(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_14command_tuples_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_8PGresult_oid_value(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_8PGresult_9oid_value_1__get__(o); } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_PGresult[] = { {"clear", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_7clear, METH_NOARGS, 0}, {"get_error_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_8PGresult_9get_error_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"error_field", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_11error_field, METH_O, 0}, {"fname", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_13fname, METH_O, 0}, {"ftable", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_15ftable, METH_O, 0}, {"ftablecol", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_17ftablecol, METH_O, 0}, {"fformat", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_19fformat, METH_O, 0}, {"ftype", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_21ftype, METH_O, 0}, {"fmod", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_23fmod, METH_O, 0}, {"fsize", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_25fsize, METH_O, 0}, {"get_value", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_8PGresult_27get_value, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"param_type", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_29param_type, METH_O, 0}, {"set_attributes", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_31set_attributes, METH_O, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_33__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGresult_35__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_14psycopg_binary_2pq_PGresult[] = { {"pgresult_ptr", __pyx_getprop_14psycopg_binary_2pq_8PGresult_pgresult_ptr, 0, 0, 0}, {"status", __pyx_getprop_14psycopg_binary_2pq_8PGresult_status, 0, 0, 0}, {"error_message", __pyx_getprop_14psycopg_binary_2pq_8PGresult_error_message, 0, 0, 0}, {"ntuples", __pyx_getprop_14psycopg_binary_2pq_8PGresult_ntuples, 0, 0, 0}, {"nfields", __pyx_getprop_14psycopg_binary_2pq_8PGresult_nfields, 0, 0, 0}, {"binary_tuples", __pyx_getprop_14psycopg_binary_2pq_8PGresult_binary_tuples, 0, 0, 0}, {"nparams", __pyx_getprop_14psycopg_binary_2pq_8PGresult_nparams, 0, 0, 0}, {"command_status", __pyx_getprop_14psycopg_binary_2pq_8PGresult_command_status, 0, 0, 0}, {"command_tuples", __pyx_getprop_14psycopg_binary_2pq_8PGresult_command_tuples, 0, 0, 0}, {"oid_value", __pyx_getprop_14psycopg_binary_2pq_8PGresult_oid_value, 0, 0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_14psycopg_binary_2pq_PGresult_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_PGresult}, {Py_tp_repr, (void *)__pyx_pw_14psycopg_binary_2pq_8PGresult_5__repr__}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_PGresult}, {Py_tp_getset, (void *)__pyx_getsets_14psycopg_binary_2pq_PGresult}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_PGresult}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_PGresult_spec = { "psycopg_binary.pq.PGresult", sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGresult), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_14psycopg_binary_2pq_PGresult_slots, }; #else static PyTypeObject __pyx_type_14psycopg_binary_2pq_PGresult = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""PGresult", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGresult), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_PGresult, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ __pyx_pw_14psycopg_binary_2pq_8PGresult_5__repr__, /*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_14psycopg_binary_2pq_PGresult, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_14psycopg_binary_2pq_PGresult, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_PGresult, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancelConn __pyx_vtable_14psycopg_binary_2pq_PGcancelConn; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGcancelConn(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *p; PyObject *o; o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_PGcancelConn; if (unlikely(__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_PGcancelConn(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_PGcancelConn) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static PyObject *__pyx_getprop_14psycopg_binary_2pq_12PGcancelConn_status(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_6status_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_12PGcancelConn_socket(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_6socket_1__get__(o); } static PyObject *__pyx_getprop_14psycopg_binary_2pq_12PGcancelConn_error_message(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13error_message_1__get__(o); } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_PGcancelConn[] = { {"start", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_5start, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_12PGcancelConn_4start}, {"blocking", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_7blocking, METH_NOARGS, __pyx_doc_14psycopg_binary_2pq_12PGcancelConn_6blocking}, {"poll", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_9poll, METH_NOARGS, 0}, {"get_error_message", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_11get_error_message, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}, {"reset", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_13reset, METH_NOARGS, 0}, {"finish", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_15finish, METH_NOARGS, 0}, {"_ensure_pgcancelconn", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_17_ensure_pgcancelconn, METH_NOARGS, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_19__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_12PGcancelConn_21__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_14psycopg_binary_2pq_PGcancelConn[] = { {"status", __pyx_getprop_14psycopg_binary_2pq_12PGcancelConn_status, 0, 0, 0}, {"socket", __pyx_getprop_14psycopg_binary_2pq_12PGcancelConn_socket, 0, 0, 0}, {"error_message", __pyx_getprop_14psycopg_binary_2pq_12PGcancelConn_error_message, 0, 0, 0}, {0, 0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_14psycopg_binary_2pq_PGcancelConn_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_PGcancelConn}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_PGcancelConn}, {Py_tp_getset, (void *)__pyx_getsets_14psycopg_binary_2pq_PGcancelConn}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_PGcancelConn}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_PGcancelConn_spec = { "psycopg_binary.pq.PGcancelConn", sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_14psycopg_binary_2pq_PGcancelConn_slots, }; #else static PyTypeObject __pyx_type_14psycopg_binary_2pq_PGcancelConn = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""PGcancelConn", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_PGcancelConn, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_14psycopg_binary_2pq_PGcancelConn, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_14psycopg_binary_2pq_PGcancelConn, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_PGcancelConn, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_14psycopg_binary_2pq_PGcancel __pyx_vtable_14psycopg_binary_2pq_PGcancel; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PGcancel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_PGcancel *p; PyObject *o; o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_14psycopg_binary_2pq_PGcancel *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_PGcancel; if (unlikely(__pyx_pw_14psycopg_binary_2pq_8PGcancel_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_PGcancel(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_PGcancel) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_14psycopg_binary_2pq_8PGcancel_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_PGcancel[] = { {"free", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_5free, METH_NOARGS, 0}, {"cancel", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_7cancel, METH_NOARGS, 0}, {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_9__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PGcancel_11__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_14psycopg_binary_2pq_PGcancel_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_PGcancel}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_PGcancel}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_PGcancel}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_PGcancel_spec = { "psycopg_binary.pq.PGcancel", sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGcancel), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_14psycopg_binary_2pq_PGcancel_slots, }; #else static PyTypeObject __pyx_type_14psycopg_binary_2pq_PGcancel = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""PGcancel", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_PGcancel), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_PGcancel, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_14psycopg_binary_2pq_PGcancel, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_PGcancel, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_14psycopg_binary_2pq_Escaping __pyx_vtable_14psycopg_binary_2pq_Escaping; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_Escaping(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_Escaping *p; PyObject *o; o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; p = ((struct __pyx_obj_14psycopg_binary_2pq_Escaping *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_Escaping; p->conn = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)Py_None); Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_Escaping(PyObject *o) { struct __pyx_obj_14psycopg_binary_2pq_Escaping *p = (struct __pyx_obj_14psycopg_binary_2pq_Escaping *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_Escaping) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->conn); PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } static int __pyx_tp_traverse_14psycopg_binary_2pq_Escaping(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_14psycopg_binary_2pq_Escaping *p = (struct __pyx_obj_14psycopg_binary_2pq_Escaping *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->conn) { e = (*v)(((PyObject *)p->conn), a); if (e) return e; } return 0; } static int __pyx_tp_clear_14psycopg_binary_2pq_Escaping(PyObject *o) { PyObject* tmp; struct __pyx_obj_14psycopg_binary_2pq_Escaping *p = (struct __pyx_obj_14psycopg_binary_2pq_Escaping *)o; tmp = ((PyObject*)p->conn); p->conn = ((struct __pyx_obj_14psycopg_binary_2pq_PGconn *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_Escaping[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_13__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8Escaping_15__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS static PyType_Slot __pyx_type_14psycopg_binary_2pq_Escaping_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_Escaping}, {Py_tp_traverse, (void *)__pyx_tp_traverse_14psycopg_binary_2pq_Escaping}, {Py_tp_clear, (void *)__pyx_tp_clear_14psycopg_binary_2pq_Escaping}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_Escaping}, {Py_tp_init, (void *)__pyx_pw_14psycopg_binary_2pq_8Escaping_1__init__}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_Escaping}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_Escaping_spec = { "psycopg_binary.pq.Escaping", sizeof(struct __pyx_obj_14psycopg_binary_2pq_Escaping), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_14psycopg_binary_2pq_Escaping_slots, }; #else static PyTypeObject __pyx_type_14psycopg_binary_2pq_Escaping = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""Escaping", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_Escaping), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_Escaping, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_14psycopg_binary_2pq_Escaping, /*tp_traverse*/ __pyx_tp_clear_14psycopg_binary_2pq_Escaping, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_14psycopg_binary_2pq_Escaping, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif __pyx_pw_14psycopg_binary_2pq_8Escaping_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_Escaping, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_14psycopg_binary_2pq_PQBuffer __pyx_vtable_14psycopg_binary_2pq_PQBuffer; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_PQBuffer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *p; PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PQBuffer > 0) & __PYX_CHECK_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PQBuffer, sizeof(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_14psycopg_binary_2pq_PQBuffer[--__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PQBuffer]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif } else #endif { o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_PQBuffer; if (unlikely(__pyx_pw_14psycopg_binary_2pq_8PQBuffer_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_PQBuffer(PyObject *o) { #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_PQBuffer) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); __pyx_pw_14psycopg_binary_2pq_8PQBuffer_3__dealloc__(o); __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); PyErr_Restore(etype, eval, etb); } #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PQBuffer < 32) & __PYX_CHECK_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PQBuffer, sizeof(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer)))) { __pyx_mstate_global->__pyx_freelist_14psycopg_binary_2pq_PQBuffer[__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_PQBuffer++] = ((struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_PQBuffer[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_11__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_13__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS #if !CYTHON_COMPILING_IN_LIMITED_API static PyBufferProcs __pyx_tp_as_buffer_PQBuffer = { __pyx_pw_14psycopg_binary_2pq_8PQBuffer_7__getbuffer__, /*bf_getbuffer*/ __pyx_pw_14psycopg_binary_2pq_8PQBuffer_9__releasebuffer__, /*bf_releasebuffer*/ }; #endif static PyType_Slot __pyx_type_14psycopg_binary_2pq_PQBuffer_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_PQBuffer}, {Py_tp_repr, (void *)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_5__repr__}, #if defined(Py_bf_getbuffer) {Py_bf_getbuffer, (void *)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_7__getbuffer__}, #endif #if defined(Py_bf_releasebuffer) {Py_bf_releasebuffer, (void *)__pyx_pw_14psycopg_binary_2pq_8PQBuffer_9__releasebuffer__}, #endif {Py_tp_doc, (void *)PyDoc_STR("\n Wrap a chunk of memory allocated by the libpq and expose it as memoryview.\n ")}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_PQBuffer}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_PQBuffer}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_PQBuffer_spec = { "psycopg_binary.pq.PQBuffer", sizeof(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, __pyx_type_14psycopg_binary_2pq_PQBuffer_slots, }; #else static PyBufferProcs __pyx_tp_as_buffer_PQBuffer = { __pyx_pw_14psycopg_binary_2pq_8PQBuffer_7__getbuffer__, /*bf_getbuffer*/ __pyx_pw_14psycopg_binary_2pq_8PQBuffer_9__releasebuffer__, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type_14psycopg_binary_2pq_PQBuffer = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""PQBuffer", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_PQBuffer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_PQBuffer, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ __pyx_pw_14psycopg_binary_2pq_8PQBuffer_5__repr__, /*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*/ &__pyx_tp_as_buffer_PQBuffer, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ PyDoc_STR("\n Wrap a chunk of memory allocated by the libpq and expose it as memoryview.\n "), /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_14psycopg_binary_2pq_PQBuffer, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_PQBuffer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static struct __pyx_vtabstruct_14psycopg_binary_2pq_ViewBuffer __pyx_vtable_14psycopg_binary_2pq_ViewBuffer; static PyObject *__pyx_tp_new_14psycopg_binary_2pq_ViewBuffer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *p; PyObject *o; #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_ViewBuffer > 0) & __PYX_CHECK_TYPE_FOR_FREELISTS(t, __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer, sizeof(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer)))) { o = (PyObject*)__pyx_mstate_global->__pyx_freelist_14psycopg_binary_2pq_ViewBuffer[--__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_ViewBuffer]; #if CYTHON_USE_TYPE_SPECS Py_DECREF(Py_TYPE(o)); #endif memset(o, 0, sizeof(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer)); #if CYTHON_COMPILING_IN_LIMITED_API (void) PyObject_Init(o, t); #else (void) PyObject_INIT(o, t); #endif PyObject_GC_Track(o); } else #endif { o = __Pyx_AllocateExtensionType(t, 0); if (unlikely(!o)) return 0; } p = ((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)o); p->__pyx_vtab = __pyx_vtabptr_14psycopg_binary_2pq_ViewBuffer; p->obj = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_1__cinit__(o, __pyx_mstate_global->__pyx_empty_tuple, NULL) < 0)) goto bad; return o; bad: Py_DECREF(o); o = 0; return NULL; } static void __pyx_tp_dealloc_14psycopg_binary_2pq_ViewBuffer(PyObject *o) { struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *p = (struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely(__Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_14psycopg_binary_2pq_ViewBuffer) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->obj); #if CYTHON_USE_FREELISTS if (likely((int)(__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_ViewBuffer < 32) & __PYX_CHECK_TYPE_FOR_FREELISTS(Py_TYPE(o), __pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer, sizeof(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer)))) { __pyx_mstate_global->__pyx_freelist_14psycopg_binary_2pq_ViewBuffer[__pyx_mstate_global->__pyx_freecount_14psycopg_binary_2pq_ViewBuffer++] = ((struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)o); } else #endif { PyTypeObject *tp = Py_TYPE(o); #if CYTHON_USE_TYPE_SLOTS (*tp->tp_free)(o); #else { freefunc tp_free = (freefunc)PyType_GetSlot(tp, Py_tp_free); if (tp_free) tp_free(o); } #endif #if CYTHON_USE_TYPE_SPECS Py_DECREF(tp); #endif } } static int __pyx_tp_traverse_14psycopg_binary_2pq_ViewBuffer(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *p = (struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)o; { e = __Pyx_call_type_traverse(o, 1, v, a); if (e) return e; } if (p->obj) { e = (*v)(p->obj, a); if (e) return e; } return 0; } static int __pyx_tp_clear_14psycopg_binary_2pq_ViewBuffer(PyObject *o) { PyObject* tmp; struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *p = (struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *)o; tmp = ((PyObject*)p->obj); p->obj = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyMethodDef __pyx_methods_14psycopg_binary_2pq_ViewBuffer[] = { {"__reduce_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_9__reduce_cython__, METH_NOARGS, 0}, {"__setstate_cython__", (PyCFunction)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_11__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; #if CYTHON_USE_TYPE_SPECS #if !CYTHON_COMPILING_IN_LIMITED_API static PyBufferProcs __pyx_tp_as_buffer_ViewBuffer = { __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_5__getbuffer__, /*bf_getbuffer*/ __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_7__releasebuffer__, /*bf_releasebuffer*/ }; #endif static PyType_Slot __pyx_type_14psycopg_binary_2pq_ViewBuffer_slots[] = { {Py_tp_dealloc, (void *)__pyx_tp_dealloc_14psycopg_binary_2pq_ViewBuffer}, {Py_tp_repr, (void *)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_3__repr__}, #if defined(Py_bf_getbuffer) {Py_bf_getbuffer, (void *)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_5__getbuffer__}, #endif #if defined(Py_bf_releasebuffer) {Py_bf_releasebuffer, (void *)__pyx_pw_14psycopg_binary_2pq_10ViewBuffer_7__releasebuffer__}, #endif {Py_tp_doc, (void *)PyDoc_STR("\n Wrap a chunk of memory owned by a different object.\n ")}, {Py_tp_traverse, (void *)__pyx_tp_traverse_14psycopg_binary_2pq_ViewBuffer}, {Py_tp_clear, (void *)__pyx_tp_clear_14psycopg_binary_2pq_ViewBuffer}, {Py_tp_methods, (void *)__pyx_methods_14psycopg_binary_2pq_ViewBuffer}, {Py_tp_new, (void *)__pyx_tp_new_14psycopg_binary_2pq_ViewBuffer}, {0, 0}, }; static PyType_Spec __pyx_type_14psycopg_binary_2pq_ViewBuffer_spec = { "psycopg_binary.pq.ViewBuffer", sizeof(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, __pyx_type_14psycopg_binary_2pq_ViewBuffer_slots, }; #else static PyBufferProcs __pyx_tp_as_buffer_ViewBuffer = { __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_5__getbuffer__, /*bf_getbuffer*/ __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_7__releasebuffer__, /*bf_releasebuffer*/ }; static PyTypeObject __pyx_type_14psycopg_binary_2pq_ViewBuffer = { PyVarObject_HEAD_INIT(0, 0) "psycopg_binary.pq.""ViewBuffer", /*tp_name*/ sizeof(struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_14psycopg_binary_2pq_ViewBuffer, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ 0, /*tp_as_async*/ __pyx_pw_14psycopg_binary_2pq_10ViewBuffer_3__repr__, /*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*/ &__pyx_tp_as_buffer_ViewBuffer, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ PyDoc_STR("\n Wrap a chunk of memory owned by a different object.\n "), /*tp_doc*/ __pyx_tp_traverse_14psycopg_binary_2pq_ViewBuffer, /*tp_traverse*/ __pyx_tp_clear_14psycopg_binary_2pq_ViewBuffer, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_14psycopg_binary_2pq_ViewBuffer, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ #if !CYTHON_USE_TYPE_SPECS 0, /*tp_dictoffset*/ #endif 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_14psycopg_binary_2pq_ViewBuffer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if CYTHON_USE_TP_FINALIZE 0, /*tp_finalize*/ #else NULL, /*tp_finalize*/ #endif #if !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800 0, /*tp_vectorcall*/ #endif #if __PYX_NEED_TP_PRINT_SLOT == 1 0, /*tp_print*/ #endif #if PY_VERSION_HEX >= 0x030C0000 0, /*tp_watched*/ #endif #if PY_VERSION_HEX >= 0x030d00A4 0, /*tp_versions_used*/ #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 0, /*tp_pypy_flags*/ #endif }; #endif static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; /* #### Code section: initfunc_declarations ### */ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); /*proto*/ static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); /*proto*/ /* #### Code section: init_module ### */ static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); /*--- Global init code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); /*--- Variable export code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); /*--- Function export code ---*/ { __pyx_t_1 = __Pyx_ApiExport_GetApiDict(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); const char * __pyx_export_signature = __Pyx_PyBytes_AsString(__pyx_mstate_global->__pyx_kp_b_int_PyObject_char_Py_ssize_t__bu); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!__pyx_export_signature)) __PYX_ERR(0, 1, __pyx_L1_error) #endif const char * __pyx_export_name = __pyx_export_signature + 40; void (*const __pyx_export_pointers[])(void) = {(void (*)(void))&__pyx_f_14psycopg_binary_2pq__buffer_as_string_and_size, (void (*)(void)) NULL}; void (*const *__pyx_export_pointer)(void) = __pyx_export_pointers; const char *__pyx_export_current_signature = __pyx_export_signature; while (*__pyx_export_pointer) { if (__Pyx_ExportFunction(__pyx_t_1, __pyx_export_name, *__pyx_export_pointer, __pyx_export_current_signature) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) ++__pyx_export_pointer; __pyx_export_name = strchr(__pyx_export_name, '\0') + 1; __pyx_export_signature = strchr(__pyx_export_signature, '\0') + 1; if (*__pyx_export_signature != '\0') __pyx_export_current_signature = __pyx_export_signature; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); /*--- Type init code ---*/ __pyx_vtabptr_14psycopg_binary_2pq_PGconn = &__pyx_vtable_14psycopg_binary_2pq_PGconn; __pyx_vtable_14psycopg_binary_2pq_PGconn._from_ptr = (struct __pyx_obj_14psycopg_binary_2pq_PGconn *(*)(PGconn *))__pyx_f_14psycopg_binary_2pq_6PGconn__from_ptr; __pyx_vtable_14psycopg_binary_2pq_PGconn.flush = (int (*)(struct __pyx_obj_14psycopg_binary_2pq_PGconn *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_6PGconn_flush; __pyx_vtable_14psycopg_binary_2pq_PGconn.notifies = (PyObject *(*)(struct __pyx_obj_14psycopg_binary_2pq_PGconn *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_6PGconn_notifies; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_PGconn_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn)) __PYX_ERR(1, 47, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_PGconn_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn) < (0)) __PYX_ERR(1, 47, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn = &__pyx_type_14psycopg_binary_2pq_PGconn; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn) < (0)) __PYX_ERR(1, 47, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_vtabptr_14psycopg_binary_2pq_PGconn) < (0)) __PYX_ERR(1, 47, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn) < (0)) __PYX_ERR(1, 47, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PGconn, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn) < (0)) __PYX_ERR(1, 47, __pyx_L1_error) #if CYTHON_USE_TYPE_SLOTS if (__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn->tp_weaklistoffset == 0) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn->tp_weaklistoffset = offsetof(struct __pyx_obj_14psycopg_binary_2pq_PGconn, __weakref__); #endif if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGconn) < (0)) __PYX_ERR(1, 47, __pyx_L1_error) __pyx_vtabptr_14psycopg_binary_2pq_PGresult = &__pyx_vtable_14psycopg_binary_2pq_PGresult; __pyx_vtable_14psycopg_binary_2pq_PGresult._from_ptr = (struct __pyx_obj_14psycopg_binary_2pq_PGresult *(*)(PGresult *))__pyx_f_14psycopg_binary_2pq_8PGresult__from_ptr; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_PGresult_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult)) __PYX_ERR(3, 14, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_PGresult_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult) < (0)) __PYX_ERR(3, 14, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult = &__pyx_type_14psycopg_binary_2pq_PGresult; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult) < (0)) __PYX_ERR(3, 14, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_vtabptr_14psycopg_binary_2pq_PGresult) < (0)) __PYX_ERR(3, 14, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult) < (0)) __PYX_ERR(3, 14, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PGresult, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult) < (0)) __PYX_ERR(3, 14, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGresult) < (0)) __PYX_ERR(3, 14, __pyx_L1_error) __pyx_vtabptr_14psycopg_binary_2pq_PGcancelConn = &__pyx_vtable_14psycopg_binary_2pq_PGcancelConn; __pyx_vtable_14psycopg_binary_2pq_PGcancelConn._from_ptr = (struct __pyx_obj_14psycopg_binary_2pq_PGcancelConn *(*)(PGcancelConn *))__pyx_f_14psycopg_binary_2pq_12PGcancelConn__from_ptr; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_PGcancelConn_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn)) __PYX_ERR(4, 8, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_PGcancelConn_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn) < (0)) __PYX_ERR(4, 8, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn = &__pyx_type_14psycopg_binary_2pq_PGcancelConn; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn) < (0)) __PYX_ERR(4, 8, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_vtabptr_14psycopg_binary_2pq_PGcancelConn) < (0)) __PYX_ERR(4, 8, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn) < (0)) __PYX_ERR(4, 8, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PGcancelConn, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn) < (0)) __PYX_ERR(4, 8, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn) < (0)) __PYX_ERR(4, 8, __pyx_L1_error) __pyx_vtabptr_14psycopg_binary_2pq_PGcancel = &__pyx_vtable_14psycopg_binary_2pq_PGcancel; __pyx_vtable_14psycopg_binary_2pq_PGcancel._from_ptr = (struct __pyx_obj_14psycopg_binary_2pq_PGcancel *(*)(PGcancel *))__pyx_f_14psycopg_binary_2pq_8PGcancel__from_ptr; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_PGcancel_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel)) __PYX_ERR(4, 79, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_PGcancel_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel) < (0)) __PYX_ERR(4, 79, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel = &__pyx_type_14psycopg_binary_2pq_PGcancel; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel) < (0)) __PYX_ERR(4, 79, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel, __pyx_vtabptr_14psycopg_binary_2pq_PGcancel) < (0)) __PYX_ERR(4, 79, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel) < (0)) __PYX_ERR(4, 79, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PGcancel, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel) < (0)) __PYX_ERR(4, 79, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PGcancel) < (0)) __PYX_ERR(4, 79, __pyx_L1_error) __pyx_vtabptr_14psycopg_binary_2pq_Escaping = &__pyx_vtable_14psycopg_binary_2pq_Escaping; __pyx_vtable_14psycopg_binary_2pq_Escaping.escape_literal = (PyObject *(*)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_8Escaping_escape_literal; __pyx_vtable_14psycopg_binary_2pq_Escaping.escape_identifier = (PyObject *(*)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_8Escaping_escape_identifier; __pyx_vtable_14psycopg_binary_2pq_Escaping.escape_string = (PyObject *(*)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_8Escaping_escape_string; __pyx_vtable_14psycopg_binary_2pq_Escaping.escape_bytea = (PyObject *(*)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, PyObject *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_8Escaping_escape_bytea; __pyx_vtable_14psycopg_binary_2pq_Escaping.unescape_bytea = (PyObject *(*)(struct __pyx_obj_14psycopg_binary_2pq_Escaping *, unsigned char const *, int __pyx_skip_dispatch))__pyx_f_14psycopg_binary_2pq_8Escaping_unescape_bytea; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_Escaping_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping)) __PYX_ERR(6, 11, __pyx_L1_error) if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_Escaping_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping) < (0)) __PYX_ERR(6, 11, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping = &__pyx_type_14psycopg_binary_2pq_Escaping; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping) < (0)) __PYX_ERR(6, 11, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_vtabptr_14psycopg_binary_2pq_Escaping) < (0)) __PYX_ERR(6, 11, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping) < (0)) __PYX_ERR(6, 11, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_Escaping, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping) < (0)) __PYX_ERR(6, 11, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_Escaping) < (0)) __PYX_ERR(6, 11, __pyx_L1_error) __pyx_vtabptr_14psycopg_binary_2pq_PQBuffer = &__pyx_vtable_14psycopg_binary_2pq_PQBuffer; __pyx_vtable_14psycopg_binary_2pq_PQBuffer._from_buffer = (struct __pyx_obj_14psycopg_binary_2pq_PQBuffer *(*)(unsigned char *, Py_ssize_t))__pyx_f_14psycopg_binary_2pq_8PQBuffer__from_buffer; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_PQBuffer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer)) __PYX_ERR(7, 13, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer->tp_as_buffer = &__pyx_tp_as_buffer_PQBuffer; #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ #elif defined(_MSC_VER) #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") #else #warning "The buffer protocol is not supported in the Limited C-API < 3.11." #endif if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_PQBuffer_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer) < (0)) __PYX_ERR(7, 13, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer = &__pyx_type_14psycopg_binary_2pq_PQBuffer; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer) < (0)) __PYX_ERR(7, 13, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer, __pyx_vtabptr_14psycopg_binary_2pq_PQBuffer) < (0)) __PYX_ERR(7, 13, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer) < (0)) __PYX_ERR(7, 13, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_PQBuffer, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer) < (0)) __PYX_ERR(7, 13, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_PQBuffer) < (0)) __PYX_ERR(7, 13, __pyx_L1_error) __pyx_vtabptr_14psycopg_binary_2pq_ViewBuffer = &__pyx_vtable_14psycopg_binary_2pq_ViewBuffer; __pyx_vtable_14psycopg_binary_2pq_ViewBuffer._from_buffer = (struct __pyx_obj_14psycopg_binary_2pq_ViewBuffer *(*)(PyObject *, unsigned char *, Py_ssize_t))__pyx_f_14psycopg_binary_2pq_10ViewBuffer__from_buffer; #if CYTHON_USE_TYPE_SPECS __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_14psycopg_binary_2pq_ViewBuffer_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer)) __PYX_ERR(7, 56, __pyx_L1_error) #if !CYTHON_COMPILING_IN_LIMITED_API __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer->tp_as_buffer = &__pyx_tp_as_buffer_ViewBuffer; #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer) /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */ #elif defined(_MSC_VER) #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.") #else #warning "The buffer protocol is not supported in the Limited C-API < 3.11." #endif if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_14psycopg_binary_2pq_ViewBuffer_spec, __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer) < (0)) __PYX_ERR(7, 56, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer = &__pyx_type_14psycopg_binary_2pq_ViewBuffer; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer) < (0)) __PYX_ERR(7, 56, __pyx_L1_error) #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount((PyObject*)__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer); #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer->tp_dictoffset && __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer->tp_getattro == PyObject_GenericGetAttr)) { __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer->tp_getattro = PyObject_GenericGetAttr; } #endif if (__Pyx_SetVtable(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer, __pyx_vtabptr_14psycopg_binary_2pq_ViewBuffer) < (0)) __PYX_ERR(7, 56, __pyx_L1_error) if (__Pyx_MergeVtables(__pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer) < (0)) __PYX_ERR(7, 56, __pyx_L1_error) if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_ViewBuffer, (PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer) < (0)) __PYX_ERR(7, 56, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_14psycopg_binary_2pq_ViewBuffer) < (0)) __PYX_ERR(7, 56, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_2_2(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_2(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API 0, 0, #else sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_2_2(PyHeapTypeObject), #endif __Pyx_ImportType_CheckSize_Warn_3_2_2); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(8, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); /*--- Variable import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); /*--- Function import code ---*/ __Pyx_RefNannyFinishContext(); return 0; } #if CYTHON_PEP489_MULTI_PHASE_INIT static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ static int __pyx_pymod_exec_pq(PyObject* module); /*proto*/ static PyModuleDef_Slot __pyx_moduledef_slots[] = { {Py_mod_create, (void*)__pyx_pymod_create}, {Py_mod_exec, (void*)__pyx_pymod_exec_pq}, #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING {Py_mod_gil, Py_MOD_GIL_NOT_USED}, #endif #if PY_VERSION_HEX >= 0x030C0000 && CYTHON_USE_MODULE_STATE {Py_mod_multiple_interpreters, Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED}, #endif {0, NULL} }; #endif #ifdef __cplusplus namespace { struct PyModuleDef __pyx_moduledef = #else static struct PyModuleDef __pyx_moduledef = #endif { PyModuleDef_HEAD_INIT, "pq", __pyx_k_libpq_Python_wrapper_using_cyth, /* m_doc */ #if CYTHON_USE_MODULE_STATE sizeof(__pyx_mstatetype), /* m_size */ #else (CYTHON_PEP489_MULTI_PHASE_INIT) ? 0 : -1, /* m_size */ #endif __pyx_methods /* m_methods */, #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_moduledef_slots, /* m_slots */ #else NULL, /* m_reload */ #endif #if CYTHON_USE_MODULE_STATE __pyx_m_traverse, /* m_traverse */ __pyx_m_clear, /* m_clear */ NULL /* m_free */ #else NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ #endif }; #ifdef __cplusplus } /* anonymous namespace */ #endif /* PyModInitFuncType */ #ifndef CYTHON_NO_PYINIT_EXPORT #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #else #ifdef __cplusplus #define __Pyx_PyMODINIT_FUNC extern "C" PyObject * #else #define __Pyx_PyMODINIT_FUNC PyObject * #endif #endif __Pyx_PyMODINIT_FUNC PyInit_pq(void) CYTHON_SMALL_CODE; /*proto*/ __Pyx_PyMODINIT_FUNC PyInit_pq(void) #if CYTHON_PEP489_MULTI_PHASE_INIT { return PyModuleDef_Init(&__pyx_moduledef); } /* ModuleCreationPEP489 */ #if CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { { PyObject *module = PyImport_ImportModule("_interpreters"); // 3.13+ I think if (!module) { PyErr_Clear(); // just try the 3.8-3.12 version module = PyImport_ImportModule("_xxsubinterpreters"); if (!module) goto bad; } PyObject *current = PyObject_CallMethod(module, "get_current", NULL); Py_DECREF(module); if (!current) goto bad; if (PyTuple_Check(current)) { PyObject *new_current = PySequence_GetItem(current, 0); Py_DECREF(current); current = new_current; if (!new_current) goto bad; } long long as_c_int = PyLong_AsLongLong(current); Py_DECREF(current); return as_c_int; } bad: PySys_WriteStderr("__Pyx_GetCurrentInterpreterId failed. Try setting the C define CYTHON_PEP489_MULTI_PHASE_INIT=0\n"); return -1; } #endif #if !CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { static PY_INT64_T main_interpreter_id = -1; #if CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 PY_INT64_T current_id = GraalPyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); #elif CYTHON_COMPILING_IN_GRAAL PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); #elif CYTHON_COMPILING_IN_LIMITED_API && (__PYX_LIMITED_VERSION_HEX < 0x03090000\ || ((defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)) && __PYX_LIMITED_VERSION_HEX < 0x030A0000)) PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); #elif CYTHON_COMPILING_IN_LIMITED_API PY_INT64_T current_id = PyInterpreterState_GetID(PyInterpreterState_Get()); #else PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); #endif if (unlikely(current_id == -1)) { return -1; } if (main_interpreter_id == -1) { main_interpreter_id = current_id; return 0; } else if (unlikely(main_interpreter_id != current_id)) { PyErr_SetString( PyExc_ImportError, "Interpreter change detected - this module can only be loaded into one interpreter per process."); return -1; } return 0; } #endif static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { if (allow_none || value != Py_None) { result = PyDict_SetItemString(moddict, to_name, value); } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); } else { result = -1; } return result; } static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; CYTHON_UNUSED_VAR(def); #if !CYTHON_USE_MODULE_STATE if (__Pyx_check_single_interpreter()) return NULL; #endif if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); if (unlikely(!modname)) goto bad; module = PyModule_NewObject(modname); Py_DECREF(modname); if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); return NULL; } static CYTHON_SMALL_CODE int __pyx_pymod_exec_pq(PyObject *__pyx_pyinit_module) #endif { int stringtab_initialized = 0; #if CYTHON_USE_MODULE_STATE int pystate_addmodule_run = 0; #endif __pyx_mstatetype *__pyx_mstate = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; size_t __pyx_t_7; int __pyx_t_8; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT if (__pyx_m) { if (__pyx_m == __pyx_pyinit_module) return 0; PyErr_SetString(PyExc_RuntimeError, "Module 'pq' has already been imported. Re-initialisation is not supported."); return -1; } #else if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif /*--- Module creation code ---*/ #if CYTHON_PEP489_MULTI_PHASE_INIT __pyx_t_1 = __pyx_pyinit_module; Py_INCREF(__pyx_t_1); #else __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) #endif #if CYTHON_USE_MODULE_STATE { int add_module_result = __Pyx_State_AddModule(__pyx_t_1, &__pyx_moduledef); __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "pq" pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } #else __pyx_m = __pyx_t_1; #endif #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_NOT_USED); #endif __pyx_mstate = __pyx_mstate_global; CYTHON_UNUSED_VAR(__pyx_t_1); __pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) Py_INCREF(__pyx_mstate->__pyx_d); __pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) /* ImportRefnannyAPI */ #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyInit_pq", 0); __Pyx_init_runtime_version(); if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Library function declarations ---*/ /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) stringtab_initialized = 1; if (__Pyx_InitGlobals() < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (__pyx_module_is_main_psycopg_binary__pq) { if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name_2, __pyx_mstate_global->__pyx_n_u_main) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) } { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) if (!PyDict_GetItemString(modules, "psycopg_binary.pq")) { if (unlikely((PyDict_SetItemString(modules, "psycopg_binary.pq", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) } } /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) if (__Pyx_CreateCodeObjects(__pyx_mstate) < (0)) __PYX_ERR(0, 1, __pyx_L1_error) /*--- Global type/function init code ---*/ (void)__Pyx_modinit_global_init_code(__pyx_mstate); (void)__Pyx_modinit_variable_export_code(__pyx_mstate); if (unlikely((__Pyx_modinit_function_export_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) if (unlikely((__Pyx_modinit_type_init_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) if (unlikely((__Pyx_modinit_type_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) (void)__Pyx_modinit_variable_import_code(__pyx_mstate); (void)__Pyx_modinit_function_import_code(__pyx_mstate); /*--- Execution code ---*/ /* "psycopg_binary/pq.pyx":9 * from psycopg_binary.pq cimport libpq * * import logging # <<<<<<<<<<<<<< * * from psycopg import errors as e */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_logging, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logging, __pyx_t_2) < (0)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":11 * import logging * * from psycopg import errors as e # <<<<<<<<<<<<<< * * logger = logging.getLogger("psycopg") */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_errors}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); switch (__pyx_t_3) { case 0: if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_e, __pyx_t_4) < (0)) __PYX_ERR(0, 11, __pyx_L1_error) break; default:; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":13 * from psycopg import errors as e * * logger = logging.getLogger("psycopg") # <<<<<<<<<<<<<< * * __impl__ = "binary" */ __pyx_t_4 = NULL; __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_logging); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_getLogger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = 1; { PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_mstate_global->__pyx_n_u_psycopg}; __pyx_t_2 = __Pyx_PyObject_FastCall((PyObject*)__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_logger, __pyx_t_2) < (0)) __PYX_ERR(0, 13, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":15 * logger = logging.getLogger("psycopg") * * __impl__ = "binary" # <<<<<<<<<<<<<< * __build_version__ = libpq.PG_VERSION_NUM * */ if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_impl, __pyx_mstate_global->__pyx_n_u_binary) < (0)) __PYX_ERR(0, 15, __pyx_L1_error) /* "psycopg_binary/pq.pyx":16 * * __impl__ = "binary" * __build_version__ = libpq.PG_VERSION_NUM # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_PyLong_From_int(PG_VERSION_NUM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_build_version, __pyx_t_2) < (0)) __PYX_ERR(0, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":19 * * * def version(): # <<<<<<<<<<<<<< * return libpq.PQlibVersion() * */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_1version, 0, __pyx_mstate_global->__pyx_n_u_version, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_version, __pyx_t_2) < (0)) __PYX_ERR(0, 19, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":28 * from cpython.memoryview cimport PyMemoryView_FromObject * * import sys # <<<<<<<<<<<<<< * * from psycopg.pq import Format as PqFormat */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_sys, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_sys, __pyx_t_2) < (0)) __PYX_ERR(1, 28, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":30 * import sys * * from psycopg.pq import Format as PqFormat # <<<<<<<<<<<<<< * from psycopg.pq import Trace, version_pretty * from psycopg.pq.misc import PGnotify, _clean_error_message, connection_summary */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Format}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 30, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Format}; __pyx_t_3 = 0; { __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 30, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); switch (__pyx_t_3) { case 0: if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_PqFormat, __pyx_t_6) < (0)) __PYX_ERR(1, 30, __pyx_L1_error) break; default:; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":31 * * from psycopg.pq import Format as PqFormat * from psycopg.pq import Trace, version_pretty # <<<<<<<<<<<<<< * from psycopg.pq.misc import PGnotify, _clean_error_message, connection_summary * from psycopg.pq._enums import ExecStatus */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Trace,__pyx_mstate_global->__pyx_n_u_version_pretty}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq, __pyx_imported_names, 2, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_Trace,__pyx_mstate_global->__pyx_n_u_version_pretty}; for (__pyx_t_3=0; __pyx_t_3 < 2; __pyx_t_3++) { __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 31, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(1, 31, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":32 * from psycopg.pq import Format as PqFormat * from psycopg.pq import Trace, version_pretty * from psycopg.pq.misc import PGnotify, _clean_error_message, connection_summary # <<<<<<<<<<<<<< * from psycopg.pq._enums import ExecStatus * from psycopg._encodings import pg2pyenc */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PGnotify,__pyx_mstate_global->__pyx_n_u_clean_error_message,__pyx_mstate_global->__pyx_n_u_connection_summary}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq_misc, __pyx_imported_names, 3, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PGnotify,__pyx_mstate_global->__pyx_n_u_clean_error_message,__pyx_mstate_global->__pyx_n_u_connection_summary}; for (__pyx_t_3=0; __pyx_t_3 < 3; __pyx_t_3++) { __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(1, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":33 * from psycopg.pq import Trace, version_pretty * from psycopg.pq.misc import PGnotify, _clean_error_message, connection_summary * from psycopg.pq._enums import ExecStatus # <<<<<<<<<<<<<< * from psycopg._encodings import pg2pyenc * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecStatus}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq__enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecStatus}; __pyx_t_3 = 0; { __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(1, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":34 * from psycopg.pq.misc import PGnotify, _clean_error_message, connection_summary * from psycopg.pq._enums import ExecStatus * from psycopg._encodings import pg2pyenc # <<<<<<<<<<<<<< * * from psycopg_binary.pq cimport PQBuffer */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_pg2pyenc}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg__encodings, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 34, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_pg2pyenc}; __pyx_t_3 = 0; { __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_6) < (0)) __PYX_ERR(1, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":72 * return f"<{cls} {info} at 0x{id(self):x}>" * * @classmethod # <<<<<<<<<<<<<< * def connect(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectdb(conninfo) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGconn) < (0)) __PYX_ERR(1, 72, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_7connect, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_connect, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect, __pyx_t_6) < (0)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect, __pyx_t_2) < (0)) __PYX_ERR(1, 72, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":80 * return PGconn._from_ptr(pgconn) * * @classmethod # <<<<<<<<<<<<<< * def connect_start(cls, const char *conninfo) -> PGconn: * cdef libpq.PGconn* pgconn = libpq.PQconnectStart(conninfo) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGconn) < (0)) __PYX_ERR(1, 80, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_9connect_start, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_connect_start, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect_start, __pyx_t_6) < (0)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GetNameInClass(__pyx_t_6, (PyObject*)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect_start, __pyx_t_2) < (0)) __PYX_ERR(1, 80, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":88 * return PGconn._from_ptr(pgconn) * * def connect_poll(self) -> int: # <<<<<<<<<<<<<< * return _call_int(self, libpq.PQconnectPoll) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 88, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_11connect_poll, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_connect_poll, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_connect_poll, __pyx_t_6) < (0)) __PYX_ERR(1, 88, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":91 * return _call_int(self, libpq.PQconnectPoll) * * def finish(self) -> None: # <<<<<<<<<<<<<< * if self._pgconn_ptr is not NULL: * libpq.PQfinish(self._pgconn_ptr) */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 91, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_13finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_finish, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_2) < (0)) __PYX_ERR(1, 91, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":113 * return rv * * def reset(self) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * libpq.PQreset(self._pgconn_ptr) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 113, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_15reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_reset, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_6) < (0)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":117 * libpq.PQreset(self._pgconn_ptr) * * def reset_start(self) -> None: # <<<<<<<<<<<<<< * if not libpq.PQresetStart(self._pgconn_ptr): * raise e.OperationalError("couldn't reset connection") */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 117, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_17reset_start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_reset_start, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_reset_start, __pyx_t_2) < (0)) __PYX_ERR(1, 117, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":121 * raise e.OperationalError("couldn't reset connection") * * def reset_poll(self) -> int: # <<<<<<<<<<<<<< * return _call_int(self, libpq.PQresetPoll) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 121, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_19reset_poll, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_reset_poll, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_reset_poll, __pyx_t_6) < (0)) __PYX_ERR(1, 121, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":124 * return _call_int(self, libpq.PQresetPoll) * * @classmethod # <<<<<<<<<<<<<< * def ping(self, const char *conninfo) -> int: * return libpq.PQping(conninfo) */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 124, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_21ping, __Pyx_CYFUNCTION_CLASSMETHOD | __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_ping, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_ping, __pyx_t_2) < (0)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GetNameInClass(__pyx_t_2, (PyObject*)__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_ping); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_ping, __pyx_t_6) < (0)) __PYX_ERR(1, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":172 * return libpq.PQtransactionStatus(self._pgconn_ptr) * * def parameter_status(self, const char *name) -> bytes | None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef const char *rv = libpq.PQparameterStatus(self._pgconn_ptr, name) */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_bytes_None) < (0)) __PYX_ERR(1, 172, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_23parameter_status, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_parameter_status, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_parameter_status, __pyx_t_2) < (0)) __PYX_ERR(1, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":184 * return libpq.PQerrorMessage(self._pgconn_ptr) * * def get_error_message(self, encoding: str = "") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding or self._encoding) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_encoding, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(1, 184, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(1, 184, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_25get_error_message, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_get_error_message, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_mstate_global->__pyx_tuple[2]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_t_6) < (0)) __PYX_ERR(1, 184, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":240 * return bool(_call_int(self, libpq.PQsslInUse)) * * def exec_(self, const char *command) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *pgresult */ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 240, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_27exec_, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_exec, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_exec, __pyx_t_2) < (0)) __PYX_ERR(1, 240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":251 * return PGresult._from_ptr(pgresult) * * def send_query(self, const char *command) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 251, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_29send_query, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_query, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_query, __pyx_t_6) < (0)) __PYX_ERR(1, 251, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":266 * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> PGresult: * _ensure_pgconn(self) */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_mstate_global->__pyx_k__6 = __pyx_t_8; /* "psycopg_binary/pq/pgconn.pyx":265 * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> PGresult: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "psycopg_binary/pq/pgconn.pyx":266 * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> PGresult: * _ensure_pgconn(self) */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyLong_From_int(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "psycopg_binary/pq/pgconn.pyx":260 * f"sending query failed: {self.get_error_message()}") * * def exec_params( # <<<<<<<<<<<<<< * self, * const char *command, */ __pyx_t_2 = PyTuple_Pack(3, Py_None, Py_None, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_param_values, __pyx_mstate_global->__pyx_kp_u_Sequence_bytes_None_None) < (0)) __PYX_ERR(1, 260, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_param_types, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 260, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_param_formats, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 260, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 260, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_31exec_params, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_exec_params, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_2); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_exec_params, __pyx_t_4) < (0)) __PYX_ERR(1, 260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":295 * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> None: * _ensure_pgconn(self) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_mstate_global->__pyx_k__7 = __pyx_t_8; /* "psycopg_binary/pq/pgconn.pyx":294 * param_values: Sequence[bytes | None] | None, * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> None: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "psycopg_binary/pq/pgconn.pyx":295 * param_types: Sequence[int] | None = None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> None: * _ensure_pgconn(self) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "psycopg_binary/pq/pgconn.pyx":289 * return PGresult._from_ptr(pgresult) * * def send_query_params( # <<<<<<<<<<<<<< * self, * const char *command, */ __pyx_t_6 = PyTuple_Pack(3, Py_None, Py_None, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_values, __pyx_mstate_global->__pyx_kp_u_Sequence_bytes_None_None) < (0)) __PYX_ERR(1, 289, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_types, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 289, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_formats, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 289, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 289, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_33send_query_params, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_query_params, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_query_params, __pyx_t_2) < (0)) __PYX_ERR(1, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":318 * ) * * def send_prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_param_types, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 318, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 318, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_35send_prepare, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_prepare, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_prepare, __pyx_t_4) < (0)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":355 * param_values: Sequence[bytes | None] | None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> None: * _ensure_pgconn(self) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_mstate_global->__pyx_k__8 = __pyx_t_8; /* "psycopg_binary/pq/pgconn.pyx":354 * const char *name, * param_values: Sequence[bytes | None] | None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> None: */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "psycopg_binary/pq/pgconn.pyx":355 * param_values: Sequence[bytes | None] | None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> None: * _ensure_pgconn(self) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "psycopg_binary/pq/pgconn.pyx":350 * ) * * def send_query_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ __pyx_t_2 = PyTuple_Pack(2, Py_None, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_values, __pyx_mstate_global->__pyx_kp_u_Sequence_bytes_None_None) < (0)) __PYX_ERR(1, 350, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_formats, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 350, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 350, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_37send_query_prepared, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_query_prepared, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_t_2); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_query_prepared, __pyx_t_6) < (0)) __PYX_ERR(1, 350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "psycopg_binary/pq/pgconn.pyx":378 * ) * * def prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_param_types, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 378, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 378, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_39prepare, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_prepare, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_prepare, __pyx_t_4) < (0)) __PYX_ERR(1, 378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":414 * param_values: Sequence[bytes] | None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> PGresult: * _ensure_pgconn(self) */ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_mstate_global->__pyx_k__9 = __pyx_t_8; /* "psycopg_binary/pq/pgconn.pyx":413 * const char *name, * param_values: Sequence[bytes] | None, * param_formats: Sequence[int] | None = None, # <<<<<<<<<<<<<< * int result_format = PqFormat.TEXT, * ) -> PGresult: */ __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_PqFormat); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); /* "psycopg_binary/pq/pgconn.pyx":414 * param_values: Sequence[bytes] | None, * param_formats: Sequence[int] | None = None, * int result_format = PqFormat.TEXT, # <<<<<<<<<<<<<< * ) -> PGresult: * _ensure_pgconn(self) */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_TEXT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = __Pyx_PyLong_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); /* "psycopg_binary/pq/pgconn.pyx":409 * return PGresult._from_ptr(rv) * * def exec_prepared( # <<<<<<<<<<<<<< * self, * const char *name, */ __pyx_t_6 = PyTuple_Pack(2, Py_None, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_values, __pyx_mstate_global->__pyx_kp_u_Sequence_bytes_None) < (0)) __PYX_ERR(1, 409, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_param_formats, __pyx_mstate_global->__pyx_kp_u_Sequence_int_None) < (0)) __PYX_ERR(1, 409, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 409, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_41exec_prepared, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_exec_prepared, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_t_6); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_exec_prepared, __pyx_t_2) < (0)) __PYX_ERR(1, 409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":440 * return PGresult._from_ptr(rv) * * def describe_prepared(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePrepared(self._pgconn_ptr, name) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 440, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_43describe_prepared, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_describe_prepared, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_describe_prepared, __pyx_t_4) < (0)) __PYX_ERR(1, 440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":449 * return PGresult._from_ptr(rv) * * def send_describe_prepared(self, const char *name) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePrepared(self._pgconn_ptr, name) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 449, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_45send_describe_prepared, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_describe_prepared, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_describe_prepared, __pyx_t_2) < (0)) __PYX_ERR(1, 449, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":457 * ) * * def describe_portal(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef libpq.PGresult *rv = libpq.PQdescribePortal(self._pgconn_ptr, name) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 457, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_47describe_portal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_describe_portal, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_describe_portal, __pyx_t_4) < (0)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":466 * return PGresult._from_ptr(rv) * * def send_describe_portal(self, const char *name) -> None: # <<<<<<<<<<<<<< * _ensure_pgconn(self) * cdef int rv = libpq.PQsendDescribePortal(self._pgconn_ptr, name) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 466, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_49send_describe_portal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_describe_portal, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_describe_portal, __pyx_t_2) < (0)) __PYX_ERR(1, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":474 * ) * * def close_prepared(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _check_supported("PQclosePrepared", 170000) * _ensure_pgconn(self) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 474, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_51close_prepared, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_close_prepared, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_close_prepared, __pyx_t_4) < (0)) __PYX_ERR(1, 474, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":484 * return PGresult._from_ptr(rv) * * def send_close_prepared(self, const char *name) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsendClosePrepared", 170000) * _ensure_pgconn(self) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 484, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_53send_close_prepared, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_close_prepared, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_close_prepared, __pyx_t_2) < (0)) __PYX_ERR(1, 484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":493 * ) * * def close_portal(self, const char *name) -> PGresult: # <<<<<<<<<<<<<< * _check_supported("PQclosePortal", 170000) * _ensure_pgconn(self) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 493, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_55close_portal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_close_portal, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_close_portal, __pyx_t_4) < (0)) __PYX_ERR(1, 493, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":503 * return PGresult._from_ptr(rv) * * def send_close_portal(self, const char *name) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsendClosePortal", 170000) * _ensure_pgconn(self) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 503, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_57send_close_portal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_close_portal, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_close_portal, __pyx_t_2) < (0)) __PYX_ERR(1, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":512 * ) * * def get_result(self) -> "PGresult" | None: # <<<<<<<<<<<<<< * cdef libpq.PGresult *pgresult = libpq.PQgetResult(self._pgconn_ptr) * if pgresult is NULL: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_PGresult_None) < (0)) __PYX_ERR(1, 512, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_59get_result, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_get_result, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_get_result, __pyx_t_4) < (0)) __PYX_ERR(1, 512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":518 * return PGresult._from_ptr(pgresult) * * def consume_input(self) -> None: # <<<<<<<<<<<<<< * if 1 != libpq.PQconsumeInput(self._pgconn_ptr): * raise e.OperationalError( */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 518, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_61consume_input, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_consume_input, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_consume_input, __pyx_t_2) < (0)) __PYX_ERR(1, 518, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":523 * f"consuming input failed: {self.get_error_message()}") * * def is_busy(self) -> int: # <<<<<<<<<<<<<< * cdef int rv * with nogil: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 523, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_63is_busy, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_is_busy, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_is_busy, __pyx_t_4) < (0)) __PYX_ERR(1, 523, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":539 * f"setting nonblocking failed: {self.get_error_message()}") * * cpdef int flush(self) except -1: # <<<<<<<<<<<<<< * if self._pgconn_ptr == NULL: * raise e.OperationalError("flushing failed: the connection is closed") */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_65flush, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_flush, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_flush, __pyx_t_4) < (0)) __PYX_ERR(1, 539, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":547 * return rv * * def set_single_row_mode(self) -> None: # <<<<<<<<<<<<<< * if not libpq.PQsetSingleRowMode(self._pgconn_ptr): * raise e.OperationalError("setting single row mode failed") */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 547, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_67set_single_row_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_set_single_row_mode, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_set_single_row_mode, __pyx_t_2) < (0)) __PYX_ERR(1, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":551 * raise e.OperationalError("setting single row mode failed") * * def set_chunked_rows_mode(self, size: int) -> None: # <<<<<<<<<<<<<< * if not libpq.PQsetChunkedRowsMode(self._pgconn_ptr, size): * raise e.OperationalError("setting chunked rows mode failed") */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_size, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 551, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 551, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_69set_chunked_rows_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_set_chunked_rows_mode, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_set_chunked_rows_mode, __pyx_t_4) < (0)) __PYX_ERR(1, 551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":555 * raise e.OperationalError("setting chunked rows mode failed") * * def cancel_conn(self) -> PGcancelConn: # <<<<<<<<<<<<<< * _check_supported("PQcancelCreate", 170000) * cdef libpq.PGcancelConn *ptr = libpq.PQcancelCreate(self._pgconn_ptr) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGcancelConn) < (0)) __PYX_ERR(1, 555, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_71cancel_conn, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_cancel_conn, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_cancel_conn, __pyx_t_2) < (0)) __PYX_ERR(1, 555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":562 * return PGcancelConn._from_ptr(ptr) * * def get_cancel(self) -> PGcancel: # <<<<<<<<<<<<<< * cdef libpq.PGcancel *ptr = libpq.PQgetCancel(self._pgconn_ptr) * if not ptr: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGcancel) < (0)) __PYX_ERR(1, 562, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_73get_cancel, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_get_cancel, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_get_cancel, __pyx_t_4) < (0)) __PYX_ERR(1, 562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":568 * return PGcancel._from_ptr(ptr) * * cpdef object notifies(self): # <<<<<<<<<<<<<< * cdef libpq.PGnotify *ptr * with nogil: */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_75notifies, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_notifies, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_notifies, __pyx_t_4) < (0)) __PYX_ERR(1, 568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":579 * return None * * def put_copy_data(self, buffer) -> int: # <<<<<<<<<<<<<< * cdef int rv * cdef char *cbuffer */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 579, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_77put_copy_data, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_put_copy_data, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_put_copy_data, __pyx_t_2) < (0)) __PYX_ERR(1, 579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":591 * return rv * * def put_copy_end(self, error: bytes | None = None) -> int: # <<<<<<<<<<<<<< * cdef int rv * cdef const char *cerr = NULL */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_error, __pyx_mstate_global->__pyx_kp_u_bytes_None) < (0)) __PYX_ERR(1, 591, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 591, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_79put_copy_end, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_put_copy_end, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_put_copy_end, __pyx_t_4) < (0)) __PYX_ERR(1, 591, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":602 * return rv * * def get_copy_data(self, int async_) -> tuple[int, memoryview]: # <<<<<<<<<<<<<< * cdef char *buffer_ptr = NULL * cdef int nbytes */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_tuple_int_memoryview) < (0)) __PYX_ERR(1, 602, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_81get_copy_data, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_get_copy_data, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_get_copy_data, __pyx_t_2) < (0)) __PYX_ERR(1, 602, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":616 * return nbytes, b"" # won't parse it, doesn't really be memoryview * * def trace(self, fileno: int) -> None: # <<<<<<<<<<<<<< * if sys.platform != "linux": * raise e.NotSupportedError("currently only supported on Linux") */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_fileno, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(1, 616, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 616, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_83trace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_trace, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_trace, __pyx_t_4) < (0)) __PYX_ERR(1, 616, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":622 * libpq.PQtrace(self._pgconn_ptr, stream) * * def set_trace_flags(self, flags: Trace) -> None: # <<<<<<<<<<<<<< * _check_supported("PQsetTraceFlags", 140000) * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_flags, __pyx_mstate_global->__pyx_n_u_Trace) < (0)) __PYX_ERR(1, 622, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 622, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_85set_trace_flags, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_set_trace_flags, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_set_trace_flags, __pyx_t_2) < (0)) __PYX_ERR(1, 622, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":626 * libpq.PQsetTraceFlags(self._pgconn_ptr, flags) * * def untrace(self) -> None: # <<<<<<<<<<<<<< * libpq.PQuntrace(self._pgconn_ptr) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 626, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_87untrace, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_untrace, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_untrace, __pyx_t_4) < (0)) __PYX_ERR(1, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":629 * libpq.PQuntrace(self._pgconn_ptr) * * def encrypt_password( # <<<<<<<<<<<<<< * self, const char *passwd, const char *user, algorithm = None * ) -> bytes: */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_bytes_2) < (0)) __PYX_ERR(1, 629, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_89encrypt_password, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_encrypt_password, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[3]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_encrypt_password, __pyx_t_2) < (0)) __PYX_ERR(1, 629, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":648 * return rv * * def change_password( # <<<<<<<<<<<<<< * self, const char *user, const char *passwd * ) -> None: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 648, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_91change_password, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_change_password, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_change_password, __pyx_t_4) < (0)) __PYX_ERR(1, 648, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":660 * ) * * def make_empty_result(self, int exec_status) -> PGresult: # <<<<<<<<<<<<<< * cdef libpq.PGresult *rv = libpq.PQmakeEmptyPGresult( * self._pgconn_ptr, exec_status) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_PGresult) < (0)) __PYX_ERR(1, 660, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_93make_empty_result, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_make_empty_result, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_make_empty_result, __pyx_t_2) < (0)) __PYX_ERR(1, 660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":678 * return status * * def enter_pipeline_mode(self) -> None: # <<<<<<<<<<<<<< * """Enter pipeline mode. * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 678, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_95enter_pipeline_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_enter_pipeline_mode, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_enter_pipeline_mode, __pyx_t_4) < (0)) __PYX_ERR(1, 678, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":688 * raise e.OperationalError("failed to enter pipeline mode") * * def exit_pipeline_mode(self) -> None: # <<<<<<<<<<<<<< * """Exit pipeline mode. * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 688, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_97exit_pipeline_mode, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_exit_pipeline_mode, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_exit_pipeline_mode, __pyx_t_2) < (0)) __PYX_ERR(1, 688, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgconn.pyx":698 * raise e.OperationalError(self.get_error_message()) * * def pipeline_sync(self) -> None: # <<<<<<<<<<<<<< * """Mark a synchronization point in a pipeline. * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 698, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_99pipeline_sync, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_pipeline_sync, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_pipeline_sync, __pyx_t_4) < (0)) __PYX_ERR(1, 698, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgconn.pyx":711 * raise e.OperationalError("failed to sync pipeline") * * def send_flush_request(self) -> None: # <<<<<<<<<<<<<< * """Sends a request for the server to flush its output buffer. * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(1, 711, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_101send_flush_request, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn_send_flush_request, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGconn, __pyx_mstate_global->__pyx_n_u_send_flush_request, __pyx_t_2) < (0)) __PYX_ERR(1, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_103__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_6PGconn_105__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGconn___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[50])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":10 * from cpython.mem cimport PyMem_Free, PyMem_Malloc * * from psycopg.pq.misc import PGresAttDesc # <<<<<<<<<<<<<< * from psycopg.pq._enums import ExecStatus * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PGresAttDesc}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq_misc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 10, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_PGresAttDesc}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(3, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":11 * * from psycopg.pq.misc import PGresAttDesc * from psycopg.pq._enums import ExecStatus # <<<<<<<<<<<<<< * * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecStatus}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq__enums, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 11, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ExecStatus}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(3, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":33 * return f"<{cls} [{status.name}] at 0x{id(self):x}>" * * def clear(self) -> None: # <<<<<<<<<<<<<< * if self._pgresult_ptr is not NULL: * libpq.PQclear(self._pgresult_ptr) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(3, 33, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_7clear, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_clear, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[51])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_clear, __pyx_t_4) < (0)) __PYX_ERR(3, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":53 * return libpq.PQresultErrorMessage(self._pgresult_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_encoding, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(3, 53, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(3, 53, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_9get_error_message, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_get_error_message, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[52])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[4]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_t_2) < (0)) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":56 * return _clean_error_message(self.error_message, encoding) * * def error_field(self, int fieldcode) -> bytes | None: # <<<<<<<<<<<<<< * cdef char * rv = libpq.PQresultErrorField(self._pgresult_ptr, fieldcode) * if rv is not NULL: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_bytes_None) < (0)) __PYX_ERR(3, 56, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_11error_field, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_error_field, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[53])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_error_field, __pyx_t_4) < (0)) __PYX_ERR(3, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":71 * return libpq.PQnfields(self._pgresult_ptr) * * def fname(self, int column_number) -> bytes | None: # <<<<<<<<<<<<<< * cdef char *rv = libpq.PQfname(self._pgresult_ptr, column_number) * if rv is not NULL: */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_bytes_None) < (0)) __PYX_ERR(3, 71, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_13fname, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_fname, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[54])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_fname, __pyx_t_2) < (0)) __PYX_ERR(3, 71, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":78 * return None * * def ftable(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftable(self._pgresult_ptr, column_number) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 78, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_15ftable, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_ftable, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[55])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 78, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_ftable, __pyx_t_4) < (0)) __PYX_ERR(3, 78, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":81 * return libpq.PQftable(self._pgresult_ptr, column_number) * * def ftablecol(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftablecol(self._pgresult_ptr, column_number) * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 81, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_17ftablecol, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_ftablecol, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[56])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 81, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_ftablecol, __pyx_t_2) < (0)) __PYX_ERR(3, 81, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":84 * return libpq.PQftablecol(self._pgresult_ptr, column_number) * * def fformat(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfformat(self._pgresult_ptr, column_number) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 84, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_19fformat, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_fformat, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[57])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_fformat, __pyx_t_4) < (0)) __PYX_ERR(3, 84, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":87 * return libpq.PQfformat(self._pgresult_ptr, column_number) * * def ftype(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQftype(self._pgresult_ptr, column_number) * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 87, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_21ftype, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_ftype, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[58])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_ftype, __pyx_t_2) < (0)) __PYX_ERR(3, 87, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":90 * return libpq.PQftype(self._pgresult_ptr, column_number) * * def fmod(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfmod(self._pgresult_ptr, column_number) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 90, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_23fmod, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_fmod, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[59])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_fmod, __pyx_t_4) < (0)) __PYX_ERR(3, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":93 * return libpq.PQfmod(self._pgresult_ptr, column_number) * * def fsize(self, int column_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQfsize(self._pgresult_ptr, column_number) * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 93, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_25fsize, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_fsize, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[60])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_fsize, __pyx_t_2) < (0)) __PYX_ERR(3, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":100 * return libpq.PQbinaryTuples(self._pgresult_ptr) * * def get_value(self, int row_number, int column_number) -> bytes | None: # <<<<<<<<<<<<<< * cdef int crow = row_number * cdef int ccol = column_number */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_bytes_None) < (0)) __PYX_ERR(3, 100, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_27get_value, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_get_value, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[61])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_get_value, __pyx_t_4) < (0)) __PYX_ERR(3, 100, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgresult.pyx":119 * return libpq.PQnparams(self._pgresult_ptr) * * def param_type(self, int param_number) -> int: # <<<<<<<<<<<<<< * return libpq.PQparamtype(self._pgresult_ptr, param_number) * */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(3, 119, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_29param_type, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_param_type, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[62])); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 119, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_param_type, __pyx_t_2) < (0)) __PYX_ERR(3, 119, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgresult.pyx":142 * return libpq.PQoidValue(self._pgresult_ptr) * * def set_attributes(self, descriptions: list[PGresAttDesc]): # <<<<<<<<<<<<<< * cdef Py_ssize_t num = len(descriptions) * cdef libpq.PGresAttDesc *attrs = PyMem_Malloc( */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_descriptions, __pyx_mstate_global->__pyx_kp_u_list_PGresAttDesc) < (0)) __PYX_ERR(3, 142, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_31set_attributes, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult_set_attributes, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[63])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGresult, __pyx_mstate_global->__pyx_n_u_set_attributes, __pyx_t_4) < (0)) __PYX_ERR(3, 142, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_33__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[64])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGresult_35__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGresult___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[65])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_4) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":21 * self.finish() * * def start(self) -> None: # <<<<<<<<<<<<<< * """Requests that the server abandons processing of the current command * in a non-blocking manner. */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 21, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_5start, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn_start, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[66])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 21, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_start, __pyx_t_2) < (0)) __PYX_ERR(4, 21, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgcancel.pyx":32 * ) * * def blocking(self) -> None: # <<<<<<<<<<<<<< * """Requests that the server abandons processing of the current command * in a blocking manner. */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 32, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_7blocking, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn_blocking, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[67])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 32, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_blocking, __pyx_t_4) < (0)) __PYX_ERR(4, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":43 * ) * * def poll(self) -> int: # <<<<<<<<<<<<<< * self._ensure_pgcancelconn() * return libpq.PQcancelPoll(self.pgcancelconn_ptr) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_int) < (0)) __PYX_ERR(4, 43, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_9poll, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn_poll, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[68])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_poll, __pyx_t_2) < (0)) __PYX_ERR(4, 43, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgcancel.pyx":62 * return libpq.PQcancelErrorMessage(self.pgcancelconn_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_encoding, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(4, 62, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_str) < (0)) __PYX_ERR(4, 62, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_11get_error_message, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn_get_error_message, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[69])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_mstate_global->__pyx_tuple[4]); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_get_error_message, __pyx_t_4) < (0)) __PYX_ERR(4, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":65 * return _clean_error_message(self.error_message, encoding) * * def reset(self) -> None: # <<<<<<<<<<<<<< * self._ensure_pgcancelconn() * libpq.PQcancelReset(self.pgcancelconn_ptr) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 65, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_13reset, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn_reset, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[70])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_reset, __pyx_t_2) < (0)) __PYX_ERR(4, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgcancel.pyx":69 * libpq.PQcancelReset(self.pgcancelconn_ptr) * * def finish(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancelconn_ptr is not NULL: * libpq.PQcancelFinish(self.pgcancelconn_ptr) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 69, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_15finish, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn_finish, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[71])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_finish, __pyx_t_4) < (0)) __PYX_ERR(4, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":74 * self.pgcancelconn_ptr = NULL * * def _ensure_pgcancelconn(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancelconn_ptr is NULL: * raise e.OperationalError("the cancel connection is closed") */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 74, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_17_ensure_pgcancelconn, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn__ensure_pgcancelcon, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[72])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 74, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancelConn, __pyx_mstate_global->__pyx_n_u_ensure_pgcancelconn, __pyx_t_2) < (0)) __PYX_ERR(4, 74, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[73])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_12PGcancelConn_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancelConn___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[74])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/pgcancel.pyx":92 * self.free() * * def free(self) -> None: # <<<<<<<<<<<<<< * if self.pgcancel_ptr is not NULL: * libpq.PQfreeCancel(self.pgcancel_ptr) */ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 92, __pyx_L1_error) __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGcancel_5free, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancel_free, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[75])); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_4, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancel, __pyx_mstate_global->__pyx_n_u_free, __pyx_t_4) < (0)) __PYX_ERR(4, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/pgcancel.pyx":97 * self.pgcancel_ptr = NULL * * def cancel(self) -> None: # <<<<<<<<<<<<<< * cdef char buf[256] * cdef int res = libpq.PQcancel(self.pgcancel_ptr, buf, sizeof(buf)) */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_n_u_None) < (0)) __PYX_ERR(4, 97, __pyx_L1_error) __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGcancel_7cancel, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancel_cancel, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[76])); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_PGcancel, __pyx_mstate_global->__pyx_n_u_cancel, __pyx_t_2) < (0)) __PYX_ERR(4, 97, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGcancel_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancel___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[77])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PGcancel_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PGcancel___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[78])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/conninfo.pyx":7 * # Copyright (C) 2020 The Psycopg Team * * from psycopg.pq.misc import ConninfoOption # <<<<<<<<<<<<<< * * */ { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ConninfoOption}; __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_psycopg_pq_misc, __pyx_imported_names, 1, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 7, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); { PyObject* const __pyx_imported_names[] = {__pyx_mstate_global->__pyx_n_u_ConninfoOption}; __pyx_t_3 = 0; { __pyx_t_4 = __Pyx_ImportFrom(__pyx_t_2, __pyx_imported_names[__pyx_t_3]); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_imported_names[__pyx_t_3], __pyx_t_4) < (0)) __PYX_ERR(5, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/conninfo.pyx":10 * * * class Conninfo: # <<<<<<<<<<<<<< * @classmethod * def get_defaults(cls) -> list[ConninfoOption]: */ __pyx_t_2 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_n_u_Conninfo, __pyx_mstate_global->__pyx_n_u_Conninfo, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, (PyObject *) NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "psycopg_binary/pq/conninfo.pyx":11 * * class Conninfo: * @classmethod # <<<<<<<<<<<<<< * def get_defaults(cls) -> list[ConninfoOption]: * cdef libpq.PQconninfoOption *opts = libpq.PQconndefaults() */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_ConninfoOption) < (0)) __PYX_ERR(5, 11, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Conninfo_1get_defaults, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Conninfo_get_defaults, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[79])); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_get_defaults, __pyx_t_4) < (0)) __PYX_ERR(5, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/conninfo.pyx":20 * return rv * * @classmethod # <<<<<<<<<<<<<< * def parse(cls, const char *conninfo) -> list[ConninfoOption]: * cdef char *errmsg = NULL */ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_return, __pyx_mstate_global->__pyx_kp_u_list_ConninfoOption) < (0)) __PYX_ERR(5, 20, __pyx_L1_error) __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Conninfo_3parse, __Pyx_CYFUNCTION_CLASSMETHOD, __pyx_mstate_global->__pyx_n_u_Conninfo_parse, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[80])); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_6); #endif __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_Method_ClassMethod(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_parse, __pyx_t_4) < (0)) __PYX_ERR(5, 20, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/conninfo.pyx":36 * return rv * * def __repr__(self): # <<<<<<<<<<<<<< * return f"<{type(self).__name__} ({self.keyword.decode('ascii')})>" * */ __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Conninfo_5__repr__, 0, __pyx_mstate_global->__pyx_n_u_Conninfo___repr, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[81])); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_repr, __pyx_t_4) < (0)) __PYX_ERR(5, 36, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "psycopg_binary/pq/conninfo.pyx":10 * * * class Conninfo: # <<<<<<<<<<<<<< * @classmethod * def get_defaults(cls) -> list[ConninfoOption]: */ __pyx_t_4 = __Pyx_Py3ClassCreate(((PyObject*)&PyType_Type), __pyx_mstate_global->__pyx_n_u_Conninfo, __pyx_mstate_global->__pyx_empty_tuple, __pyx_t_2, NULL, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_4); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_Conninfo, __pyx_t_4) < (0)) __PYX_ERR(5, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/escaping.pyx":15 * self.conn = conn * * cpdef escape_literal(self, data): # <<<<<<<<<<<<<< * cdef char *out * cdef char *ptr */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_3escape_literal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping_escape_literal, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[82])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_escape_literal, __pyx_t_2) < (0)) __PYX_ERR(6, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/escaping.pyx":37 * return rv * * cpdef escape_identifier(self, data): # <<<<<<<<<<<<<< * cdef char *out * cdef char *ptr */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_5escape_identifier, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping_escape_identifier, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[83])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_escape_identifier, __pyx_t_2) < (0)) __PYX_ERR(6, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/escaping.pyx":59 * return rv * * cpdef escape_string(self, data): # <<<<<<<<<<<<<< * cdef int error * cdef size_t len_out */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_7escape_string, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping_escape_string, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[84])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_escape_string, __pyx_t_2) < (0)) __PYX_ERR(6, 59, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/escaping.pyx":90 * return rv * * cpdef escape_bytea(self, data): # <<<<<<<<<<<<<< * cdef size_t len_out * cdef unsigned char *out */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_9escape_bytea, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping_escape_bytea, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[85])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_escape_bytea, __pyx_t_2) < (0)) __PYX_ERR(6, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq/escaping.pyx":116 * return rv * * cpdef unescape_bytea(self, const unsigned char *data): # <<<<<<<<<<<<<< * # not needed, but let's keep it symmetric with the escaping: * # if a connection is passed in, it must be valid. */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_11unescape_bytea, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping_unescape_bytea, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[86])); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_unescape_bytea, __pyx_t_2) < (0)) __PYX_ERR(6, 116, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * cdef tuple state * cdef object _dict */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_13__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[87])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":16 * else: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * __pyx_unpickle_Escaping__set_state(self, __pyx_state) */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8Escaping_15__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Escaping___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[88])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_14psycopg_binary_2pq_Escaping, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 16, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PQBuffer_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PQBuffer___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[89])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_8PQBuffer_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_PQBuffer___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[90])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_10ViewBuffer_9__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ViewBuffer___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[91])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "(tree fragment)":3 * def __reduce_cython__(self): * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_10ViewBuffer_11__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ViewBuffer___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[92])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_2) < (0)) __PYX_ERR(2, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":32 * * # importing the ssl module sets up Python's libcrypto callbacks * import ssl # no-cython-lint # <<<<<<<<<<<<<< * * # disable libcrypto setup in libpq, so it won't stomp on the callbacks */ __pyx_t_1 = __Pyx_Import(__pyx_mstate_global->__pyx_n_u_ssl, 0, 0, NULL, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_ssl, __pyx_t_2) < (0)) __PYX_ERR(0, 32, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":36 * # disable libcrypto setup in libpq, so it won't stomp on the callbacks * # that have already been set up * libpq.PQinitOpenSSL(1, 0) # <<<<<<<<<<<<<< */ PQinitOpenSSL(1, 0); /* "(tree fragment)":4 * int __Pyx_CheckUnpickleChecksum(long, long, long, long, const char*) except -1 * int __Pyx_UpdateUnpickledDict(object, object, Py_ssize_t) except -1 * def __pyx_unpickle_Escaping(__pyx_type, long __pyx_checksum, tuple __pyx_state): # <<<<<<<<<<<<<< * cdef object __pyx_result * __Pyx_CheckUnpickleChecksum(__pyx_checksum, 0x0804127, 0x3908a35, 0x0c1d0e2, b'conn') */ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_14psycopg_binary_2pq_3__pyx_unpickle_Escaping, 0, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Escaping, NULL, __pyx_mstate_global->__pyx_n_u_psycopg_binary_pq, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[93])); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030E0000 PyUnstable_Object_EnableDeferredRefcount(__pyx_t_2); #endif if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_unpickle_Escaping, __pyx_t_2) < (0)) __PYX_ERR(2, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "psycopg_binary/pq.pyx":1 * """ # <<<<<<<<<<<<<< * libpq Python wrapper using cython bindings. * """ */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 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_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); if (__pyx_m) { if (__pyx_mstate->__pyx_d && stringtab_initialized) { __Pyx_AddTraceback("init psycopg_binary.pq", __pyx_clineno, __pyx_lineno, __pyx_filename); } #if !CYTHON_USE_MODULE_STATE Py_CLEAR(__pyx_m); #else Py_DECREF(__pyx_m); if (pystate_addmodule_run) { PyObject *tp, *value, *tb; PyErr_Fetch(&tp, &value, &tb); PyState_RemoveModule(&__pyx_moduledef); PyErr_Restore(tp, value, tb); } #endif } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init psycopg_binary.pq"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if CYTHON_PEP489_MULTI_PHASE_INIT return (__pyx_m != NULL) ? 0 : -1; #else return __pyx_m; #endif } /* #### Code section: pystring_table ### */ /* #### Code section: cached_builtins ### */ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_id); if (!__pyx_builtin_id) __PYX_ERR(1, 70, __pyx_L1_error) /* Cached unbound methods */ __pyx_mstate->__pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; __pyx_mstate->__pyx_umethod_PyDict_Type_items.method_name = &__pyx_mstate->__pyx_n_u_items; __pyx_mstate->__pyx_umethod_PyDict_Type_pop.type = (PyObject*)&PyDict_Type; __pyx_mstate->__pyx_umethod_PyDict_Type_pop.method_name = &__pyx_mstate->__pyx_n_u_pop; __pyx_mstate->__pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type; __pyx_mstate->__pyx_umethod_PyDict_Type_values.method_name = &__pyx_mstate->__pyx_n_u_values; return 0; __pyx_L1_error:; return -1; } /* #### Code section: cached_constants ### */ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_RefNannyDeclarations CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "psycopg_binary/pq/conninfo.pyx":37 * * def __repr__(self): * return f"<{type(self).__name__} ({self.keyword.decode('ascii')})>" # <<<<<<<<<<<<<< * * */ __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_n_u_ascii); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(5, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = ('self.conn is not None',) # <<<<<<<<<<<<<< * if use_setstate: * return __pyx_unpickle_Escaping, (type(self), 0x0804127, None), state */ __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_kp_u_self_conn_is_not_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(2, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); /* "psycopg_binary/pq/pgconn.pyx":184 * return libpq.PQerrorMessage(self._pgconn_ptr) * * def get_error_message(self, encoding: str = "") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding or self._encoding) * */ __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_kp_u__5); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(1, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); /* "psycopg_binary/pq/pgconn.pyx":318 * ) * * def send_prepare( # <<<<<<<<<<<<<< * self, * const char *name, */ __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); /* "psycopg_binary/pq/pgresult.pyx":53 * return libpq.PQresultErrorMessage(self._pgresult_ptr) * * def get_error_message(self, encoding: str = "utf-8") -> str: # <<<<<<<<<<<<<< * return _clean_error_message(self.error_message, encoding) * */ __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_kp_u_utf_8); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(3, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_tuple; for (Py_ssize_t i=0; i<5; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); #else Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } } #endif __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } /* #### Code section: init_constants ### */ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); { const struct { const unsigned int length: 8; } index[] = {{1},{179},{17},{19},{23},{22},{29},{20},{2},{2},{2},{1},{1},{1},{1},{1},{1},{0},{8},{6},{7},{18},{6},{12},{30},{28},{15},{23},{31},{24},{24},{37},{33},{32},{38},{40},{35},{33},{29},{25},{28},{33},{26},{7},{6},{28},{26},{48},{23},{45},{22},{33},{24},{29},{23},{22},{17},{41},{2},{4},{9},{20},{18},{50},{24},{14},{12},{18},{28},{24},{30},{30},{30},{28},{30},{21},{28},{32},{21},{31},{26},{25},{34},{31},{33},{22},{32},{28},{30},{14},{31},{24},{22},{22},{5},{10},{8},{14},{17},{21},{14},{8},{26},{28},{21},{26},{23},{22},{23},{10},{6},{4},{17},{16},{8},{12},{30},{32},{33},{21},{19},{30},{17},{18},{18},{26},{28},{15},{13},{6},{24},{26},{18},{22},{19},{21},{14},{19},{20},{20},{22},{24},{23},{26},{12},{18},{20},{25},{13},{12},{17},{20},{24},{17},{14},{24},{15},{23},{11},{20},{14},{20},{19},{12},{17},{18},{24},{26},{27},{29},{25},{19},{17},{24},{26},{28},{26},{22},{12},{14},{8},{12},{8},{26},{28},{14},{20},{16},{13},{14},{14},{15},{18},{14},{26},{18},{19},{23},{8},{26},{28},{14},{16},{13},{15},{22},{21},{19},{18},{21},{10},{14},{17},{19},{15},{8},{20},{4},{5},{10},{28},{30},{9},{5},{6},{18},{5},{9},{6},{6},{8},{3},{6},{10},{17},{5},{5},{6},{11},{7},{4},{4},{8},{15},{9},{20},{5},{8},{18},{12},{14},{3},{8},{13},{8},{7},{8},{4},{7},{12},{13},{18},{8},{13},{4},{6},{7},{4},{6},{5},{15},{17},{12},{8},{5},{8},{8},{7},{1},{8},{9},{16},{20},{19},{6},{6},{5},{11},{13},{6},{12},{17},{14},{13},{3},{9},{5},{11},{13},{11},{18},{7},{9},{6},{6},{5},{5},{4},{5},{6},{4},{5},{6},{9},{5},{8},{9},{10},{13},{12},{17},{10},{9},{12},{1},{2},{8},{3},{7},{13},{5},{7},{5},{6},{5},{6},{7},{8},{17},{13},{10},{4},{8},{6},{7},{8},{7},{3},{4},{3},{13},{12},{10},{11},{12},{16},{5},{6},{8},{6},{8},{4},{13},{8},{4},{3},{7},{11},{7},{18},{17},{10},{17},{15},{3},{13},{12},{12},{14},{12},{11},{10},{23},{14},{12},{10},{17},{13},{8},{3},{5},{10},{11},{13},{6},{10},{2},{4},{17},{19},{20},{22},{18},{12},{10},{17},{19},{14},{21},{12},{19},{15},{10},{12},{19},{4},{3},{5},{5},{6},{3},{6},{3},{7},{8},{5},{10},{5},{6},{14},{7},{6},{12},{4},{1},{3},{6},{7},{14},{1},{0},{66},{75},{19},{57},{189},{101},{76},{66},{48},{45},{75},{32},{34},{65},{66},{82},{65},{55},{43},{35},{39},{60},{24},{52},{39},{57},{145},{106},{163},{145},{190},{44},{105},{105},{146},{136},{184},{173},{14},{19},{70},{39},{39},{130},{140},{68},{50},{29},{19},{19},{19},{52},{52},{9},{45},{54},{9},{30},{31},{91},{38},{28},{87},{29},{33},{19},{24},{19},{55},{11},{24},{55},{22},{30},{70},{42},{33},{75},{42},{14},{21}}; #if (CYTHON_COMPRESS_STRINGS) == 2 /* compression: bz2 (4559 bytes) */ const char* const cstring = "BZh91AY&SY\360<\205\337\000\004\022\177\377\377\377\377\377\377\377\377\377\377\377\377\377\277\377\377\377\300@@@@@@@@@@@@\000@\000`\023}\33745\345\275\305\260\332\302\337ox\220*^\356tJ\372\322(\024\000h\323\335\203\252UR\217w\326\240(\017\257`\036\022\204$!\251\232\233!O\3256\220\363S\014\223\300F\200\320\232h\236\232\214M\242z\232zM\21143S\r5=\014\231'\250\362\217Q\246\324\022\232\200\t\224\321\250&\215S\301\245\036HzOF\247\250zCA\240i\240\003C \036\240\000\320\000\006\236\240\320\006\2314E&T\006\231\r43\325\001\2654\001\246\232\000h\000\000\000i\246#\020\320\000\000\003\324\001&\251\02154\365\000\000\000\032h\000\014\206\200\000\000\000\006\200\000\003@\000\323@\006\212Hh\320\321\240\006\232hi\240h\r\006\002`\21524\310\003& h\320\001\243@\302\0314\321\246\201\"@\201\031M4\310h\023B\236\2010\233S@b\000\000\006\200\000\000h\000\000\001\243B\325\315\253q\206$\032J\250\324\326T\244D.\372\240a~\260C\360\006\024\237\233\000)\242\306\322\022$\\\010\376b\330\270`\332\201c\005\023\033Pd1\210l\272\241+\025\272E\"\340'oT\017U \377\255\0044\205;\212a\217\035\345jUV\277\371 z\271T\342b\304\311\202\006\323L\020\330\306 R)\021\001\022\002\301\202\240(\262\010\202\260i+\330\241\342!^_P\276W\2238\001>4\000N\242\276\360\020446\206\323b\033H\326Y\025-}\327\314\270.0b/'\257\"\014\221Qd\034\357#+\272C\001^\013\225\264\311\2149E\250\026\266\233\n\215\246\000Uh\352\323\034\220\322\213%\236\300\014\204d\0079\316\204\354\304\261SL1\"\2021D\013\207\022\023\251\223\266\031\003D$\206\322k$!h\022\005\253\005\206\023\262vZ\243\254\232!\267\002\312\346\320\315\264\203@}[yR\315\272s\251Dhl\"\203\006\006\334+2OE\252\340\311@\243\030\0143V\315g9\314\305\013a\323\203\004D/`\025\005\230w&X\317\031\316d\206TS\312\361M\215\254\002\223,\247H\210\316+T%\213\030o\232\250K}c\251\270\252\027\253\355\361G\313\357\376c\3621\250yk\360\3604m\010kG+\270\272\317\342x\020\354\356\303\226\337\203\223\206\022\024k_{\2464H\344\222\243\333\236G\270\214\220\264\0366\342R\254\375\tw\257\212\3272\004\277\206e\205\027""\336\204]\010b2\232\035\2052\357V\021\343\326\372^\222p\317\241/\362\350\237\342\306\352\306\241\271\333\215\325\327\\\313\317D\256B\332\377[\006\014\304N\242\022\203\275[\326\020\365\0371\250\212c\002\306-JRp\262D%\3669y\257\024\216a\230x\230&\014\352\364\321V\240\217B(\212GP\210\014@1+\216\006T\220\221\020\026\303;\372d+\243t\304\326\223v.\220\300\0050T\315U\352\270\207w\364;\331S&E\217\200G%\251\"\326\230\004\320\227\240\010\031\256Q\262\030F\002\301\331\237\302\370\225\272B\240p\241\223%d`&tv(7\227\236\2631\272\2731\017\024\307do\t\274^z\236z^\215}\021q\005s\304\343u\372f\207\030\2654W\271P\215~2\327G7/\376\330jN,\264;}/4\304\366MJ!{\263w\003\365w6:\232\350K;w\326\326\270\346\027N\346\330\324\277\261n]\322*B\020!\001\356\311X)\005%\250FPt@@#\004Q\001\006B$\213(\311\212\216\315Cn\335\230\021F\003Y\223&\023&\2416\351\327\3416}\002`[\241\317\022Ly\021\360\247\3070\010\265\031c\034\345t\003\273\214\350\034\000\300\030o\233\301\272\230\353\325\255\333\323CII\360]\301%\241\0079\224)\206}*\3528\034\366\214b@z!\236i\355\363\263\264\206\210\004\376\177\006\225\317\027g\323\24336k\253T\344\261\305z\034@\212\216l})\210\227\235\250\324\320\034\352\324\360\225\364\212kFi\266\245\273\373\355\233\272\0240\306\r\\\335\357!7\257L1\214\006/\345c\267m>T\270\377;h\215bTi\324m\235qv7C\004\360\376\333\325Ir\022\355\004&\t5&&\316\310a\317\216GG\034%\351\274\333\327\261\222$\253\204$\016L\2058Q1+\006\004B\031\020\210 f\014\374\337\031\231\244\t\005\207\032\305!q\0205z\226\236,v\221\336\326\225\222[r\362N\030`TZ\2017\240\347\023KD\316\337\272\270\307\272;\224\336\371\360\205\274\264\347\026\327\036A.\244I\233fF\324\310\\\200\210I\241\250cFE\221\0051\241.@\344\222\352K\366G\246w\256\3410\364\374{m&\214\277\0375j\206\227vl\333\271\266\247\346\353\365\273G\037\251\3723\272\247g\270\341tz[FKIL]h(\271\t\304\243\331{\350G\264\371\352\246_\323\214\253*$\344\235\nR\017\034\214(y\036d\360n\253\324\332\3104\267Nt\321J\224_\263|\005;J\026\235\337'8\205\234J\336l]\332o\007\230\340\016\216\237\025""\365\235\301B:B\201\330Vr\211\326j\263\200\360\305\\\211N%\005\235'\021\001U(-\004U\247W9qt\277Y\253g\352{\236\372\307\216\032\314\027\303\3765\362\353\0262p\340\367\263\316x\330\227O\237\2334&L'n\324\037yr\310\230\240\307Sq`\214\310\205\025\017\257>\2555\342\366\3671m/\253\r[\376\267\215d\030C\021\217\014\0039@\014\370\344\320\233\241(Mo\351VJvI\020\343\356R\321jl\342~(\274\235\373\240b\004^\315j?\024\236 =\233\356\307\005\206tM\302\034\325\r\303\306\224\200=\210<\210H W\022\024T\233\nZW\003\311\221\334]\240\010L\254\340q!\223\211\352\2349\344\321Ej\306\326J\224I\026rL8\n\325\304\221VC\"w\322\314R\023A\334\035\3253\213\212\224\021\022\"T\220R\327\271\232+&\254\307\273J&{\240<\263\372P&\010\324A:\247\026`\361\272_N\010\250\242\301\352w\004\226\245\277\003\027`\036\232oK\355\376\352\230\245d\027\t\240\327\310\360I+\3142\242\362h\ta+z\202\007\020\002\305\242b\304\013\257p\324\021\354\220\221\277|\262^\215\312\315\234\210e\206cU\005\034$\350<*l\034\013\325\003:w\234\374\010\032\302\032\304\rz\342h\0026\\\312sa\247a\321\203B\003\310!\023\334E\023\237\036i,B\242\312IH\222\261k\221\010M\277\276\221:]\245\345\324\331M\216\244\013O77\225i\342.be]\241\351\"\005+\034\357\310\014\342\004y;#(\352\306\304\355z\002\030\211\245\216\315\036\320\222\336\221\0132I%\340\312dWM\331\323=\215\316C\325\355\271\267e\361\355\212\320\305\254\215\010\313\375'-T[i\325\331gg|S*\230m@\033\032\003'\221H\241\332\351\226\241\031\322&\375\337\014n\3239\202\252\324\225#\034\355\214\307s\242\2411\244JA3h\322m\264\227\215X+x\007:\016\316\357G6;\257P\306\306\322I\221\020\341\215\303\\y\316I\353\242@9\034\210\010\nY0e\035;L\225\250\373\245\026\004\240&\256\372\271nn\005\327\331\007\037[\3539v\240\252\252\030\370\352\224\022\265\320\265\363X\262\033l\227\235L\355\263\031,Q\021\024gUHh8\231hpU\307\004\210\230$\230\320\322\t:i\004\235G\216\375J(\004\345\345,\236\027,\022JP\244V$\3051\244\2064\245``\333I\321 \226s$\354\251s\222I\026L\013\030\331\004\202\312\240\201U\334t]\010\265\361\262<\336~z\343\222\343\312\032\304\201\266\003s/V\2212\221\312m;y\361L\332\307s\026\206\356\275\342+Cp\036\210\3166\233\032w,;\367\024\016\002g#5Xb\350h\213T\205REB\216\234\006\273\031\261T@\024\024""\005\005\21166\233\0014\332d\232r\200Wc\010%\253\006\304x@zw&\332U'px\006+\363@g8\317\006\336ll.\354\301#\236Cb9t\344\237U'\316\3477\035\006\r\272\010T\235\034\234\302]8\207b\003\273\312\013\255\017\002\031\301\325L\336]\205\301\356\335e>\222{\006\253\206\247\223p\217$)\246\373\022\233Q\357`s\2253\360X\320L\334;Y\344&\204\3337k\367P\336\371\260\246a\270\303|\366g\261n3\345{\345D\036\372\357\021\242\242\343A\322\311\352\\B\250\241\033\350\216\214\001\262#\201\275\201\275\212\014\327d\020\2335\016\221\356\227\215\232\244\324\001y&P\265I\nF\273:\226\273\201\224\262P[\2041\370\342\334QH\224\246\2018\273\356(\003G\2371\264@T@\303\275\315)U.\022\206v\262\245\250y\033\373\235v\004ss\264\231\343\025\327\240\007@\300\255i\003\266w\371G\024\351\324\264~'\177\013\222[\\\r\225\210\226\251\341\306\"\003\026\021\252'\0024\333\262\020\266L\274\323#\267\031H\303\027\213<\361\244H\324\260\222%%!\r\214\312iBM\014\274\"}dm\016\365\245/%\301{{`Q\225\245\021\307&\350i\026N\343T\2504,\206c#$\327\227w\223HVc6\3425p6]\343{m\340\243\274\226\351\363+.\267\016\036\246x\357\2172\361k\316dzT\2432-\203\267=\tD\020\344\344\007S\234\226\327\346v_\274@\223FfX\337\317\207@\253\360\353\334yk\221\2149Y\014\370\"WEf\004*\217g'\025\203n$1\rW\236\272qP?&\226\256\252\222H^u\352\351\301;\001\231\306\n\225\270{\272\255X\361z)K\\\032\3515\017!\032\240\004\270\017\247\007Y\324\221\007\331\362\327\217\242xS4\274\250\352\264d\315t\223\024\236\005\212\311\2646\332,\034\275-_73P\207\t\006^\204\005\321\273\215(\352Q\000\22070Q\024\212\206\231\202j\017\t5P.\023g%\216\033\227\266g@\3720\301\001\031\352\006\257\304\344\030\363\332\320k\210n\007\005\234\256\305'Is\313PZ\357\341\246\010\r\362\352\361\360\315\334\236\242\372\014Q|\0213\310eK\246\334\221U\273&\326\224\2463\263\333\007\003\307\362<\230h\344\360\346\\\013a$\223L\037\234\177Q1J\251\024\342\316\344\220\3304\367&\027\220Of\371x\255\301\364\342\332\335\\8\177\032\",\000\215ND\206G\272\2411d\345<\243\227\265\337\327\202\275\353\356\235\246\351\345\307=glu""\325\327\303\304.\275/\336\206\030\201\214*\361\235\177\024\245\232L\356\371P\202MI\300\235\0148g\3014r&\227\230g\035\224\024\244\025)\004\201M\235Mo\252J\210\227R\027\233\300\002z\360\301+\230\266\233\271\305\270\024\221/:78\261\322(\343\336\376\215>\316\0036\376\310\341\357\025\312\366G98S\335\357A\020\333UT\221\0303\330OE\336\333\230\001\345\t\177$D\021\001\210g\"\256\023)\257\215\020)\004N\257\310\014dP\275\300u\210\200\000\021\201\354)\310\241 )\216@\010\0203\202\231\220~r\224\007L{\252\230\0309\353\371J\212\231\344U\214Z\366ET\250Oi\307\330K\343\210Pz\036/j\003*\001\247\347f\325\250p\357@\005\023\t\230+\300\334D\242(\244\346\224\204\363\233\343\341\200\301\025\013\330&\240\263N\365iH\213(Z+E\302\214wh\234~e\242\255I\206\005/\2141}\374\265\031k\326\030r\2179\272\3363\340q\375\337\246\230\343'!\262\016\006\335\326O+\036\313\007j\007\036K\335\2321\031w\321\014\257V\367\265j\322T\263e\230W\214\345\006vPso\355r\022\005\202#0\331\352\345H\t\270Y~\\e[*\232\233C\244\201\374\205 \r\315\306C3;=\271\036\031\332\251\031\300\211\241\006\"\0228G\3149x\014\335W\241\234\366ET\320\316\365\277\253\004m\022\016\211Bl\021\331\364I_\332\263\233\276\311\356\313,\215\226h\263\373Hf\031\231n\357\035\346\314\312\270\"R\315\212\213\257\352\035p{\r\345\351A*h\224\224\272\013\303\n\201\256K\302\014\246\317n\302\241\\$\026\030\356\251|\205U\017\234\246\311U\025\306\001\261A\324\004\250\016\252\017k\360#\212\211\206PQ~&#\0350\317>\272@k\251\356\013E\n\010k\342xG\263]\211\203\376\230D\227\355\0324\233\320\273\005\000\237\252\030+\201\315\350\310CH\362[\242\317\320\327\303\352\374\202\251A\024\303\320(\370hz\027`\362\216q\257D\362\336\235z!\266\355~\"\016Zm\320\314\322P\333*\262\256\220\335zU8\017\006\263\222\266hm\326<\325\253\023y\027\372+q\255\177_\337\270X\326\261c\300\354z\230\375\214lU1y\262\353}<\216v6.\241S\317]Y\325\177^\376\236n7\301!rRT\322\322\316\242/O\007\307gUO\024\354)\356""\347NS\245\326iJn\316\372*hw-oT\275\024\262z\211\266\254\207\244\274\273\360S\363\313\227\221r^\327\177\n;\332\017e\273\240\314\327\005\031\023w@'Ibe\353\234\030\232\245\033\261\307\024\r\260\336Bq \003\031Q\021\0312S\276\022\203\362\266\004\335\023\273\332\310\214t\271\372z?o\223\3046.^\007\335\371\357[21\373\031^{\223\200T\352\262\256a\326\354\036\334\364\256=\250;\215?\026\347u\317#\323\257\350\3643\005o'\240\306\332\2513uU\234N\003\271X\226\257\030\303\273\030v\312da\260\305\022.Y\252\270\025Fn\205\232\014\333M4\255qs\226\351\234\212d\3263\207\335\210\272vs\227Y\304\245U\233\026-\230\320\364]*\201#\316\341X\247\321\021\001\r@\340\351\322\345bm\230\231\246\266\006\"\350\266\321\265\010\231\223!I\244\"H\2700\301\306\010xI\230\335\365D\201\240,!\2202\035btg8\230\013+C\272.\302\004\245\207d\330Q\002\02476\027\324\004\213\310\010E,(yx\016\244,\322\2637\211\272c\002\235\2108&\231\262\215\340\303\250\226M\000\220*\002%\225H\005\376.\344\212p\241!\340y\013\276"; PyObject *data = __Pyx_DecompressString(cstring, 4559, 2); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif #elif (CYTHON_COMPRESS_STRINGS) != 0 /* compression: zlib (4573 bytes) */ const char* const cstring = "x\332\305XK{\323V\267&\247\2465\324@\\\022R\276r\221\271C!4m(\320\366\264uI\270|\345\0227\264\345\224R=\212,'*\262dKr\210\277\303\351a\230\241\206\032j\250\241\206\036z\230\241\206\036\346'\364'\234w\355\255\253\255\320>\31778\317\223X\322\332[{\257\275.\357z\227\346\037\033\266\"\330\033\222-\334\351\333\033\206.\250\226\320T4uM1%[\321\372\202e\233\252l+&M\322\205\225\345\225k\213\267\026\005Io\n\246\362\273\"\333\226`\365\326dM\262,\305\022\214\226\260\326S5[\325\005\273\337Q\254y\341AK\350\033=AW\224\246`\033B\007\363\262/\330\033\212.X\212M7\302EI\327\r[\262UC\027\361\272\252\257_\024\232\252\211M\324M\205\336\276+i\2262\177q\345\236\251X=\315\276(\274\026\036\033\272\262\322\260\024\275yW\353Y\033?(\335\236b\331\002\211\354\037\330\254\272m\233\226\320\222TMi\256\322\260.+\317\327\372\266b\275\210\336\317K#\341\304\240\252\333\261Lx.\\\272\374\365\245\313\337|%|-5\233\242NF\204\t?\331z\301/\202\264\211\375\2445M\021T\335\262\025\251)\260\265\263\033\360{\303\204\305Z-\330W\331\352\340\244J\363\252\260n\330\202,aOM\220\r]\247\363\3031\330D0:\212\2564\2431~\244/\004Y3,E\350\230JG2a\345D\234\177\025.\351\250\035x\026\352\267\215\246\202a\253\327\206\2151\322\351\331\231\327zZS\277h\013\222\246\0312b@X\271GKM\3123\0334\225\226\004S[o\235\244\352-cr\202\322\356\330}!v\351\344x\013\026R,Y\352(\"YL\242\030+\236\325\323\377z\036\324 \215H\025\304\242i)\311\024\331T\230\276\314\266w0G0\326(\276\213'\214\017B{\004qz\330d\200\"3zGc\221\r\013\367LS\321m\344\226\241S\202\365:\035\303\204\343I\271\207\252\336\333j\342\034&2p\322\247M\325\242\240Rt\366k\2328\265\312\334\253\312\nt\220\025$\212\371\205p\336\212,\2416\261\221\332R\021^\361\022{\217\350F\326[\035\323\330\304\244f4_S\201\001\2226\276\314\270\370\255k\020\224 \336\222%\266\024\271g\223$9'R\315\354\027L\310\313\371\225\000\001g\300\001rq\235\016Z}]N\306Z\204\0160\021\207\207d%\222fu\232\020\020.ec\330\342\351\326\\\227)KU\213\273\242\251\251\226\375\374N\024YO:4\367\005\223\261\300\006\004-\301\006/`\235(S\004Q""\304y{\262\"\212B\263\307\300M7\364k0\320\246\ns\212\242\254\352\252\215A\354\311T\320T\234\365K\001\356\265H\017\n^\251-\"\354\333\022 \230?1\310\215\3567%\r'\005\266\330\014s_\031f\023\326\222\315>\323-9\036\267\374\244\211;V_6:\353\342\232\252Kf\377z\247{=N\233\371N\177kr\224y\030\313\024\217v\326y\006\3549\212\265\367\032\343\270P8JB\036\364t\000\214\365\205\246dK\311!\230\273Q?,\001\365\254\323\025Z\246\321\026V\014\313\306\242\253\215\207\310M\2555O{\223[\t#\t\226)a\331r\305\250\232\014O\354\226\033\241\254\037\037\330;\255\343\031{\344A<\314\245Tz\231\217\255=&\244R\233%\217\274\321\323_bQ\323xe\261\024\211f\304\343\010\2745\300\343\313l\330\307c\026~P\304\360j\366\315\257x&[F\317\224\225\257Y|N\224\253$S\366\312\240I9\304\266\335\353h\254\326^\025\332J\3330\373\233\252\362\352E\317n]\273u\347\311\243G\365\307K\342\223\357\343D\313'\\\3744O\271\3251E1\021\254+\266\030\227\250D\310\340\1779\212\333\370:\237\344\245\314\350\220(fF`\024\013\364\244`,[x\306\205)\322\216\217D\3409.\346\306M\244\371\262\266\014L\\\205\022=\353.\313}\nYp\270\325\270\210,SQx\322!\366\006\223`qzF\005g\376\211\257d\203\354\375\344\251\307F'N\236\037W@%LE\214\323\\\036_>\016\257\234\260\005\204\2636r\"\362\023\253jb[\261,i]\311\215v\014-w\202yVts\022(i&\222\275O\365\266\023\315\347M5\3372\025\2053 \376[\270\352\336V\242\021\276\222\230YC\006\227^\207\301\"d\216\245\224\027\"\371Q\322\362\242\010\027b!\317\232\374\223\030\231'+\212\315\021\311\300\367\020\216\304\366\"Y\214H\371=Si~\333\250|\214k\315j\260\030\327Y\221`\"\036A\254\212\331{\016[9\311\330\026[(zEK%\301\302\036\250HG\367\0242\211\307\022\001 X$p\316\310\306\343*\226\363\372\022\tTK\\\353Y\375\350\251-\275TD\306O\363\263\210o!\237\343\203\260S)d\004\213%f,\346\001\317o\243\023\021%\211e\374\344\361SoR\353D\006t\217Dq\304'\367Y\257sA\326\347T\027\304\202\250\312\312\363\016`#\305a16T\360\036\363\213\030q\254\354@\376\254L\304J\325\204 \037!Y\371\370v0\r/k\"\225\265l\2500#\260\262EC\343#\266)!u[\232\264\036\357\302$\321}O\217""\236\230\213\373Y\362\026w(\361\265\010\007\222\221\002$\210\306dM\221\314\344\211\007%bIk&\262\026'u\3513N\220>\350\010\265\364\311R\377\225y\262\211\212\216=\312\206\226\221\200 &O\005I\221\031a\3741\221\244\3742\021\2211%\264\326*(&R\241\361\035\353b\343k\201u\322\221I\3534\"\014g-\026\236\030<\256\3048\323`\241\272\302\2031z\210\343\241\221R\210\037A*\356\255\256\326W\036\2544\"\254\212\227`\005\257\301\220j%\312\305G\024\027\r\002\234\274\244\325CB\231\206\215VU\373\211\263\355\225\306\006\230\t\032}\034/N\345U\312d\366\335\341NV\271T\220(\210\323>\245\240\272\313b\256\313\3136\316\334\337\302\377\222\n\230~\254l\331?(\255\247\313\317\236\262\231?\201\362pc\245w\223\006\315\215M\230T\322\326\rS\2657\332\222%\253\252D\300#\262_\325@)0\r\352\253\024\213\034H?\360,\242Lb\r\004\247\327q\311^\353\265\370\367\t\376+vl\020+\372\306\323\024\243^Dd\304\004\024\005;F\365?\255w2\177M\2061e\004\233\0345,c\365\017\355\016}\017\022\351\252Hz>,Y\306\340G_\2677,\231\301\250\252\363<^\223\344\227Yx\313C\232\254Y\262\316\001\005\333\367\332\272\250\367\332kP\206=\250M\331h\267A\246q\351\020\251\345\0379X0eKj\256\226\246\301&\242\230\266a\247\270-\312\225W\031\300#3c\312\274\017#T\247O.\274\0276\307\000v\002T\271\200\221Z\030\245I1\302/\350\377;\260\235IW\312}H\rY\024\025\204\273A\035\200\030\337\214\327\352\"\212VP\270\025}s\023\n\230f\333ZgN\310\000T\316)\354\301\312\022\323\t\266\233'\2719n\253l\311\364\307\016\310h@\206\035\344h\001{\340Uu\222\032D@\311\224#\323\266\340E\335\340L\201\001<\253G\004\237\0145\243\331\240s\01469<& \311\260Q\024[=\344\211\010\000|h\254\303\002)\273\310\321\212l?1\001\243)\251Hp\224\255\310\363STU\204\273\332\356h\370\205\2458\341\020qM\262\022\006k[/\225>\371M\223\326\024\215\307\276F\237\2064\246\026\375\222\267\305\266\204T\020'x\nD\212-\3059E\306\352\241\032\212d\205\344\227%-\256\312+Q\214\tM\224-H\023\243c\243\273\263s_\031\370\003\317\241\264 d>=d\277<\214\223\"\326m\261hlv\326?\355\364\021\240\274\357\217;|\242K9\236\324\321\340-\354LI\3301"":QH\210bz\303\277\007D\227\371$\366\255\374\207\202\371N7\236\222\275\243\371\275\266\225\021\264UK\006\274\345\250X\226\203aG`6uedTv\277\241\310/\221\366\374)\266=\335G\316\246[\036Xt\327\323;\252\374\022\236\210{;.\336d1Hkv{\222\306\335\223~\036\232\300\375D\240l\361\007ju\2617\243\177))\314\260\301H1\356FS\261{\246N\314\210{\322\334\244\317 \023L\261\200\"\026q\303bR8\311\006\26340\245u\023\304\257\200\361\345yF!\361c\345/\212\353\002\3667F\373\360\030\345n\246l\212\005%\224P\302\2624fB6\302#\031\020\206?\005\332\366-\3469Jh\032\024\371.,\025\304\226dQUU\233\370A\376\346\233\370\210f\366:\0101\005\320\226\354\215{\023\010\254\361\034\212\nl\\ga\021,\271\005\324\020.\255\364\237\260\017\320\302\225\253\002\025\004\341\nnV\372\242\305\252\002\304\227\367\211Q\305\226\254\010uE\024;v\250\260\364I05*\177\350N\205\307\257\370\265Q\371\230#9\335Q\371\242\367G\320\010\232\203\371\035\214\276\277\375\331\266\354TG\225\017\234Zx\364\234W\037M_\366\253\376\271p\376\333\341\324ny\316\371\227W\365ja\351c\177aT\236q\036\270\r\267\031\236\3714\200h!\250Fk\356\036:<\252\034s4\257\346-\322\342\264\354\342v7\273\350%\177\312\237\t\257}3\350Fk\235reZyT\276\034^\376f\360zgaT\231v\376\303\251\355\226+\333\313\316,S\2652\343<\364\246|\357\366\260p\364\360\320\333\3575\342\207\177\272\212\267\020?*Cm\007*V\266\227\234wp\223\034\303kD\312\013\036ls\314\321!z\352\237\n\272\203\312\260N\207\276\351\234s\244\354\261\347}\311\267\303\317\226\207\314&_:\353.\264<\032\036%\177|x\036\353]\270\031\274\036b\213\243\316-wa\227_\302\022\354\0339\356\252_O\035\027^\274\211\275J\203\307;\265\277\357\271\317\202\205\354\n\267\006S\203\231\301o\260w\321\n\330\316\177\032.\334\031.dVX\014\352\354\325/\007\314I\207\303SL\222\370\370c\004\2054\032\233\037\355x6<{#\037m\353\016\231\300a\207\305Q\317x5\276\324\377\270w\334n\326\326\243\362G\356-o\301[\362\2437\327\234\251t<<\317N\022\376\347\223""\035lsd\033q\005\203\305K\335\203\233\253\377pk\356\"\2559\355\034q3\343\341\221\2327\207E\253p\2437Cq3\035N\323\222\245\033\024\273\314\356p\\r\206\217\302\217X\204\004\363\303\251\202\320F\036\004\347\302\317\357\357LE\013\244\306\376bP\033,\016\376\330i\374}c\237\361\256\007\307\007H\003(Go}\356\314Am\212\231\263\260\005\013\316kn\327+y\217\203Z\201YF\323\010P\177)\374\344\273a-2\013b&:\024\303\203\364P\327\375nP\n\036\017k\177q(\030:\373\032V\tf\202\337\206\013\005\257\301\365\301\323\360\366\367;\360,\314\377ge\337\201\312\366\355p\006\241\3565\021\363\205\251\021\226\256\370\227\370i0\225\005\261\257\017\352\331XxS\037-\336\000V\370\247\341\364\352x\354\355\226g\235_`\024\350\212\331\177\036\334w\340xr\\(\314v\n\212\003>\213KW\374\013A\005\373\226\217\204G\310\330K\341%\034\035[\237<5*/\004\247\271\367o\304\230\020\205\375\241\360\220\300@\352\320\t\267\216\364\346Fgy{*<\025\331\361\356P*\210\3767u\206\234s\316\1773\344\354\322\024\266\364%D\356g\356\357\376;\376\355\340\016\334W\375\310]p\353\331\027\351\220\025\030a\323Yu\247\362YC\266\351\001\335\216z9\023\356\226\221j\336\347\260\356y\370\035\010\021\205\324\222\277\337\377mp#\016m\313\251M@\212\2570?\375\371\356\276\003\207\267W\201\322\027\334)\027\007\236s\272\224R80\024z7V\350g\322\364\310\266\355\334p\017y\253\310\263i\304N8G\226\256\322\254K\034\306\336\035H\203nnO\030t4M)\363\031\r\245\273\325\306v\252\244;-#\177\237\372\263~\233\336y\353i\337Ou\233\013\347p\254\321\364\214\263\354\236\"D\334?x6l\014\245]x\342\017\216\311\275\301\375a}\330\330\235P\217@\347\350\240>\310\030\343\222{\006\253\346U\204w\316\026\355\377\367\235\005\357\\\360$\317\366o\004\207\007J\234lc\336a\010\022\314\262<}\273w\016\357\241\320\333\234\265\213\232\276\341j~\315\277\031\234\t\276\013\326\200\003\025\236O\221\361\274~\260?x6h\014`;\3543\232&\310]H\327\030\315\3444,\357\203R\223+\272\337@p;X\036Tw\313\207\266\177v\276C\r\215k0K&$\326\250|\311\257\020\270\344\262?\265c\204\237H\326\253\327Fe\366\302B\270P\037V\207Wv\352""\034\177\243\304=\262\375\312\221a\037(\371\222^\331MO|\314\177\025H\301\026\302r\3664\301\t;\310na\206c\243o\353\243\003\007#dE\301&\373\237\361\252Q\016\3178\320\000>\214\321\354\376\360\356N\021\316\246(\310\375\367#;\366xf\315}8\232%D\231#\323\237\240\027ig\006\311\344\331\243\210\301\313\336\027\376\363\360\326?\261K\345\037\3565\217\362\347\360\221Q\345\204\373\210\307\372c\3572b\351\340\2406\232>\357\375\227\377\373\340 \001?\001\313}\357\201\377K\300r\361\266s\307\311\351\007\242\342/\206\327a\310\214\215\377=\215\216\205\307(4\376\256Jc\006\003\235\t\226\330\252\320\243\274\357\3305?\273u\231\2059\275\366\225\363\n\350\\9\356\236\206cO\006\022\333\227\254\335\335-\327\0227\315:/\274\253\020n\005&\002\013Da\277\363c\022\302N\317\275\037\236\373\n\331\376\353N5V\336\371\335\213t\277\340\037\010f\003\225@,\n\326\202\372Rl\277\377\017\275uR'\247\367n\252\367[\214\314\022j\306\271G\025(\252k3 \322\222k\207g1\0175,\311\002\260$\212\342\031\236\225\304\2147\007H\027F\277@\320W\375\203\301\036\024\000\333\314_\247\372~\002dQzK}g\231}\315\377uP\035\234\033H\231\220=J\007\031\213\320\277\035\234\027\274\25148\211\233G\206\332\357\377\022\336|\210\226\000\300v\205\310\327\333c3%M\377\216\006\216\001@K\024hPn4\"\005v\307\025\230\210\267\324s\031N\2316\021\214o\234 z\214\272\1778\220\376\"\3473k\020\261\252D\304\n\304\021^\r\247\317F\313\310\203\214\016\336\323\3602:\2057\304\243\250^9\213\300\262\375\356\257\014\0107\202u\252\026\221\037\217l\367Q\252\216\205\247\301\324\302\022\325\344(\320\226B\201\211X\333:\203\276\257\356>\rk0/\275x\337\253\363\243\377\356\276\343\306\335\031\021L\234\246\352\034\303ne\244\350\241Y\247\3414\335y\177\212\021\177\364y\356\003FB\257\017f\007\353\303\242\036\365\214w\326\373\031\365\352Y\320x35*M;\207\\pS\254\234\034\2341J\336,\260\360\266\006\265|wx\322\215\033\010\326'^\365\237\014\026\006K\005m\003oo\276 \255i\257\203\333\037;\361\353\344\221G0\3729O\312/~\236\023\006p\344\213^\327/\371y\206L\345u\377\341\355\247\210\207Re\373\236""\263\340\334u\257b\211\322{o6QT\227\335\031Z\034/P\232 \367\251\033\302X\227\321\335\313\376\014:\234\365\340\371\360\275!\306r\222\330\017'\335gd\300\360\n(Za+w\336\373\305\357f\372\326C'\351k\2017O\236\374\232\222\2255`\354\347\264\373\232\267)\337\016\337\005\361\212A\35595d\341\371\033\301O\003\276(q\201\335\3503@<0\232&\375\351',]\360\244\244\245\033\243Pa\351\230\023!\311\037\356\317\030\253\236\"\320\242\376\037\036\024\010LX\223\227Y<~\247\022V\030\324\316\304~\010K\247\210\352\347\343\225\231!m\213@\001\202\305\340\217\302\310J\333\"r6\361\272M\037\233\035w\253\321\247\023\225\265tu^\361\247vK\240\037\224\002\357\017\276\034\276\014\033?\214J\364a\340\026k\000\341\263\327\316M\027{S\236~\031\350C\310`\277\2604G\232D\272\037\"\240X\362\246xW\363^\320\315w5\007\206G\207K\324\333a\243$\272Y\310~\340\\\217bo\022^\274F\241\220\255B#\237n?sD\226\032{\324\300HG\262\317\377\272\353X\256\n\023\270\347\250\340\301'\320;,!\264c\366|\013!\362\200\327\203\017\234y\326\253\377\026\334\036,\017\253\205\215o\332NG\264\021{E\r(\260\2247X{\364\237\307c\276\\\242\032\307t\344\216\215P\244\366\177\014\027\234W"; PyObject *data = __Pyx_DecompressString(cstring, 4573, 1); if (unlikely(!data)) __PYX_ERR(0, 1, __pyx_L1_error) const char* const bytes = __Pyx_PyBytes_AsString(data); #if !CYTHON_ASSUME_SAFE_MACROS if (likely(bytes)); else { Py_DECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } #endif #else /* compression: none (11585 bytes) */ const char* const bytes = ".Note that Cython is deliberately stricter than PEP-484 and rejects subclasses of builtin types. If you need to pass subclasses then set the 'annotation_typing' directive to False.'PGresult' | NonePQsendFlushRequest PQsetResultAttrs failedSequence[bytes] | NoneSequence[bytes | None] | NoneSequence[int] | None [ ()>()?< >add_note at 0x] at 0x available instead bytesbytes | Nonebytes or buffer expected, got cancel connection not openedcancel failed: close prepared failed: connection not in pipeline modeconsuming input failed: couldn't allocate PGconncouldn't allocate connection defaultscouldn't allocate connection infocouldn't allocate empty PGresultcouldn't allocate for escape_bytea of couldn't allocate for unescape_bytea of couldn't allocate on conninfo parsecouldn't create cancelConn objectcouldn't create cancel objectcouldn't reset connectioncouldn't send cancellation: currently only supported on Linuxdescribe prepared failed: disableenableerror in notice receiver: %sescape_identifier failed: escape_identifier failed: no connection providedescape_literal failed: escape_literal failed: no connection providedescape_string failed: executing prepared query failed: executing query failed: failed to enter pipeline modefailed to sync pipelineflush request failed: flushing failed: flushing failed: the connection is closedgcgot isenabledlist[ConninfoOption]list[PGresAttDesc]no default __reduce__ due to non-trivial __cinit__ on the client; version param_formats param_types param_values but password encryption failed: preparing query failed: psycopg_binary/pq/conninfo.pyxpsycopg_binary/pq/escaping.pyxpsycopg_binary/pq/pgcancel.pyxpsycopg_binary/pq/pgconn.pyxpsycopg_binary/pq/pgresult.pyxpsycopg_binary/pq.pyxreceiving copy data failed: requires libpq from PostgreSQL self.conn is not Nonesending close prepared failed: sending copy data failed: sending copy end failed: sending describe prepared failed: sending prepared query failed: sending query and params failed: sending qu""ery failed: setting chunked rows mode failedsetting nonblocking failed: setting single row mode failedthe cancel connection is closedthe connection is closedthe connection is losttuple[int, memoryview]utf-8COMMAND_OKConninfoConninfoOptionConninfo.__repr__Conninfo.get_defaultsConninfo.parseEscapingEscaping.__reduce_cython__Escaping.__setstate_cython__Escaping.escape_byteaEscaping.escape_identifierEscaping.escape_literalEscaping.escape_stringEscaping.unescape_byteaExecStatusFormatNoneNotSupportedErrorOperationalErrorPGcancelPGcancelConnPGcancelConn.__reduce_cython__PGcancelConn.__setstate_cython__PGcancelConn._ensure_pgcancelconnPGcancelConn.blockingPGcancelConn.finishPGcancelConn.get_error_messagePGcancelConn.pollPGcancelConn.resetPGcancelConn.startPGcancel.__reduce_cython__PGcancel.__setstate_cython__PGcancel.cancelPGcancel.freePGconnPGconn.__reduce_cython__PGconn.__setstate_cython__PGconn.cancel_connPGconn.change_passwordPGconn.close_portalPGconn.close_preparedPGconn.connectPGconn.connect_pollPGconn.connect_startPGconn.consume_inputPGconn.describe_portalPGconn.describe_preparedPGconn.encrypt_passwordPGconn.enter_pipeline_modePGconn.exec_PGconn.exec_paramsPGconn.exec_preparedPGconn.exit_pipeline_modePGconn.finishPGconn.flushPGconn.get_cancelPGconn.get_copy_dataPGconn.get_error_messagePGconn.get_resultPGconn.is_busyPGconn.make_empty_resultPGconn.notifiesPGconn.parameter_statusPGconn.pingPGconn.pipeline_syncPGconn.preparePGconn.put_copy_dataPGconn.put_copy_endPGconn.resetPGconn.reset_pollPGconn.reset_startPGconn.send_close_portalPGconn.send_close_preparedPGconn.send_describe_portalPGconn.send_describe_preparedPGconn.send_flush_requestPGconn.send_preparePGconn.send_queryPGconn.send_query_paramsPGconn.send_query_preparedPGconn.set_chunked_rows_modePGconn.set_single_row_modePGconn.set_trace_flagsPGconn.tracePGconn.untracePGnotifyPGresAttDescPGresultPGresult.__reduce_cython__PGresult.__setstate_cython__PGresult.clearPGresult.error_fieldPGresult.fformatPGresu""lt.fmodPGresult.fnamePGresult.fsizePGresult.ftablePGresult.ftablecolPGresult.ftypePGresult.get_error_messagePGresult.get_valuePGresult.param_typePGresult.set_attributesPQBufferPQBuffer.__reduce_cython__PQBuffer.__setstate_cython__PQcancelCreatePQchangePasswordPQclosePortalPQclosePreparedPQconnectionUsedGSSAPIPQencryptPasswordConnPQenterPipelineModePQexitPipelineModePQfullProtocolVersionPQhostaddrPQpipelineSyncPQsendClosePortalPQsendClosePreparedPQsetTraceFlagsPqFormat__Pyx_PyDict_NextRefTEXTTraceViewBufferViewBuffer.__reduce_cython__ViewBuffer.__setstate_cython__algorithmasciiasync_asyncio.coroutinesattrsatttypmodatypesbinaryblockingbufbufferbuffer_ptr__build_version__bytescalgocancelcancel_conncbufferccolcerrcformatschange_password__class___clean_error_messageclearclengthscline_in_tracebackclose_portalclose_preparedclscnparamscolumn_numbercolumnidcommandcompiledconnconnectconnect_pollconnect_startconnection_summaryconninfoconsume_inputcrowctypescvaluesdatadecodedescrdescribe_portaldescribe_prepareddescriptions__dict___dictdispchardispsize__doc__eencoding_encodingencrypt_password_ensure_pgcancelconnenter_pipeline_modeenvvarerrmsgerrorerror_fielderror_messageerrorsescape_byteaescape_identifierescape_literalescape_stringexcexceptionexec_exec_paramsexec_preparedexec_statusexit_pipeline_modefformatfieldcodefilenofinishflagsflushfmodfnameformatfreefsizeftableftablecolftype__func__getLoggerget_cancelget_copy_dataget_defaultsget_error_messageget_resultget_value__getstate__iid__impl__intis_busy_is_coroutineitemskeywordlabellengthlinuxloggerlogging__main__make_empty_result__metaclass____module__name__name__nbytes__new__notifiesnparamsnumoptsoutparam_formatsparam_numberparam_typeparam_typesparam_valuesparameter_statusparsepasswdpg2pyencpgconnpgresultpingpipeline_syncplatformpollpopprepare__prepare__psycopgpsycopg._encodingspsycopg_binary.pqpsycopg.pqpsycopg.pq._enumspsycopg.pq.miscptrput_copy_dataput_copy_end__pyx_capi____pyx_checksum__pyx_result__pyx_state__pyx_type__pyx_unp""ickle_Escaping__pyx_vtable____qualname____reduce____reduce_cython____reduce_ex____repr__resresetreset_pollreset_startresult_formatreturnrow_numberrvselfsend_close_portalsend_close_preparedsend_describe_portalsend_describe_preparedsend_flush_requestsend_preparesend_querysend_query_paramssend_query_preparedset_attributesset_chunked_rows_mode__set_name__set_single_row_modeset_trace_flagssetdefault__setstate____setstate_cython__sizesslstartstatestatusstrstreamsystableid__test__tracetypes_fasttypidtyplenunescape_byteauntraceupdateuse_setstateuservvalvaluesversionversion_prettyxint (PyObject *, char **, Py_ssize_t *)\000_buffer_as_string_and_size\320\0040\260\001\330\010\030\230\001\320\031*\250!\330\010\026\220a\220q\330\010'\240~\260Q\260d\270.\310\001\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\020)\250\021\250$\320.@\300\001\340\010\027\220z\240\021\240!\320\004+\2501\330\010\024\220I\230Q\230d\320\"2\260!\320\0041\260\021\330\010\026\220a\220q\340\r\016\330\014\026\220l\240!\2404\240~\260Q\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\020(\250\001\250\024\320-?\270q\320\004+\2501\330\010\036\230c\240\021\240!\330\010)\320)?\270|\3101\330\014\020\220\002\220!\340\010\014\210E\220\025\220a\220q\330\014\024\220L\240\001\240\021\330\014\021\220\021\220\"\220H\230E\240\021\330\014\021\220\021\220\"\220K\230u\240A\330\014\021\220\021\220\"\220L\240\005\240Q\330\014\021\220\021\220\"\220J\230e\2401\330\014\021\220\021\220\"\220I\230U\240!\330\014\021\220\021\220\"\220J\230e\2401\330\014\021\220\021\220\"\220M\240\025\240a\340\010\034\320\034-\250Q\250d\3202B\300%\300u\310A\330\010\022\220!\2201\330\010\014\210D\220\003\2201\330\014\022\220!\320\023$\240A\240Q\320\004+\2501\330\010 \240\001\340\010\026\220n\240A\240T\250\036\260q\270\014\300A\330\010\013\2107\220$\220a\330\014\022\220!\320\023$\240A\330\020.\250a\250t\3203E\300Q\330\010\013\210;\220g\230Q\330\014\023\320\023*\250!\330\030%\240Q\320&7\260|\3001\330\014\023\2208\2301\340\014""\023\2208\2301\320\0042\260!\330\010\030\230\001\320\031,\250A\330\010\026\220a\220q\330\010'\320'7\260q\270\004\270N\310!\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\020)\250\021\250$\320.@\300\001\340\010\027\220z\240\021\240!\320\0043\2601\330\010\026\220a\220q\330\010'\320'8\270\001\270\024\270^\3101\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\020,\250A\250T\3201C\3001\340\010\027\220z\240\021\240!\320\0044\260A\330\010'\320';\2701\330\014\020\220\016\320\0364\260A\330\010\013\2104\210q\330\014\022\220+\230Q\230a\330\010\027\220z\240\021\240!\320\0044\260A\330\010\026\220a\220q\330\010#\320#5\260Q\260d\270.\310\001\330\010\013\2103\210g\220Q\330\014\023\2201\340\014\023\2201\320\004\"\240!\330\010\013\2104\210}\230C\230q\330\014\022\220!\320\023$\240A\240Q\330\010\033\2308\2401\240D\250\001\330\010\013\2103\210b\220\001\330\014\022\220!\320\023$\240A\320%8\270\001\270\024\320=O\310q\330\010\017\210q\320\004\030\230\001\330\010\013\2104\210}\230G\2401\330\021\032\230!\2304\230q\330\014\020\220\017\230q\320\004\030\230\001\330\010\013\2104\320\017!\240\027\250\001\330\021 \240\001\240\024\240Q\330\014\020\320\020$\240A\320\0045\260Q\330\010\030\230\001\320\031.\250a\330\010\026\220a\220q\330\010\033\320\033-\250Q\250d\260.\300\001\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\0201\260\021\260$\3206H\310\001\320\0045\260Q\330\010\026\220a\220q\330\010'\320':\270!\2704\270~\310Q\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\020,\250A\250T\3201C\3001\340\010\027\220z\240\021\240!\320\004\"\240/\260\031\270!\340\010 \240\001\330\010\013\2106\220\027\230\001\330\014\023\320\023#\2401\240A\330\010\022\220-\230q\240\004\240N\260!\330\010\013\2103\210b\220\001\330\014\022\220!\320\023$\240A\330\020+\2501\250D\3200B\300!\330\010\017\210q\320\0047\260q\330\010\030\230\001\320\0310\260\001\330\010\026\220a\220q\330\010\033\320\033/\250q\260\004\260N\300!\330\010\013\2104\210q\330\014\022\220!\320\023$""\240A\330\0201\260\021\260$\3206H\310\001\320\0048\270\001\330\010\026\220a\220q\330\010\033\320\0330\260\001\260\024\260^\3001\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\0204\260A\260T\3209K\3101\320\004\032\230!\360\014\000\t\014\2109\320\024%\240Q\240d\250!\330\014\022\220!\320\023$\240A\330\020.\250a\250t\3203E\300Q\320\004*\250(\260!\330\010\013\2109\320\024)\250\021\250$\250n\270A\330\014\022\220!\320\023$\240A\240Q\200A\33045\330\010)\250\037\270\001\270\021\330\010\013\2104\210q\330\014\022\220+\230Q\230a\340\010\025\220Z\230q\240\001\320\004$\240A\360\n\000\t\031\230\001\320\0310\260\001\330\010\033\320\033.\250a\250t\2601\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\020(\250\001\250\024\320-?\270q\320\004*\250&\260\014\270A\330\010\017\320\017#\2401\240D\320(8\270\001\200A\330\035\036\330\0101\260\037\300\001\330\010\013\2105\220\003\2201\330\014\022\220+\230Q\230a\330\010\r\320\r \240\001\240\021\330\r\034\230A\230Q\330\010\017\210q\320\004,\250A\330\010\036\320\0361\260\021\260$\3206F\300a\330\010\013\2103\210g\220Q\330\014\023\2201\340\014\023\2201\200A\340\r\016\330\014\027\220{\240!\2404\240q\330\010\013\2101\330\014\022\220(\230!\2303\230j\250\003\2509\260C\260q\330\021\033\2301\230A\330\014\023\2201\340\014\023\2201\200A\360\n\000\t\014\2104\210v\220S\230\001\330\014\022\220!\320\023$\240A\240Q\330\010\013\2104\210u\220M\240\023\240A\330\014\022\220!\320\023$\240A\240Q\340\010\"\240!\2406\250\021\250%\250q\260\001\340\010\023\320\023#\2401\240D\250\005\250^\2705\300\001\330\010\013\2104\210s\220!\330\014\022\220!\320\023$\240A\330\020)\250\021\250$\250e\3203E\300Q\360\006\000\t\016\210S\220\002\220&\230\001\230\021\330\r\027\220q\230\001\330\010\017\210q\200A\360\006\000\t\014\2104\210v\220W\230A\330\014\017\210t\2205\230\r\240S\250\001\330\020\026\220a\320\027(\250\001\250\021\360\006\000\t(\320'7\260q\270\006\270a\270q\330\010\013\2104\210s\220!\330\014\022\220+\230Q\330\020:\270!\2703\270a\270q\360\006\000\t\016""\210S\220\002\220!\330\r\027\220q\230\001\330\010\017\210q\200A\360\014\000\t\014\2104\210v\220W\230E\240\024\240T\250\025\250m\2703\270a\330\014\022\220!\320\023$\240A\240Q\340\010\"\240!\2406\250\021\250%\250q\260\001\340\010\013\2104\210v\220W\230A\330\014\027\320\027)\250\021\330\020\024\220E\230\036\320'8\270\005\270X\300Q\300a\340\014\027\220~\240Q\320&7\260u\270H\300A\300Q\340\010\013\2104\210s\220!\330\014\022\220+\230Q\330\0208\270\001\270\023\270A\270Q\360\006\000\t\016\210S\220\002\220(\230\"\230A\330\r\027\220q\230\001\330\010\017\210q\200A\360\n\000\t#\240!\2406\250\021\250%\250q\260\001\340\010\013\2104\210v\220S\230\001\330\014\022\220!\320\023$\240A\240Q\330\010\013\2104\210u\220M\240\023\240A\330\014\022\220!\320\023$\240A\240Q\340\010\023\320\023&\240a\240t\2505\260\016\270e\3001\330\010\013\2104\210s\220!\330\014\022\220!\320\023$\240A\330\020,\250A\250T\260\025\3206H\310\001\360\006\000\t\016\210S\220\002\220&\230\001\230\021\330\r\027\220q\230\001\330\010\017\210q\200A\360\016\000\t#\240!\2406\250\021\250%\250q\260\001\340\010\013\2104\210v\220W\230A\330\014\017\210t\2205\230\r\240S\250\001\330\020\026\220a\320\027(\250\001\250\021\340\014\026\220h\230l\250!\2507\260\"\260B\260b\270\001\330\014\033\320\033.\250a\330\020\024\220E\230\036\240y\260\005\260X\270Q\270a\340\014\017\210q\330\020\032\230!\2301\330\020\026\220a\320\027(\250\001\330\024,\250A\250T\260\025\3206H\310\001\360\010\000\r\027\220h\230l\250!\2507\260\"\260B\260b\270\001\330\014\033\230?\250!\2509\260E\270\021\340\010\r\210W\220B\220a\330\010\022\220!\2201\330\010\017\210q\320\004\034\230A\330\010(\250\014\260A\260T\270\021\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\240Q\330\010\027\220z\240\021\240!\200A\330,-\330\010\034\230A\330\0101\3201A\300\021\300*\310A\310Q\330\010\013\2105\220\003\2201\330\014\017\210w\220c\230\021\330\020\026\220k\240\021\240!\340\020\026\220a\320\027(\250\001\250\026\250w\260a\260x\270q\330\025\037\230q\240\001\330\020\026\220a\340\010\r\320""\r \240\001\240\021\330\r\034\230A\230Q\330\010\017\210q\200A\330@A\330\t\n\330\010\030\230\001\320\0312\260!\360\006\000\t\"\240\021\330\010\013\2101\330\014\024\220A\330\010\023\320\023)\250\021\250$\250n\270H\300F\310!\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\020.\250a\250t\3203E\300Q\360\006\000\t\016\210U\220!\2201\330\r\027\220q\230\001\330\010\017\210q\200A\360\006\000\027\030\330\025,\250A\330\027.\250a\330\034$\240A\330\t\n\330\010\026\220a\220q\360\016\000\t\023\220(\230)\240:\250[\3208J\310!\330\014\032\230-\240q\360\006\000\016\017\330\014\034\230M\250\021\330\020\024\220N\240)\2505\260\n\270!\330\020%\240Y\250j\270\n\300!\330\010\033\2301\230H\240I\250Z\260q\330\010\013\2109\220C\220q\330\014\022\220!\320\023$\240A\330\020*\250!\2504\320/A\300\021\330\010\027\220z\240\021\240!\200A\360\006\000\027\030\330\025,\250A\330\027.\250a\330\034$\240A\330\t\n\330\010\026\220a\220q\360\016\000\t\023\220(\230)\240:\250[\3208J\310!\330\014\032\230-\240q\360\006\000\016\017\330\014\026\320\026(\250\001\330\020\024\220N\240)\2505\260\n\270!\330\020%\240Y\250j\270\n\300!\330\010\033\2301\230H\240I\250Z\260q\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\0203\2601\260D\3208J\310!\200A\360\010\000\026-\250A\330\t\n\330\010\026\220a\220q\360\010\000\t#\240!\330\010\013\210<\220w\230a\330\014\031\230\037\250\001\250\035\260a\330\014\026\320\026.\250a\250q\340\010!\240\021\330\010\013\2101\330\014\025\220]\240,\250a\250x\260r\270\021\330\014\020\220\005\220U\230!\2301\330\020\026\220a\220u\230H\320$<\270A\270\\\310\021\360\006\000\016\017\330\014\026\220j\240\001\330\020\024\220N\240&\250\t\260\025\260i\270q\330\010\022\220!\2201\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\020*\250!\2504\320/A\300\021\330\010\027\220z\240\021\240!\200A\360\010\000\026-\250A\330\t\n\330\010\026\220a\220q\360\010\000\t#\240!\330\010\013\210<\220w\230a\330\014\031\230\037\250\001\250\035\260a\330\014\026\320\026.\250a\250q\340\010!\240\021\330""\010\013\2101\330\014\025\220]\240,\250a\250x\260r\270\021\330\014\020\220\005\220U\230!\2301\330\020\026\220a\220u\230H\320$<\270A\270\\\310\021\360\006\000\016\017\330\014\026\220n\240A\330\020\024\220N\240&\250\t\260\025\260i\270q\340\010\022\220!\2201\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\0203\2601\260D\3208J\310!\200A\330,-\330\010\024\220G\2301\230A\320\004,\250A\330\010\024\220J\230a\230t\320#3\2601\200A\340\t\n\330\010\030\230\001\320\031-\250Q\360\006\000\t\024\320\023$\240A\240T\250\036\260v\270Q\330\010\020\220\017\230q\240\005\240S\250\n\260!\330\014\022\220!\320\023$\240A\330\020.\250a\250t\3203E\300Q\200A\330./\330\010)\250\034\260Q\260a\330\010\013\2104\210q\330\014\022\220+\230Q\230a\340\010\025\220Z\230q\240\001\320\004\034\230A\330\010-\250\\\270\021\270$\270a\330\010\013\2109\220C\220q\330\014\023\2201\330\010\027\220z\240\021\240!\200A\360\006\000\027\030\330\027.\250a\330\034$\240A\330\t\n\330\010\026\220a\220q\360\016\000\t\023\220(\230)\240:\250[\3208J\310!\330\014\032\230&\240\001\360\006\000\016\017\330\014\026\320\026*\250!\330\020\024\220N\240&\250\005\250Z\3207L\310A\330\020\032\230*\240A\330\010\033\2301\230H\240I\250Z\260q\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\0201\260\021\260$\3206H\310\001\200A\360\006\000\027\030\330\027.\250a\330\034$\240A\330\t\n\330\010\026\220a\220q\360\016\000\t\023\220(\230)\240:\250[\3208J\310!\330\014\032\230&\240\001\360\006\000\016\017\330\014\026\220o\240Q\330\020\024\220N\240&\250\005\250Q\330\020%\240Q\330\020\032\230*\240A\340\010\033\2301\230H\240I\250Z\260q\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\330\0203\2601\260D\3208J\310!\340\010\027\220z\240\021\240!\320\004,\250A\330\010\026\220a\220q\340\r\016\330\014\034\230G\2401\240D\250\016\260a\330\010\013\2109\220C\220q\330\014\022\220!\320\023$\240A\330\020*\250!\2504\320/A\300\021\340\010\027\220z\240\021\240!\320\004$\240A\360\014\000\t\031\230\001\320\031/\250q\330\010\020\320\020#\2401\240D""\250\016\260c\270\021\330\014\022\220!\320\023$\240A\240T\320);\2701\200A\330\010\017\210s\220!\2204\220q\230\005\230\\\250\021\250$\250h\260g\270Q\270a\320\004\034\230A\330\010\017\210y\230\001\230\026\320\0370\260\001\320\004)\250\021\330\010\024\220G\2301\230D\320 0\260\001\320\004*\250!\330\010\024\220H\230A\230T\320!1\260\021\320\004\034\230H\240A\330\010\013\2103\210j\230\003\2301\330\014\022\220!\320\023%\240Q\240a\330\010\021\220\026\220q\230\010\240\001\330\r\025\220Q\220d\230.\250\001\320\004\030\230\001\340\010\034\230I\240Q\240d\250/\270\025\270g\300Q\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\020\"\240#\240W\250A\250X\260Q\200\001\330\004\020\220\r\230Q\320\004%\240Q\360\014\000\t\031\230\001\320\0310\260\001\330\010\020\320\020$\240A\240T\250\036\260s\270!\330\014\022\220!\320\023$\240A\240Q\320\004\035\230Q\330\010\030\230\001\320\031+\2501\330\010,\250O\2701\270D\300\001\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\240Q\330\010\033\230:\240Q\240a\200\001\330\004\n\210+\220Q\320\004\035\230Q\330\010\013\2109\220M\240\021\240$\240a\330\014\022\220!\320\023$\240A\240Q\320\004%\240Q\330\010\013\2109\320\024'\240q\250\004\250A\330\014\022\220!\320\023$\240A\240Q\200\001\360\010\000\005\016\210T\220\021\330\004\014\210G\2201\220F\230,\240a\330\004\007\200v\210W\220E\230\024\230Q\330\010\022\220!\330\010\027\220q\340\010\030\230\001\330\004\007\200q\330\010\017\320\017)\250\024\250Q\250g\260[\300\007\300q\340\010\017\320\017)\250\024\250Q\250g\260[\300\001\320\004*\250!\330\010\035\230X\240Q\240d\320*:\270!\330\010\013\2103\210g\220Q\330\014\023\2201\340\014\023\2201\320\004%\240Z\250q\330\010\030\230\001\320\031,\250A\330\r\035\230Q\230d\240.\260\001\320\004>\270a\330\010\030\230\001\330\010\030\230\001\330\010\037\230|\2501\250D\3200@\300\006\300a\340\010\013\2101\330\014\025\220[\240\001\240\024\320%5\260V\2701\340\014\023\2201\220B\220a\340\014\024\220L\240\001\240\024\320%5\260V\2701\330\020\027\220q\340\020\027\220q\320\004&\240a""\330\010\013\2104\320\017!\240\023\240A\330\014\022\220!\320\023$\240A\240Q\320\004\026\220a\330\010\013\2104\210~\230W\240A\330\021\036\230a\230t\2401\330\014\020\320\020 \240\001\320\004.\250a\330\010\024\220L\240\001\240\024\320%5\260Q\320\004\026\220a\330\010\014\320\014!\240\021\330\010\024\220M\240\021\240$\240a\320\004\036\230a\330\010\017\210y\230\001\230\026\320\0370\260\001\320\004:\270!\330\010\026\220a\220q\330\010\033\320\0332\260!\2604\260~\300Q\330\010\013\2104\210q\330\014\022\220!\320\023$\240A\330\0204\260A\260T\3209K\3101\200\001\330\004&\240a\240v\250Q\320\004\031\230\021\340\r\016\330\014\026\220i\230q\240\004\240A\330\010\017\210q\200\001\340\004\037\230q\320 0\260\013\270;\300k\320QR\330\004\023\2208\2308\2401\240A\330\004\007\200|\2207\230!\330\010*\250!\250;\260n\300A\330\004\013\2101\320\004\027\220q\330\010\014\320\014!\240\021\330\r\033\2301\230D\240\001\320\004*\250&\260\007\260q\330\010\017\320\017#\2401\240D\320(8\270\t\300\023\300D\310\001\320\004\037\230q\360\014\000\t\031\230\001\320\031+\2501\330\010\022\220/\240\021\240$\240a\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\240Q\330\010\013\2103\210c\220\021\330\014\022\220!\320\023$\240A\240Q\320\004\037\230q\330\010\013\2102\210X\220_\240A\240T\250\021\330\014\022\220!\320\023$\240A\330\020*\250!\2504\320/A\300\021\320\004\027\220q\330\010\013\2104\210\177\230g\240Q\330\021\031\230\021\230$\230a\330\014\020\320\020!\240\021\320\004'\240q\360\n\000\t#\240!\2408\2501\250I\260Q\260a\330\010\022\220.\240\001\240\024\240^\2609\270E\300\021\330\010\013\2103\210b\220\001\330\014\022\220!\320\023$\240A\330\020,\250A\250T\3201C\3001\330\010\017\210q\320\004\027\220q\360\014\000\t\014\2109\220N\240!\2404\240q\330\014\022\220!\320\023$\240A\330\020.\250a\250t\3203E\300Q\320\004\031\230\021\330\r\027\220q\230\004\230A\320\004\027\220q\330\010\026\220a\220q\330\r\025\220Q\220d\230!"; PyObject *data = NULL; CYTHON_UNUSED_VAR(__Pyx_DecompressString); #endif PyObject **stringtab = __pyx_mstate->__pyx_string_tab; Py_ssize_t pos = 0; for (int i = 0; i < 440; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyUnicode_DecodeUTF8(bytes + pos, bytes_length, NULL); if (likely(string) && i >= 95) PyUnicode_InternInPlace(&string); if (unlikely(!string)) { Py_XDECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } stringtab[i] = string; pos += bytes_length; } for (int i = 440; i < 522; i++) { Py_ssize_t bytes_length = index[i].length; PyObject *string = PyBytes_FromStringAndSize(bytes + pos, bytes_length); stringtab[i] = string; pos += bytes_length; if (unlikely(!string)) { Py_XDECREF(data); __PYX_ERR(0, 1, __pyx_L1_error) } } Py_XDECREF(data); for (Py_ssize_t i = 0; i < 522; i++) { if (unlikely(PyObject_Hash(stringtab[i]) == -1)) { __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = stringtab + 440; for (Py_ssize_t i=0; i<82; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); #else Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } } #endif } { PyObject **numbertab = __pyx_mstate->__pyx_number_tab + 0; int32_t const cint_constants_4[] = {8405287L}; for (int i = 0; i < 1; i++) { numbertab[i] = PyLong_FromLong(cint_constants_4[i - 0]); if (unlikely(!numbertab[i])) __PYX_ERR(0, 1, __pyx_L1_error) } } #if CYTHON_IMMORTAL_CONSTANTS { PyObject **table = __pyx_mstate->__pyx_number_tab; for (Py_ssize_t i=0; i<1; ++i) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING Py_SET_REFCNT(table[i], _Py_IMMORTAL_REFCNT_LOCAL); #else Py_SET_REFCNT(table[i], _Py_IMMORTAL_INITIAL_REFCNT); #endif } } #endif return 0; __pyx_L1_error:; return -1; } /* #### Code section: init_codeobjects ### */ typedef struct { unsigned int argcount : 3; unsigned int num_posonly_args : 1; unsigned int num_kwonly_args : 1; unsigned int nlocals : 4; unsigned int flags : 10; unsigned int first_line : 10; } __Pyx_PyCode_New_function_description; /* NewCodeObj.proto */ static PyObject* __Pyx_PyCode_New( const __Pyx_PyCode_New_function_description descr, PyObject * const *varnames, PyObject *filename, PyObject *funcname, PyObject *line_table, PyObject *tuple_dedup_map ); static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { const __Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 19}; PyObject* const varnames[] = {0}; __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pyx, __pyx_mstate->__pyx_n_u_version, __pyx_mstate->__pyx_kp_b_iso88591_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 72}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_conninfo, __pyx_mstate->__pyx_n_u_conninfo, __pyx_mstate->__pyx_n_u_pgconn}; __pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_connect, __pyx_mstate->__pyx_kp_b_iso88591_A_Qa_4q_Qa_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 80}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_conninfo, __pyx_mstate->__pyx_n_u_conninfo, __pyx_mstate->__pyx_n_u_pgconn}; __pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_connect_start, __pyx_mstate->__pyx_kp_b_iso88591_A45_4q_Qa_Zq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 88}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_connect_poll, __pyx_mstate->__pyx_kp_b_iso88591_a_y_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 91}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_4_G1_4q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 113}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_q_aq_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 117}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_reset_start, __pyx_mstate->__pyx_kp_b_iso88591_Q_9M_a_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 121}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_reset_poll, __pyx_mstate->__pyx_kp_b_iso88591_A_y_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 124}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_conninfo, __pyx_mstate->__pyx_n_u_conninfo}; __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_ping, __pyx_mstate->__pyx_kp_b_iso88591_A_G1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 172}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_parameter_status, __pyx_mstate->__pyx_kp_b_iso88591_4A_aq_5Qd_3gQ_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 184}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoding}; __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_get_error_message, __pyx_mstate->__pyx_kp_b_iso88591_q_1D_8_D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 240}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_pgresult}; __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_exec, __pyx_mstate->__pyx_kp_b_iso88591_A_aq_G1D_a_9Cq_A_4_A_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 251}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_query, __pyx_mstate->__pyx_kp_b_iso88591_1_aq_l_4_Q_4q_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 260}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_param_values, __pyx_mstate->__pyx_n_u_param_types, __pyx_mstate->__pyx_n_u_param_formats, __pyx_mstate->__pyx_n_u_result_format, __pyx_mstate->__pyx_n_u_cnparams, __pyx_mstate->__pyx_n_u_ctypes, __pyx_mstate->__pyx_n_u_cvalues, __pyx_mstate->__pyx_n_u_clengths, __pyx_mstate->__pyx_n_u_cformats, __pyx_mstate->__pyx_n_u_pgresult}; __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_exec_params, __pyx_mstate->__pyx_kp_b_iso88591_A_A_a_A_aq_8J_q_M_N_5_Yj_1HIZq_9, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 12, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 289}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_param_values, __pyx_mstate->__pyx_n_u_param_types, __pyx_mstate->__pyx_n_u_param_formats, __pyx_mstate->__pyx_n_u_result_format, __pyx_mstate->__pyx_n_u_cnparams, __pyx_mstate->__pyx_n_u_ctypes, __pyx_mstate->__pyx_n_u_cvalues, __pyx_mstate->__pyx_n_u_clengths, __pyx_mstate->__pyx_n_u_cformats, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_query_params, __pyx_mstate->__pyx_kp_b_iso88591_A_A_a_A_aq_8J_q_N_5_Yj_1HIZq_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 318}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_param_types, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_types_fast, __pyx_mstate->__pyx_n_u_nparams, __pyx_mstate->__pyx_n_u_atypes, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_prepare, __pyx_mstate->__pyx_kp_b_iso88591_A_A_aq_wa_a_aq_1_axr_U_1_auH_A_n, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 350}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_param_values, __pyx_mstate->__pyx_n_u_param_formats, __pyx_mstate->__pyx_n_u_result_format, __pyx_mstate->__pyx_n_u_cnparams, __pyx_mstate->__pyx_n_u_ctypes, __pyx_mstate->__pyx_n_u_cvalues, __pyx_mstate->__pyx_n_u_clengths, __pyx_mstate->__pyx_n_u_cformats, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_query_prepared, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_aq_8J_N_Z7LA_A_1HIZq_4q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 378}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_command, __pyx_mstate->__pyx_n_u_param_types, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_types_fast, __pyx_mstate->__pyx_n_u_nparams, __pyx_mstate->__pyx_n_u_atypes, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_prepare, __pyx_mstate->__pyx_kp_b_iso88591_A_A_aq_wa_a_aq_1_axr_U_1_auH_A_j, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 11, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 409}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_param_values, __pyx_mstate->__pyx_n_u_param_formats, __pyx_mstate->__pyx_n_u_result_format, __pyx_mstate->__pyx_n_u_cnparams, __pyx_mstate->__pyx_n_u_ctypes, __pyx_mstate->__pyx_n_u_cvalues, __pyx_mstate->__pyx_n_u_clengths, __pyx_mstate->__pyx_n_u_cformats, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_exec_prepared, __pyx_mstate->__pyx_kp_b_iso88591_A_a_A_aq_8J_oQ_N_Q_Q_A_1HIZq_3c, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 440}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_describe_prepared, __pyx_mstate->__pyx_kp_b_iso88591_5Q_aq_4_Q_3c_A_AT1C1_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 449}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_describe_prepared, __pyx_mstate->__pyx_kp_b_iso88591_aq_2_4_Q_4q_A_4AT9K1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 457}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_describe_portal, __pyx_mstate->__pyx_kp_b_iso88591_31_aq_8_1_3c_A_AT1C1_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 466}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_describe_portal, __pyx_mstate->__pyx_kp_b_iso88591_8_aq_0_1_4q_A_4AT9K1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 474}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_close_prepared, __pyx_mstate->__pyx_kp_b_iso88591_2_A_aq_7q_N_3c_A_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 484}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_close_prepared, __pyx_mstate->__pyx_kp_b_iso88591_7q_0_aq_q_N_4q_A_1_6H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 493}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_close_portal, __pyx_mstate->__pyx_kp_b_iso88591_0_aq_Qd_3c_A_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 503}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_name, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_close_portal, __pyx_mstate->__pyx_kp_b_iso88591_5Q_a_aq_Qd_4q_A_1_6H, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 512}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pgresult}; __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_get_result, __pyx_mstate->__pyx_kp_b_iso88591_A_a_9Cq_1_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 518}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_consume_input, __pyx_mstate->__pyx_kp_b_iso88591_q_2X_AT_A_4_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 523}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_is_busy, __pyx_mstate->__pyx_kp_b_iso88591_iq_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 539}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_flush, __pyx_mstate->__pyx_kp_b_iso88591_4_Cq_AQ_81D_3b_A_8_Oq_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 547}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_set_single_row_mode, __pyx_mstate->__pyx_kp_b_iso88591_Q_9_q_A_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 551}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_size}; __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_set_chunked_rows_mode, __pyx_mstate->__pyx_kp_b_iso88591_9_nA_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 555}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ptr}; __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_cancel_conn, __pyx_mstate->__pyx_kp_b_iso88591_Q_1_O1D_4q_AQ_Qa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 562}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ptr}; __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_get_cancel, __pyx_mstate->__pyx_kp_b_iso88591_A_AT_4q_AQ_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 568}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_notifies, __pyx_mstate->__pyx_kp_b_iso88591_A_4q_1_3j_9Cq_1A_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 579}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buffer, __pyx_mstate->__pyx_n_u_rv, __pyx_mstate->__pyx_n_u_cbuffer, __pyx_mstate->__pyx_n_u_length}; __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_put_copy_data, __pyx_mstate->__pyx_kp_b_iso88591_q_81IQa_9E_3b_A_AT1C1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 591}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_error, __pyx_mstate->__pyx_n_u_rv, __pyx_mstate->__pyx_n_u_cerr}; __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_put_copy_end, __pyx_mstate->__pyx_kp_b_iso88591_6_1A_q_N_3b_A_1D0B_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 602}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_async, __pyx_mstate->__pyx_n_u_async, __pyx_mstate->__pyx_n_u_buffer_ptr, __pyx_mstate->__pyx_n_u_nbytes, __pyx_mstate->__pyx_n_u_data}; __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_get_copy_data, __pyx_mstate->__pyx_kp_b_iso88591_1_nAT_q_A_7_a_A_at3EQ_gQ_Q_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 616}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fileno, __pyx_mstate->__pyx_n_u_stream}; __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_trace, __pyx_mstate->__pyx_kp_b_iso88591_HA_3j_1_Qa_q_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 622}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_flags}; __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_set_trace_flags, __pyx_mstate->__pyx_kp_b_iso88591_Zq_A_Qd, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 626}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_untrace, __pyx_mstate->__pyx_kp_b_iso88591_q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 629}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_passwd, __pyx_mstate->__pyx_n_u_user, __pyx_mstate->__pyx_n_u_algorithm, __pyx_mstate->__pyx_n_u_out, __pyx_mstate->__pyx_n_u_calgo, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_encrypt_password, __pyx_mstate->__pyx_kp_b_iso88591_A_A_2_1_A_nHF_4q_A_at3EQ_U_1_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 648}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_user, __pyx_mstate->__pyx_n_u_passwd, __pyx_mstate->__pyx_n_u_res}; __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_change_password, __pyx_mstate->__pyx_kp_b_iso88591_A_Q_AT_vQ_q_S_A_at3EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 660}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_exec_status, __pyx_mstate->__pyx_n_u_exec_status, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_make_empty_result, __pyx_mstate->__pyx_kp_b_iso88591_4A_1_4A_4q_Qa_z, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 678}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_enter_pipeline_mode, __pyx_mstate->__pyx_kp_b_iso88591_Q_0_AT_s_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 688}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_exit_pipeline_mode, __pyx_mstate->__pyx_kp_b_iso88591_A_q_1D_c_AT_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 698}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_pipeline_sync, __pyx_mstate->__pyx_kp_b_iso88591_q_1_a_3c_AQ_3c_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 711}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgconn_pyx, __pyx_mstate->__pyx_n_u_send_flush_request, __pyx_mstate->__pyx_kp_b_iso88591_A_0_at1_3c_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[50] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[50])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 33}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[51] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_clear, __pyx_mstate->__pyx_kp_b_iso88591_q_4_gQ_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[51])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 53}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoding}; __pyx_mstate_global->__pyx_codeobj_tab[52] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_get_error_message, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[52])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 56}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_fieldcode, __pyx_mstate->__pyx_n_u_fieldcode, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[53] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_error_field, __pyx_mstate->__pyx_kp_b_iso88591_A_1_6Fa_3gQ_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[53])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 71}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[54] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_fname, __pyx_mstate->__pyx_kp_b_iso88591_XQd_3gQ_1_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[54])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 78}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number}; __pyx_mstate_global->__pyx_codeobj_tab[55] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_ftable, __pyx_mstate->__pyx_kp_b_iso88591_1_IQd_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[55])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 81}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number}; __pyx_mstate_global->__pyx_codeobj_tab[56] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_ftablecol, __pyx_mstate->__pyx_kp_b_iso88591_a_L_5Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[56])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 84}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number}; __pyx_mstate_global->__pyx_codeobj_tab[57] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_fformat, __pyx_mstate->__pyx_kp_b_iso88591_A_Jat_31, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[57])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 87}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number}; __pyx_mstate_global->__pyx_codeobj_tab[58] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_ftype, __pyx_mstate->__pyx_kp_b_iso88591_HAT_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[58])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 90}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number}; __pyx_mstate_global->__pyx_codeobj_tab[59] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_fmod, __pyx_mstate->__pyx_kp_b_iso88591_G1D_0, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[59])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 93}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_column_number}; __pyx_mstate_global->__pyx_codeobj_tab[60] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_fsize, __pyx_mstate->__pyx_kp_b_iso88591_HAT_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[60])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 100}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_row_number, __pyx_mstate->__pyx_n_u_column_number, __pyx_mstate->__pyx_n_u_crow, __pyx_mstate->__pyx_n_u_ccol, __pyx_mstate->__pyx_n_u_length, __pyx_mstate->__pyx_n_u_v}; __pyx_mstate_global->__pyx_codeobj_tab[61] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_get_value, __pyx_mstate->__pyx_kp_b_iso88591_a_1D0_a_1_5V1_1Ba_L_5V1_q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[61])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 119}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_param_number, __pyx_mstate->__pyx_n_u_param_number}; __pyx_mstate_global->__pyx_codeobj_tab[62] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_param_type, __pyx_mstate->__pyx_kp_b_iso88591_a_L_5Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[62])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 142}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_descriptions, __pyx_mstate->__pyx_n_u_num, __pyx_mstate->__pyx_n_u_attrs, __pyx_mstate->__pyx_n_u_i, __pyx_mstate->__pyx_n_u_descr, __pyx_mstate->__pyx_n_u_res}; __pyx_mstate_global->__pyx_codeobj_tab[63] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgresult_pyx, __pyx_mstate->__pyx_n_u_set_attributes, __pyx_mstate->__pyx_kp_b_iso88591_1_c_1_E_aq_L_HE_KuA_L_Q_Je1_IU, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[63])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[64] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[64])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[65] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[65])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 21}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[66] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_start, __pyx_mstate->__pyx_kp_b_iso88591_q_9N_4q_A_at3EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[66])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 32}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[67] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_blocking, __pyx_mstate->__pyx_kp_b_iso88591_9_Qd_A_at3EQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[67])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 43}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[68] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_poll, __pyx_mstate->__pyx_kp_b_iso88591_a_M_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[68])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 62}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_encoding}; __pyx_mstate_global->__pyx_codeobj_tab[69] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_get_error_message, __pyx_mstate->__pyx_kp_b_iso88591_A_1D_8, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[69])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 65}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[70] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_reset, __pyx_mstate->__pyx_kp_b_iso88591_q_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[70])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 69}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[71] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_finish, __pyx_mstate->__pyx_kp_b_iso88591_4_Q_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[71])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 74}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[72] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_ensure_pgcancelconn, __pyx_mstate->__pyx_kp_b_iso88591_a_4_A_AQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[72])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[73] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[73])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[74] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[74])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 92}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[75] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_free, __pyx_mstate->__pyx_kp_b_iso88591_a_4_WA_at1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[75])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_res}; __pyx_mstate_global->__pyx_codeobj_tab[76] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_pgcancel_pyx, __pyx_mstate->__pyx_n_u_cancel, __pyx_mstate->__pyx_kp_b_iso88591_IQd_gQ_4q_A_WAXQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[76])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[77] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[77])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[78] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[78])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 11}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_opts, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[79] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_conninfo_pyx, __pyx_mstate->__pyx_n_u_get_defaults, __pyx_mstate->__pyx_kp_b_iso88591_A_1_5_1_Qa_AQ_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[79])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 20}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_cls, __pyx_mstate->__pyx_n_u_conninfo, __pyx_mstate->__pyx_n_u_errmsg, __pyx_mstate->__pyx_n_u_opts, __pyx_mstate->__pyx_n_u_exc, __pyx_mstate->__pyx_n_u_rv}; __pyx_mstate_global->__pyx_codeobj_tab[80] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_conninfo_pyx, __pyx_mstate->__pyx_n_u_parse, __pyx_mstate->__pyx_kp_b_iso88591_A_A_11A_AQ_5_1_wc_k_a_waxq_q_a_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[80])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 36}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[81] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_conninfo_pyx, __pyx_mstate->__pyx_n_u_repr, __pyx_mstate->__pyx_kp_b_iso88591_A_s_4q_hgQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[81])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 15}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; __pyx_mstate_global->__pyx_codeobj_tab[82] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_escaping_pyx, __pyx_mstate->__pyx_n_u_escape_literal, __pyx_mstate->__pyx_kp_b_iso88591_A_4vS_AQ_4uM_A_AQ_6_q_1D_5_4s_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[82])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 37}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; __pyx_mstate_global->__pyx_codeobj_tab[83] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_escaping_pyx, __pyx_mstate->__pyx_n_u_escape_identifier, __pyx_mstate->__pyx_kp_b_iso88591_A_6_q_4vS_AQ_4uM_A_AQ_at5_e1_4s, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[83])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 59}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; __pyx_mstate_global->__pyx_codeobj_tab[84] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_escaping_pyx, __pyx_mstate->__pyx_n_u_escape_string, __pyx_mstate->__pyx_kp_b_iso88591_A_6_q_4vWA_t5_S_a_hl_7_Bb_a_E_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[84])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 90}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data}; __pyx_mstate_global->__pyx_codeobj_tab[85] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_escaping_pyx, __pyx_mstate->__pyx_n_u_escape_bytea, __pyx_mstate->__pyx_kp_b_iso88591_A_4vWE_T_m3a_AQ_6_q_4vWA_E_8_XQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[85])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 116}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_data, __pyx_mstate->__pyx_n_u_data}; __pyx_mstate_global->__pyx_codeobj_tab[86] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_psycopg_binary_pq_escaping_pyx, __pyx_mstate->__pyx_n_u_unescape_bytea, __pyx_mstate->__pyx_kp_b_iso88591_A_4vWA_t5_S_a_7q_aq_4s_Q_3aq_S_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[86])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_state, __pyx_mstate->__pyx_n_u_dict_2, __pyx_mstate->__pyx_n_u_use_setstate}; __pyx_mstate_global->__pyx_codeobj_tab[87] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_T_G1F_a_vWE_Q_q_q_Qg_q_Qg, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[87])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 16}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[88] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_avQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[88])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[89] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[89])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[90] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[90])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; __pyx_mstate_global->__pyx_codeobj_tab[91] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[91])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; __pyx_mstate_global->__pyx_codeobj_tab[92] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_mstate->__pyx_kp_b_iso88591_Q_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[92])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 4}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_pyx_type, __pyx_mstate->__pyx_n_u_pyx_checksum, __pyx_mstate->__pyx_n_u_pyx_state, __pyx_mstate->__pyx_n_u_pyx_result}; __pyx_mstate_global->__pyx_codeobj_tab[93] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_pyx_unpickle_Escaping, __pyx_mstate->__pyx_kp_b_iso88591_q_0_kQR_881A_7_nA_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[93])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; bad: Py_DECREF(tuple_dedup_map); return -1; } /* #### Code section: init_globals ### */ static int __Pyx_InitGlobals(void) { /* PythonCompatibility.init */ if (likely(__Pyx_init_co_variables() == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* AssertionsEnabled.init */ if (likely(__Pyx_init_assertions_enabled() == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CommonTypesMetaclass.init */ if (likely(__pyx_CommonTypesMetaclass_init(__pyx_m) == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CachedMethodType.init */ #if CYTHON_COMPILING_IN_LIMITED_API { PyObject *typesModule=NULL; typesModule = PyImport_ImportModule("types"); if (typesModule) { __pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); Py_DECREF(typesModule); } } // error handling follows #endif if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) /* CythonFunctionShared.init */ if (likely(__pyx_CyFunction_init(__pyx_m) == 0)); else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } /* #### Code section: cleanup_globals ### */ /* #### Code section: cleanup_module ### */ /* #### Code section: main_method ### */ /* #### Code section: utility_code_pragmas ### */ #ifdef _MSC_VER #pragma warning( push ) /* Warning 4127: conditional expression is constant * Cython uses constant conditional expressions to allow in inline functions to be optimized at * compile-time, so this warning is not useful */ #pragma warning( disable : 4127 ) #endif /* #### Code section: utility_code_def ### */ /* --- Runtime support code --- */ /* Refnanny */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule(modname); if (!m) goto end; p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif /* PyErrExceptionMatches (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); for (i=0; i= 0x030C00A6 PyObject *current_exception = tstate->current_exception; if (unlikely(!current_exception)) return 0; exc_type = (PyObject*) Py_TYPE(current_exception); if (exc_type == err) return 1; #else exc_type = tstate->curexc_type; if (exc_type == err) return 1; if (unlikely(!exc_type)) return 0; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(exc_type); #endif if (unlikely(PyTuple_Check(err))) { result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); } else { result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(exc_type); #endif return result; } #endif /* PyErrFetchRestore (used by PyObjectGetAttrStrNoError) */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject *tmp_value; assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); if (value) { #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) #endif PyException_SetTraceback(value, tb); } tmp_value = tstate->current_exception; tstate->current_exception = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyObject* exc_value; exc_value = tstate->current_exception; tstate->current_exception = 0; *value = exc_value; *type = NULL; *tb = NULL; if (exc_value) { *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); #if CYTHON_COMPILING_IN_CPYTHON *tb = ((PyBaseExceptionObject*) exc_value)->traceback; Py_XINCREF(*tb); #else *tb = PyException_GetTraceback(exc_value); #endif } #else *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif } #endif /* PyObjectGetAttrStr (used by PyObjectGetAttrStrNoError) */ #if CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); return PyObject_GetAttr(obj, attr_name); } #endif /* PyObjectGetAttrStrNoError (used by GetBuiltinName) */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) __Pyx_PyErr_Clear(); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { PyObject *result; #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 (void) PyObject_GetOptionalAttr(obj, attr_name, &result); return result; #else #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); } #endif result = __Pyx_PyObject_GetAttrStr(obj, attr_name); if (unlikely(!result)) { __Pyx_PyObject_GetAttrStr_ClearAttributeError(); } return result; #endif } /* GetBuiltinName */ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); if (unlikely(!result) && !PyErr_Occurred()) { PyErr_Format(PyExc_NameError, "name '%U' is not defined", name); } return result; } /* TupleAndListFromArray (used by fastcall) */ #if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; Py_ssize_t i; if (n <= 0) { return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; for (i = 0; i < n; i++) { if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < (0))) { Py_DECREF(res); return NULL; } Py_INCREF(src[i]); } return res; } #elif CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { PyObject *v; Py_ssize_t i; for (i = 0; i < length; i++) { v = dest[i] = src[i]; Py_INCREF(v); } } static CYTHON_INLINE PyObject * __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); } res = PyTuple_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); return res; } static CYTHON_INLINE PyObject * __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) { PyObject *res; if (n <= 0) { return PyList_New(0); } res = PyList_New(n); if (unlikely(res == NULL)) return NULL; __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); return res; } #endif /* BytesEquals (used by UnicodeEquals) */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ !(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result; #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) Py_hash_t hash1, hash2; hash1 = ((PyBytesObject*)s1)->ob_shash; hash2 = ((PyBytesObject*)s2)->ob_shash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { return (equals == Py_NE); } #endif result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } /* UnicodeEquals (used by fastcall) */ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL return PyObject_RichCompareBool(s1, s2, equals); #else int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length, length2; int kind; void *data1, *data2; #if !CYTHON_COMPILING_IN_LIMITED_API if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; #endif length = __Pyx_PyUnicode_GET_LENGTH(s1); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(length < 0)) return -1; #endif length2 = __Pyx_PyUnicode_GET_LENGTH(s2); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(length2 < 0)) return -1; #endif if (length != length2) { goto return_ne; } #if CYTHON_USE_UNICODE_INTERNALS { Py_hash_t hash1, hash2; hash1 = ((PyASCIIObject*)s1)->hash; hash2 = ((PyASCIIObject*)s2)->hash; if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { goto return_ne; } } #endif kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: return (equals == Py_EQ); return_ne: return (equals == Py_NE); #endif } /* fastcall */ #if CYTHON_METH_FASTCALL static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) { Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(n == -1)) return NULL; #endif for (i = 0; i < n; i++) { PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!namei)) return NULL; #endif if (s == namei) return kwvalues[i]; } for (i = 0; i < n; i++) { PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!namei)) return NULL; #endif int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); if (unlikely(eq != 0)) { if (unlikely(eq < 0)) return NULL; return kwvalues[i]; } } return NULL; } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 || CYTHON_COMPILING_IN_LIMITED_API CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { Py_ssize_t i, nkwargs; PyObject *dict; #if !CYTHON_ASSUME_SAFE_SIZE nkwargs = PyTuple_Size(kwnames); if (unlikely(nkwargs < 0)) return NULL; #else nkwargs = PyTuple_GET_SIZE(kwnames); #endif dict = PyDict_New(); if (unlikely(!dict)) return NULL; for (i=0; itp_dict; return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { #if CYTHON_COMPILING_IN_CPYTHON dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); #else dictptr = _PyObject_GetDictPtr(obj); #endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } #endif /* GetModuleGlobalName */ #if CYTHON_USE_DICT_VERSIONS static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) #else static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) #endif { PyObject *result; #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(!__pyx_m)) { if (!PyErr_Occurred()) PyErr_SetNone(PyExc_NameError); return NULL; } result = PyObject_GetAttr(__pyx_m, name); if (likely(result)) { return result; } PyErr_Clear(); #elif CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return result; } #else result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); __PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { return __Pyx_NewRef(result); } PyErr_Clear(); #endif return __Pyx_GetBuiltinName(name); } /* PyObjectCall (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = Py_TYPE(func)->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectCallMethO (used by PyObjectFastCall) */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); self = __Pyx_CyOrPyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif /* PyObjectFastCall (used by PyObjectCallOneArg) */ #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject * const*args, size_t nargs, PyObject *kwargs) { PyObject *argstuple; PyObject *result = 0; size_t i; argstuple = PyTuple_New((Py_ssize_t)nargs); if (unlikely(!argstuple)) return NULL; for (i = 0; i < nargs; i++) { Py_INCREF(args[i]); if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; } result = __Pyx_PyObject_Call(func, argstuple, kwargs); bad: Py_DECREF(argstuple); return result; } #endif #if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x03090000 #define __Pyx_PyVectorcall_Function(callable) _PyVectorcall_Function(callable) #elif CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE vectorcallfunc __Pyx_PyVectorcall_Function(PyObject *callable) { PyTypeObject *tp = Py_TYPE(callable); #if defined(__Pyx_CyFunction_USED) if (__Pyx_CyFunction_CheckExact(callable)) { return __Pyx_CyFunction_func_vectorcall(callable); } #endif if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) { return NULL; } assert(PyCallable_Check(callable)); Py_ssize_t offset = tp->tp_vectorcall_offset; assert(offset > 0); vectorcallfunc ptr; memcpy(&ptr, (char *) callable + offset, sizeof(ptr)); return ptr; } #else #define __Pyx_PyVectorcall_Function(callable) PyVectorcall_Function(callable) #endif #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject *const *args, size_t _nargs, PyObject *kwargs) { Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); #if CYTHON_COMPILING_IN_CPYTHON if (nargs == 0 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) return __Pyx_PyObject_CallMethO(func, NULL); } else if (nargs == 1 && kwargs == NULL) { if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) return __Pyx_PyObject_CallMethO(func, args[0]); } #endif if (kwargs == NULL) { #if CYTHON_VECTORCALL #if CYTHON_COMPILING_IN_LIMITED_API return PyObject_Vectorcall(func, args, _nargs, NULL); #else vectorcallfunc f = __Pyx_PyVectorcall_Function(func); if (f) { return f(func, args, _nargs, NULL); } #endif #endif } if (nargs == 0) { return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); } #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); #else return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); #endif } /* PyObjectCallOneArg */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *args[2] = {NULL, arg}; return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* JoinPyUnicode */ static PyObject* __Pyx_PyUnicode_Join(PyObject** values, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; int result_ukind, kind_shift; Py_ssize_t i, char_pos; void *result_udata; if (max_char > 1114111) max_char = 1114111; result_uval = PyUnicode_New(result_ulength, max_char); if (unlikely(!result_uval)) return NULL; result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1; result_udata = PyUnicode_DATA(result_uval); assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0); if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - result_ulength < 0)) goto overflow; char_pos = 0; for (i=0; i < value_count; i++) { int ukind; Py_ssize_t ulength; void *udata; PyObject *uval = values[i]; #if !CYTHON_COMPILING_IN_LIMITED_API if (__Pyx_PyUnicode_READY(uval) == (-1)) goto bad; #endif ulength = __Pyx_PyUnicode_GET_LENGTH(uval); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(ulength < 0)) goto bad; #endif if (unlikely(!ulength)) continue; if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos)) goto overflow; ukind = __Pyx_PyUnicode_KIND(uval); udata = __Pyx_PyUnicode_DATA(uval); if (ukind == result_ukind) { memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift)); } else { #if PY_VERSION_HEX >= 0x030d0000 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad; #elif CYTHON_COMPILING_IN_CPYTHON || defined(_PyUnicode_FastCopyCharacters) _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); #else Py_ssize_t j; for (j=0; j < ulength; j++) { Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); } #endif } char_pos += ulength; } return result_uval; overflow: PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); bad: Py_DECREF(result_uval); return NULL; #else Py_ssize_t i; PyObject *result = NULL; PyObject *value_tuple = PyTuple_New(value_count); if (unlikely(!value_tuple)) return NULL; CYTHON_UNUSED_VAR(max_char); CYTHON_UNUSED_VAR(result_ulength); for (i=0; i__pyx_empty_unicode, value_tuple); bad: Py_DECREF(value_tuple); return result; #endif } /* RaiseException */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } if (cause) { PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if PY_VERSION_HEX >= 0x030C00A6 PyException_SetTraceback(value, tb); #elif CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #else PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #endif } bad: Py_XDECREF(owned_instance); return; } /* 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); } /* UnpackUnboundCMethod (used by CallUnboundCMethod0) */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { PyObject *result; PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); if (unlikely(!selfless_args)) return NULL; result = PyObject_Call(method, selfless_args, kwargs); Py_DECREF(selfless_args); return result; } #elif CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03090000 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) { return _PyObject_Vectorcall (method, args ? args+1 : NULL, nargs ? nargs-1 : 0, kwnames); } #else static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames) { return #if PY_VERSION_HEX < 0x03090000 _PyObject_Vectorcall #else PyObject_Vectorcall #endif (method, args ? args+1 : NULL, nargs ? (size_t) nargs-1 : 0, kwnames); } #endif static PyMethodDef __Pyx_UnboundCMethod_Def = { "CythonUnboundCMethod", __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall), #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030C0000 METH_VARARGS | METH_KEYWORDS, #else METH_FASTCALL | METH_KEYWORDS, #endif NULL }; static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method, *result=NULL; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; result = method; #if CYTHON_COMPILING_IN_CPYTHON if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } else #endif #if CYTHON_COMPILING_IN_PYPY #else if (PyCFunction_Check(method)) #endif { PyObject *self; int self_found; #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY self = PyObject_GetAttrString(method, "__self__"); if (!self) { PyErr_Clear(); } #else self = PyCFunction_GET_SELF(method); #endif self_found = (self && self != Py_None); #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY Py_XDECREF(self); #endif if (self_found) { PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method); if (unlikely(!unbound_method)) return -1; Py_DECREF(method); result = unbound_method; } } #if !CYTHON_COMPILING_IN_CPYTHON_FREETHREADING if (unlikely(target->method)) { Py_DECREF(result); } else #endif target->method = result; return 0; } /* CallUnboundCMethod0 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); if (likely(was_initialized == 2 && cfunc->func)) { if (likely(cfunc->flag == METH_NOARGS)) return __Pyx_CallCFunction(cfunc, self, NULL); if (likely(cfunc->flag == METH_FASTCALL)) return __Pyx_CallCFunctionFast(cfunc, self, NULL, 0); if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, NULL, 0, NULL); if (likely(cfunc->flag == (METH_VARARGS | METH_KEYWORDS))) return __Pyx_CallCFunctionWithKeywords(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple, NULL); if (cfunc->flag == METH_VARARGS) return __Pyx_CallCFunction(cfunc, self, __pyx_mstate_global->__pyx_empty_tuple); return __Pyx__CallUnboundCMethod0(cfunc, self); } #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING else if (unlikely(was_initialized == 1)) { __Pyx_CachedCFunction tmp_cfunc = { #ifndef __cplusplus 0 #endif }; tmp_cfunc.type = cfunc->type; tmp_cfunc.method_name = cfunc->method_name; return __Pyx__CallUnboundCMethod0(&tmp_cfunc, self); } #endif PyObject *result = __Pyx__CallUnboundCMethod0(cfunc, self); __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); return result; } #endif static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *result; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; result = __Pyx_PyObject_CallOneArg(cfunc->method, self); return result; } /* py_dict_items (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_items, d); } /* py_dict_values (used by OwnedDictNext) */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { return __Pyx_CallUnboundCMethod0(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_values, d); } /* OwnedDictNext (used by RejectKeywords) */ #if CYTHON_AVOID_BORROWED_REFS static int __Pyx_PyDict_NextRef(PyObject *p, PyObject **ppos, PyObject **pkey, PyObject **pvalue) { PyObject *next = NULL; if (!*ppos) { if (pvalue) { PyObject *dictview = pkey ? __Pyx_PyDict_Items(p) : __Pyx_PyDict_Values(p); if (unlikely(!dictview)) goto bad; *ppos = PyObject_GetIter(dictview); Py_DECREF(dictview); } else { *ppos = PyObject_GetIter(p); } if (unlikely(!*ppos)) goto bad; } next = PyIter_Next(*ppos); if (!next) { if (PyErr_Occurred()) goto bad; return 0; } if (pkey && pvalue) { *pkey = __Pyx_PySequence_ITEM(next, 0); if (unlikely(*pkey)) goto bad; *pvalue = __Pyx_PySequence_ITEM(next, 1); if (unlikely(*pvalue)) goto bad; Py_DECREF(next); } else if (pkey) { *pkey = next; } else { assert(pvalue); *pvalue = next; } return 1; bad: Py_XDECREF(next); #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 PyErr_FormatUnraisable("Exception ignored in __Pyx_PyDict_NextRef"); #else PyErr_WriteUnraisable(__pyx_mstate_global->__pyx_n_u_Pyx_PyDict_NextRef); #endif if (pkey) *pkey = NULL; if (pvalue) *pvalue = NULL; return 0; } #else // !CYTHON_AVOID_BORROWED_REFS static int __Pyx_PyDict_NextRef(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue) { int result = PyDict_Next(p, ppos, pkey, pvalue); if (likely(result == 1)) { if (pkey) Py_INCREF(*pkey); if (pvalue) Py_INCREF(*pvalue); } return result; } #endif /* RejectKeywords */ static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds) { PyObject *key = NULL; if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) { key = __Pyx_PySequence_ITEM(kwds, 0); } else { #if CYTHON_AVOID_BORROWED_REFS PyObject *pos = NULL; #else Py_ssize_t pos = 0; #endif #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return; #endif __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(pos); #endif } if (likely(key)) { PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); Py_DECREF(key); } } /* PyObjectFastCallMethod */ #if !CYTHON_VECTORCALL || PY_VERSION_HEX < 0x03090000 static PyObject *__Pyx_PyObject_FastCallMethod(PyObject *name, PyObject *const *args, size_t nargsf) { PyObject *result; PyObject *attr = PyObject_GetAttr(args[0], name); if (unlikely(!attr)) return NULL; result = __Pyx_PyObject_FastCall(attr, args+1, nargsf - 1); Py_DECREF(attr); return result; } #endif /* WriteUnraisableException */ static void __Pyx_WriteUnraisable(const char *name, int clineno, int lineno, const char *filename, int full_traceback, int nogil) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_PyThreadState_declare PyGILState_STATE state; if (nogil) state = PyGILState_Ensure(); else state = (PyGILState_STATE)0; CYTHON_UNUSED_VAR(clineno); CYTHON_UNUSED_VAR(lineno); CYTHON_UNUSED_VAR(filename); CYTHON_MAYBE_UNUSED_VAR(nogil); __Pyx_PyThreadState_assign __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); if (full_traceback) { Py_XINCREF(old_exc); Py_XINCREF(old_val); Py_XINCREF(old_tb); __Pyx_ErrRestore(old_exc, old_val, old_tb); PyErr_PrintEx(0); } ctx = PyUnicode_FromString(name); __Pyx_ErrRestore(old_exc, old_val, old_tb); if (!ctx) { PyErr_WriteUnraisable(Py_None); } else { PyErr_WriteUnraisable(ctx); Py_DECREF(ctx); } if (nogil) PyGILState_Release(state); } /* PyObjectFormat */ #if CYTHON_USE_UNICODE_WRITER static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { int ret; _PyUnicodeWriter writer; if (likely(PyFloat_CheckExact(obj))) { _PyUnicodeWriter_Init(&writer); ret = _PyFloat_FormatAdvancedWriter( &writer, obj, format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); } else if (likely(PyLong_CheckExact(obj))) { _PyUnicodeWriter_Init(&writer); ret = _PyLong_FormatAdvancedWriter( &writer, obj, format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); } else { return PyObject_Format(obj, format_spec); } if (unlikely(ret == -1)) { _PyUnicodeWriter_Dealloc(&writer); return NULL; } return _PyUnicodeWriter_Finish(&writer); } #endif /* pybuiltin_invalid (used by pyint_simplify) */ static void __Pyx_PyBuiltin_Invalid(PyObject *obj, const char *type_name, const char *argname) { __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); if (argname) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got " __Pyx_FMT_TYPENAME ")", argname, type_name, obj_type_name ); } else { PyErr_Format(PyExc_TypeError, "Expected %.200s, got " __Pyx_FMT_TYPENAME, type_name, obj_type_name ); } __Pyx_DECREF_TypeName(obj_type_name); } /* pyint_simplify */ static CYTHON_INLINE int __Pyx_PyInt_FromNumber(PyObject **number_var, const char *argname, int accept_none) { PyObject *number = *number_var; if (likely((accept_none && number == Py_None) || PyLong_CheckExact(number))) { return 0; } PyObject *int_object; if (likely(PyNumber_Check(number))) { int_object = PyNumber_Long(number); if (unlikely(!int_object)) goto bad; } else { __Pyx_PyBuiltin_Invalid(number, "int", argname); goto bad; } *number_var = int_object; Py_DECREF(number); return 0; bad: *number_var = NULL; Py_DECREF(number); return -1; } /* RaiseDoubleKeywords (used by ParseKeywordsImpl) */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, "%s() got multiple values for keyword argument '%U'", func_name, kw_name); } /* CallUnboundCMethod2 */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { int was_initialized = __Pyx_CachedCFunction_GetAndSetInitializing(cfunc); if (likely(was_initialized == 2 && cfunc->func)) { PyObject *args[2] = {arg1, arg2}; if (cfunc->flag == METH_FASTCALL) { return __Pyx_CallCFunctionFast(cfunc, self, args, 2); } if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) return __Pyx_CallCFunctionFastWithKeywords(cfunc, self, args, 2, NULL); } #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING else if (unlikely(was_initialized == 1)) { __Pyx_CachedCFunction tmp_cfunc = { #ifndef __cplusplus 0 #endif }; tmp_cfunc.type = cfunc->type; tmp_cfunc.method_name = cfunc->method_name; return __Pyx__CallUnboundCMethod2(&tmp_cfunc, self, arg1, arg2); } #endif PyObject *result = __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); __Pyx_CachedCFunction_SetFinishedInitializing(cfunc); return result; } #endif static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON if (cfunc->func && (cfunc->flag & METH_VARARGS)) { PyObject *result = NULL; PyObject *args = PyTuple_New(2); if (unlikely(!args)) return NULL; Py_INCREF(arg1); PyTuple_SET_ITEM(args, 0, arg1); Py_INCREF(arg2); PyTuple_SET_ITEM(args, 1, arg2); if (cfunc->flag & METH_KEYWORDS) result = __Pyx_CallCFunctionWithKeywords(cfunc, self, args, NULL); else result = __Pyx_CallCFunction(cfunc, self, args); Py_DECREF(args); return result; } #endif { PyObject *args[4] = {NULL, self, arg1, arg2}; return __Pyx_PyObject_FastCall(cfunc->method, args+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } } /* ParseKeywordsImpl (used by ParseKeywords) */ static int __Pyx_ValidateDuplicatePosArgs( PyObject *kwds, PyObject ** const argnames[], PyObject ** const *first_kw_arg, const char* function_name) { PyObject ** const *name = argnames; while (name != first_kw_arg) { PyObject *key = **name; int found = PyDict_Contains(kwds, key); if (unlikely(found)) { if (found == 1) __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; } name++; } return 0; bad: return -1; } #if CYTHON_USE_UNICODE_INTERNALS static CYTHON_INLINE int __Pyx_UnicodeKeywordsEqual(PyObject *s1, PyObject *s2) { int kind; Py_ssize_t len = PyUnicode_GET_LENGTH(s1); if (len != PyUnicode_GET_LENGTH(s2)) return 0; kind = PyUnicode_KIND(s1); if (kind != PyUnicode_KIND(s2)) return 0; const void *data1 = PyUnicode_DATA(s1); const void *data2 = PyUnicode_DATA(s2); return (memcmp(data1, data2, (size_t) len * (size_t) kind) == 0); } #endif static int __Pyx_MatchKeywordArg_str( PyObject *key, PyObject ** const argnames[], PyObject ** const *first_kw_arg, size_t *index_found, const char *function_name) { PyObject ** const *name; #if CYTHON_USE_UNICODE_INTERNALS Py_hash_t key_hash = ((PyASCIIObject*)key)->hash; if (unlikely(key_hash == -1)) { key_hash = PyObject_Hash(key); if (unlikely(key_hash == -1)) goto bad; } #endif name = first_kw_arg; while (*name) { PyObject *name_str = **name; #if CYTHON_USE_UNICODE_INTERNALS if (key_hash == ((PyASCIIObject*)name_str)->hash && __Pyx_UnicodeKeywordsEqual(name_str, key)) { *index_found = (size_t) (name - argnames); return 1; } #else #if CYTHON_ASSUME_SAFE_SIZE if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) #endif { int cmp = PyUnicode_Compare(name_str, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { *index_found = (size_t) (name - argnames); return 1; } } #endif name++; } name = argnames; while (name != first_kw_arg) { PyObject *name_str = **name; #if CYTHON_USE_UNICODE_INTERNALS if (unlikely(key_hash == ((PyASCIIObject*)name_str)->hash)) { if (__Pyx_UnicodeKeywordsEqual(name_str, key)) goto arg_passed_twice; } #else #if CYTHON_ASSUME_SAFE_SIZE if (PyUnicode_GET_LENGTH(name_str) == PyUnicode_GET_LENGTH(key)) #endif { if (unlikely(name_str == key)) goto arg_passed_twice; int cmp = PyUnicode_Compare(name_str, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; } #endif name++; } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; bad: return -1; } static int __Pyx_MatchKeywordArg_nostr( PyObject *key, PyObject ** const argnames[], PyObject ** const *first_kw_arg, size_t *index_found, const char *function_name) { PyObject ** const *name; if (unlikely(!PyUnicode_Check(key))) goto invalid_keyword_type; name = first_kw_arg; while (*name) { int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); if (cmp == 1) { *index_found = (size_t) (name - argnames); return 1; } if (unlikely(cmp == -1)) goto bad; name++; } name = argnames; while (name != first_kw_arg) { int cmp = PyObject_RichCompareBool(**name, key, Py_EQ); if (unlikely(cmp != 0)) { if (cmp == 1) goto arg_passed_twice; else goto bad; } name++; } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; bad: return -1; } static CYTHON_INLINE int __Pyx_MatchKeywordArg( PyObject *key, PyObject ** const argnames[], PyObject ** const *first_kw_arg, size_t *index_found, const char *function_name) { return likely(PyUnicode_CheckExact(key)) ? __Pyx_MatchKeywordArg_str(key, argnames, first_kw_arg, index_found, function_name) : __Pyx_MatchKeywordArg_nostr(key, argnames, first_kw_arg, index_found, function_name); } static void __Pyx_RejectUnknownKeyword( PyObject *kwds, PyObject ** const argnames[], PyObject ** const *first_kw_arg, const char *function_name) { #if CYTHON_AVOID_BORROWED_REFS PyObject *pos = NULL; #else Py_ssize_t pos = 0; #endif PyObject *key = NULL; __Pyx_BEGIN_CRITICAL_SECTION(kwds); while ( #if CYTHON_AVOID_BORROWED_REFS __Pyx_PyDict_NextRef(kwds, &pos, &key, NULL) #else PyDict_Next(kwds, &pos, &key, NULL) #endif ) { PyObject** const *name = first_kw_arg; while (*name && (**name != key)) name++; if (!*name) { size_t index_found = 0; int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); if (cmp != 1) { if (cmp == 0) { PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(key); #endif break; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(key); #endif } __Pyx_END_CRITICAL_SECTION(); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(pos); #endif assert(PyErr_Occurred()); } static int __Pyx_ParseKeywordDict( PyObject *kwds, PyObject ** const argnames[], PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs) { PyObject** const *name; PyObject** const *first_kw_arg = argnames + num_pos_args; Py_ssize_t extracted = 0; #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; #endif name = first_kw_arg; while (*name && num_kwargs > extracted) { PyObject * key = **name; PyObject *value; int found = 0; #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 found = PyDict_GetItemRef(kwds, key, &value); #else value = PyDict_GetItemWithError(kwds, key); if (value) { Py_INCREF(value); found = 1; } else { if (unlikely(PyErr_Occurred())) goto bad; } #endif if (found) { if (unlikely(found < 0)) goto bad; values[name-argnames] = value; extracted++; } name++; } if (num_kwargs > extracted) { if (ignore_unknown_kwargs) { if (unlikely(__Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name) == -1)) goto bad; } else { __Pyx_RejectUnknownKeyword(kwds, argnames, first_kw_arg, function_name); goto bad; } } return 0; bad: return -1; } static int __Pyx_ParseKeywordDictToDict( PyObject *kwds, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject** const *name; PyObject** const *first_kw_arg = argnames + num_pos_args; Py_ssize_t len; #if !CYTHON_COMPILING_IN_PYPY || defined(PyArg_ValidateKeywordArguments) if (unlikely(!PyArg_ValidateKeywordArguments(kwds))) return -1; #endif if (PyDict_Update(kwds2, kwds) < 0) goto bad; name = first_kw_arg; while (*name) { PyObject *key = **name; PyObject *value; #if !CYTHON_COMPILING_IN_LIMITED_API && (PY_VERSION_HEX >= 0x030d00A2 || defined(PyDict_Pop)) int found = PyDict_Pop(kwds2, key, &value); if (found) { if (unlikely(found < 0)) goto bad; values[name-argnames] = value; } #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 int found = PyDict_GetItemRef(kwds2, key, &value); if (found) { if (unlikely(found < 0)) goto bad; values[name-argnames] = value; if (unlikely(PyDict_DelItem(kwds2, key) < 0)) goto bad; } #else #if CYTHON_COMPILING_IN_CPYTHON value = _PyDict_Pop(kwds2, key, kwds2); #else value = __Pyx_CallUnboundCMethod2(&__pyx_mstate_global->__pyx_umethod_PyDict_Type_pop, kwds2, key, kwds2); #endif if (value == kwds2) { Py_DECREF(value); } else { if (unlikely(!value)) goto bad; values[name-argnames] = value; } #endif name++; } len = PyDict_Size(kwds2); if (len > 0) { return __Pyx_ValidateDuplicatePosArgs(kwds, argnames, first_kw_arg, function_name); } else if (unlikely(len == -1)) { goto bad; } return 0; bad: return -1; } static int __Pyx_ParseKeywordsTuple( PyObject *kwds, PyObject * const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs) { PyObject *key = NULL; PyObject** const * name; PyObject** const *first_kw_arg = argnames + num_pos_args; for (Py_ssize_t pos = 0; pos < num_kwargs; pos++) { #if CYTHON_AVOID_BORROWED_REFS key = __Pyx_PySequence_ITEM(kwds, pos); #else key = __Pyx_PyTuple_GET_ITEM(kwds, pos); #endif #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(!key)) goto bad; #endif name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { PyObject *value = kwvalues[pos]; values[name-argnames] = __Pyx_NewRef(value); } else { size_t index_found = 0; int cmp = __Pyx_MatchKeywordArg(key, argnames, first_kw_arg, &index_found, function_name); if (cmp == 1) { PyObject *value = kwvalues[pos]; values[index_found] = __Pyx_NewRef(value); } else { if (unlikely(cmp == -1)) goto bad; if (kwds2) { PyObject *value = kwvalues[pos]; if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else if (!ignore_unknown_kwargs) { goto invalid_keyword; } } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(key); key = NULL; #endif } return 0; invalid_keyword: PyErr_Format(PyExc_TypeError, "%s() got an unexpected keyword argument '%U'", function_name, key); goto bad; bad: #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(key); #endif return -1; } /* ParseKeywords */ static int __Pyx_ParseKeywords( PyObject *kwds, PyObject * const *kwvalues, PyObject ** const argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, Py_ssize_t num_kwargs, const char* function_name, int ignore_unknown_kwargs) { if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds))) return __Pyx_ParseKeywordsTuple(kwds, kwvalues, argnames, kwds2, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); else if (kwds2) return __Pyx_ParseKeywordDictToDict(kwds, argnames, kwds2, values, num_pos_args, function_name); else return __Pyx_ParseKeywordDict(kwds, argnames, values, num_pos_args, num_kwargs, function_name, ignore_unknown_kwargs); } /* ArgTypeTestFunc (used by ArgTypeTest) */ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) { __Pyx_TypeName type_name; __Pyx_TypeName obj_type_name; PyObject *extra_info = __pyx_mstate_global->__pyx_empty_unicode; int from_annotation_subclass = 0; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } else if (!exact) { if (likely(__Pyx_TypeCheck(obj, type))) return 1; } else if (exact == 2) { if (__Pyx_TypeCheck(obj, type)) { from_annotation_subclass = 1; extra_info = __pyx_mstate_global->__pyx_kp_u_Note_that_Cython_is_deliberately; } } type_name = __Pyx_PyType_GetFullyQualifiedName(type); obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME ", got " __Pyx_FMT_TYPENAME ")" #if __PYX_LIMITED_VERSION_HEX < 0x030C0000 "%s%U" #endif , name, type_name, obj_type_name #if __PYX_LIMITED_VERSION_HEX < 0x030C0000 , (from_annotation_subclass ? ". " : ""), extra_info #endif ); #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 if (exact == 2 && from_annotation_subclass) { PyObject *res; PyObject *vargs[2]; vargs[0] = PyErr_GetRaisedException(); vargs[1] = extra_info; res = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_kp_u_add_note, vargs, 2, NULL); Py_XDECREF(res); PyErr_SetRaisedException(vargs[0]); } #endif __Pyx_DECREF_TypeName(type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* RaiseUnexpectedTypeError */ static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj) { __Pyx_TypeName obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME, expected, obj_type_name); __Pyx_DECREF_TypeName(obj_type_name); return 0; } /* RaiseUnboundLocalError */ static void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* ExtTypeTest */ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { __Pyx_TypeName obj_type_name; __Pyx_TypeName type_name; if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(__Pyx_TypeCheck(obj, type))) return 1; obj_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(obj)); type_name = __Pyx_PyType_GetFullyQualifiedName(type); PyErr_Format(PyExc_TypeError, "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME, obj_type_name, type_name); __Pyx_DECREF_TypeName(obj_type_name); __Pyx_DECREF_TypeName(type_name); return 0; } /* GetTopmostException (used by SaveResetException) */ #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate) { _PyErr_StackItem *exc_info = tstate->exc_info; while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) && exc_info->previous_item != NULL) { exc_info = exc_info->previous_item; } return exc_info; } #endif /* SaveResetException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); PyObject *exc_value = exc_info->exc_value; if (exc_value == NULL || exc_value == Py_None) { *value = NULL; *type = NULL; *tb = NULL; } else { *value = exc_value; Py_INCREF(*value); *type = (PyObject*) Py_TYPE(exc_value); Py_INCREF(*type); *tb = PyException_GetTraceback(exc_value); } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); *type = exc_info->exc_type; *value = exc_info->exc_value; *tb = exc_info->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #else *type = tstate->exc_type; *value = tstate->exc_value; *tb = tstate->exc_traceback; Py_XINCREF(*type); Py_XINCREF(*value); Py_XINCREF(*tb); #endif } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; PyObject *tmp_value = exc_info->exc_value; exc_info->exc_value = value; Py_XDECREF(tmp_value); Py_XDECREF(type); Py_XDECREF(tb); #else PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = type; exc_info->exc_value = value; exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = type; tstate->exc_value = value; tstate->exc_traceback = tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #endif } #endif /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif { PyObject *local_type = NULL, *local_value, *local_tb = NULL; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; #if PY_VERSION_HEX >= 0x030C0000 local_value = tstate->current_exception; tstate->current_exception = 0; #else local_type = tstate->curexc_type; local_value = tstate->curexc_value; local_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #endif #elif __PYX_LIMITED_VERSION_HEX > 0x030C0000 local_value = PyErr_GetRaisedException(); #else PyErr_Fetch(&local_type, &local_value, &local_tb); #endif #if __PYX_LIMITED_VERSION_HEX > 0x030C0000 if (likely(local_value)) { local_type = (PyObject*) Py_TYPE(local_value); Py_INCREF(local_type); local_tb = PyException_GetTraceback(local_value); } #else PyErr_NormalizeException(&local_type, &local_value, &local_tb); #if CYTHON_FAST_THREAD_STATE if (unlikely(tstate->curexc_type)) #else if (unlikely(PyErr_Occurred())) #endif goto bad; if (local_tb) { if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) goto bad; } #endif // __PYX_LIMITED_VERSION_HEX > 0x030C0000 Py_XINCREF(local_tb); Py_XINCREF(local_type); Py_XINCREF(local_value); *type = local_type; *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE #if CYTHON_USE_EXC_INFO_STACK { _PyErr_StackItem *exc_info = tstate->exc_info; #if PY_VERSION_HEX >= 0x030B00a4 tmp_value = exc_info->exc_value; exc_info->exc_value = local_value; tmp_type = NULL; tmp_tb = NULL; Py_XDECREF(local_type); Py_XDECREF(local_tb); #else tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = local_type; exc_info->exc_value = local_value; exc_info->exc_traceback = local_tb; #endif } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = local_type; tstate->exc_value = local_value; tstate->exc_traceback = local_tb; #endif Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #elif __PYX_LIMITED_VERSION_HEX >= 0x030b0000 PyErr_SetHandledException(local_value); Py_XDECREF(local_value); Py_XDECREF(local_type); Py_XDECREF(local_tb); #else PyErr_SetExcInfo(local_type, local_value, local_tb); #endif return 0; #if __PYX_LIMITED_VERSION_HEX <= 0x030C0000 bad: *type = 0; *value = 0; *tb = 0; Py_XDECREF(local_type); Py_XDECREF(local_value); Py_XDECREF(local_tb); return -1; #endif } /* SwapException */ #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4 _PyErr_StackItem *exc_info = tstate->exc_info; tmp_value = exc_info->exc_value; exc_info->exc_value = *value; if (tmp_value == NULL || tmp_value == Py_None) { Py_XDECREF(tmp_value); tmp_value = NULL; tmp_type = NULL; tmp_tb = NULL; } else { tmp_type = (PyObject*) Py_TYPE(tmp_value); Py_INCREF(tmp_type); #if CYTHON_COMPILING_IN_CPYTHON tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback; Py_XINCREF(tmp_tb); #else tmp_tb = PyException_GetTraceback(tmp_value); #endif } #elif CYTHON_USE_EXC_INFO_STACK _PyErr_StackItem *exc_info = tstate->exc_info; tmp_type = exc_info->exc_type; tmp_value = exc_info->exc_value; tmp_tb = exc_info->exc_traceback; exc_info->exc_type = *type; exc_info->exc_value = *value; exc_info->exc_traceback = *tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #else static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } #endif /* CIntToDigits (used by CIntToPyUnicode) */ static const char DIGIT_PAIRS_10[2*10*10+1] = { "00010203040506070809" "10111213141516171819" "20212223242526272829" "30313233343536373839" "40414243444546474849" "50515253545556575859" "60616263646566676869" "70717273747576777879" "80818283848586878889" "90919293949596979899" }; static const char DIGIT_PAIRS_8[2*8*8+1] = { "0001020304050607" "1011121314151617" "2021222324252627" "3031323334353637" "4041424344454647" "5051525354555657" "6061626364656667" "7071727374757677" }; static const char DIGITS_HEX[2*16+1] = { "0123456789abcdef" "0123456789ABCDEF" }; /* BuildPyUnicode (used by COrdinalToPyUnicode) */ static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, const char* chars, int clength, int prepend_sign, char padding_char) { PyObject *uval; Py_ssize_t uoffset = ulength - clength; #if CYTHON_USE_UNICODE_INTERNALS Py_ssize_t i; void *udata; uval = PyUnicode_New(ulength, 127); if (unlikely(!uval)) return NULL; udata = PyUnicode_DATA(uval); if (uoffset > 0) { i = 0; if (prepend_sign) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); i++; } for (; i < uoffset; i++) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); } } for (i=0; i < clength; i++) { __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); } #else { PyObject *sign = NULL, *padding = NULL; uval = NULL; if (uoffset > 0) { prepend_sign = !!prepend_sign; if (uoffset > prepend_sign) { padding = PyUnicode_FromOrdinal(padding_char); if (likely(padding) && uoffset > prepend_sign + 1) { PyObject *tmp = PySequence_Repeat(padding, uoffset - prepend_sign); Py_DECREF(padding); padding = tmp; } if (unlikely(!padding)) goto done_or_error; } if (prepend_sign) { sign = PyUnicode_FromOrdinal('-'); if (unlikely(!sign)) goto done_or_error; } } uval = PyUnicode_DecodeASCII(chars, clength, NULL); if (likely(uval) && padding) { PyObject *tmp = PyUnicode_Concat(padding, uval); Py_DECREF(uval); uval = tmp; } if (likely(uval) && sign) { PyObject *tmp = PyUnicode_Concat(sign, uval); Py_DECREF(uval); uval = tmp; } done_or_error: Py_XDECREF(padding); Py_XDECREF(sign); } #endif return uval; } /* COrdinalToPyUnicode (used by CIntToPyUnicode) */ static CYTHON_INLINE int __Pyx_CheckUnicodeValue(int value) { return value <= 1114111; } static PyObject* __Pyx_PyUnicode_FromOrdinal_Padded(int value, Py_ssize_t ulength, char padding_char) { Py_ssize_t padding_length = ulength - 1; if (likely((padding_length <= 250) && (value < 0xD800 || value > 0xDFFF))) { char chars[256]; if (value <= 255) { memset(chars, padding_char, (size_t) padding_length); chars[ulength-1] = (char) value; return PyUnicode_DecodeLatin1(chars, ulength, NULL); } char *cpos = chars + sizeof(chars); if (value < 0x800) { *--cpos = (char) (0x80 | (value & 0x3f)); value >>= 6; *--cpos = (char) (0xc0 | (value & 0x1f)); } else if (value < 0x10000) { *--cpos = (char) (0x80 | (value & 0x3f)); value >>= 6; *--cpos = (char) (0x80 | (value & 0x3f)); value >>= 6; *--cpos = (char) (0xe0 | (value & 0x0f)); } else { *--cpos = (char) (0x80 | (value & 0x3f)); value >>= 6; *--cpos = (char) (0x80 | (value & 0x3f)); value >>= 6; *--cpos = (char) (0x80 | (value & 0x3f)); value >>= 6; *--cpos = (char) (0xf0 | (value & 0x07)); } cpos -= padding_length; memset(cpos, padding_char, (size_t) padding_length); return PyUnicode_DecodeUTF8(cpos, chars + sizeof(chars) - cpos, NULL); } if (value <= 127 && CYTHON_USE_UNICODE_INTERNALS) { const char chars[1] = {(char) value}; return __Pyx_PyUnicode_BuildFromAscii(ulength, chars, 1, 0, padding_char); } { PyObject *uchar, *padding_uchar, *padding, *result; padding_uchar = PyUnicode_FromOrdinal(padding_char); if (unlikely(!padding_uchar)) return NULL; padding = PySequence_Repeat(padding_uchar, padding_length); Py_DECREF(padding_uchar); if (unlikely(!padding)) return NULL; uchar = PyUnicode_FromOrdinal(value); if (unlikely(!uchar)) { Py_DECREF(padding); return NULL; } result = PyUnicode_Concat(padding, uchar); Py_DECREF(padding); Py_DECREF(uchar); return result; } } /* CIntToPyUnicode */ static CYTHON_INLINE PyObject* __Pyx_uchar___Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (unlikely(!(is_unsigned || value == 0 || value > 0) || !(sizeof(value) <= 2 || value & ~ (Py_ssize_t) 0x01fffff || __Pyx_CheckUnicodeValue((int) value)))) { PyErr_SetString(PyExc_OverflowError, "%c arg not in range(0x110000)"); return NULL; } if (width <= 1) { return PyUnicode_FromOrdinal((int) value); } return __Pyx_PyUnicode_FromOrdinal_Padded((int) value, width, padding_char); } static CYTHON_INLINE PyObject* __Pyx____Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(Py_ssize_t)*3+2]; char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; const char *hex_digits = DIGITS_HEX; Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; format_char = 'x'; } remaining = value; last_one_off = 0; dpos = end; do { int digit_pos; switch (format_char) { case 'o': digit_pos = abs((int)(remaining % (8*8))); remaining = (Py_ssize_t) (remaining / (8*8)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); last_one_off = (digit_pos < 8); break; case 'd': digit_pos = abs((int)(remaining % (10*10))); remaining = (Py_ssize_t) (remaining / (10*10)); dpos -= 2; memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); last_one_off = (digit_pos < 10); break; case 'x': *(--dpos) = hex_digits[abs((int)(remaining % 16))]; remaining = (Py_ssize_t) (remaining / 16); break; default: assert(0); break; } } while (unlikely(remaining != 0)); assert(!last_one_off || *dpos == '0'); dpos += last_one_off; length = end - dpos; ulength = length; prepend_sign = 0; if (!is_unsigned && value <= neg_one) { if (padding_char == ' ' || width <= length + 1) { *(--dpos) = '-'; ++length; } else { prepend_sign = 1; } ++ulength; } if (width > ulength) { ulength = width; } if (ulength == 1) { return PyUnicode_FromOrdinal(*dpos); } return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); } /* GetItemInt */ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (unlikely(!j)) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck, int unsafe_shared) { CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); #if CYTHON_ASSUME_SAFE_SIZE Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS)) { return __Pyx_PyList_GetItemRefFast(o, wrapped_i, unsafe_shared); } else if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { return __Pyx_NewRef(PyList_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else (void)wraparound; (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck, int unsafe_shared) { CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); #if CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS Py_ssize_t wrapped_i = i; if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { return __Pyx_NewRef(PyTuple_GET_ITEM(o, wrapped_i)); } return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); #else (void)wraparound; (void)boundscheck; return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck, int unsafe_shared) { CYTHON_MAYBE_UNUSED_VAR(unsafe_shared); #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((CYTHON_AVOID_BORROWED_REFS || CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS)) { return __Pyx_PyList_GetItemRefFast(o, n, unsafe_shared); } else if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { return __Pyx_NewRef(PyList_GET_ITEM(o, n)); } } else #if !CYTHON_AVOID_BORROWED_REFS if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { return __Pyx_NewRef(PyTuple_GET_ITEM(o, n)); } } else #endif #endif #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY { PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping; PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence; if (!is_list && mm && mm->mp_subscript) { PyObject *r, *key = PyLong_FromSsize_t(i); if (unlikely(!key)) return NULL; r = mm->mp_subscript(o, key); Py_DECREF(key); return r; } if (is_list || likely(sm && sm->sq_item)) { if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) { Py_ssize_t l = sm->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (!PyErr_ExceptionMatches(PyExc_OverflowError)) return NULL; PyErr_Clear(); } } return sm->sq_item(o, i); } } #else if (is_list || !PyMapping_Check(o)) { return PySequence_GetItem(o, i); } #endif (void)wraparound; (void)boundscheck; return __Pyx_GetItemInt_Generic(o, PyLong_FromSsize_t(i)); } /* decode_c_string */ static CYTHON_INLINE PyObject* __Pyx_decode_c_string( const char* cstring, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { Py_ssize_t length; if (unlikely((start < 0) | (stop < 0))) { size_t slen = strlen(cstring); if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "c-string too long to convert to Python"); return NULL; } length = (Py_ssize_t) slen; if (start < 0) { start += length; if (start < 0) start = 0; } if (stop < 0) stop += length; } if (unlikely(stop <= start)) return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_unicode); length = stop - start; cstring += start; if (decode_func) { return decode_func(cstring, length, errors); } else { return PyUnicode_Decode(cstring, length, encoding, errors); } } /* PyObjectVectorCallKwBuilder */ #if CYTHON_VECTORCALL static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_PyObject_FastCallDict; if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; Py_INCREF(key); args[n] = value; return 0; } CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { (void)__Pyx_VectorcallBuilder_AddArgStr; if (unlikely(!PyUnicode_Check(key))) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); return -1; } return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); } static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { PyObject *pyKey = PyUnicode_FromString(key); if (!pyKey) return -1; return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); } #else // CYTHON_VECTORCALL CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { if (unlikely(!PyUnicode_Check(key))) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); return -1; } return PyDict_SetItem(builder, key, value); } #endif /* GetAttr3 */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); Py_INCREF(d); return d; } #endif static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r; #if __PYX_LIMITED_VERSION_HEX >= 0x030d0000 int res = PyObject_GetOptionalAttr(o, n, &r); return (res != 0) ? r : __Pyx_NewRef(d); #else #if CYTHON_USE_TYPE_SLOTS if (likely(PyUnicode_Check(n))) { r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (unlikely(!r) && likely(!PyErr_Occurred())) { r = __Pyx_NewRef(d); } return r; } #endif r = PyObject_GetAttr(o, n); return (likely(r)) ? r : __Pyx_GetAttr3Default(d); #endif } /* AllocateExtensionType */ static PyObject *__Pyx_AllocateExtensionType(PyTypeObject *t, int is_final) { if (is_final || likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) { allocfunc alloc_func = __Pyx_PyType_GetSlot(t, tp_alloc, allocfunc); return alloc_func(t, 0); } else { newfunc tp_new = __Pyx_PyType_TryGetSlot(&PyBaseObject_Type, tp_new, newfunc); #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 if (!tp_new) { PyObject *new_str = PyUnicode_FromString("__new__"); if (likely(new_str)) { PyObject *o = PyObject_CallMethodObjArgs((PyObject *)&PyBaseObject_Type, new_str, t, NULL); Py_DECREF(new_str); return o; } else return NULL; } else #endif return tp_new(t, __pyx_mstate_global->__pyx_empty_tuple, 0); } } /* CallTypeTraverse */ #if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) #else static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 if (__Pyx_get_runtime_version() < 0x03090000) return 0; #endif if (!always_call) { PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); unsigned long flags = PyType_GetFlags(base); if (flags & Py_TPFLAGS_HEAPTYPE) { return 0; } } Py_VISIT((PyObject*)Py_TYPE(o)); return 0; } #endif /* FunctionExport */ static int __Pyx_ExportFunction(PyObject *api_dict, const char *name, void (*f)(void), const char *sig) { PyObject *cobj; union { void (*fp)(void); void *p; } tmp; tmp.fp = f; cobj = PyCapsule_New(tmp.p, sig, 0); if (!cobj) goto bad; if (PyDict_SetItemString(api_dict, name, cobj) < 0) goto bad; Py_DECREF(cobj); return 0; bad: Py_XDECREF(cobj); return -1; } /* GetApiDict */ static PyObject *__Pyx_ApiExport_GetApiDict(void) { PyObject *d; if (__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_pyx_capi, &d) == -1) return NULL; if (!d) { d = PyDict_New(); if (!d) goto bad; if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_pyx_capi, d) < 0) goto bad; } return d; bad: Py_XDECREF(d); return NULL; } /* LimitedApiGetTypeDict (used by SetItemOnTypeDict) */ #if CYTHON_COMPILING_IN_LIMITED_API static Py_ssize_t __Pyx_GetTypeDictOffset(void) { PyObject *tp_dictoffset_o; Py_ssize_t tp_dictoffset; tp_dictoffset_o = PyObject_GetAttrString((PyObject*)(&PyType_Type), "__dictoffset__"); if (unlikely(!tp_dictoffset_o)) return -1; tp_dictoffset = PyLong_AsSsize_t(tp_dictoffset_o); Py_DECREF(tp_dictoffset_o); if (unlikely(tp_dictoffset == 0)) { PyErr_SetString( PyExc_TypeError, "'type' doesn't have a dictoffset"); return -1; } else if (unlikely(tp_dictoffset < 0)) { PyErr_SetString( PyExc_TypeError, "'type' has an unexpected negative dictoffset. " "Please report this as Cython bug"); return -1; } return tp_dictoffset; } static PyObject *__Pyx_GetTypeDict(PyTypeObject *tp) { static Py_ssize_t tp_dictoffset = 0; if (unlikely(tp_dictoffset == 0)) { tp_dictoffset = __Pyx_GetTypeDictOffset(); if (unlikely(tp_dictoffset == -1 && PyErr_Occurred())) { tp_dictoffset = 0; // try again next time? return NULL; } } return *(PyObject**)((char*)tp + tp_dictoffset); } #endif /* SetItemOnTypeDict (used by FixUpExtensionType) */ static int __Pyx__SetItemOnTypeDict(PyTypeObject *tp, PyObject *k, PyObject *v) { int result; PyObject *tp_dict; #if CYTHON_COMPILING_IN_LIMITED_API tp_dict = __Pyx_GetTypeDict(tp); if (unlikely(!tp_dict)) return -1; #else tp_dict = tp->tp_dict; #endif result = PyDict_SetItem(tp_dict, k, v); if (likely(!result)) { PyType_Modified(tp); if (unlikely(PyObject_HasAttr(v, __pyx_mstate_global->__pyx_n_u_set_name))) { PyObject *setNameResult = PyObject_CallMethodObjArgs(v, __pyx_mstate_global->__pyx_n_u_set_name, (PyObject *) tp, k, NULL); if (!setNameResult) return -1; Py_DECREF(setNameResult); } } return result; } /* FixUpExtensionType */ static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { #if __PYX_LIMITED_VERSION_HEX > 0x030900B1 CYTHON_UNUSED_VAR(spec); CYTHON_UNUSED_VAR(type); CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); #else const PyType_Slot *slot = spec->slots; int changed = 0; #if !CYTHON_COMPILING_IN_LIMITED_API while (slot && slot->slot && slot->slot != Py_tp_members) slot++; if (slot && slot->slot == Py_tp_members) { #if !CYTHON_COMPILING_IN_CPYTHON const #endif // !CYTHON_COMPILING_IN_CPYTHON) PyMemberDef *memb = (PyMemberDef*) slot->pfunc; while (memb && memb->name) { if (memb->name[0] == '_' && memb->name[1] == '_') { if (strcmp(memb->name, "__weaklistoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_weaklistoffset = memb->offset; changed = 1; } else if (strcmp(memb->name, "__dictoffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_dictoffset = memb->offset; changed = 1; } #if CYTHON_METH_FASTCALL else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { assert(memb->type == T_PYSSIZET); assert(memb->flags == READONLY); type->tp_vectorcall_offset = memb->offset; changed = 1; } #endif // CYTHON_METH_FASTCALL #if !CYTHON_COMPILING_IN_PYPY else if (strcmp(memb->name, "__module__") == 0) { PyObject *descr; assert(memb->type == T_OBJECT); assert(memb->flags == 0 || memb->flags == READONLY); descr = PyDescr_NewMember(type, memb); if (unlikely(!descr)) return -1; int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); Py_DECREF(descr); if (unlikely(set_item_result < 0)) { return -1; } changed = 1; } #endif // !CYTHON_COMPILING_IN_PYPY } memb++; } } #endif // !CYTHON_COMPILING_IN_LIMITED_API #if !CYTHON_COMPILING_IN_PYPY slot = spec->slots; while (slot && slot->slot && slot->slot != Py_tp_getset) slot++; if (slot && slot->slot == Py_tp_getset) { PyGetSetDef *getset = (PyGetSetDef*) slot->pfunc; while (getset && getset->name) { if (getset->name[0] == '_' && getset->name[1] == '_' && strcmp(getset->name, "__module__") == 0) { PyObject *descr = PyDescr_NewGetSet(type, getset); if (unlikely(!descr)) return -1; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *pyname = PyUnicode_FromString(getset->name); if (unlikely(!pyname)) { Py_DECREF(descr); return -1; } int set_item_result = __Pyx_SetItemOnTypeDict(type, pyname, descr); Py_DECREF(pyname); #else CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); int set_item_result = PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr); #endif Py_DECREF(descr); if (unlikely(set_item_result < 0)) { return -1; } changed = 1; } ++getset; } } #else CYTHON_UNUSED_VAR(__Pyx__SetItemOnTypeDict); #endif // !CYTHON_COMPILING_IN_PYPY if (changed) PyType_Modified(type); #endif // PY_VERSION_HEX > 0x030900B1 return 0; } /* PyObjectCallNoArg (used by PyObjectCallMethod0) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { PyObject *arg[2] = {NULL, NULL}; return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectGetMethod (used by PyObjectCallMethod0) */ #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { PyObject *attr; #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP __Pyx_TypeName type_name; PyTypeObject *tp = Py_TYPE(obj); PyObject *descr; descrgetfunc f = NULL; PyObject **dictptr, *dict; int meth_found = 0; assert (*method == NULL); if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; } if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { return 0; } descr = _PyType_Lookup(tp, name); if (likely(descr != NULL)) { Py_INCREF(descr); #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR)) #else #ifdef __Pyx_CyFunction_USED if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) #else if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type))) #endif #endif { meth_found = 1; } else { f = Py_TYPE(descr)->tp_descr_get; if (f != NULL && PyDescr_IsData(descr)) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } } } dictptr = _PyObject_GetDictPtr(obj); if (dictptr != NULL && (dict = *dictptr) != NULL) { Py_INCREF(dict); attr = __Pyx_PyDict_GetItemStr(dict, name); if (attr != NULL) { Py_INCREF(attr); Py_DECREF(dict); Py_XDECREF(descr); goto try_unpack; } Py_DECREF(dict); } if (meth_found) { *method = descr; return 1; } if (f != NULL) { attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); Py_DECREF(descr); goto try_unpack; } if (likely(descr != NULL)) { *method = descr; return 0; } type_name = __Pyx_PyType_GetFullyQualifiedName(tp); PyErr_Format(PyExc_AttributeError, "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'", type_name, name); __Pyx_DECREF_TypeName(type_name); return 0; #else attr = __Pyx_PyObject_GetAttrStr(obj, name); goto try_unpack; #endif try_unpack: #if CYTHON_UNPACK_METHODS if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { PyObject *function = PyMethod_GET_FUNCTION(attr); Py_INCREF(function); Py_DECREF(attr); *method = function; return 1; } #endif *method = attr; return 0; } #endif /* PyObjectCallMethod0 (used by PyType_Ready) */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) PyObject *args[1] = {obj}; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_CallNoArg; return PyObject_VectorcallMethod(method_name, args, 1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result = NULL; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_CallOneArg(method, obj); Py_DECREF(method); return result; } if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: return result; #endif } /* ValidateBasesTuple (used by PyType_Ready) */ #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) { Py_ssize_t i, n; #if CYTHON_ASSUME_SAFE_SIZE n = PyTuple_GET_SIZE(bases); #else n = PyTuple_Size(bases); if (unlikely(n < 0)) return -1; #endif for (i = 1; i < n; i++) { PyTypeObject *b; #if CYTHON_AVOID_BORROWED_REFS PyObject *b0 = PySequence_GetItem(bases, i); if (!b0) return -1; #elif CYTHON_ASSUME_SAFE_MACROS PyObject *b0 = PyTuple_GET_ITEM(bases, i); #else PyObject *b0 = PyTuple_GetItem(bases, i); if (!b0) return -1; #endif b = (PyTypeObject*) b0; if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) { __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); PyErr_Format(PyExc_TypeError, "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name); __Pyx_DECREF_TypeName(b_name); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } if (dictoffset == 0) { Py_ssize_t b_dictoffset = 0; #if CYTHON_USE_TYPE_SLOTS b_dictoffset = b->tp_dictoffset; #else PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__"); if (!py_b_dictoffset) goto dictoffset_return; b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset); Py_DECREF(py_b_dictoffset); if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return; #endif if (b_dictoffset) { { __Pyx_TypeName b_name = __Pyx_PyType_GetFullyQualifiedName(b); PyErr_Format(PyExc_TypeError, "extension type '%.200s' has no __dict__ slot, " "but base type '" __Pyx_FMT_TYPENAME "' has: " "either add 'cdef dict __dict__' to the extension type " "or add '__slots__ = [...]' to the base type", type_name, b_name); __Pyx_DECREF_TypeName(b_name); } #if !CYTHON_USE_TYPE_SLOTS dictoffset_return: #endif #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif return -1; } } #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(b0); #endif } return 0; } #endif /* PyType_Ready */ CYTHON_UNUSED static int __Pyx_PyType_HasMultipleInheritance(PyTypeObject *t) { while (t) { PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases) { return 1; } t = __Pyx_PyType_GetSlot(t, tp_base, PyTypeObject*); } return 0; } static int __Pyx_PyType_Ready(PyTypeObject *t) { #if CYTHON_USE_TYPE_SPECS || !CYTHON_COMPILING_IN_CPYTHON || defined(PYSTON_MAJOR_VERSION) (void)__Pyx_PyObject_CallMethod0; #if CYTHON_USE_TYPE_SPECS (void)__Pyx_validate_bases_tuple; #endif return PyType_Ready(t); #else int r; if (!__Pyx_PyType_HasMultipleInheritance(t)) { return PyType_Ready(t); } PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*); if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1)) return -1; #if !defined(PYSTON_MAJOR_VERSION) { int gc_was_enabled; #if PY_VERSION_HEX >= 0x030A00b1 gc_was_enabled = PyGC_Disable(); (void)__Pyx_PyObject_CallMethod0; #else PyObject *ret, *py_status; PyObject *gc = NULL; #if (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400) &&\ !CYTHON_COMPILING_IN_GRAAL gc = PyImport_GetModule(__pyx_mstate_global->__pyx_kp_u_gc); #endif if (unlikely(!gc)) gc = PyImport_Import(__pyx_mstate_global->__pyx_kp_u_gc); if (unlikely(!gc)) return -1; py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_isenabled); if (unlikely(!py_status)) { Py_DECREF(gc); return -1; } gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); Py_DECREF(py_status); if (gc_was_enabled > 0) { ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_disable); if (unlikely(!ret)) { Py_DECREF(gc); return -1; } Py_DECREF(ret); } else if (unlikely(gc_was_enabled == -1)) { Py_DECREF(gc); return -1; } #endif t->tp_flags |= Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A0000 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE; #endif #else (void)__Pyx_PyObject_CallMethod0; #endif r = PyType_Ready(t); #if !defined(PYSTON_MAJOR_VERSION) t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; #if PY_VERSION_HEX >= 0x030A00b1 if (gc_was_enabled) PyGC_Enable(); #else if (gc_was_enabled) { PyObject *tp, *v, *tb; PyErr_Fetch(&tp, &v, &tb); ret = __Pyx_PyObject_CallMethod0(gc, __pyx_mstate_global->__pyx_kp_u_enable); if (likely(ret || r == -1)) { Py_XDECREF(ret); PyErr_Restore(tp, v, tb); } else { Py_XDECREF(tp); Py_XDECREF(v); Py_XDECREF(tb); r = -1; } } Py_DECREF(gc); #endif } #endif return r; #endif } /* SetVTable */ static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) { PyObject *ob = PyCapsule_New(vtable, 0, 0); if (unlikely(!ob)) goto bad; #if CYTHON_COMPILING_IN_LIMITED_API if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) #else if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable, ob) < 0)) #endif goto bad; Py_DECREF(ob); return 0; bad: Py_XDECREF(ob); return -1; } /* GetVTable (used by MergeVTables) */ static void* __Pyx_GetVtable(PyTypeObject *type) { void* ptr; #if CYTHON_COMPILING_IN_LIMITED_API PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_mstate_global->__pyx_n_u_pyx_vtable); #else PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_mstate_global->__pyx_n_u_pyx_vtable); #endif if (!ob) goto bad; ptr = PyCapsule_GetPointer(ob, 0); if (!ptr && !PyErr_Occurred()) PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); Py_DECREF(ob); return ptr; bad: Py_XDECREF(ob); return NULL; } /* MergeVTables */ static int __Pyx_MergeVtables(PyTypeObject *type) { int i=0; Py_ssize_t size; void** base_vtables; __Pyx_TypeName tp_base_name = NULL; __Pyx_TypeName base_name = NULL; void* unknown = (void*)-1; PyObject* bases = __Pyx_PyType_GetSlot(type, tp_bases, PyObject*); int base_depth = 0; { PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); while (base) { base_depth += 1; base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); } } base_vtables = (void**) PyMem_Malloc(sizeof(void*) * (size_t)(base_depth + 1)); base_vtables[0] = unknown; #if CYTHON_COMPILING_IN_LIMITED_API size = PyTuple_Size(bases); if (size < 0) goto other_failure; #else size = PyTuple_GET_SIZE(bases); #endif for (i = 1; i < size; i++) { PyObject *basei; void* base_vtable; #if CYTHON_AVOID_BORROWED_REFS basei = PySequence_GetItem(bases, i); if (unlikely(!basei)) goto other_failure; #elif !CYTHON_ASSUME_SAFE_MACROS basei = PyTuple_GetItem(bases, i); if (unlikely(!basei)) goto other_failure; #else basei = PyTuple_GET_ITEM(bases, i); #endif base_vtable = __Pyx_GetVtable((PyTypeObject*)basei); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(basei); #endif if (base_vtable != NULL) { int j; PyTypeObject* base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); for (j = 0; j < base_depth; j++) { if (base_vtables[j] == unknown) { base_vtables[j] = __Pyx_GetVtable(base); base_vtables[j + 1] = unknown; } if (base_vtables[j] == base_vtable) { break; } else if (base_vtables[j] == NULL) { goto bad; } base = __Pyx_PyType_GetSlot(base, tp_base, PyTypeObject*); } } } PyErr_Clear(); PyMem_Free(base_vtables); return 0; bad: { PyTypeObject* basei = NULL; PyTypeObject* tp_base = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*); tp_base_name = __Pyx_PyType_GetFullyQualifiedName(tp_base); #if CYTHON_AVOID_BORROWED_REFS basei = (PyTypeObject*)PySequence_GetItem(bases, i); if (unlikely(!basei)) goto really_bad; #elif !CYTHON_ASSUME_SAFE_MACROS basei = (PyTypeObject*)PyTuple_GetItem(bases, i); if (unlikely(!basei)) goto really_bad; #else basei = (PyTypeObject*)PyTuple_GET_ITEM(bases, i); #endif base_name = __Pyx_PyType_GetFullyQualifiedName(basei); #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(basei); #endif } PyErr_Format(PyExc_TypeError, "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name); #if CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS really_bad: // bad has failed! #endif __Pyx_DECREF_TypeName(tp_base_name); __Pyx_DECREF_TypeName(base_name); #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_AVOID_BORROWED_REFS || !CYTHON_ASSUME_SAFE_MACROS other_failure: #endif PyMem_Free(base_vtables); return -1; } /* DelItemOnTypeDict (used by SetupReduce) */ static int __Pyx__DelItemOnTypeDict(PyTypeObject *tp, PyObject *k) { int result; PyObject *tp_dict; #if CYTHON_COMPILING_IN_LIMITED_API tp_dict = __Pyx_GetTypeDict(tp); if (unlikely(!tp_dict)) return -1; #else tp_dict = tp->tp_dict; #endif result = PyDict_DelItem(tp_dict, k); if (likely(!result)) PyType_Modified(tp); return result; } /* SetupReduce */ static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_mstate_global->__pyx_n_u_name_2); if (likely(name_attr)) { ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); } else { ret = -1; } if (unlikely(ret < 0)) { PyErr_Clear(); ret = 0; } Py_XDECREF(name_attr); return ret; } static int __Pyx_setup_reduce(PyObject* type_obj) { int ret = 0; PyObject *object_reduce = NULL; PyObject *object_getstate = NULL; PyObject *object_reduce_ex = NULL; PyObject *reduce = NULL; PyObject *reduce_ex = NULL; PyObject *reduce_cython = NULL; PyObject *setstate = NULL; PyObject *setstate_cython = NULL; PyObject *getstate = NULL; #if CYTHON_USE_PYTYPE_LOOKUP getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_getstate); #else getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_getstate); if (!getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (getstate) { #if CYTHON_USE_PYTYPE_LOOKUP object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); #else object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_getstate); if (!object_getstate && PyErr_Occurred()) { goto __PYX_BAD; } #endif if (object_getstate != getstate) { goto __PYX_GOOD; } } #if CYTHON_USE_PYTYPE_LOOKUP object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #else object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; #endif reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; if (reduce_ex == object_reduce_ex) { #if CYTHON_USE_PYTYPE_LOOKUP object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; #else object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_mstate_global->__pyx_n_u_reduce); if (!object_reduce) goto __PYX_BAD; #endif reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_mstate_global->__pyx_n_u_reduce); if (unlikely(!reduce)) goto __PYX_BAD; if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_mstate_global->__pyx_n_u_reduce_cython)) { reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (likely(reduce_cython)) { ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (reduce == object_reduce || PyErr_Occurred()) { goto __PYX_BAD; } setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate); if (!setstate) PyErr_Clear(); if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_mstate_global->__pyx_n_u_setstate_cython)) { setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (likely(setstate_cython)) { ret = __Pyx_SetItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; ret = __Pyx_DelItemOnTypeDict((PyTypeObject*)type_obj, __pyx_mstate_global->__pyx_n_u_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; } else if (!setstate || PyErr_Occurred()) { goto __PYX_BAD; } } PyType_Modified((PyTypeObject*)type_obj); } } goto __PYX_GOOD; __PYX_BAD: if (!PyErr_Occurred()) { __Pyx_TypeName type_obj_name = __Pyx_PyType_GetFullyQualifiedName((PyTypeObject*)type_obj); PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name); __Pyx_DECREF_TypeName(type_obj_name); } ret = -1; __PYX_GOOD: #if !CYTHON_USE_PYTYPE_LOOKUP Py_XDECREF(object_reduce); Py_XDECREF(object_reduce_ex); Py_XDECREF(object_getstate); Py_XDECREF(getstate); #endif Py_XDECREF(reduce); Py_XDECREF(reduce_ex); Py_XDECREF(reduce_cython); Py_XDECREF(setstate); Py_XDECREF(setstate_cython); return ret; } /* TypeImport */ #ifndef __PYX_HAVE_RT_ImportType_3_2_2 #define __PYX_HAVE_RT_ImportType_3_2_2 static PyTypeObject *__Pyx_ImportType_3_2_2(PyObject *module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_2_2 check_size) { PyObject *result = 0; Py_ssize_t basicsize; Py_ssize_t itemsize; #if defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) PyObject *py_basicsize; PyObject *py_itemsize; #endif result = PyObject_GetAttrString(module, class_name); if (!result) goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } #if !( defined(Py_LIMITED_API) || (defined(CYTHON_COMPILING_IN_LIMITED_API) && CYTHON_COMPILING_IN_LIMITED_API) ) basicsize = ((PyTypeObject *)result)->tp_basicsize; itemsize = ((PyTypeObject *)result)->tp_itemsize; #else if (size == 0) { return (PyTypeObject *)result; } py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); if (!py_basicsize) goto bad; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = 0; if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; py_itemsize = PyObject_GetAttrString(result, "__itemsize__"); if (!py_itemsize) goto bad; itemsize = PyLong_AsSsize_t(py_itemsize); Py_DECREF(py_itemsize); py_itemsize = 0; if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred()) goto bad; #endif if (itemsize) { if (size % alignment) { alignment = size % alignment; } if (itemsize < (Py_ssize_t)alignment) itemsize = (Py_ssize_t)alignment; } if ((size_t)(basicsize + itemsize) < size) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize+itemsize); goto bad; } if (check_size == __Pyx_ImportType_CheckSize_Error_3_2_2 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd-%zd from PyObject", module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_2_2 && (size_t)basicsize > size) { if (PyErr_WarnFormat(NULL, 0, "%.200s.%.200s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", module_name, class_name, size, basicsize) < 0) { goto bad; } } return (PyTypeObject *)result; bad: Py_XDECREF(result); return NULL; } #endif /* HasAttr (used by ImportImpl) */ #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!PyUnicode_Check(n))) { PyErr_SetString(PyExc_TypeError, "hasattr(): attribute name must be string"); return -1; } r = __Pyx_PyObject_GetAttrStrNoError(o, n); if (!r) { return (unlikely(PyErr_Occurred())) ? -1 : 0; } else { Py_DECREF(r); return 1; } } #endif /* ImportImpl (used by Import) */ static int __Pyx__Import_GetModule(PyObject *qualname, PyObject **module) { PyObject *imported_module = PyImport_GetModule(qualname); if (unlikely(!imported_module)) { *module = NULL; if (PyErr_Occurred()) { return -1; } return 0; } *module = imported_module; return 1; } static int __Pyx__Import_Lookup(PyObject *qualname, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject **module) { PyObject *imported_module; PyObject *top_level_package_name; Py_ssize_t i; int status, module_found; Py_ssize_t dot_index; module_found = __Pyx__Import_GetModule(qualname, &imported_module); if (unlikely(!module_found || module_found == -1)) { *module = NULL; return module_found; } if (imported_names) { for (i = 0; i < len_imported_names; i++) { PyObject *imported_name = imported_names[i]; #if __PYX_LIMITED_VERSION_HEX < 0x030d0000 int has_imported_attribute = PyObject_HasAttr(imported_module, imported_name); #else int has_imported_attribute = PyObject_HasAttrWithError(imported_module, imported_name); if (unlikely(has_imported_attribute == -1)) goto error; #endif if (!has_imported_attribute) { goto not_found; } } *module = imported_module; return 1; } dot_index = PyUnicode_FindChar(qualname, '.', 0, PY_SSIZE_T_MAX, 1); if (dot_index == -1) { *module = imported_module; return 1; } if (unlikely(dot_index == -2)) goto error; top_level_package_name = PyUnicode_Substring(qualname, 0, dot_index); if (unlikely(!top_level_package_name)) goto error; Py_DECREF(imported_module); status = __Pyx__Import_GetModule(top_level_package_name, module); Py_DECREF(top_level_package_name); return status; error: Py_DECREF(imported_module); *module = NULL; return -1; not_found: Py_DECREF(imported_module); *module = NULL; return 0; } static PyObject *__Pyx__Import(PyObject *name, PyObject *const *imported_names, Py_ssize_t len_imported_names, PyObject *qualname, PyObject *moddict, int level) { PyObject *module = 0; PyObject *empty_dict = 0; PyObject *from_list = 0; int module_found; if (!qualname) { qualname = name; } module_found = __Pyx__Import_Lookup(qualname, imported_names, len_imported_names, &module); if (likely(module_found == 1)) { return module; } else if (unlikely(module_found == -1)) { return NULL; } empty_dict = PyDict_New(); if (unlikely(!empty_dict)) goto bad; if (imported_names) { #if CYTHON_COMPILING_IN_CPYTHON from_list = __Pyx_PyList_FromArray(imported_names, len_imported_names); if (unlikely(!from_list)) goto bad; #else from_list = PyList_New(len_imported_names); if (unlikely(!from_list)) goto bad; for (Py_ssize_t i=0; i__pyx_d, level); } /* ImportFrom */ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { const char* module_name_str = 0; PyObject* module_name = 0; PyObject* module_dot = 0; PyObject* full_name = 0; PyErr_Clear(); module_name_str = PyModule_GetName(module); if (unlikely(!module_name_str)) { goto modbad; } module_name = PyUnicode_FromString(module_name_str); if (unlikely(!module_name)) { goto modbad; } module_dot = PyUnicode_Concat(module_name, __pyx_mstate_global->__pyx_kp_u_); if (unlikely(!module_dot)) { goto modbad; } full_name = PyUnicode_Concat(module_dot, name); if (unlikely(!full_name)) { goto modbad; } #if (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) ||\ CYTHON_COMPILING_IN_GRAAL { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) goto modbad; value = PyObject_GetItem(modules, full_name); } #else value = PyImport_GetModule(full_name); #endif modbad: Py_XDECREF(full_name); Py_XDECREF(module_dot); Py_XDECREF(module_name); } if (unlikely(!value)) { PyErr_Format(PyExc_ImportError, "cannot import name %S", name); } return value; } /* dict_setdefault (used by FetchCommonType) */ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value) { PyObject* value; #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030C0000 PyObject *args[] = {d, key, default_value}; value = PyObject_VectorcallMethod(__pyx_mstate_global->__pyx_n_u_setdefault, args, 3 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #elif CYTHON_COMPILING_IN_LIMITED_API value = PyObject_CallMethodObjArgs(d, __pyx_mstate_global->__pyx_n_u_setdefault, key, default_value, NULL); #elif PY_VERSION_HEX >= 0x030d0000 PyDict_SetDefaultRef(d, key, default_value, &value); #else value = PyDict_SetDefault(d, key, default_value); if (unlikely(!value)) return NULL; Py_INCREF(value); #endif return value; } /* AddModuleRef (used by FetchSharedCythonModule) */ #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING static PyObject *__Pyx_PyImport_AddModuleObjectRef(PyObject *name) { PyObject *module_dict = PyImport_GetModuleDict(); PyObject *m; if (PyMapping_GetOptionalItem(module_dict, name, &m) < 0) { return NULL; } if (m != NULL && PyModule_Check(m)) { return m; } Py_XDECREF(m); m = PyModule_NewObject(name); if (m == NULL) return NULL; if (PyDict_CheckExact(module_dict)) { PyObject *new_m; (void)PyDict_SetDefaultRef(module_dict, name, m, &new_m); Py_DECREF(m); return new_m; } else { if (PyObject_SetItem(module_dict, name, m) != 0) { Py_DECREF(m); return NULL; } return m; } } static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *py_name = PyUnicode_FromString(name); if (!py_name) return NULL; PyObject *module = __Pyx_PyImport_AddModuleObjectRef(py_name); Py_DECREF(py_name); return module; } #elif __PYX_LIMITED_VERSION_HEX >= 0x030d0000 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) #else static PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { PyObject *module = PyImport_AddModule(name); Py_XINCREF(module); return module; } #endif /* FetchSharedCythonModule (used by FetchCommonType) */ static PyObject *__Pyx_FetchSharedCythonABIModule(void) { return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); } /* FetchCommonType (used by CommonTypesMetaclass) */ #if __PYX_LIMITED_VERSION_HEX < 0x030C0000 static PyObject* __Pyx_PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *result = __Pyx_PyType_FromModuleAndSpec(module, spec, bases); if (result && metaclass) { PyObject *old_tp = (PyObject*)Py_TYPE(result); Py_INCREF((PyObject*)metaclass); #if __PYX_LIMITED_VERSION_HEX >= 0x03090000 Py_SET_TYPE(result, metaclass); #else result->ob_type = metaclass; #endif Py_DECREF(old_tp); } return result; } #else #define __Pyx_PyType_FromMetaclass(me, mo, s, b) PyType_FromMetaclass(me, mo, s, b) #endif static int __Pyx_VerifyCachedType(PyObject *cached_type, const char *name, Py_ssize_t expected_basicsize) { Py_ssize_t basicsize; if (!PyType_Check(cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", name); return -1; } if (expected_basicsize == 0) { return 0; // size is inherited, nothing useful to check } #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_basicsize; py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); if (unlikely(!py_basicsize)) return -1; basicsize = PyLong_AsSsize_t(py_basicsize); Py_DECREF(py_basicsize); py_basicsize = NULL; if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) return -1; #else basicsize = ((PyTypeObject*) cached_type)->tp_basicsize; #endif if (basicsize != expected_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", name); return -1; } return 0; } static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyTypeObject *metaclass, PyObject *module, PyType_Spec *spec, PyObject *bases) { PyObject *abi_module = NULL, *cached_type = NULL, *abi_module_dict, *new_cached_type, *py_object_name; int get_item_ref_result; const char* object_name = strrchr(spec->name, '.'); object_name = object_name ? object_name+1 : spec->name; py_object_name = PyUnicode_FromString(object_name); if (!py_object_name) return NULL; abi_module = __Pyx_FetchSharedCythonABIModule(); if (!abi_module) goto done; abi_module_dict = PyModule_GetDict(abi_module); if (!abi_module_dict) goto done; get_item_ref_result = __Pyx_PyDict_GetItemRef(abi_module_dict, py_object_name, &cached_type); if (get_item_ref_result == 1) { if (__Pyx_VerifyCachedType( cached_type, object_name, spec->basicsize) < 0) { goto bad; } goto done; } else if (unlikely(get_item_ref_result == -1)) { goto bad; } cached_type = __Pyx_PyType_FromMetaclass( metaclass, CYTHON_USE_MODULE_STATE ? module : abi_module, spec, bases); if (unlikely(!cached_type)) goto bad; if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; new_cached_type = __Pyx_PyDict_SetDefault(abi_module_dict, py_object_name, cached_type); if (unlikely(new_cached_type != cached_type)) { if (unlikely(!new_cached_type)) goto bad; Py_DECREF(cached_type); cached_type = new_cached_type; if (__Pyx_VerifyCachedType( cached_type, object_name, spec->basicsize) < 0) { goto bad; } goto done; } else { Py_DECREF(new_cached_type); } done: Py_XDECREF(abi_module); Py_DECREF(py_object_name); assert(cached_type == NULL || PyType_Check(cached_type)); return (PyTypeObject *) cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } /* CommonTypesMetaclass (used by CythonFunctionShared) */ static PyObject* __pyx_CommonTypesMetaclass_get_module(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED void* context) { return PyUnicode_FromString(__PYX_ABI_MODULE_NAME); } #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject* __pyx_CommonTypesMetaclass_call(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwds) { PyErr_SetString(PyExc_TypeError, "Cannot instantiate Cython internal types"); return NULL; } static int __pyx_CommonTypesMetaclass_setattr(CYTHON_UNUSED PyObject *self, CYTHON_UNUSED PyObject *attr, CYTHON_UNUSED PyObject *value) { PyErr_SetString(PyExc_TypeError, "Cython internal types are immutable"); return -1; } #endif static PyGetSetDef __pyx_CommonTypesMetaclass_getset[] = { {"__module__", __pyx_CommonTypesMetaclass_get_module, NULL, NULL, NULL}, {0, 0, 0, 0, 0} }; static PyType_Slot __pyx_CommonTypesMetaclass_slots[] = { {Py_tp_getset, (void *)__pyx_CommonTypesMetaclass_getset}, #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 {Py_tp_call, (void*)__pyx_CommonTypesMetaclass_call}, {Py_tp_new, (void*)__pyx_CommonTypesMetaclass_call}, {Py_tp_setattro, (void*)__pyx_CommonTypesMetaclass_setattr}, #endif {0, 0} }; static PyType_Spec __pyx_CommonTypesMetaclass_spec = { __PYX_TYPE_MODULE_PREFIX "_common_types_metatype", 0, 0, Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT, __pyx_CommonTypesMetaclass_slots }; static int __pyx_CommonTypesMetaclass_init(PyObject *module) { __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); PyObject *bases = PyTuple_Pack(1, &PyType_Type); if (unlikely(!bases)) { return -1; } mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases); Py_DECREF(bases); if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) { return -1; } return 0; } /* PyMethodNew (used by CythonFunctionShared) */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { PyObject *result; CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); #if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 { PyObject *args[] = {func, self}; result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); } #else result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); #endif return result; } #else static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { CYTHON_UNUSED_VAR(typ); if (!self) return __Pyx_NewRef(func); return PyMethod_New(func, self); } #endif /* PyVectorcallFastCallDict (used by CythonFunctionShared) */ #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { PyObject *res = NULL; PyObject *kwnames; PyObject **newargs; PyObject **kwvalues; Py_ssize_t i; #if CYTHON_AVOID_BORROWED_REFS PyObject *pos; #else Py_ssize_t pos; #endif size_t j; PyObject *key, *value; unsigned long keys_are_strings; #if !CYTHON_ASSUME_SAFE_SIZE Py_ssize_t nkw = PyDict_Size(kw); if (unlikely(nkw == -1)) return NULL; #else Py_ssize_t nkw = PyDict_GET_SIZE(kw); #endif newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); if (unlikely(newargs == NULL)) { PyErr_NoMemory(); return NULL; } for (j = 0; j < nargs; j++) newargs[j] = args[j]; kwnames = PyTuple_New(nkw); if (unlikely(kwnames == NULL)) { PyMem_Free(newargs); return NULL; } kwvalues = newargs + nargs; pos = 0; i = 0; keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; while (__Pyx_PyDict_NextRef(kw, &pos, &key, &value)) { keys_are_strings &= #if CYTHON_COMPILING_IN_LIMITED_API PyType_GetFlags(Py_TYPE(key)); #else Py_TYPE(key)->tp_flags; #endif #if !CYTHON_ASSUME_SAFE_MACROS if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; #else PyTuple_SET_ITEM(kwnames, i, key); #endif kwvalues[i] = value; i++; } if (unlikely(!keys_are_strings)) { PyErr_SetString(PyExc_TypeError, "keywords must be strings"); goto cleanup; } res = vc(func, newargs, nargs, kwnames); cleanup: #if CYTHON_AVOID_BORROWED_REFS Py_DECREF(pos); #endif Py_DECREF(kwnames); for (i = 0; i < nkw; i++) Py_DECREF(kwvalues[i]); PyMem_Free(newargs); return res; } static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) { Py_ssize_t kw_size = likely(kw == NULL) ? 0 : #if !CYTHON_ASSUME_SAFE_SIZE PyDict_Size(kw); #else PyDict_GET_SIZE(kw); #endif if (kw_size == 0) { return vc(func, args, nargs, NULL); } #if !CYTHON_ASSUME_SAFE_SIZE else if (unlikely(kw_size == -1)) { return NULL; } #endif return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); } #endif /* CythonFunctionShared (used by CythonFunction) */ #if CYTHON_COMPILING_IN_LIMITED_API static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void (*cfunc)(void)) { if (__Pyx_CyFunction_Check(func)) { return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; } else if (PyCFunction_Check(func)) { return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; } return 0; } static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { int result; PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); if (unlikely(!newFunc)) { PyErr_Clear(); // It's only an optimization, so don't throw an error return 0; } result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); Py_DECREF(newFunc); return result; } return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); } #else static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void (*cfunc)(void)) { if (PyMethod_Check(func)) { func = PyMethod_GET_FUNCTION(func); } return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; } #endif static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API __Pyx_Py_XDECREF_SET( __Pyx_CyFunction_GetClassObj(f), ((classobj) ? __Pyx_NewRef(classobj) : NULL)); #else __Pyx_Py_XDECREF_SET( ((PyCMethodObject *) (f))->mm_class, (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); #endif } static PyObject * __Pyx_CyFunction_get_doc_locked(__pyx_CyFunctionObject *op) { if (unlikely(op->func_doc == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); if (unlikely(!op->func_doc)) return NULL; #else if (((PyCFunctionObject*)op)->m_ml->ml_doc) { op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } #endif } Py_INCREF(op->func_doc); return op->func_doc; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) { PyObject *result; CYTHON_UNUSED_VAR(closure); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_doc_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (value == NULL) { value = Py_None; } Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_doc, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_name_locked(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if CYTHON_COMPILING_IN_LIMITED_API op->func_name = PyObject_GetAttrString(op->func, "__name__"); #else op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) { PyObject *result = NULL; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_name_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL || !PyUnicode_Check(value))) { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_name, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); PyObject *result; __Pyx_BEGIN_CRITICAL_SECTION(op); Py_INCREF(op->func_qualname); result = op->func_qualname; __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(value == NULL || !PyUnicode_Check(value))) { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_qualname, value); __Pyx_END_CRITICAL_SECTION(); return 0; } #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } #endif static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(op); CYTHON_UNUSED_VAR(context); Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; CYTHON_UNUSED_VAR(context); Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyTuple_Check(value))) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->defaults_tuple, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_defaults_locked(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result = NULL; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_defaults_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value) { value = Py_None; } else if (unlikely(value != Py_None && !PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " "currently affect the values used in function calls", 1); Py_INCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults_locked(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { PyObject* result; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_kwdefaults_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); if (!value || value == Py_None) { value = NULL; } else if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); __Pyx_BEGIN_CRITICAL_SECTION(op); __Pyx_Py_XDECREF_SET(op->func_annotations, value); __Pyx_END_CRITICAL_SECTION(); return 0; } static PyObject * __Pyx_CyFunction_get_annotations_locked(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { PyObject *result; CYTHON_UNUSED_VAR(context); __Pyx_BEGIN_CRITICAL_SECTION(op); result = __Pyx_CyFunction_get_annotations_locked(op); __Pyx_END_CRITICAL_SECTION(); return result; } static PyObject * __Pyx_CyFunction_get_is_coroutine_value(__pyx_CyFunctionObject *op) { int is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; if (is_coroutine) { PyObject *is_coroutine_value, *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; fromlist = PyList_New(1); if (unlikely(!fromlist)) return NULL; Py_INCREF(marker); #if CYTHON_ASSUME_SAFE_MACROS PyList_SET_ITEM(fromlist, 0, marker); #else if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { Py_DECREF(marker); Py_DECREF(fromlist); return NULL; } #endif module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); Py_DECREF(fromlist); if (unlikely(!module)) goto ignore; is_coroutine_value = __Pyx_PyObject_GetAttrStr(module, marker); Py_DECREF(module); if (likely(is_coroutine_value)) { return is_coroutine_value; } ignore: PyErr_Clear(); } return __Pyx_PyBool_FromLong(is_coroutine); } static PyObject * __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { PyObject *result; CYTHON_UNUSED_VAR(context); if (op->func_is_coroutine) { return __Pyx_NewRef(op->func_is_coroutine); } result = __Pyx_CyFunction_get_is_coroutine_value(op); if (unlikely(!result)) return NULL; __Pyx_BEGIN_CRITICAL_SECTION(op); if (op->func_is_coroutine) { Py_DECREF(result); result = __Pyx_NewRef(op->func_is_coroutine); } else { op->func_is_coroutine = __Pyx_NewRef(result); } __Pyx_END_CRITICAL_SECTION(); return result; } static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); if (!py_name) return; PyErr_Format(PyExc_TypeError, "%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", py_name, message, size); Py_DECREF(py_name); #else const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; PyErr_Format(PyExc_TypeError, "%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", name, message, size); #endif } static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); if (!py_name) return; PyErr_Format(PyExc_TypeError, "%.200S() %s", py_name, message); Py_DECREF(py_name); #else const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; PyErr_Format(PyExc_TypeError, "%.200s() %s", name, message); #endif } #if CYTHON_COMPILING_IN_LIMITED_API static PyObject * __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_GetAttrString(op->func, "__module__"); } static int __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { CYTHON_UNUSED_VAR(context); return PyObject_SetAttrString(op->func, "__module__", value); } #endif static PyGetSetDef __pyx_CyFunction_getsets[] = { {"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 {"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, {"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)PyObject_GenericSetDict, 0, 0}, #else {"func_dict", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, {"__dict__", (getter)PyObject_GenericGetDict, (setter)PyObject_GenericSetDict, 0, 0}, #endif {"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, #if CYTHON_COMPILING_IN_LIMITED_API {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, #endif {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { #if !CYTHON_COMPILING_IN_LIMITED_API {"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API {"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, #endif #if CYTHON_METH_FASTCALL #if CYTHON_COMPILING_IN_LIMITED_API {"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, #else {"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, #endif #if CYTHON_COMPILING_IN_LIMITED_API {"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, #else {"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, #endif #endif {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) { PyObject *result = NULL; CYTHON_UNUSED_VAR(args); __Pyx_BEGIN_CRITICAL_SECTION(m); Py_INCREF(m->func_qualname); result = m->func_qualname; __Pyx_END_CRITICAL_SECTION(); return result; } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if CYTHON_COMPILING_IN_LIMITED_API #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) #endif static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { #if !CYTHON_COMPILING_IN_LIMITED_API PyCFunctionObject *cf = (PyCFunctionObject*) op; #endif if (unlikely(op == NULL)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); if (unlikely(!op->func)) return NULL; #endif op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; #if !CYTHON_COMPILING_IN_LIMITED_API cf->m_ml = ml; cf->m_self = (PyObject *) op; #endif Py_XINCREF(closure); op->func_closure = closure; #if !CYTHON_COMPILING_IN_LIMITED_API Py_XINCREF(module); cf->m_module = module; #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API op->func_dict = NULL; #endif op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API op->func_classobj = NULL; #else ((PyCMethodObject*)op)->mm_class = NULL; #endif op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; op->func_is_coroutine = NULL; #if CYTHON_METH_FASTCALL switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { case METH_NOARGS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; break; case METH_O: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; break; case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; break; case METH_FASTCALL | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; break; case METH_VARARGS | METH_KEYWORDS: __Pyx_CyFunction_func_vectorcall(op) = NULL; break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); Py_DECREF(op); return NULL; } #endif return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func); #else Py_CLEAR(((PyCFunctionObject*)m)->m_module); #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_CLEAR(m->func_dict); #elif PY_VERSION_HEX < 0x030d0000 _PyObject_ClearManagedDict((PyObject*)m); #else PyObject_ClearManagedDict((PyObject*)m); #endif Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API #if PY_VERSION_HEX < 0x030900B1 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); #else { PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; ((PyCMethodObject *) (m))->mm_class = NULL; Py_XDECREF(cls); } #endif #endif Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); Py_CLEAR(m->func_is_coroutine); Py_CLEAR(m->defaults); return 0; } static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) { if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); __Pyx_PyHeapTypeObject_GC_Del(m); } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); __Pyx__CyFunction_dealloc(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { { int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); if (e) return e; } Py_VISIT(m->func_closure); #if CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func); #else Py_VISIT(((PyCFunctionObject*)m)->m_module); #endif #if PY_VERSION_HEX < 0x030C0000 || CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(m->func_dict); #else { int e = #if PY_VERSION_HEX < 0x030d0000 _PyObject_VisitManagedDict #else PyObject_VisitManagedDict #endif ((PyObject*)m, visit, arg); if (e != 0) return e; } #endif __Pyx_VISIT_CONST(m->func_name); __Pyx_VISIT_CONST(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); __Pyx_VISIT_CONST(m->func_code); #if !CYTHON_COMPILING_IN_LIMITED_API Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); #endif Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); Py_VISIT(m->func_is_coroutine); Py_VISIT(m->defaults); return 0; } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { PyObject *repr; __Pyx_BEGIN_CRITICAL_SECTION(op); repr = PyUnicode_FromFormat("", op->func_qualname, (void *)op); __Pyx_END_CRITICAL_SECTION(); return repr; } static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { #if CYTHON_COMPILING_IN_LIMITED_API PyObject *f = ((__pyx_CyFunctionObject*)func)->func; PyCFunction meth; int flags; meth = PyCFunction_GetFunction(f); if (unlikely(!meth)) return NULL; flags = PyCFunction_GetFlags(f); if (unlikely(flags < 0)) return NULL; #else PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; int flags = f->m_ml->ml_flags; #endif Py_ssize_t size; switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)(void(*)(void))meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_SIZE size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 0)) return (*meth)(self, NULL); __Pyx_CyFunction_raise_argument_count_error( (__pyx_CyFunctionObject*)func, "takes no arguments", size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { #if CYTHON_ASSUME_SAFE_SIZE size = PyTuple_GET_SIZE(arg); #else size = PyTuple_Size(arg); if (unlikely(size < 0)) return NULL; #endif if (likely(size == 1)) { PyObject *result, *arg0; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS arg0 = PyTuple_GET_ITEM(arg, 0); #else arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; #endif result = (*meth)(self, arg0); #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) Py_DECREF(arg0); #endif return result; } __Pyx_CyFunction_raise_argument_count_error( (__pyx_CyFunctionObject*)func, "takes exactly one argument", size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); return NULL; } __Pyx_CyFunction_raise_type_error( (__pyx_CyFunctionObject*)func, "takes no keyword arguments"); return NULL; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *self, *result; #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)func)->m_self; #endif result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); return result; } static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { PyObject *result; __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); if (vc) { #if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); #else (void) &__Pyx_PyVectorcall_FastCallDict; return PyVectorcall_Call(func, args, kw); #endif } #endif if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { Py_ssize_t argc; PyObject *new_args; PyObject *self; #if CYTHON_ASSUME_SAFE_SIZE argc = PyTuple_GET_SIZE(args); #else argc = PyTuple_Size(args); if (unlikely(argc < 0)) return NULL; #endif new_args = PyTuple_GetSlice(args, 1, argc); if (unlikely(!new_args)) return NULL; self = PyTuple_GetItem(args, 0); if (unlikely(!self)) { Py_DECREF(new_args); PyErr_Format(PyExc_TypeError, "unbound method %.200S() needs an argument", cyfunc->func_qualname); return NULL; } result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); Py_DECREF(new_args); } else { result = __Pyx_CyFunction_Call(func, args, kw); } return result; } #if CYTHON_METH_FASTCALL && CYTHON_VECTORCALL static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) { int ret = 0; if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { if (unlikely(nargs < 1)) { __Pyx_CyFunction_raise_type_error( cyfunc, "needs an argument"); return -1; } ret = 1; } if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { __Pyx_CyFunction_raise_type_error( cyfunc, "takes no keyword arguments"); return -1; } return ret; } static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } if (unlikely(nargs != 0)) { __Pyx_CyFunction_raise_argument_count_error( cyfunc, "takes no arguments", nargs); return NULL; } return meth(self, NULL); } static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } if (unlikely(nargs != 1)) { __Pyx_CyFunction_raise_argument_count_error( cyfunc, "takes exactly one argument", nargs); return NULL; } return meth(self, args[0]); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); } static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) { __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); PyObject *self; #if CYTHON_COMPILING_IN_LIMITED_API PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); if (unlikely(!meth)) return NULL; #else PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; #endif switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { case 1: self = args[0]; args += 1; nargs -= 1; break; case 0: #if CYTHON_COMPILING_IN_LIMITED_API self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); if (unlikely(!self) && PyErr_Occurred()) return NULL; #else self = ((PyCFunctionObject*)cyfunc)->m_self; #endif break; default: return NULL; } #if PY_VERSION_HEX < 0x030e00A6 size_t nargs_value = (size_t) nargs; #else Py_ssize_t nargs_value = nargs; #endif return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, nargs_value, kwnames); } #endif static PyType_Slot __pyx_CyFunctionType_slots[] = { {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, {Py_tp_repr, (void *)__Pyx_CyFunction_repr}, {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, {Py_tp_clear, (void *)__Pyx_CyFunction_clear}, {Py_tp_methods, (void *)__pyx_CyFunction_methods}, {Py_tp_members, (void *)__pyx_CyFunction_members}, {Py_tp_getset, (void *)__pyx_CyFunction_getsets}, {Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, {0, 0}, }; static PyType_Spec __pyx_CyFunctionType_spec = { __PYX_TYPE_MODULE_PREFIX "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR Py_TPFLAGS_METHOD_DESCRIPTOR | #endif #if CYTHON_METH_FASTCALL #if defined(Py_TPFLAGS_HAVE_VECTORCALL) Py_TPFLAGS_HAVE_VECTORCALL | #elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) _Py_TPFLAGS_HAVE_VECTORCALL | #endif #endif // CYTHON_METH_FASTCALL #if PY_VERSION_HEX >= 0x030C0000 && !CYTHON_COMPILING_IN_LIMITED_API Py_TPFLAGS_MANAGED_DICT | #endif Py_TPFLAGS_IMMUTABLETYPE | Py_TPFLAGS_DISALLOW_INSTANTIATION | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, __pyx_CyFunctionType_slots }; static int __pyx_CyFunction_init(PyObject *module) { __pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec( mstate->__pyx_CommonTypesMetaclassType, module, &__pyx_CyFunctionType_spec, NULL); if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { return -1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); // _PyObject_New(defaults_type); if (unlikely(!m->defaults)) return NULL; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } /* CythonFunction */ static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { PyObject *op = __Pyx_CyFunction_Init( PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), ml, flags, qualname, closure, module, globals, code ); if (likely(op)) { PyObject_GC_Track(op); } return op; } /* ClassMethod */ static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYPY if (PyMethodDescr_Check(method)) #else if (__Pyx_TypeCheck(method, &PyMethodDescr_Type)) #endif { #if CYTHON_COMPILING_IN_LIMITED_API return PyErr_Format( PyExc_SystemError, "Cython cannot yet handle classmethod on a MethodDescriptorType (%S) in limited API mode. " "This is most likely a classmethod in a cdef class method with binding=False. " "Try setting 'binding' to True.", method); #elif CYTHON_COMPILING_IN_GRAAL && defined(GRAALPY_VERSION_NUM) && GRAALPY_VERSION_NUM > 0x19000000 PyTypeObject *d_type = GraalPyDescrObject_GetType(method); return PyDescr_NewClassMethod(d_type, GraalPyMethodDescrObject_GetMethod(method)); #elif CYTHON_COMPILING_IN_GRAAL PyTypeObject *d_type = PyDescrObject_GetType(method); return PyDescr_NewClassMethod(d_type, PyMethodDescrObject_GetMethod(method)); #else PyMethodDescrObject *descr = (PyMethodDescrObject *)method; PyTypeObject *d_type = descr->d_common.d_type; return PyDescr_NewClassMethod(d_type, descr->d_method); #endif } #endif #if !CYTHON_COMPILING_IN_LIMITED_API else if (PyMethod_Check(method)) { return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); } else { return PyClassMethod_New(method); } #else { PyObject *func=NULL; PyObject *builtins, *classmethod, *classmethod_str, *result=NULL; if (__Pyx_TypeCheck(method, __pyx_mstate_global->__Pyx_CachedMethodType)) { func = PyObject_GetAttrString(method, "__func__"); if (!func) goto bad; } else { func = method; Py_INCREF(func); } builtins = PyEval_GetBuiltins(); // borrowed if (unlikely(!builtins)) goto bad; classmethod_str = PyUnicode_FromString("classmethod"); if (unlikely(!classmethod_str)) goto bad; classmethod = PyObject_GetItem(builtins, classmethod_str); Py_DECREF(classmethod_str); if (unlikely(!classmethod)) goto bad; result = PyObject_CallFunctionObjArgs(classmethod, func, NULL); Py_DECREF(classmethod); bad: Py_XDECREF(func); return result; } #endif } /* GetNameInClass */ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; PyObject *dict; assert(PyType_Check(nmspace)); #if CYTHON_USE_TYPE_SLOTS dict = ((PyTypeObject*)nmspace)->tp_dict; Py_XINCREF(dict); #else dict = PyObject_GetAttr(nmspace, __pyx_mstate_global->__pyx_n_u_dict); #endif if (likely(dict)) { result = PyObject_GetItem(dict, name); Py_DECREF(dict); if (result) { return result; } } PyErr_Clear(); __Pyx_GetModuleGlobalNameUncached(result, name); return result; } /* CalculateMetaclass (used by Py3ClassCreate) */ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases; #if CYTHON_ASSUME_SAFE_SIZE nbases = PyTuple_GET_SIZE(bases); #else nbases = PyTuple_Size(bases); if (nbases < 0) return NULL; #endif for (i=0; i < nbases; i++) { PyTypeObject *tmptype; #if CYTHON_ASSUME_SAFE_MACROS PyObject *tmp = PyTuple_GET_ITEM(bases, i); #else PyObject *tmp = PyTuple_GetItem(bases, i); if (!tmp) return NULL; #endif tmptype = Py_TYPE(tmp); if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { metaclass = &PyType_Type; } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } /* PyObjectCall2Args (used by Py3ClassCreate) */ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { PyObject *args[3] = {NULL, arg1, arg2}; return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); } /* PyObjectLookupSpecial (used by Py3ClassCreate) */ #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { PyObject *res; PyTypeObject *tp = Py_TYPE(obj); res = _PyType_Lookup(tp, attr_name); if (likely(res)) { descrgetfunc f = Py_TYPE(res)->tp_descr_get; if (!f) { Py_INCREF(res); } else { res = f(res, obj, (PyObject *)tp); } } else if (with_error) { PyErr_SetObject(PyExc_AttributeError, attr_name); } return res; } #endif /* Py3ClassCreate */ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare_2); if (prep) { PyObject *pargs[3] = {NULL, name, bases}; ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_DECREF(prep); } else { if (unlikely(PyErr_Occurred())) return NULL; ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result; PyObject *owned_metaclass = NULL; PyObject *margs[4] = {NULL, name, bases, dict}; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); Py_XDECREF(owned_metaclass); return result; } /* CLineInTraceback (used by AddTraceback) */ #if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 #define __Pyx_PyProbablyModule_GetDict(o) __Pyx_XNewRef(PyModule_GetDict(o)) #elif !CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_CPYTHON_FREETHREADING #define __Pyx_PyProbablyModule_GetDict(o) PyObject_GenericGetDict(o, NULL); #else PyObject* __Pyx_PyProbablyModule_GetDict(PyObject *o) { PyObject **dict_ptr = _PyObject_GetDictPtr(o); return dict_ptr ? __Pyx_XNewRef(*dict_ptr) : NULL; } #endif static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline = NULL; PyObject *ptype, *pvalue, *ptraceback; PyObject *cython_runtime_dict; CYTHON_MAYBE_UNUSED_VAR(tstate); if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { return c_line; } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); cython_runtime_dict = __Pyx_PyProbablyModule_GetDict(__pyx_mstate_global->__pyx_cython_runtime); if (likely(cython_runtime_dict)) { __PYX_PY_DICT_LOOKUP_IF_MODIFIED( use_cline, cython_runtime_dict, __Pyx_PyDict_SetDefault(cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False)) } if (use_cline == NULL || use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } Py_XDECREF(use_cline); Py_XDECREF(cython_runtime_dict); __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); return c_line; } #endif /* CodeObjectCache (used by AddTraceback) */ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static __Pyx_CachedCodeObjectType *__pyx__find_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line) { __Pyx_CachedCodeObjectType* code_object; int pos; if (unlikely(!code_line) || unlikely(!code_cache->entries)) { return NULL; } pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); if (unlikely(pos >= code_cache->count) || unlikely(code_cache->entries[pos].code_line != code_line)) { return NULL; } code_object = code_cache->entries[pos].code_object; Py_INCREF(code_object); return code_object; } static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS (void)__pyx__find_code_object; return NULL; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just miss. #else struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_nonatomic_int_type old_count = __pyx_atomic_incr_acq_rel(&code_cache->accessor_count); if (old_count < 0) { __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); return NULL; } #endif __Pyx_CachedCodeObjectType *result = __pyx__find_code_object(code_cache, code_line); #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_atomic_decr_acq_rel(&code_cache->accessor_count); #endif return result; #endif } static void __pyx__insert_code_object(struct __Pyx_CodeObjectCache *code_cache, int code_line, __Pyx_CachedCodeObjectType* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = code_cache->entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { code_cache->entries = entries; code_cache->max_count = 64; code_cache->count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(code_cache->entries, code_cache->count, code_line); if ((pos < code_cache->count) && unlikely(code_cache->entries[pos].code_line == code_line)) { __Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_INCREF(code_object); Py_DECREF(tmp); return; } if (code_cache->count == code_cache->max_count) { int new_max = code_cache->max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( code_cache->entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } code_cache->entries = entries; code_cache->max_count = new_max; } for (i=code_cache->count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; code_cache->count++; Py_INCREF(code_object); } static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) { #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING && !CYTHON_ATOMICS (void)__pyx__insert_code_object; return; // Most implementation should have atomics. But otherwise, don't make it thread-safe, just fail. #else struct __Pyx_CodeObjectCache *code_cache = &__pyx_mstate_global->__pyx_code_cache; #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_nonatomic_int_type expected = 0; if (!__pyx_atomic_int_cmp_exchange(&code_cache->accessor_count, &expected, INT_MIN)) { return; } #endif __pyx__insert_code_object(code_cache, code_line, code_object); #if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING __pyx_atomic_sub(&code_cache->accessor_count, INT_MIN); #endif #endif } /* AddTraceback */ #include "compile.h" #include "frameobject.h" #include "traceback.h" #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) #ifndef Py_BUILD_CORE #define Py_BUILD_CORE 1 #endif #include "internal/pycore_frame.h" #endif #if CYTHON_COMPILING_IN_LIMITED_API static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, PyObject *firstlineno, PyObject *name) { PyObject *replace = NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; replace = PyObject_GetAttrString(code, "replace"); if (likely(replace)) { PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); Py_DECREF(replace); return result; } PyErr_Clear(); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; PyObject *replace = NULL, *getframe = NULL, *frame = NULL; PyObject *exc_type, *exc_value, *exc_traceback; int success = 0; if (c_line) { c_line = __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); } PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); code_object = __pyx_find_code_object(c_line ? -c_line : py_line); if (!code_object) { code_object = Py_CompileString("_getframe()", filename, Py_eval_input); if (unlikely(!code_object)) goto bad; py_py_line = PyLong_FromLong(py_line); if (unlikely(!py_py_line)) goto bad; if (c_line) { py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); } else { py_funcname = PyUnicode_FromString(funcname); } if (unlikely(!py_funcname)) goto bad; dict = PyDict_New(); if (unlikely(!dict)) goto bad; { PyObject *old_code_object = code_object; code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); Py_DECREF(old_code_object); } if (unlikely(!code_object)) goto bad; __pyx_insert_code_object(c_line ? -c_line : py_line, code_object); } else { dict = PyDict_New(); } getframe = PySys_GetObject("_getframe"); if (unlikely(!getframe)) goto bad; if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; frame = PyEval_EvalCode(code_object, dict, dict); if (unlikely(!frame) || frame == Py_None) goto bad; success = 1; bad: PyErr_Restore(exc_type, exc_value, exc_traceback); Py_XDECREF(code_object); Py_XDECREF(py_py_line); Py_XDECREF(py_funcname); Py_XDECREF(dict); Py_XDECREF(replace); if (success) { PyTraceBack_Here( (struct _frame*)frame); } Py_XDECREF(frame); } #else static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = NULL; PyObject *py_funcname = NULL; if (c_line) { py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); if (!py_funcname) goto bad; funcname = PyUnicode_AsUTF8(py_funcname); if (!funcname) goto bad; } py_code = PyCode_NewEmpty(filename, funcname, py_line); Py_XDECREF(py_funcname); return py_code; bad: Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject *ptype, *pvalue, *ptraceback; if (c_line) { c_line = __Pyx_CLineForTraceback(tstate, c_line); } py_code = __pyx_find_code_object(c_line ? -c_line : py_line); if (!py_code) { __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) { /* If the code object creation fails, then we should clear the fetched exception references and propagate the new exception */ Py_XDECREF(ptype); Py_XDECREF(pvalue); Py_XDECREF(ptraceback); goto bad; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); } py_frame = PyFrame_New( tstate, /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_mstate_global->__pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; __Pyx_PyFrame_SetLineNumber(py_frame, py_line); PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #endif /* CheckUnpickleChecksum */ static void __Pyx_RaiseUnpickleChecksumError(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { PyObject *pickle_module = PyImport_ImportModule("pickle"); if (unlikely(!pickle_module)) return; PyObject *pickle_error = PyObject_GetAttrString(pickle_module, "PickleError"); Py_DECREF(pickle_module); if (unlikely(!pickle_error)) return; if (checksum2 == checksum1) { PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x) = (%s))", checksum, checksum1, members); } else if (checksum3 == checksum2) { PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x) = (%s))", checksum, checksum1, checksum2, members); } else { PyErr_Format(pickle_error, "Incompatible checksums (0x%x vs (0x%x, 0x%x, 0x%x) = (%s))", checksum, checksum1, checksum2, checksum3, members); } Py_DECREF(pickle_error); } static int __Pyx_CheckUnpickleChecksum(long checksum, long checksum1, long checksum2, long checksum3, const char *members) { int found = 0; found |= checksum1 == checksum; found |= checksum2 == checksum; found |= checksum3 == checksum; if (likely(found)) return 0; __Pyx_RaiseUnpickleChecksumError(checksum, checksum1, checksum2, checksum3, members); return -1; } /* CIntFromPyVerify */ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(int) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (unlikely(!PyLong_Check(x))) { int val; PyObject *tmp = __Pyx_PyNumber_Long(x); if (!tmp) return (int) -1; val = __Pyx_PyLong_As_int(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(int) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } } #endif if ((sizeof(int) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { int val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (int) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (int) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (int) -1; } else { stepval = v; } v = NULL; val = (int) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((int) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((int) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (int) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } /* CIntFromPy */ static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (unlikely(!PyLong_Check(x))) { long val; PyObject *tmp = __Pyx_PyNumber_Long(x); if (!tmp) return (long) -1; val = __Pyx_PyLong_As_long(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(long) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } } #endif if ((sizeof(long) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { long val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (long) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (long) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (long) -1; } else { stepval = v; } v = NULL; val = (long) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((long) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((long) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (long) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PY_LONG_LONG(PY_LONG_LONG value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PY_LONG_LONG neg_one = (PY_LONG_LONG) -1, const_zero = (PY_LONG_LONG) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PY_LONG_LONG) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(PY_LONG_LONG) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PY_LONG_LONG) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PY_LONG_LONG) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PY_LONG_LONG), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PY_LONG_LONG)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PGPing(PGPing value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PGPing neg_one = (PGPing) -1, const_zero = (PGPing) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PGPing) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PGPing) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(PGPing) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PGPing) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PGPing) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PGPing), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PGPing)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ConnStatusType(ConnStatusType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const ConnStatusType neg_one = (ConnStatusType) -1, const_zero = (ConnStatusType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ConnStatusType) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(ConnStatusType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(ConnStatusType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(ConnStatusType) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(ConnStatusType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(ConnStatusType), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ConnStatusType)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PGTransactionStatusType(PGTransactionStatusType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PGTransactionStatusType neg_one = (PGTransactionStatusType) -1, const_zero = (PGTransactionStatusType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PGTransactionStatusType) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PGTransactionStatusType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(PGTransactionStatusType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PGTransactionStatusType) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PGTransactionStatusType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PGTransactionStatusType), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PGTransactionStatusType)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntFromPy */ static CYTHON_INLINE Oid __Pyx_PyLong_As_Oid(PyObject *x) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Oid neg_one = (Oid) -1, const_zero = (Oid) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (unlikely(!PyLong_Check(x))) { Oid val; PyObject *tmp = __Pyx_PyNumber_Long(x); if (!tmp) return (Oid) -1; val = __Pyx_PyLong_As_Oid(tmp); Py_DECREF(tmp); return val; } if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS if (unlikely(__Pyx_PyLong_IsNeg(x))) { goto raise_neg_overflow; } else if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Oid, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_DigitCount(x)) { case 2: if ((8 * sizeof(Oid) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Oid) >= 2 * PyLong_SHIFT)) { return (Oid) (((((Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])); } } break; case 3: if ((8 * sizeof(Oid) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Oid) >= 3 * PyLong_SHIFT)) { return (Oid) (((((((Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])); } } break; case 4: if ((8 * sizeof(Oid) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, 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(Oid) >= 4 * PyLong_SHIFT)) { return (Oid) (((((((((Oid)digits[3]) << PyLong_SHIFT) | (Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0])); } } break; } } #endif #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (Oid) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if ((sizeof(Oid) <= sizeof(unsigned long))) { __PYX_VERIFY_RETURN_INT_EXC(Oid, unsigned long, PyLong_AsUnsignedLong(x)) } else if ((sizeof(Oid) <= sizeof(unsigned PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Oid, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS if (__Pyx_PyLong_IsCompact(x)) { __PYX_VERIFY_RETURN_INT(Oid, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) } else { const digit* digits = __Pyx_PyLong_Digits(x); assert(__Pyx_PyLong_DigitCount(x) > 1); switch (__Pyx_PyLong_SignedDigitCount(x)) { case -2: if ((8 * sizeof(Oid) - 1 > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Oid) - 1 > 2 * PyLong_SHIFT)) { return (Oid) (((Oid)-1)*(((((Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]))); } } break; case 2: if ((8 * sizeof(Oid) > 1 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Oid) - 1 > 2 * PyLong_SHIFT)) { return (Oid) ((((((Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]))); } } break; case -3: if ((8 * sizeof(Oid) - 1 > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Oid) - 1 > 3 * PyLong_SHIFT)) { return (Oid) (((Oid)-1)*(((((((Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]))); } } break; case 3: if ((8 * sizeof(Oid) > 2 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if ((8 * sizeof(Oid) - 1 > 3 * PyLong_SHIFT)) { return (Oid) ((((((((Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]))); } } break; case -4: if ((8 * sizeof(Oid) - 1 > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, 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(Oid) - 1 > 4 * PyLong_SHIFT)) { return (Oid) (((Oid)-1)*(((((((((Oid)digits[3]) << PyLong_SHIFT) | (Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]))); } } break; case 4: if ((8 * sizeof(Oid) > 3 * PyLong_SHIFT)) { if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { __PYX_VERIFY_RETURN_INT(Oid, 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(Oid) - 1 > 4 * PyLong_SHIFT)) { return (Oid) ((((((((((Oid)digits[3]) << PyLong_SHIFT) | (Oid)digits[2]) << PyLong_SHIFT) | (Oid)digits[1]) << PyLong_SHIFT) | (Oid)digits[0]))); } } break; } } #endif if ((sizeof(Oid) <= sizeof(long))) { __PYX_VERIFY_RETURN_INT_EXC(Oid, long, PyLong_AsLong(x)) } else if ((sizeof(Oid) <= sizeof(PY_LONG_LONG))) { __PYX_VERIFY_RETURN_INT_EXC(Oid, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { Oid val; int ret = -1; #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API Py_ssize_t bytes_copied = PyLong_AsNativeBytes( x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); if (unlikely(bytes_copied == -1)) { } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { goto raise_overflow; } else { ret = 0; } #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; ret = _PyLong_AsByteArray((PyLongObject *)x, bytes, sizeof(val), is_little, !is_unsigned); #else PyObject *v; PyObject *stepval = NULL, *mask = NULL, *shift = NULL; int bits, remaining_bits, is_negative = 0; int chunk_size = (sizeof(long) < 8) ? 30 : 62; if (likely(PyLong_CheckExact(x))) { v = __Pyx_NewRef(x); } else { v = PyNumber_Long(x); if (unlikely(!v)) return (Oid) -1; assert(PyLong_CheckExact(v)); } { int result = PyObject_RichCompareBool(v, Py_False, Py_LT); if (unlikely(result < 0)) { Py_DECREF(v); return (Oid) -1; } is_negative = result == 1; } if (is_unsigned && unlikely(is_negative)) { Py_DECREF(v); goto raise_neg_overflow; } else if (is_negative) { stepval = PyNumber_Invert(v); Py_DECREF(v); if (unlikely(!stepval)) return (Oid) -1; } else { stepval = v; } v = NULL; val = (Oid) 0; mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; for (bits = 0; bits < (int) sizeof(Oid) * 8 - chunk_size; bits += chunk_size) { PyObject *tmp, *digit; long idigit; digit = PyNumber_And(stepval, mask); if (unlikely(!digit)) goto done; idigit = PyLong_AsLong(digit); Py_DECREF(digit); if (unlikely(idigit < 0)) goto done; val |= ((Oid) idigit) << bits; tmp = PyNumber_Rshift(stepval, shift); if (unlikely(!tmp)) goto done; Py_DECREF(stepval); stepval = tmp; } Py_DECREF(shift); shift = NULL; Py_DECREF(mask); mask = NULL; { long idigit = PyLong_AsLong(stepval); if (unlikely(idigit < 0)) goto done; remaining_bits = ((int) sizeof(Oid) * 8) - bits - (is_unsigned ? 0 : 1); if (unlikely(idigit >= (1L << remaining_bits))) goto raise_overflow; val |= ((Oid) idigit) << bits; } if (!is_unsigned) { if (unlikely(val & (((Oid) 1) << (sizeof(Oid) * 8 - 1)))) goto raise_overflow; if (is_negative) val = ~val; } ret = 0; done: Py_XDECREF(shift); Py_XDECREF(mask); Py_XDECREF(stepval); #endif if (unlikely(ret)) return (Oid) -1; return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to Oid"); return (Oid) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to Oid"); return (Oid) -1; } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_ExecStatusType(ExecStatusType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const ExecStatusType neg_one = (ExecStatusType) -1, const_zero = (ExecStatusType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(ExecStatusType) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(ExecStatusType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(ExecStatusType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(ExecStatusType) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(ExecStatusType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(ExecStatusType), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(ExecStatusType)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PGpipelineStatus(PGpipelineStatus value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PGpipelineStatus neg_one = (PGpipelineStatus) -1, const_zero = (PGpipelineStatus) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PGpipelineStatus) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PGpipelineStatus) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(PGpipelineStatus) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PGpipelineStatus) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PGpipelineStatus) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PGpipelineStatus), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PGpipelineStatus)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_Oid(Oid value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Oid neg_one = (Oid) -1, const_zero = (Oid) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Oid) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(Oid) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(Oid) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(Oid) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(Oid) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(Oid), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(Oid)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_PostgresPollingStatusType(PostgresPollingStatusType value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const PostgresPollingStatusType neg_one = (PostgresPollingStatusType) -1, const_zero = (PostgresPollingStatusType) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(PostgresPollingStatusType) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PostgresPollingStatusType) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(PostgresPollingStatusType) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(PostgresPollingStatusType) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(PostgresPollingStatusType) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(PostgresPollingStatusType), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(PostgresPollingStatusType)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const long neg_one = (long) -1, const_zero = (long) 0; #ifdef __Pyx_HAS_GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); #if !CYTHON_COMPILING_IN_PYPY } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); #endif } } else { if (sizeof(long) <= sizeof(long)) { return PyLong_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { unsigned char *bytes = (unsigned char *)&value; #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 if (is_unsigned) { return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); } else { return PyLong_FromNativeBytes(bytes, sizeof(value), -1); } #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 int one = 1; int little = (int)*(unsigned char *)&one; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); #else int one = 1; int little = (int)*(unsigned char *)&one; PyObject *from_bytes, *result = NULL, *kwds = NULL; PyObject *py_bytes = NULL, *order_str = NULL; from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); if (!from_bytes) return NULL; py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); if (!py_bytes) goto limited_bad; order_str = PyUnicode_FromString(little ? "little" : "big"); if (!order_str) goto limited_bad; { PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; if (!is_unsigned) { kwds = __Pyx_MakeVectorcallBuilderKwds(1); if (!kwds) goto limited_bad; if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; } result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); } limited_bad: Py_XDECREF(kwds); Py_XDECREF(order_str); Py_XDECREF(py_bytes); Py_XDECREF(from_bytes); return result; #endif } } /* PyObjectCallMethod1 */ #if !(CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000))) static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); Py_DECREF(method); return result; } #endif static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { #if CYTHON_VECTORCALL && (__PYX_LIMITED_VERSION_HEX >= 0x030C0000 || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x03090000)) PyObject *args[2] = {obj, arg}; (void) __Pyx_PyObject_CallOneArg; (void) __Pyx_PyObject_Call2Args; return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL); #else PyObject *method = NULL, *result; int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); if (likely(is_method)) { result = __Pyx_PyObject_Call2Args(method, obj, arg); Py_DECREF(method); return result; } if (unlikely(!method)) return NULL; return __Pyx__PyObject_CallMethod1(method, arg); #endif } /* UpdateUnpickledDict */ static int __Pyx__UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { PyObject *state_dict = __Pyx_PySequence_ITEM(state, index); if (unlikely(!state_dict)) { return -1; } int non_empty = PyObject_IsTrue(state_dict); if (non_empty == 0) { Py_DECREF(state_dict); return 0; } else if (unlikely(non_empty == -1)) { return -1; } PyObject *dict; #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 dict = PyObject_GetAttrString(obj, "__dict__"); #else dict = PyObject_GenericGetDict(obj, NULL); #endif if (unlikely(!dict)) { Py_DECREF(state_dict); return -1; } int result; if (likely(PyDict_CheckExact(dict))) { result = PyDict_Update(dict, state_dict); } else { PyObject *obj_result = __Pyx_PyObject_CallMethod1(dict, __pyx_mstate_global->__pyx_n_u_update, state_dict); if (likely(obj_result)) { Py_DECREF(obj_result); result = 0; } else { result = -1; } } Py_DECREF(state_dict); Py_DECREF(dict); return result; } static int __Pyx_UpdateUnpickledDict(PyObject *obj, PyObject *state, Py_ssize_t index) { Py_ssize_t state_size = __Pyx_PyTuple_GET_SIZE(state); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(state_size == -1)) return -1; #endif if (state_size <= index) { return 0; } return __Pyx__UpdateUnpickledDict(obj, state, index); } /* FormatTypeName */ #if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030d0000 static __Pyx_TypeName __Pyx_PyType_GetFullyQualifiedName(PyTypeObject* tp) { PyObject *module = NULL, *name = NULL, *result = NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_mstate_global->__pyx_n_u_qualname); #else name = PyType_GetQualName(tp); #endif if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) goto bad; module = __Pyx_PyObject_GetAttrStr((PyObject *)tp, __pyx_mstate_global->__pyx_n_u_module); if (unlikely(module == NULL) || unlikely(!PyUnicode_Check(module))) goto bad; if (PyUnicode_CompareWithASCIIString(module, "builtins") == 0) { result = name; name = NULL; goto done; } result = PyUnicode_FromFormat("%U.%U", module, name); if (unlikely(result == NULL)) goto bad; done: Py_XDECREF(name); Py_XDECREF(module); return result; bad: PyErr_Clear(); if (name) { result = name; name = NULL; } else { result = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u__15); } goto done; } #endif /* FastTypeChecks */ #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); if (a == b) return 1; } return b == &PyBaseObject_Type; } static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (a == b) return 1; mro = a->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(a, b); } static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { PyObject *mro; if (cls == a || cls == b) return 1; mro = cls->tp_mro; if (likely(mro)) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(mro); for (i = 0; i < n; i++) { PyObject *base = PyTuple_GET_ITEM(mro, i); if (base == (PyObject *)a || base == (PyObject *)b) return 1; } return 0; } return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); } static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { if (exc_type1) { return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); } else { return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); } } static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; assert(PyExceptionClass_Check(exc_type)); n = PyTuple_GET_SIZE(tuple); for (i=0; i>= 8; ++i; } __Pyx_cached_runtime_version = version; } } #endif static unsigned long __Pyx_get_runtime_version(void) { #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 return Py_Version & ~0xFFUL; #else return __Pyx_cached_runtime_version; #endif } /* CheckBinaryVersion */ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { const unsigned long MAJOR_MINOR = 0xFFFF0000UL; if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) return 0; if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) return 1; { char message[200]; PyOS_snprintf(message, sizeof(message), "compile time Python version %d.%d " "of module '%.100s' " "%s " "runtime version %d.%d", (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), __Pyx_MODULE_NAME, (allow_newer) ? "was newer than" : "does not match", (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) ); return PyErr_WarnEx(NULL, message, 1); } } /* NewCodeObj */ #if CYTHON_COMPILING_IN_LIMITED_API static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030b0000 PyObject *version_info; PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030b0000 minor_version = 11; #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; minor_version = PyLong_AsLong(py_minor_version); Py_DECREF(py_minor_version); if (minor_version == -1 && PyErr_Occurred()) goto end; #endif if (!(types_module = PyImport_ImportModule("types"))) goto end; if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; if (minor_version <= 7) { (void)p; result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOOO", a, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else if (minor_version <= 10) { result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOOO", a,p, k, l, s, f, code, c, n, v, fn, name, fline, lnos, fv, cell); } else { if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOOOO", a,p, k, l, s, f, code, c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); } end: Py_XDECREF(code_type); Py_XDECREF(exception_table); Py_XDECREF(types_module); if (type) { PyErr_Restore(type, value, traceback); } return result; } #elif PY_VERSION_HEX >= 0x030B0000 static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, PyObject *code, PyObject *c, PyObject* n, PyObject *v, PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; result = #if PY_VERSION_HEX >= 0x030C0000 PyUnstable_Code_NewWithPosOnlyArgs #else PyCode_NewWithPosOnlyArgs #endif (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1 if (likely(result)) result->_co_firsttraceable = 0; #endif return result; } #elif !CYTHON_COMPILING_IN_PYPY #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #else #define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #endif static PyObject* __Pyx_PyCode_New( const __Pyx_PyCode_New_function_description descr, PyObject * const *varnames, PyObject *filename, PyObject *funcname, PyObject *line_table, PyObject *tuple_dedup_map ) { PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL; Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; PyObject *varnames_tuple = PyTuple_New(var_count); if (unlikely(!varnames_tuple)) return NULL; for (Py_ssize_t i=0; i < var_count; i++) { Py_INCREF(varnames[i]); if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; } #if CYTHON_COMPILING_IN_LIMITED_API varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); if (!varnames_tuple_dedup) { if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; varnames_tuple_dedup = varnames_tuple; } #else varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); if (unlikely(!varnames_tuple_dedup)) goto done; #endif #if CYTHON_AVOID_BORROWED_REFS Py_INCREF(varnames_tuple_dedup); #endif if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL && !CYTHON_COMPILING_IN_GRAAL) { Py_ssize_t line_table_length = __Pyx_PyBytes_GET_SIZE(line_table); #if !CYTHON_ASSUME_SAFE_SIZE if (unlikely(line_table_length == -1)) goto done; #endif Py_ssize_t code_len = (line_table_length * 2 + 4) & ~3LL; code_bytes = PyBytes_FromStringAndSize(NULL, code_len); if (unlikely(!code_bytes)) goto done; char* c_code_bytes = PyBytes_AsString(code_bytes); if (unlikely(!c_code_bytes)) goto done; memset(c_code_bytes, 0, (size_t) code_len); } code_obj = (PyObject*) __Pyx__PyCode_New( (int) descr.argcount, (int) descr.num_posonly_args, (int) descr.num_kwonly_args, (int) descr.nlocals, 0, (int) descr.flags, code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_empty_tuple, varnames_tuple_dedup, __pyx_mstate_global->__pyx_empty_tuple, __pyx_mstate_global->__pyx_empty_tuple, filename, funcname, (int) descr.first_line, (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table) ? line_table : __pyx_mstate_global->__pyx_empty_bytes ); done: Py_XDECREF(code_bytes); #if CYTHON_AVOID_BORROWED_REFS Py_XDECREF(varnames_tuple_dedup); #endif Py_DECREF(varnames_tuple); return code_obj; } /* DecompressString */ static PyObject *__Pyx_DecompressString(const char *s, Py_ssize_t length, int algo) { PyObject *module, *decompress, *compressed_bytes, *decompressed; const char* module_name = algo == 3 ? "compression.zstd" : algo == 2 ? "bz2" : "zlib"; PyObject *methodname = PyUnicode_FromString("decompress"); if (unlikely(!methodname)) return NULL; #if __PYX_LIMITED_VERSION_HEX >= 0x030e0000 if (algo == 3) { PyObject *fromlist = Py_BuildValue("[O]", methodname); if (unlikely(!fromlist)) return NULL; module = PyImport_ImportModuleLevel("compression.zstd", NULL, NULL, fromlist, 0); Py_DECREF(fromlist); } else #endif module = PyImport_ImportModule(module_name); if (unlikely(!module)) goto import_failed; decompress = PyObject_GetAttr(module, methodname); if (unlikely(!decompress)) goto import_failed; { #ifdef __cplusplus char *memview_bytes = const_cast(s); #else #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wcast-qual" #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-qual" #endif char *memview_bytes = (char*) s; #if defined(__clang__) #pragma clang diagnostic pop #elif !defined(__INTEL_COMPILER) && defined(__GNUC__) #pragma GCC diagnostic pop #endif #endif #if CYTHON_COMPILING_IN_LIMITED_API && !defined(PyBUF_READ) int memview_flags = 0x100; #else int memview_flags = PyBUF_READ; #endif compressed_bytes = PyMemoryView_FromMemory(memview_bytes, length, memview_flags); } if (unlikely(!compressed_bytes)) { Py_DECREF(decompress); goto bad; } decompressed = PyObject_CallFunctionObjArgs(decompress, compressed_bytes, NULL); Py_DECREF(compressed_bytes); Py_DECREF(decompress); Py_DECREF(module); Py_DECREF(methodname); return decompressed; import_failed: PyErr_Format(PyExc_ImportError, "Failed to import '%.20s.decompress' - cannot initialise module strings. " "String compression was configured with the C macro 'CYTHON_COMPRESS_STRINGS=%d'.", module_name, algo); bad: Py_XDECREF(module); Py_DECREF(methodname); return NULL; } #include static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { size_t len = strlen(s); if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { PyErr_SetString(PyExc_OverflowError, "byte string is too long"); return -1; } return (Py_ssize_t) len; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return __Pyx_PyUnicode_FromStringAndSize(c_str, len); } static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { Py_ssize_t len = __Pyx_ssize_strlen(c_str); if (unlikely(len < 0)) return NULL; return PyByteArray_FromStringAndSize(c_str, len); } static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; #if CYTHON_COMPILING_IN_LIMITED_API { const char* result; Py_ssize_t unicode_length; CYTHON_MAYBE_UNUSED_VAR(unicode_length); // only for __PYX_DEFAULT_STRING_ENCODING_IS_ASCII #if __PYX_LIMITED_VERSION_HEX < 0x030A0000 if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; #else result = PyUnicode_AsUTF8AndSize(o, length); #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII unicode_length = PyUnicode_GetLength(o); if (unlikely(unicode_length < 0)) return NULL; if (unlikely(unicode_length != *length)) { PyUnicode_AsASCIIString(o); return NULL; } #endif return result; } #else #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (likely(PyUnicode_IS_ASCII(o))) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } #endif static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 if (PyUnicode_Check(o)) { return __Pyx_PyUnicode_AsStringAndSize(o, length); } else #endif if (PyByteArray_Check(o)) { #if (CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) || (CYTHON_COMPILING_IN_PYPY && (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))) *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); #else *length = PyByteArray_Size(o); if (*length == -1) return NULL; return PyByteArray_AsString(o); #endif } else { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { int retval; if (unlikely(!x)) return -1; retval = __Pyx_PyObject_IsTrue(x); Py_DECREF(x); return retval; } static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { __Pyx_TypeName result_type_name = __Pyx_PyType_GetFullyQualifiedName(Py_TYPE(result)); if (PyLong_Check(result)) { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " "The ability to return an instance of a strict subclass of int is deprecated, " "and may be removed in a future version of Python.", result_type_name)) { __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } __Pyx_DECREF_TypeName(result_type_name); return result; } PyErr_Format(PyExc_TypeError, "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", result_type_name); __Pyx_DECREF_TypeName(result_type_name); Py_DECREF(result); return NULL; } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { #if CYTHON_USE_TYPE_SLOTS PyNumberMethods *m; #endif PyObject *res = NULL; if (likely(PyLong_Check(x))) return __Pyx_NewRef(x); #if CYTHON_USE_TYPE_SLOTS m = Py_TYPE(x)->tp_as_number; if (likely(m && m->nb_int)) { res = m->nb_int(x); } #else if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { res = PyNumber_Long(x); } #endif if (likely(res)) { if (unlikely(!PyLong_CheckExact(res))) { return __Pyx_PyNumber_LongWrongResultType(res); } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS if (likely(__Pyx_PyLong_IsCompact(b))) { return __Pyx_PyLong_CompactValue(b); } else { const digit* digits = __Pyx_PyLong_Digits(b); const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyLong_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); } else { Py_ssize_t ival; PyObject *x; x = PyNumber_Index(o); if (!x) return -1; ival = PyLong_AsLong(x); Py_DECREF(x); return ival; } } static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { CYTHON_UNUSED_VAR(b); return __Pyx_NewRef(Py_None); } static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { return __Pyx_NewRef(b ? Py_True: Py_False); } static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { return PyLong_FromSize_t(ival); } /* MultiPhaseInitModuleState */ #if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE #ifndef CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE #if (CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX >= 0x030C0000) #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 1 #else #define CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE 0 #endif #endif #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE && !CYTHON_ATOMICS #error "Module state with PEP489 requires atomics. Currently that's one of\ C11, C++11, gcc atomic intrinsics or MSVC atomic intrinsics" #endif #if !CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE #define __Pyx_ModuleStateLookup_Lock() #define __Pyx_ModuleStateLookup_Unlock() #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d0000 static PyMutex __Pyx_ModuleStateLookup_mutex = {0}; #define __Pyx_ModuleStateLookup_Lock() PyMutex_Lock(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() PyMutex_Unlock(&__Pyx_ModuleStateLookup_mutex) #elif defined(__cplusplus) && __cplusplus >= 201103L #include static std::mutex __Pyx_ModuleStateLookup_mutex; #define __Pyx_ModuleStateLookup_Lock() __Pyx_ModuleStateLookup_mutex.lock() #define __Pyx_ModuleStateLookup_Unlock() __Pyx_ModuleStateLookup_mutex.unlock() #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ > 201112L) && !defined(__STDC_NO_THREADS__) #include static mtx_t __Pyx_ModuleStateLookup_mutex; static once_flag __Pyx_ModuleStateLookup_mutex_once_flag = ONCE_FLAG_INIT; static void __Pyx_ModuleStateLookup_initialize_mutex(void) { mtx_init(&__Pyx_ModuleStateLookup_mutex, mtx_plain); } #define __Pyx_ModuleStateLookup_Lock()\ call_once(&__Pyx_ModuleStateLookup_mutex_once_flag, __Pyx_ModuleStateLookup_initialize_mutex);\ mtx_lock(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() mtx_unlock(&__Pyx_ModuleStateLookup_mutex) #elif defined(HAVE_PTHREAD_H) #include static pthread_mutex_t __Pyx_ModuleStateLookup_mutex = PTHREAD_MUTEX_INITIALIZER; #define __Pyx_ModuleStateLookup_Lock() pthread_mutex_lock(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() pthread_mutex_unlock(&__Pyx_ModuleStateLookup_mutex) #elif defined(_WIN32) #include // synchapi.h on its own doesn't work static SRWLOCK __Pyx_ModuleStateLookup_mutex = SRWLOCK_INIT; #define __Pyx_ModuleStateLookup_Lock() AcquireSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) #define __Pyx_ModuleStateLookup_Unlock() ReleaseSRWLockExclusive(&__Pyx_ModuleStateLookup_mutex) #else #error "No suitable lock available for CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE.\ Requires C standard >= C11, or C++ standard >= C++11,\ or pthreads, or the Windows 32 API, or Python >= 3.13." #endif typedef struct { int64_t id; PyObject *module; } __Pyx_InterpreterIdAndModule; typedef struct { char interpreter_id_as_index; Py_ssize_t count; Py_ssize_t allocated; __Pyx_InterpreterIdAndModule table[1]; } __Pyx_ModuleStateLookupData; #define __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE 32 #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE static __pyx_atomic_int_type __Pyx_ModuleStateLookup_read_counter = 0; #endif #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE static __pyx_atomic_ptr_type __Pyx_ModuleStateLookup_data = 0; #else static __Pyx_ModuleStateLookupData* __Pyx_ModuleStateLookup_data = NULL; #endif static __Pyx_InterpreterIdAndModule* __Pyx_State_FindModuleStateLookupTableLowerBound( __Pyx_InterpreterIdAndModule* table, Py_ssize_t count, int64_t interpreterId) { __Pyx_InterpreterIdAndModule* begin = table; __Pyx_InterpreterIdAndModule* end = begin + count; if (begin->id == interpreterId) { return begin; } while ((end - begin) > __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { __Pyx_InterpreterIdAndModule* halfway = begin + (end - begin)/2; if (halfway->id == interpreterId) { return halfway; } if (halfway->id < interpreterId) { begin = halfway; } else { end = halfway; } } for (; begin < end; ++begin) { if (begin->id >= interpreterId) return begin; } return begin; } static PyObject *__Pyx_State_FindModule(CYTHON_UNUSED void* dummy) { int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); if (interpreter_id == -1) return NULL; #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __Pyx_ModuleStateLookupData* data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); { __pyx_atomic_incr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); if (likely(data)) { __Pyx_ModuleStateLookupData* new_data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_acquire(&__Pyx_ModuleStateLookup_data); if (likely(data == new_data)) { goto read_finished; } } __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); __Pyx_ModuleStateLookup_Lock(); __pyx_atomic_incr_relaxed(&__Pyx_ModuleStateLookup_read_counter); data = (__Pyx_ModuleStateLookupData*)__pyx_atomic_pointer_load_relaxed(&__Pyx_ModuleStateLookup_data); __Pyx_ModuleStateLookup_Unlock(); } read_finished:; #else __Pyx_ModuleStateLookupData* data = __Pyx_ModuleStateLookup_data; #endif __Pyx_InterpreterIdAndModule* found = NULL; if (unlikely(!data)) goto end; if (data->interpreter_id_as_index) { if (interpreter_id < data->count) { found = data->table+interpreter_id; } } else { found = __Pyx_State_FindModuleStateLookupTableLowerBound( data->table, data->count, interpreter_id); } end: { PyObject *result=NULL; if (found && found->id == interpreter_id) { result = found->module; } #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __pyx_atomic_decr_acq_rel(&__Pyx_ModuleStateLookup_read_counter); #endif return result; } } #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE static void __Pyx_ModuleStateLookup_wait_until_no_readers(void) { while (__pyx_atomic_load(&__Pyx_ModuleStateLookup_read_counter) != 0); } #else #define __Pyx_ModuleStateLookup_wait_until_no_readers() #endif static int __Pyx_State_AddModuleInterpIdAsIndex(__Pyx_ModuleStateLookupData **old_data, PyObject* module, int64_t interpreter_id) { Py_ssize_t to_allocate = (*old_data)->allocated; while (to_allocate <= interpreter_id) { if (to_allocate == 0) to_allocate = 1; else to_allocate *= 2; } __Pyx_ModuleStateLookupData *new_data = *old_data; if (to_allocate != (*old_data)->allocated) { new_data = (__Pyx_ModuleStateLookupData *)realloc( *old_data, sizeof(__Pyx_ModuleStateLookupData)+(to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); if (!new_data) { PyErr_NoMemory(); return -1; } for (Py_ssize_t i = new_data->allocated; i < to_allocate; ++i) { new_data->table[i].id = i; new_data->table[i].module = NULL; } new_data->allocated = to_allocate; } new_data->table[interpreter_id].module = module; if (new_data->count < interpreter_id+1) { new_data->count = interpreter_id+1; } *old_data = new_data; return 0; } static void __Pyx_State_ConvertFromInterpIdAsIndex(__Pyx_ModuleStateLookupData *data) { __Pyx_InterpreterIdAndModule *read = data->table; __Pyx_InterpreterIdAndModule *write = data->table; __Pyx_InterpreterIdAndModule *end = read + data->count; for (; readmodule) { write->id = read->id; write->module = read->module; ++write; } } data->count = write - data->table; for (; writeid = 0; write->module = NULL; } data->interpreter_id_as_index = 0; } static int __Pyx_State_AddModule(PyObject* module, CYTHON_UNUSED void* dummy) { int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); if (interpreter_id == -1) return -1; int result = 0; __Pyx_ModuleStateLookup_Lock(); #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __Pyx_ModuleStateLookupData *old_data = (__Pyx_ModuleStateLookupData *) __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); #else __Pyx_ModuleStateLookupData *old_data = __Pyx_ModuleStateLookup_data; #endif __Pyx_ModuleStateLookupData *new_data = old_data; if (!new_data) { new_data = (__Pyx_ModuleStateLookupData *)calloc(1, sizeof(__Pyx_ModuleStateLookupData)); if (!new_data) { result = -1; PyErr_NoMemory(); goto end; } new_data->allocated = 1; new_data->interpreter_id_as_index = 1; } __Pyx_ModuleStateLookup_wait_until_no_readers(); if (new_data->interpreter_id_as_index) { if (interpreter_id < __PYX_MODULE_STATE_LOOKUP_SMALL_SIZE) { result = __Pyx_State_AddModuleInterpIdAsIndex(&new_data, module, interpreter_id); goto end; } __Pyx_State_ConvertFromInterpIdAsIndex(new_data); } { Py_ssize_t insert_at = 0; { __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( new_data->table, new_data->count, interpreter_id); assert(lower_bound); insert_at = lower_bound - new_data->table; if (unlikely(insert_at < new_data->count && lower_bound->id == interpreter_id)) { lower_bound->module = module; goto end; // already in table, nothing more to do } } if (new_data->count+1 >= new_data->allocated) { Py_ssize_t to_allocate = (new_data->count+1)*2; new_data = (__Pyx_ModuleStateLookupData*)realloc( new_data, sizeof(__Pyx_ModuleStateLookupData) + (to_allocate-1)*sizeof(__Pyx_InterpreterIdAndModule)); if (!new_data) { result = -1; new_data = old_data; PyErr_NoMemory(); goto end; } new_data->allocated = to_allocate; } ++new_data->count; int64_t last_id = interpreter_id; PyObject *last_module = module; for (Py_ssize_t i=insert_at; icount; ++i) { int64_t current_id = new_data->table[i].id; new_data->table[i].id = last_id; last_id = current_id; PyObject *current_module = new_data->table[i].module; new_data->table[i].module = last_module; last_module = current_module; } } end: #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, new_data); #else __Pyx_ModuleStateLookup_data = new_data; #endif __Pyx_ModuleStateLookup_Unlock(); return result; } static int __Pyx_State_RemoveModule(CYTHON_UNUSED void* dummy) { int64_t interpreter_id = PyInterpreterState_GetID(__Pyx_PyInterpreterState_Get()); if (interpreter_id == -1) return -1; __Pyx_ModuleStateLookup_Lock(); #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __Pyx_ModuleStateLookupData *data = (__Pyx_ModuleStateLookupData *) __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, 0); #else __Pyx_ModuleStateLookupData *data = __Pyx_ModuleStateLookup_data; #endif if (data->interpreter_id_as_index) { if (interpreter_id < data->count) { data->table[interpreter_id].module = NULL; } goto done; } { __Pyx_ModuleStateLookup_wait_until_no_readers(); __Pyx_InterpreterIdAndModule* lower_bound = __Pyx_State_FindModuleStateLookupTableLowerBound( data->table, data->count, interpreter_id); if (!lower_bound) goto done; if (lower_bound->id != interpreter_id) goto done; __Pyx_InterpreterIdAndModule *end = data->table+data->count; for (;lower_boundid = (lower_bound+1)->id; lower_bound->module = (lower_bound+1)->module; } } --data->count; if (data->count == 0) { free(data); data = NULL; } done: #if CYTHON_MODULE_STATE_LOOKUP_THREAD_SAFE __pyx_atomic_pointer_exchange(&__Pyx_ModuleStateLookup_data, data); #else __Pyx_ModuleStateLookup_data = data; #endif __Pyx_ModuleStateLookup_Unlock(); return 0; } #endif /* #### Code section: utility_code_pragmas_end ### */ #ifdef _MSC_VER #pragma warning( pop ) #endif /* #### Code section: end ### */ #endif /* Py_PYTHON_H */