| 1 |
|
| 2 |
|
| 3 |
#ifndef PY_SSIZE_T_CLEAN |
| 4 |
#define PY_SSIZE_T_CLEAN |
| 5 |
#endif |
| 6 |
|
| 7 |
#if defined(Py_LIMITED_API) && !defined(CYTHON_LIMITED_API) |
| 8 |
#define CYTHON_LIMITED_API 1 |
| 9 |
#endif |
| 10 |
|
| 11 |
#include "Python.h" |
| 12 |
#ifndef Py_PYTHON_H |
| 13 |
#error Python headers needed to compile C extensions, please install development version of Python. |
| 14 |
#elif PY_VERSION_HEX < 0x03080000 |
| 15 |
#error Cython requires Python 3.8+. |
| 16 |
#else |
| 17 |
#define __PYX_ABI_VERSION "3_1_0a1" |
| 18 |
#define CYTHON_HEX_VERSION 0x030100A1 |
| 19 |
#define CYTHON_FUTURE_DIVISION 0 |
| 20 |
|
| 21 |
#include <stddef.h> |
| 22 |
#ifndef offsetof |
| 23 |
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) |
| 24 |
#endif |
| 25 |
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS) |
| 26 |
#ifndef __stdcall |
| 27 |
#define __stdcall |
| 28 |
#endif |
| 29 |
#ifndef __cdecl |
| 30 |
#define __cdecl |
| 31 |
#endif |
| 32 |
#ifndef __fastcall |
| 33 |
#define __fastcall |
| 34 |
#endif |
| 35 |
#endif |
| 36 |
#ifndef DL_IMPORT |
| 37 |
#define DL_IMPORT(t) t |
| 38 |
#endif |
| 39 |
#ifndef DL_EXPORT |
| 40 |
#define DL_EXPORT(t) t |
| 41 |
#endif |
| 42 |
#define __PYX_COMMA , |
| 43 |
#ifndef HAVE_LONG_LONG |
| 44 |
#define HAVE_LONG_LONG |
| 45 |
#endif |
| 46 |
#ifndef PY_LONG_LONG |
| 47 |
#define PY_LONG_LONG LONG_LONG |
| 48 |
#endif |
| 49 |
#ifndef Py_HUGE_VAL |
| 50 |
#define Py_HUGE_VAL HUGE_VAL |
| 51 |
#endif |
| 52 |
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX |
| 53 |
#if defined(GRAALVM_PYTHON) |
| 54 |
|
| 55 |
|
| 56 |
#define CYTHON_COMPILING_IN_PYPY 0 |
| 57 |
#define CYTHON_COMPILING_IN_CPYTHON 0 |
| 58 |
#define CYTHON_COMPILING_IN_LIMITED_API 0 |
| 59 |
#define CYTHON_COMPILING_IN_GRAAL 1 |
| 60 |
#define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 |
| 61 |
#undef CYTHON_USE_TYPE_SLOTS |
| 62 |
#define CYTHON_USE_TYPE_SLOTS 0 |
| 63 |
#undef CYTHON_USE_TYPE_SPECS |
| 64 |
#define CYTHON_USE_TYPE_SPECS 0 |
| 65 |
#undef CYTHON_USE_PYTYPE_LOOKUP |
| 66 |
#define CYTHON_USE_PYTYPE_LOOKUP 0 |
| 67 |
#undef CYTHON_USE_PYLIST_INTERNALS |
| 68 |
#define CYTHON_USE_PYLIST_INTERNALS 0 |
| 69 |
#undef CYTHON_USE_UNICODE_INTERNALS |
| 70 |
#define CYTHON_USE_UNICODE_INTERNALS 0 |
| 71 |
#undef CYTHON_USE_UNICODE_WRITER |
| 72 |
#define CYTHON_USE_UNICODE_WRITER 0 |
| 73 |
#undef CYTHON_USE_PYLONG_INTERNALS |
| 74 |
#define CYTHON_USE_PYLONG_INTERNALS 0 |
| 75 |
#undef CYTHON_AVOID_BORROWED_REFS |
| 76 |
#define CYTHON_AVOID_BORROWED_REFS 1 |
| 77 |
#undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS |
| 78 |
#define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 |
| 79 |
#undef CYTHON_ASSUME_SAFE_MACROS |
| 80 |
#define CYTHON_ASSUME_SAFE_MACROS 0 |
| 81 |
#undef CYTHON_ASSUME_SAFE_SIZE |
| 82 |
#define CYTHON_ASSUME_SAFE_SIZE 0 |
| 83 |
#undef CYTHON_UNPACK_METHODS |
| 84 |
#define CYTHON_UNPACK_METHODS 0 |
| 85 |
#undef CYTHON_FAST_THREAD_STATE |
| 86 |
#define CYTHON_FAST_THREAD_STATE 0 |
| 87 |
#undef CYTHON_FAST_GIL |
| 88 |
#define CYTHON_FAST_GIL 0 |
| 89 |
#undef CYTHON_METH_FASTCALL |
| 90 |
#define CYTHON_METH_FASTCALL 0 |
| 91 |
#undef CYTHON_FAST_PYCALL |
| 92 |
#define CYTHON_FAST_PYCALL 0 |
| 93 |
#ifndef CYTHON_PEP487_INIT_SUBCLASS |
| 94 |
#define CYTHON_PEP487_INIT_SUBCLASS 1 |
| 95 |
#endif |
| 96 |
#undef CYTHON_PEP489_MULTI_PHASE_INIT |
| 97 |
#define CYTHON_PEP489_MULTI_PHASE_INIT 1 |
| 98 |
#undef CYTHON_USE_MODULE_STATE |
| 99 |
#define CYTHON_USE_MODULE_STATE 0 |
| 100 |
#undef CYTHON_USE_SYS_MONITORING |
| 101 |
#define CYTHON_USE_SYS_MONITORING 0 |
| 102 |
#undef CYTHON_USE_TP_FINALIZE |
| 103 |
#define CYTHON_USE_TP_FINALIZE 0 |
| 104 |
#undef CYTHON_USE_AM_SEND |
| 105 |
#define CYTHON_USE_AM_SEND 0 |
| 106 |
#undef CYTHON_USE_DICT_VERSIONS |
| 107 |
#define CYTHON_USE_DICT_VERSIONS 0 |
| 108 |
#undef CYTHON_USE_EXC_INFO_STACK |
| 109 |
#define CYTHON_USE_EXC_INFO_STACK 1 |
| 110 |
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC |
| 111 |
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0 |
| 112 |
#endif |
| 113 |
#undef CYTHON_USE_FREELISTS |
| 114 |
#define CYTHON_USE_FREELISTS 0 |
| 115 |
#elif defined(PYPY_VERSION) |
| 116 |
#define CYTHON_COMPILING_IN_PYPY 1 |
| 117 |
#define CYTHON_COMPILING_IN_CPYTHON 0 |
| 118 |
#define CYTHON_COMPILING_IN_LIMITED_API 0 |
| 119 |
#define CYTHON_COMPILING_IN_GRAAL 0 |
| 120 |
#define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 |
| 121 |
#undef CYTHON_USE_TYPE_SLOTS |
| 122 |
#define CYTHON_USE_TYPE_SLOTS 1 |
| 123 |
#ifndef CYTHON_USE_TYPE_SPECS |
| 124 |
#define CYTHON_USE_TYPE_SPECS 0 |
| 125 |
#endif |
| 126 |
#undef CYTHON_USE_PYTYPE_LOOKUP |
| 127 |
#define CYTHON_USE_PYTYPE_LOOKUP 0 |
| 128 |
#undef CYTHON_USE_PYLIST_INTERNALS |
| 129 |
#define CYTHON_USE_PYLIST_INTERNALS 0 |
| 130 |
#undef CYTHON_USE_UNICODE_INTERNALS |
| 131 |
#define CYTHON_USE_UNICODE_INTERNALS 0 |
| 132 |
#undef CYTHON_USE_UNICODE_WRITER |
| 133 |
#define CYTHON_USE_UNICODE_WRITER 0 |
| 134 |
#undef CYTHON_USE_PYLONG_INTERNALS |
| 135 |
#define CYTHON_USE_PYLONG_INTERNALS 0 |
| 136 |
#undef CYTHON_AVOID_BORROWED_REFS |
| 137 |
#define CYTHON_AVOID_BORROWED_REFS 1 |
| 138 |
#undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS |
| 139 |
#define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 |
| 140 |
#undef CYTHON_ASSUME_SAFE_MACROS |
| 141 |
#define CYTHON_ASSUME_SAFE_MACROS 0 |
| 142 |
#ifndef CYTHON_ASSUME_SAFE_SIZE |
| 143 |
#define CYTHON_ASSUME_SAFE_SIZE 1 |
| 144 |
#endif |
| 145 |
#undef CYTHON_UNPACK_METHODS |
| 146 |
#define CYTHON_UNPACK_METHODS 0 |
| 147 |
#undef CYTHON_FAST_THREAD_STATE |
| 148 |
#define CYTHON_FAST_THREAD_STATE 0 |
| 149 |
#undef CYTHON_FAST_GIL |
| 150 |
#define CYTHON_FAST_GIL 0 |
| 151 |
#undef CYTHON_METH_FASTCALL |
| 152 |
#define CYTHON_METH_FASTCALL 0 |
| 153 |
#undef CYTHON_FAST_PYCALL |
| 154 |
#define CYTHON_FAST_PYCALL 0 |
| 155 |
#ifndef CYTHON_PEP487_INIT_SUBCLASS |
| 156 |
#define CYTHON_PEP487_INIT_SUBCLASS 1 |
| 157 |
#endif |
| 158 |
#if PY_VERSION_HEX < 0x03090000 |
| 159 |
#undef CYTHON_PEP489_MULTI_PHASE_INIT |
| 160 |
#define CYTHON_PEP489_MULTI_PHASE_INIT 0 |
| 161 |
#elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT) |
| 162 |
#define CYTHON_PEP489_MULTI_PHASE_INIT 1 |
| 163 |
#endif |
| 164 |
#undef CYTHON_USE_MODULE_STATE |
| 165 |
#define CYTHON_USE_MODULE_STATE 0 |
| 166 |
#undef CYTHON_USE_SYS_MONITORING |
| 167 |
#define CYTHON_USE_SYS_MONITORING 0 |
| 168 |
#ifndef CYTHON_USE_TP_FINALIZE |
| 169 |
#define CYTHON_USE_TP_FINALIZE (PYPY_VERSION_NUM >= 0x07030C00) |
| 170 |
#endif |
| 171 |
#undef CYTHON_USE_AM_SEND |
| 172 |
#define CYTHON_USE_AM_SEND 0 |
| 173 |
#undef CYTHON_USE_DICT_VERSIONS |
| 174 |
#define CYTHON_USE_DICT_VERSIONS 0 |
| 175 |
#undef CYTHON_USE_EXC_INFO_STACK |
| 176 |
#define CYTHON_USE_EXC_INFO_STACK 0 |
| 177 |
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC |
| 178 |
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0 |
| 179 |
#endif |
| 180 |
#undef CYTHON_USE_FREELISTS |
| 181 |
#define CYTHON_USE_FREELISTS 0 |
| 182 |
#elif defined(CYTHON_LIMITED_API) |
| 183 |
#ifdef Py_LIMITED_API |
| 184 |
#undef __PYX_LIMITED_VERSION_HEX |
| 185 |
#define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API |
| 186 |
#endif |
| 187 |
#define CYTHON_COMPILING_IN_PYPY 0 |
| 188 |
#define CYTHON_COMPILING_IN_CPYTHON 0 |
| 189 |
#define CYTHON_COMPILING_IN_LIMITED_API 1 |
| 190 |
#define CYTHON_COMPILING_IN_GRAAL 0 |
| 191 |
#define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 |
| 192 |
#undef CYTHON_CLINE_IN_TRACEBACK |
| 193 |
#define CYTHON_CLINE_IN_TRACEBACK 0 |
| 194 |
#undef CYTHON_USE_TYPE_SLOTS |
| 195 |
#define CYTHON_USE_TYPE_SLOTS 0 |
| 196 |
#undef CYTHON_USE_TYPE_SPECS |
| 197 |
#define CYTHON_USE_TYPE_SPECS 1 |
| 198 |
#undef CYTHON_USE_PYTYPE_LOOKUP |
| 199 |
#define CYTHON_USE_PYTYPE_LOOKUP 0 |
| 200 |
#undef CYTHON_USE_PYLIST_INTERNALS |
| 201 |
#define CYTHON_USE_PYLIST_INTERNALS 0 |
| 202 |
#undef CYTHON_USE_UNICODE_INTERNALS |
| 203 |
#define CYTHON_USE_UNICODE_INTERNALS 0 |
| 204 |
#ifndef CYTHON_USE_UNICODE_WRITER |
| 205 |
#define CYTHON_USE_UNICODE_WRITER 0 |
| 206 |
#endif |
| 207 |
#undef CYTHON_USE_PYLONG_INTERNALS |
| 208 |
#define CYTHON_USE_PYLONG_INTERNALS 0 |
| 209 |
#ifndef CYTHON_AVOID_BORROWED_REFS |
| 210 |
#define CYTHON_AVOID_BORROWED_REFS 0 |
| 211 |
#endif |
| 212 |
#ifndef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS |
| 213 |
#define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 |
| 214 |
#endif |
| 215 |
#undef CYTHON_ASSUME_SAFE_MACROS |
| 216 |
#define CYTHON_ASSUME_SAFE_MACROS 0 |
| 217 |
#undef CYTHON_ASSUME_SAFE_SIZE |
| 218 |
#define CYTHON_ASSUME_SAFE_SIZE 0 |
| 219 |
#undef CYTHON_UNPACK_METHODS |
| 220 |
#define CYTHON_UNPACK_METHODS 0 |
| 221 |
#undef CYTHON_FAST_THREAD_STATE |
| 222 |
#define CYTHON_FAST_THREAD_STATE 0 |
| 223 |
#undef CYTHON_FAST_GIL |
| 224 |
#define CYTHON_FAST_GIL 0 |
| 225 |
#undef CYTHON_METH_FASTCALL |
| 226 |
#define CYTHON_METH_FASTCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) |
| 227 |
#undef CYTHON_FAST_PYCALL |
| 228 |
#define CYTHON_FAST_PYCALL 0 |
| 229 |
#ifndef CYTHON_PEP487_INIT_SUBCLASS |
| 230 |
#define CYTHON_PEP487_INIT_SUBCLASS 1 |
| 231 |
#endif |
| 232 |
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT |
| 233 |
#define CYTHON_PEP489_MULTI_PHASE_INIT 0 |
| 234 |
#endif |
| 235 |
#ifndef CYTHON_USE_MODULE_STATE |
| 236 |
#define CYTHON_USE_MODULE_STATE 0 |
| 237 |
#endif |
| 238 |
#undef CYTHON_USE_SYS_MONITORING |
| 239 |
#define CYTHON_USE_SYS_MONITORING 0 |
| 240 |
#ifndef CYTHON_USE_TP_FINALIZE |
| 241 |
#define CYTHON_USE_TP_FINALIZE 0 |
| 242 |
#endif |
| 243 |
#ifndef CYTHON_USE_AM_SEND |
| 244 |
#define CYTHON_USE_AM_SEND (__PYX_LIMITED_VERSION_HEX >= 0x030A0000) |
| 245 |
#endif |
| 246 |
#undef CYTHON_USE_DICT_VERSIONS |
| 247 |
#define CYTHON_USE_DICT_VERSIONS 0 |
| 248 |
#undef CYTHON_USE_EXC_INFO_STACK |
| 249 |
#define CYTHON_USE_EXC_INFO_STACK 0 |
| 250 |
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC |
| 251 |
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0 |
| 252 |
#endif |
| 253 |
#undef CYTHON_USE_FREELISTS |
| 254 |
#define CYTHON_USE_FREELISTS 0 |
| 255 |
#else |
| 256 |
#define CYTHON_COMPILING_IN_PYPY 0 |
| 257 |
#define CYTHON_COMPILING_IN_CPYTHON 1 |
| 258 |
#define CYTHON_COMPILING_IN_LIMITED_API 0 |
| 259 |
#define CYTHON_COMPILING_IN_GRAAL 0 |
| 260 |
#ifdef Py_GIL_DISABLED |
| 261 |
#define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 1 |
| 262 |
#else |
| 263 |
#define CYTHON_COMPILING_IN_CPYTHON_FREETHREADING 0 |
| 264 |
#endif |
| 265 |
#if PY_VERSION_HEX < 0x030A0000 |
| 266 |
#undef CYTHON_USE_TYPE_SLOTS |
| 267 |
#define CYTHON_USE_TYPE_SLOTS 1 |
| 268 |
#elif !defined(CYTHON_USE_TYPE_SLOTS) |
| 269 |
#define CYTHON_USE_TYPE_SLOTS 1 |
| 270 |
#endif |
| 271 |
#ifndef CYTHON_USE_TYPE_SPECS |
| 272 |
#define CYTHON_USE_TYPE_SPECS 0 |
| 273 |
#endif |
| 274 |
#ifndef CYTHON_USE_PYTYPE_LOOKUP |
| 275 |
#define CYTHON_USE_PYTYPE_LOOKUP 1 |
| 276 |
#endif |
| 277 |
#ifndef CYTHON_USE_PYLONG_INTERNALS |
| 278 |
#define CYTHON_USE_PYLONG_INTERNALS 1 |
| 279 |
#endif |
| 280 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING |
| 281 |
#undef CYTHON_USE_PYLIST_INTERNALS |
| 282 |
#define CYTHON_USE_PYLIST_INTERNALS 0 |
| 283 |
#elif !defined(CYTHON_USE_PYLIST_INTERNALS) |
| 284 |
#define CYTHON_USE_PYLIST_INTERNALS 1 |
| 285 |
#endif |
| 286 |
#ifndef CYTHON_USE_UNICODE_INTERNALS |
| 287 |
#define CYTHON_USE_UNICODE_INTERNALS 1 |
| 288 |
#endif |
| 289 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING || PY_VERSION_HEX >= 0x030B00A2 |
| 290 |
#undef CYTHON_USE_UNICODE_WRITER |
| 291 |
#define CYTHON_USE_UNICODE_WRITER 0 |
| 292 |
#elif !defined(CYTHON_USE_UNICODE_WRITER) |
| 293 |
#define CYTHON_USE_UNICODE_WRITER 1 |
| 294 |
#endif |
| 295 |
#ifndef CYTHON_AVOID_BORROWED_REFS |
| 296 |
#define CYTHON_AVOID_BORROWED_REFS 0 |
| 297 |
#endif |
| 298 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING |
| 299 |
#undef CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS |
| 300 |
#define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 1 |
| 301 |
#elif !defined(CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS) |
| 302 |
#define CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS 0 |
| 303 |
#endif |
| 304 |
#ifndef CYTHON_ASSUME_SAFE_MACROS |
| 305 |
#define CYTHON_ASSUME_SAFE_MACROS 1 |
| 306 |
#endif |
| 307 |
#ifndef CYTHON_ASSUME_SAFE_SIZE |
| 308 |
#define CYTHON_ASSUME_SAFE_SIZE 1 |
| 309 |
#endif |
| 310 |
#ifndef CYTHON_UNPACK_METHODS |
| 311 |
#define CYTHON_UNPACK_METHODS 1 |
| 312 |
#endif |
| 313 |
#ifndef CYTHON_FAST_THREAD_STATE |
| 314 |
#define CYTHON_FAST_THREAD_STATE 1 |
| 315 |
#endif |
| 316 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING |
| 317 |
#undef CYTHON_FAST_GIL |
| 318 |
#define CYTHON_FAST_GIL 0 |
| 319 |
#elif !defined(CYTHON_FAST_GIL) |
| 320 |
#define CYTHON_FAST_GIL (PY_VERSION_HEX < 0x030C00A6) |
| 321 |
#endif |
| 322 |
#ifndef CYTHON_METH_FASTCALL |
| 323 |
#define CYTHON_METH_FASTCALL 1 |
| 324 |
#endif |
| 325 |
#ifndef CYTHON_FAST_PYCALL |
| 326 |
#define CYTHON_FAST_PYCALL 1 |
| 327 |
#endif |
| 328 |
#ifndef CYTHON_PEP487_INIT_SUBCLASS |
| 329 |
#define CYTHON_PEP487_INIT_SUBCLASS 1 |
| 330 |
#endif |
| 331 |
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT |
| 332 |
#define CYTHON_PEP489_MULTI_PHASE_INIT 1 |
| 333 |
#endif |
| 334 |
#ifndef CYTHON_USE_MODULE_STATE |
| 335 |
#define CYTHON_USE_MODULE_STATE 0 |
| 336 |
#endif |
| 337 |
#ifndef CYTHON_USE_SYS_MONITORING |
| 338 |
#define CYTHON_USE_SYS_MONITORING (PY_VERSION_HEX >= 0x030d00B1) |
| 339 |
#endif |
| 340 |
#ifndef CYTHON_USE_TP_FINALIZE |
| 341 |
#define CYTHON_USE_TP_FINALIZE 1 |
| 342 |
#endif |
| 343 |
#ifndef CYTHON_USE_AM_SEND |
| 344 |
#define CYTHON_USE_AM_SEND 1 |
| 345 |
#endif |
| 346 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING |
| 347 |
#undef CYTHON_USE_DICT_VERSIONS |
| 348 |
#define CYTHON_USE_DICT_VERSIONS 0 |
| 349 |
#elif !defined(CYTHON_USE_DICT_VERSIONS) |
| 350 |
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5 && !CYTHON_USE_MODULE_STATE) |
| 351 |
#endif |
| 352 |
#ifndef CYTHON_USE_EXC_INFO_STACK |
| 353 |
#define CYTHON_USE_EXC_INFO_STACK 1 |
| 354 |
#endif |
| 355 |
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC |
| 356 |
#define CYTHON_UPDATE_DESCRIPTOR_DOC 1 |
| 357 |
#endif |
| 358 |
#ifndef CYTHON_USE_FREELISTS |
| 359 |
#define CYTHON_USE_FREELISTS (!CYTHON_COMPILING_IN_CPYTHON_FREETHREADING) |
| 360 |
#endif |
| 361 |
#endif |
| 362 |
#ifndef CYTHON_FAST_PYCCALL |
| 363 |
#define CYTHON_FAST_PYCCALL CYTHON_FAST_PYCALL |
| 364 |
#endif |
| 365 |
#ifndef CYTHON_VECTORCALL |
| 366 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 367 |
#define CYTHON_VECTORCALL (__PYX_LIMITED_VERSION_HEX >= 0x030C0000) |
| 368 |
#else |
| 369 |
#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1) |
| 370 |
#endif |
| 371 |
#endif |
| 372 |
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1) |
| 373 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 374 |
#undef SHIFT |
| 375 |
#undef BASE |
| 376 |
#undef MASK |
| 377 |
#ifdef SIZEOF_VOID_P |
| 378 |
enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; |
| 379 |
#endif |
| 380 |
#endif |
| 381 |
#ifndef __has_attribute |
| 382 |
#define __has_attribute(x) 0 |
| 383 |
#endif |
| 384 |
#ifndef __has_cpp_attribute |
| 385 |
#define __has_cpp_attribute(x) 0 |
| 386 |
#endif |
| 387 |
#ifndef CYTHON_RESTRICT |
| 388 |
#if defined(__GNUC__) |
| 389 |
#define CYTHON_RESTRICT __restrict__ |
| 390 |
#elif defined(_MSC_VER) && _MSC_VER >= 1400 |
| 391 |
#define CYTHON_RESTRICT __restrict |
| 392 |
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 393 |
#define CYTHON_RESTRICT restrict |
| 394 |
#else |
| 395 |
#define CYTHON_RESTRICT |
| 396 |
#endif |
| 397 |
#endif |
| 398 |
#ifndef CYTHON_UNUSED |
| 399 |
#if defined(__cplusplus) |
| 400 |
|
| 401 |
|
| 402 |
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) |
| 403 |
#if __has_cpp_attribute(maybe_unused) |
| 404 |
#define CYTHON_UNUSED [[maybe_unused]] |
| 405 |
#endif |
| 406 |
#endif |
| 407 |
#endif |
| 408 |
#endif |
| 409 |
#ifndef CYTHON_UNUSED |
| 410 |
# if defined(__GNUC__) |
| 411 |
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) |
| 412 |
# define CYTHON_UNUSED __attribute__ ((__unused__)) |
| 413 |
# else |
| 414 |
# define CYTHON_UNUSED |
| 415 |
# endif |
| 416 |
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) |
| 417 |
# define CYTHON_UNUSED __attribute__ ((__unused__)) |
| 418 |
# else |
| 419 |
# define CYTHON_UNUSED |
| 420 |
# endif |
| 421 |
#endif |
| 422 |
#ifndef CYTHON_UNUSED_VAR |
| 423 |
# if defined(__cplusplus) |
| 424 |
template<class T> void CYTHON_UNUSED_VAR( const T& ) { } |
| 425 |
# else |
| 426 |
# define CYTHON_UNUSED_VAR(x) (void)(x) |
| 427 |
# endif |
| 428 |
#endif |
| 429 |
#ifndef CYTHON_MAYBE_UNUSED_VAR |
| 430 |
#define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x) |
| 431 |
#endif |
| 432 |
#ifndef CYTHON_NCP_UNUSED |
| 433 |
# if CYTHON_COMPILING_IN_CPYTHON |
| 434 |
# define CYTHON_NCP_UNUSED |
| 435 |
# else |
| 436 |
# define CYTHON_NCP_UNUSED CYTHON_UNUSED |
| 437 |
# endif |
| 438 |
#endif |
| 439 |
#ifndef CYTHON_USE_CPP_STD_MOVE |
| 440 |
#if defined(__cplusplus) && (\ |
| 441 |
__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600)) |
| 442 |
#define CYTHON_USE_CPP_STD_MOVE 1 |
| 443 |
#else |
| 444 |
#define CYTHON_USE_CPP_STD_MOVE 0 |
| 445 |
#endif |
| 446 |
#endif |
| 447 |
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) |
| 448 |
#ifdef _MSC_VER |
| 449 |
#ifndef _MSC_STDINT_H_ |
| 450 |
#if _MSC_VER < 1300 |
| 451 |
typedef unsigned char uint8_t; |
| 452 |
typedef unsigned short uint16_t; |
| 453 |
typedef unsigned int uint32_t; |
| 454 |
#else |
| 455 |
typedef unsigned __int8 uint8_t; |
| 456 |
typedef unsigned __int16 uint16_t; |
| 457 |
typedef unsigned __int32 uint32_t; |
| 458 |
#endif |
| 459 |
#endif |
| 460 |
#if _MSC_VER < 1300 |
| 461 |
#ifdef _WIN64 |
| 462 |
typedef unsigned long long __pyx_uintptr_t; |
| 463 |
#else |
| 464 |
typedef unsigned int __pyx_uintptr_t; |
| 465 |
#endif |
| 466 |
#else |
| 467 |
#ifdef _WIN64 |
| 468 |
typedef unsigned __int64 __pyx_uintptr_t; |
| 469 |
#else |
| 470 |
typedef unsigned __int32 __pyx_uintptr_t; |
| 471 |
#endif |
| 472 |
#endif |
| 473 |
#else |
| 474 |
#include <stdint.h> |
| 475 |
typedef uintptr_t __pyx_uintptr_t; |
| 476 |
#endif |
| 477 |
#ifndef CYTHON_FALLTHROUGH |
| 478 |
#if defined(__cplusplus) |
| 479 |
|
| 480 |
|
| 481 |
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) |
| 482 |
#if __has_cpp_attribute(fallthrough) |
| 483 |
#define CYTHON_FALLTHROUGH [[fallthrough]] |
| 484 |
#endif |
| 485 |
#endif |
| 486 |
#ifndef CYTHON_FALLTHROUGH |
| 487 |
#if __has_cpp_attribute(clang::fallthrough) |
| 488 |
#define CYTHON_FALLTHROUGH [[clang::fallthrough]] |
| 489 |
#elif __has_cpp_attribute(gnu::fallthrough) |
| 490 |
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]] |
| 491 |
#endif |
| 492 |
#endif |
| 493 |
#endif |
| 494 |
#ifndef CYTHON_FALLTHROUGH |
| 495 |
#if __has_attribute(fallthrough) |
| 496 |
#define CYTHON_FALLTHROUGH __attribute__((fallthrough)) |
| 497 |
#else |
| 498 |
#define CYTHON_FALLTHROUGH |
| 499 |
#endif |
| 500 |
#endif |
| 501 |
#if defined(__clang__) && defined(__apple_build_version__) |
| 502 |
#if __apple_build_version__ < 7000000 |
| 503 |
#undef CYTHON_FALLTHROUGH |
| 504 |
#define CYTHON_FALLTHROUGH |
| 505 |
#endif |
| 506 |
#endif |
| 507 |
#endif |
| 508 |
#ifndef Py_UNREACHABLE |
| 509 |
#define Py_UNREACHABLE() assert(0); abort() |
| 510 |
#endif |
| 511 |
#ifdef __cplusplus |
| 512 |
template <typename T> |
| 513 |
struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);}; |
| 514 |
#define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value) |
| 515 |
#else |
| 516 |
#define __PYX_IS_UNSIGNED(type) (((type)-1) > 0) |
| 517 |
#endif |
| 518 |
#if CYTHON_COMPILING_IN_PYPY == 1 |
| 519 |
#define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000) |
| 520 |
#else |
| 521 |
#define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000) |
| 522 |
#endif |
| 523 |
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer)) |
| 524 |
|
| 525 |
|
| 526 |
#ifndef CYTHON_INLINE |
| 527 |
#if defined(__clang__) |
| 528 |
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) |
| 529 |
#elif defined(__GNUC__) |
| 530 |
#define CYTHON_INLINE __inline__ |
| 531 |
#elif defined(_MSC_VER) |
| 532 |
#define CYTHON_INLINE __inline |
| 533 |
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 534 |
#define CYTHON_INLINE inline |
| 535 |
#else |
| 536 |
#define CYTHON_INLINE |
| 537 |
#endif |
| 538 |
#endif |
| 539 |
|
| 540 |
|
| 541 |
#define __PYX_BUILD_PY_SSIZE_T "n" |
| 542 |
#define CYTHON_FORMAT_SSIZE_T "z" |
| 543 |
#define __Pyx_BUILTIN_MODULE_NAME "builtins" |
| 544 |
#define __Pyx_DefaultClassType PyType_Type |
| 545 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 546 |
#ifndef CO_OPTIMIZED |
| 547 |
#define CO_OPTIMIZED 0x0001 |
| 548 |
#endif |
| 549 |
#ifndef CO_NEWLOCALS |
| 550 |
#define CO_NEWLOCALS 0x0002 |
| 551 |
#endif |
| 552 |
#ifndef CO_VARARGS |
| 553 |
#define CO_VARARGS 0x0004 |
| 554 |
#endif |
| 555 |
#ifndef CO_VARKEYWORDS |
| 556 |
#define CO_VARKEYWORDS 0x0008 |
| 557 |
#endif |
| 558 |
#ifndef CO_ASYNC_GENERATOR |
| 559 |
#define CO_ASYNC_GENERATOR 0x0200 |
| 560 |
#endif |
| 561 |
#ifndef CO_GENERATOR |
| 562 |
#define CO_GENERATOR 0x0020 |
| 563 |
#endif |
| 564 |
#ifndef CO_COROUTINE |
| 565 |
#define CO_COROUTINE 0x0080 |
| 566 |
#endif |
| 567 |
#endif |
| 568 |
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE) |
| 569 |
#define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type) |
| 570 |
#else |
| 571 |
#define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type)) |
| 572 |
#endif |
| 573 |
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is) |
| 574 |
#define __Pyx_Py_Is(x, y) Py_Is(x, y) |
| 575 |
#else |
| 576 |
#define __Pyx_Py_Is(x, y) ((x) == (y)) |
| 577 |
#endif |
| 578 |
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone) |
| 579 |
#define __Pyx_Py_IsNone(ob) Py_IsNone(ob) |
| 580 |
#else |
| 581 |
#define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None) |
| 582 |
#endif |
| 583 |
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue) |
| 584 |
#define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob) |
| 585 |
#else |
| 586 |
#define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True) |
| 587 |
#endif |
| 588 |
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse) |
| 589 |
#define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob) |
| 590 |
#else |
| 591 |
#define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False) |
| 592 |
#endif |
| 593 |
#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj)) |
| 594 |
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY |
| 595 |
#define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o) |
| 596 |
#else |
| 597 |
#define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o) |
| 598 |
#endif |
| 599 |
#ifndef CO_COROUTINE |
| 600 |
#define CO_COROUTINE 0x80 |
| 601 |
#endif |
| 602 |
#ifndef CO_ASYNC_GENERATOR |
| 603 |
#define CO_ASYNC_GENERATOR 0x200 |
| 604 |
#endif |
| 605 |
#ifndef Py_TPFLAGS_CHECKTYPES |
| 606 |
#define Py_TPFLAGS_CHECKTYPES 0 |
| 607 |
#endif |
| 608 |
#ifndef Py_TPFLAGS_HAVE_INDEX |
| 609 |
#define Py_TPFLAGS_HAVE_INDEX 0 |
| 610 |
#endif |
| 611 |
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER |
| 612 |
#define Py_TPFLAGS_HAVE_NEWBUFFER 0 |
| 613 |
#endif |
| 614 |
#ifndef Py_TPFLAGS_HAVE_FINALIZE |
| 615 |
#define Py_TPFLAGS_HAVE_FINALIZE 0 |
| 616 |
#endif |
| 617 |
#ifndef Py_TPFLAGS_SEQUENCE |
| 618 |
#define Py_TPFLAGS_SEQUENCE 0 |
| 619 |
#endif |
| 620 |
#ifndef Py_TPFLAGS_MAPPING |
| 621 |
#define Py_TPFLAGS_MAPPING 0 |
| 622 |
#endif |
| 623 |
#ifndef METH_STACKLESS |
| 624 |
#define METH_STACKLESS 0 |
| 625 |
#endif |
| 626 |
#ifndef METH_FASTCALL |
| 627 |
#ifndef METH_FASTCALL |
| 628 |
#define METH_FASTCALL 0x80 |
| 629 |
#endif |
| 630 |
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); |
| 631 |
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, |
| 632 |
Py_ssize_t nargs, PyObject *kwnames); |
| 633 |
#else |
| 634 |
#if PY_VERSION_HEX >= 0x030d00A4 |
| 635 |
# define __Pyx_PyCFunctionFast PyCFunctionFast |
| 636 |
# define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords |
| 637 |
#else |
| 638 |
# define __Pyx_PyCFunctionFast _PyCFunctionFast |
| 639 |
# define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords |
| 640 |
#endif |
| 641 |
#endif |
| 642 |
#if CYTHON_METH_FASTCALL |
| 643 |
#define __Pyx_METH_FASTCALL METH_FASTCALL |
| 644 |
#define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast |
| 645 |
#define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords |
| 646 |
#else |
| 647 |
#define __Pyx_METH_FASTCALL METH_VARARGS |
| 648 |
#define __Pyx_PyCFunction_FastCall PyCFunction |
| 649 |
#define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords |
| 650 |
#endif |
| 651 |
#if CYTHON_VECTORCALL |
| 652 |
#define __pyx_vectorcallfunc vectorcallfunc |
| 653 |
#define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET |
| 654 |
#define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n)) |
| 655 |
#elif CYTHON_BACKPORT_VECTORCALL |
| 656 |
typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args, |
| 657 |
size_t nargsf, PyObject *kwnames); |
| 658 |
#define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1)) |
| 659 |
#define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)) |
| 660 |
#else |
| 661 |
#define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0 |
| 662 |
#define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n)) |
| 663 |
#endif |
| 664 |
#if PY_VERSION_HEX >= 0x030900B1 |
| 665 |
#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func) |
| 666 |
#else |
| 667 |
#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func) |
| 668 |
#endif |
| 669 |
#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func) |
| 670 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 671 |
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth) |
| 672 |
#elif !CYTHON_COMPILING_IN_LIMITED_API |
| 673 |
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func) |
| 674 |
#endif |
| 675 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 676 |
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags) |
| 677 |
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) { |
| 678 |
return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self; |
| 679 |
} |
| 680 |
#endif |
| 681 |
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) { |
| 682 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 683 |
return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc; |
| 684 |
#else |
| 685 |
return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; |
| 686 |
#endif |
| 687 |
} |
| 688 |
#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc) |
| 689 |
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1 |
| 690 |
#define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b)) |
| 691 |
typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *); |
| 692 |
#else |
| 693 |
#define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b) |
| 694 |
#define __Pyx_PyCMethod PyCMethod |
| 695 |
#endif |
| 696 |
#ifndef METH_METHOD |
| 697 |
#define METH_METHOD 0x200 |
| 698 |
#endif |
| 699 |
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) |
| 700 |
#define PyObject_Malloc(s) PyMem_Malloc(s) |
| 701 |
#define PyObject_Free(p) PyMem_Free(p) |
| 702 |
#define PyObject_Realloc(p) PyMem_Realloc(p) |
| 703 |
#endif |
| 704 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 705 |
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) |
| 706 |
#elif CYTHON_COMPILING_IN_GRAAL |
| 707 |
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) |
| 708 |
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) _PyFrame_SetLineNumber((frame), (lineno)) |
| 709 |
#else |
| 710 |
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) |
| 711 |
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) |
| 712 |
#endif |
| 713 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 714 |
#define __Pyx_PyThreadState_Current PyThreadState_Get() |
| 715 |
#elif !CYTHON_FAST_THREAD_STATE |
| 716 |
#define __Pyx_PyThreadState_Current PyThreadState_GET() |
| 717 |
#elif PY_VERSION_HEX >= 0x030d00A1 |
| 718 |
#define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked() |
| 719 |
#else |
| 720 |
#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() |
| 721 |
#endif |
| 722 |
#if CYTHON_USE_MODULE_STATE |
| 723 |
static CYTHON_INLINE void *__Pyx__PyModule_GetState(PyObject *op) |
| 724 |
{ |
| 725 |
void *result; |
| 726 |
result = PyModule_GetState(op); |
| 727 |
if (!result) |
| 728 |
Py_FatalError("Couldn't find the module state"); |
| 729 |
return result; |
| 730 |
} |
| 731 |
#define __Pyx_PyModule_GetState(o) (__pyx_mstatetype *)__Pyx__PyModule_GetState(o) |
| 732 |
#else |
| 733 |
#define __Pyx_PyModule_GetState(op) ((void)op,__pyx_mstate_global) |
| 734 |
#endif |
| 735 |
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE((PyObject *) obj), name, func_ctype) |
| 736 |
#define __Pyx_PyObject_TryGetSlot(obj, name, func_ctype) __Pyx_PyType_TryGetSlot(Py_TYPE(obj), name, func_ctype) |
| 737 |
#define __Pyx_PyObject_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSubSlot(Py_TYPE(obj), sub, name, func_ctype) |
| 738 |
#if CYTHON_USE_TYPE_SLOTS |
| 739 |
#define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name) |
| 740 |
#define __Pyx_PyType_TryGetSlot(type, name, func_ctype) __Pyx_PyType_GetSlot(type, name, func_ctype) |
| 741 |
#define __Pyx_PyType_TryGetSubSlot(type, sub, name, func_ctype) (((type)->sub) ? ((type)->sub->name) : NULL) |
| 742 |
#else |
| 743 |
#define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name)) |
| 744 |
#define __Pyx_PyType_TryGetSlot(type, name, func_ctype)\ |
| 745 |
((__PYX_LIMITED_VERSION_HEX >= 0x030A0000 ||\ |
| 746 |
(PyType_GetFlags(type) & Py_TPFLAGS_HEAPTYPE) || __Pyx_get_runtime_version() >= 0x030A0000) ?\ |
| 747 |
__Pyx_PyType_GetSlot(type, name, func_ctype) : NULL) |
| 748 |
#define __Pyx_PyType_TryGetSubSlot(obj, sub, name, func_ctype) __Pyx_PyType_TryGetSlot(obj, name, func_ctype) |
| 749 |
#endif |
| 750 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized) |
| 751 |
#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) |
| 752 |
#else |
| 753 |
#define __Pyx_PyDict_NewPresized(n) PyDict_New() |
| 754 |
#endif |
| 755 |
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) |
| 756 |
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) |
| 757 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS |
| 758 |
#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) |
| 759 |
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) { |
| 760 |
PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name); |
| 761 |
if (res == NULL) PyErr_Clear(); |
| 762 |
return res; |
| 763 |
} |
| 764 |
#elif !CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000 |
| 765 |
#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError |
| 766 |
#define __Pyx_PyDict_GetItemStr PyDict_GetItem |
| 767 |
#else |
| 768 |
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) { |
| 769 |
#if CYTHON_COMPILING_IN_PYPY |
| 770 |
return PyDict_GetItem(dict, name); |
| 771 |
#else |
| 772 |
PyDictEntry *ep; |
| 773 |
PyDictObject *mp = (PyDictObject*) dict; |
| 774 |
long hash = ((PyStringObject *) name)->ob_shash; |
| 775 |
assert(hash != -1); |
| 776 |
ep = (mp->ma_lookup)(mp, name, hash); |
| 777 |
if (ep == NULL) { |
| 778 |
return NULL; |
| 779 |
} |
| 780 |
return ep->me_value; |
| 781 |
#endif |
| 782 |
} |
| 783 |
#define __Pyx_PyDict_GetItemStr PyDict_GetItem |
| 784 |
#endif |
| 785 |
#if CYTHON_USE_TYPE_SLOTS |
| 786 |
#define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags) |
| 787 |
#define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0) |
| 788 |
#else |
| 789 |
#define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp)) |
| 790 |
#define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature) |
| 791 |
#endif |
| 792 |
#define __Pyx_PyObject_GetIterNextFunc(iterator) __Pyx_PyObject_GetSlot(iterator, tp_iternext, iternextfunc) |
| 793 |
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000 |
| 794 |
#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\ |
| 795 |
PyTypeObject *type = Py_TYPE((PyObject*)obj);\ |
| 796 |
assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\ |
| 797 |
PyObject_GC_Del(obj);\ |
| 798 |
Py_DECREF(type);\ |
| 799 |
} |
| 800 |
#else |
| 801 |
#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj) |
| 802 |
#endif |
| 803 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 804 |
#define __Pyx_PyUnicode_READY(op) (0) |
| 805 |
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i) |
| 806 |
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U) |
| 807 |
#define __Pyx_PyUnicode_KIND(u) ((void)u, (0)) |
| 808 |
#define __Pyx_PyUnicode_DATA(u) ((void*)u) |
| 809 |
#define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i)) |
| 810 |
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u)) |
| 811 |
#else |
| 812 |
#if PY_VERSION_HEX >= 0x030C0000 |
| 813 |
#define __Pyx_PyUnicode_READY(op) (0) |
| 814 |
#else |
| 815 |
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ |
| 816 |
0 : _PyUnicode_Ready((PyObject *)(op))) |
| 817 |
#endif |
| 818 |
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) |
| 819 |
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) |
| 820 |
#define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u)) |
| 821 |
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) |
| 822 |
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) |
| 823 |
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch) |
| 824 |
#if PY_VERSION_HEX >= 0x030C0000 |
| 825 |
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) |
| 826 |
#else |
| 827 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 |
| 828 |
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) |
| 829 |
#else |
| 830 |
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) |
| 831 |
#endif |
| 832 |
#endif |
| 833 |
#endif |
| 834 |
#if CYTHON_COMPILING_IN_PYPY |
| 835 |
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) |
| 836 |
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) |
| 837 |
#else |
| 838 |
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) |
| 839 |
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ |
| 840 |
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) |
| 841 |
#endif |
| 842 |
#if CYTHON_COMPILING_IN_PYPY |
| 843 |
#if !defined(PyUnicode_DecodeUnicodeEscape) |
| 844 |
#define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors) |
| 845 |
#endif |
| 846 |
#if !defined(PyUnicode_Contains) |
| 847 |
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s) |
| 848 |
#endif |
| 849 |
#if !defined(PyByteArray_Check) |
| 850 |
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) |
| 851 |
#endif |
| 852 |
#if !defined(PyObject_Format) |
| 853 |
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) |
| 854 |
#endif |
| 855 |
#endif |
| 856 |
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) |
| 857 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 858 |
#define __Pyx_PySequence_ListKeepNew(obj)\ |
| 859 |
(likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj)) |
| 860 |
#else |
| 861 |
#define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj) |
| 862 |
#endif |
| 863 |
#ifndef PySet_CheckExact |
| 864 |
#define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type) |
| 865 |
#endif |
| 866 |
#if PY_VERSION_HEX >= 0x030900A4 |
| 867 |
#define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) |
| 868 |
#define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) |
| 869 |
#else |
| 870 |
#define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) |
| 871 |
#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) |
| 872 |
#endif |
| 873 |
#if CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS && PY_VERSION_HEX >= 0x030d00b1 |
| 874 |
#define __Pyx_PyList_GetItemRef(o, i) PyList_GetItemRef(o, i) |
| 875 |
#define __Pyx_PyDict_GetItemRef(dict, key, result) PyDict_GetItemRef(dict, key, result) |
| 876 |
#elif !CYTHON_AVOID_BORROWED_REFS |
| 877 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 878 |
#define __Pyx_PyList_GetItemRef(o, i) __Pyx_NewRef(PyList_GET_ITEM(o, i)) |
| 879 |
#else |
| 880 |
#define __Pyx_PyList_GetItemRef(o, i) PySequence_GetItem(o, i) |
| 881 |
#endif |
| 882 |
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { |
| 883 |
*result = PyDict_GetItem(dict, key); |
| 884 |
if (*result == NULL) { |
| 885 |
return 0; |
| 886 |
} |
| 887 |
Py_INCREF(*result); |
| 888 |
return 1; |
| 889 |
} |
| 890 |
#else |
| 891 |
#define __Pyx_PyList_GetItemRef(o, i) PySequence_GetItem(o, i) |
| 892 |
static CYTHON_INLINE int __Pyx_PyDict_GetItemRef(PyObject *dict, PyObject *key, PyObject **result) { |
| 893 |
*result = PyObject_GetItem(dict, key); |
| 894 |
if (PyErr_Occurred()) { |
| 895 |
return -1; |
| 896 |
} else if (*result == NULL) { |
| 897 |
return 0; |
| 898 |
} |
| 899 |
return 1; |
| 900 |
} |
| 901 |
#endif |
| 902 |
#if defined(CYTHON_DEBUG_VISIT_CONST) && CYTHON_DEBUG_VISIT_CONST |
| 903 |
#define __Pyx_VISIT_CONST(obj) Py_VISIT(obj) |
| 904 |
#else |
| 905 |
#define __Pyx_VISIT_CONST(obj) |
| 906 |
#endif |
| 907 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 908 |
#define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i) |
| 909 |
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) |
| 910 |
#define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0)) |
| 911 |
#define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GET_ITEM(o, i) |
| 912 |
#define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0)) |
| 913 |
#define __Pyx_PyList_GET_ITEM(o, i) PyList_GET_ITEM(o, i) |
| 914 |
#else |
| 915 |
#define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i) |
| 916 |
#define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) |
| 917 |
#define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v) |
| 918 |
#define __Pyx_PyTuple_GET_ITEM(o, i) PyTuple_GetItem(o, i) |
| 919 |
#define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v) |
| 920 |
#define __Pyx_PyList_GET_ITEM(o, i) PyList_GetItem(o, i) |
| 921 |
#endif |
| 922 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 923 |
#define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o) |
| 924 |
#define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o) |
| 925 |
#define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o) |
| 926 |
#define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o) |
| 927 |
#define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o) |
| 928 |
#define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GET_LENGTH(o) |
| 929 |
#else |
| 930 |
#define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o) |
| 931 |
#define __Pyx_PyList_GET_SIZE(o) PyList_Size(o) |
| 932 |
#define __Pyx_PySet_GET_SIZE(o) PySet_Size(o) |
| 933 |
#define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o) |
| 934 |
#define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o) |
| 935 |
#define __Pyx_PyUnicode_GET_LENGTH(o) PyUnicode_GetLength(o) |
| 936 |
#endif |
| 937 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 |
| 938 |
#define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name) |
| 939 |
#else |
| 940 |
static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) { |
| 941 |
PyObject *module = PyImport_AddModule(name); |
| 942 |
Py_XINCREF(module); |
| 943 |
return module; |
| 944 |
} |
| 945 |
#endif |
| 946 |
#define PyBoolObject PyLongObject |
| 947 |
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_InternFromString) |
| 948 |
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s) |
| 949 |
#endif |
| 950 |
#define __Pyx_PyLong_FromHash_t PyLong_FromSsize_t |
| 951 |
#define __Pyx_PyLong_AsHash_t __Pyx_PyIndex_AsSsize_t |
| 952 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 |
| 953 |
#define __Pyx_PySendResult PySendResult |
| 954 |
#else |
| 955 |
typedef enum { |
| 956 |
PYGEN_RETURN = 0, |
| 957 |
PYGEN_ERROR = -1, |
| 958 |
PYGEN_NEXT = 1, |
| 959 |
} __Pyx_PySendResult; |
| 960 |
#endif |
| 961 |
#if CYTHON_COMPILING_IN_LIMITED_API || PY_VERSION_HEX < 0x030A00A3 |
| 962 |
typedef __Pyx_PySendResult (*__Pyx_pyiter_sendfunc)(PyObject *iter, PyObject *value, PyObject **result); |
| 963 |
#else |
| 964 |
#define __Pyx_pyiter_sendfunc sendfunc |
| 965 |
#endif |
| 966 |
#define __PYX_HAS_PY_AM_SEND (!CYTHON_USE_TYPE_SPECS || CYTHON_USE_AM_SEND && __PYX_LIMITED_VERSION_HEX >= 0x030A0000) |
| 967 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030A0000 |
| 968 |
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods |
| 969 |
#define __Pyx_SlotTpAsAsync(s) (&(s)) |
| 970 |
#else |
| 971 |
typedef struct { |
| 972 |
unaryfunc am_await; |
| 973 |
unaryfunc am_aiter; |
| 974 |
unaryfunc am_anext; |
| 975 |
__Pyx_pyiter_sendfunc am_send; |
| 976 |
} __Pyx_PyAsyncMethodsStruct; |
| 977 |
#define __Pyx_SlotTpAsAsync(s) ((PyAsyncMethods*)&(s)) |
| 978 |
#endif |
| 979 |
#if CYTHON_USE_AM_SEND && PY_VERSION_HEX < 0x030A00F0 |
| 980 |
#define __Pyx_TPFLAGS_HAVE_AM_SEND (1UL << 21) |
| 981 |
#else |
| 982 |
#define __Pyx_TPFLAGS_HAVE_AM_SEND (0) |
| 983 |
#endif |
| 984 |
|
| 985 |
|
| 986 |
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) |
| 987 |
#ifndef _USE_MATH_DEFINES |
| 988 |
#define _USE_MATH_DEFINES |
| 989 |
#endif |
| 990 |
#endif |
| 991 |
#include <math.h> |
| 992 |
#ifdef NAN |
| 993 |
#define __PYX_NAN() ((float) NAN) |
| 994 |
#else |
| 995 |
static CYTHON_INLINE float __PYX_NAN() { |
| 996 |
float value; |
| 997 |
memset(&value, 0xFF, sizeof(value)); |
| 998 |
return value; |
| 999 |
} |
| 1000 |
#endif |
| 1001 |
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) |
| 1002 |
#define __Pyx_truncl trunc |
| 1003 |
#else |
| 1004 |
#define __Pyx_truncl truncl |
| 1005 |
#endif |
| 1006 |
|
| 1007 |
#ifndef CYTHON_CLINE_IN_TRACEBACK_RUNTIME |
| 1008 |
#define CYTHON_CLINE_IN_TRACEBACK_RUNTIME 1 |
| 1009 |
#endif |
| 1010 |
#ifndef CYTHON_CLINE_IN_TRACEBACK |
| 1011 |
#define CYTHON_CLINE_IN_TRACEBACK CYTHON_CLINE_IN_TRACEBACK_RUNTIME |
| 1012 |
#endif |
| 1013 |
#if CYTHON_CLINE_IN_TRACEBACK |
| 1014 |
#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; } |
| 1015 |
#else |
| 1016 |
#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; } |
| 1017 |
#endif |
| 1018 |
#define __PYX_ERR(f_index, lineno, Ln_error) \ |
| 1019 |
{ __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } |
| 1020 |
|
| 1021 |
#ifdef CYTHON_EXTERN_C |
| 1022 |
#undef __PYX_EXTERN_C |
| 1023 |
#define __PYX_EXTERN_C CYTHON_EXTERN_C |
| 1024 |
#elif defined(__PYX_EXTERN_C) |
| 1025 |
#ifdef _MSC_VER |
| 1026 |
#pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.") |
| 1027 |
#else |
| 1028 |
#warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead. |
| 1029 |
#endif |
| 1030 |
#else |
| 1031 |
#ifdef __cplusplus |
| 1032 |
#define __PYX_EXTERN_C extern "C" |
| 1033 |
#else |
| 1034 |
#define __PYX_EXTERN_C extern |
| 1035 |
#endif |
| 1036 |
#endif |
| 1037 |
|
| 1038 |
#define __PYX_HAVE__builtin_min_max |
| 1039 |
#define __PYX_HAVE_API__builtin_min_max |
| 1040 |
|
| 1041 |
#ifdef _OPENMP |
| 1042 |
#include <omp.h> |
| 1043 |
#endif |
| 1044 |
|
| 1045 |
#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) |
| 1046 |
#define CYTHON_WITHOUT_ASSERTIONS |
| 1047 |
#endif |
| 1048 |
|
| 1049 |
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 |
| 1050 |
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 |
| 1051 |
#define __PYX_DEFAULT_STRING_ENCODING "" |
| 1052 |
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString |
| 1053 |
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize |
| 1054 |
#define __Pyx_uchar_cast(c) ((unsigned char)c) |
| 1055 |
#define __Pyx_long_cast(x) ((long)x) |
| 1056 |
#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ |
| 1057 |
(sizeof(type) < sizeof(Py_ssize_t)) ||\ |
| 1058 |
(sizeof(type) > sizeof(Py_ssize_t) &&\ |
| 1059 |
likely(v < (type)PY_SSIZE_T_MAX ||\ |
| 1060 |
v == (type)PY_SSIZE_T_MAX) &&\ |
| 1061 |
(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ |
| 1062 |
v == (type)PY_SSIZE_T_MIN))) ||\ |
| 1063 |
(sizeof(type) == sizeof(Py_ssize_t) &&\ |
| 1064 |
(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ |
| 1065 |
v == (type)PY_SSIZE_T_MAX))) ) |
| 1066 |
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { |
| 1067 |
return (size_t) i < (size_t) limit; |
| 1068 |
} |
| 1069 |
#if defined (__cplusplus) && __cplusplus >= 201103L |
| 1070 |
#include <cstdlib> |
| 1071 |
#define __Pyx_sst_abs(value) std::abs(value) |
| 1072 |
#elif SIZEOF_INT >= SIZEOF_SIZE_T |
| 1073 |
#define __Pyx_sst_abs(value) abs(value) |
| 1074 |
#elif SIZEOF_LONG >= SIZEOF_SIZE_T |
| 1075 |
#define __Pyx_sst_abs(value) labs(value) |
| 1076 |
#elif defined (_MSC_VER) |
| 1077 |
#define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) |
| 1078 |
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L |
| 1079 |
#define __Pyx_sst_abs(value) llabs(value) |
| 1080 |
#elif defined (__GNUC__) |
| 1081 |
#define __Pyx_sst_abs(value) __builtin_llabs(value) |
| 1082 |
#else |
| 1083 |
#define __Pyx_sst_abs(value) ((value<0) ? -value : value) |
| 1084 |
#endif |
| 1085 |
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s); |
| 1086 |
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); |
| 1087 |
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); |
| 1088 |
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*); |
| 1089 |
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) |
| 1090 |
#define __Pyx_PyBytes_FromString PyBytes_FromString |
| 1091 |
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize |
| 1092 |
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); |
| 1093 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 1094 |
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) |
| 1095 |
#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) |
| 1096 |
#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) |
| 1097 |
#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) |
| 1098 |
#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) |
| 1099 |
#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) |
| 1100 |
#else |
| 1101 |
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AsString(s)) |
| 1102 |
#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AsString(s)) |
| 1103 |
#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AsString(s)) |
| 1104 |
#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AsString(s)) |
| 1105 |
#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AsString(s)) |
| 1106 |
#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AsString(s)) |
| 1107 |
#endif |
| 1108 |
#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) |
| 1109 |
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) |
| 1110 |
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s)) |
| 1111 |
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) |
| 1112 |
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) |
| 1113 |
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) |
| 1114 |
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) |
| 1115 |
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) |
| 1116 |
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) |
| 1117 |
#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o) |
| 1118 |
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode |
| 1119 |
static CYTHON_INLINE PyObject *__Pyx_NewRef(PyObject *obj) { |
| 1120 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_NewRef) |
| 1121 |
return Py_NewRef(obj); |
| 1122 |
#else |
| 1123 |
Py_INCREF(obj); |
| 1124 |
return obj; |
| 1125 |
#endif |
| 1126 |
} |
| 1127 |
static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { |
| 1128 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030a0000 || defined(Py_XNewRef) |
| 1129 |
return Py_XNewRef(obj); |
| 1130 |
#else |
| 1131 |
Py_XINCREF(obj); |
| 1132 |
return obj; |
| 1133 |
#endif |
| 1134 |
} |
| 1135 |
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) |
| 1136 |
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); |
| 1137 |
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); |
| 1138 |
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); |
| 1139 |
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x); |
| 1140 |
#define __Pyx_PySequence_Tuple(obj)\ |
| 1141 |
(likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) |
| 1142 |
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); |
| 1143 |
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t); |
| 1144 |
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); |
| 1145 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 1146 |
#define __Pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) |
| 1147 |
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AS_DOUBLE(x) |
| 1148 |
#else |
| 1149 |
#define __Pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) |
| 1150 |
#define __Pyx_PyFloat_AS_DOUBLE(x) PyFloat_AsDouble(x) |
| 1151 |
#endif |
| 1152 |
#define __Pyx_PyFloat_AsFloat(x) ((float) __Pyx_PyFloat_AsDouble(x)) |
| 1153 |
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) |
| 1154 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 1155 |
#if PY_VERSION_HEX >= 0x030C00A7 |
| 1156 |
#ifndef _PyLong_SIGN_MASK |
| 1157 |
#define _PyLong_SIGN_MASK 3 |
| 1158 |
#endif |
| 1159 |
#ifndef _PyLong_NON_SIZE_BITS |
| 1160 |
#define _PyLong_NON_SIZE_BITS 3 |
| 1161 |
#endif |
| 1162 |
#define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK) |
| 1163 |
#define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0) |
| 1164 |
#define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x)) |
| 1165 |
#define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1) |
| 1166 |
#define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0) |
| 1167 |
#define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0]) |
| 1168 |
#define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS)) |
| 1169 |
#define __Pyx_PyLong_SignedDigitCount(x)\ |
| 1170 |
((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) |
| 1171 |
#if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) |
| 1172 |
#define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) |
| 1173 |
#define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) |
| 1174 |
#else |
| 1175 |
#define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) |
| 1176 |
#define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) |
| 1177 |
#endif |
| 1178 |
typedef Py_ssize_t __Pyx_compact_pylong; |
| 1179 |
typedef size_t __Pyx_compact_upylong; |
| 1180 |
#else |
| 1181 |
#define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) |
| 1182 |
#define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) |
| 1183 |
#define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) |
| 1184 |
#define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0) |
| 1185 |
#define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0]) |
| 1186 |
#define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x)) |
| 1187 |
#define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x) |
| 1188 |
#define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1) |
| 1189 |
#define __Pyx_PyLong_CompactValue(x)\ |
| 1190 |
((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0])) |
| 1191 |
typedef sdigit __Pyx_compact_pylong; |
| 1192 |
typedef digit __Pyx_compact_upylong; |
| 1193 |
#endif |
| 1194 |
#if PY_VERSION_HEX >= 0x030C00A5 |
| 1195 |
#define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit) |
| 1196 |
#else |
| 1197 |
#define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit) |
| 1198 |
#endif |
| 1199 |
#endif |
| 1200 |
#if __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 |
| 1201 |
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) |
| 1202 |
#elif __PYX_DEFAULT_STRING_ENCODING_IS_ASCII |
| 1203 |
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeASCII(c_str, size, NULL) |
| 1204 |
#else |
| 1205 |
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) |
| 1206 |
#endif |
| 1207 |
|
| 1208 |
|
| 1209 |
|
| 1210 |
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) |
| 1211 |
#define likely(x) __builtin_expect(!!(x), 1) |
| 1212 |
#define unlikely(x) __builtin_expect(!!(x), 0) |
| 1213 |
#else |
| 1214 |
#define likely(x) (x) |
| 1215 |
#define unlikely(x) (x) |
| 1216 |
#endif |
| 1217 |
|
| 1218 |
#ifdef __cplusplus |
| 1219 |
#include <type_traits> |
| 1220 |
template <typename T> |
| 1221 |
static void __Pyx_pretend_to_initialize(T* ptr) { |
| 1222 |
#if __cplusplus > 201103L |
| 1223 |
if ((std::is_trivially_default_constructible<T>::value)) |
| 1224 |
#endif |
| 1225 |
*ptr = T(); |
| 1226 |
(void)ptr; |
| 1227 |
} |
| 1228 |
#else |
| 1229 |
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } |
| 1230 |
#endif |
| 1231 |
|
| 1232 |
|
| 1233 |
#if !CYTHON_USE_MODULE_STATE |
| 1234 |
static PyObject *__pyx_m = NULL; |
| 1235 |
#endif |
| 1236 |
static int __pyx_lineno; |
| 1237 |
static int __pyx_clineno = 0; |
| 1238 |
static const char * const __pyx_cfilenm = __FILE__; |
| 1239 |
static const char *__pyx_filename; |
| 1240 |
|
| 1241 |
|
| 1242 |
|
| 1243 |
static const char* const __pyx_f[] = { |
| 1244 |
"tests/run/builtin_min_max.pyx", |
| 1245 |
}; |
| 1246 |
|
| 1247 |
|
| 1248 |
#include <structmember.h> |
| 1249 |
|
| 1250 |
|
| 1251 |
|
| 1252 |
|
| 1253 |
|
| 1254 |
|
| 1255 |
|
| 1256 |
|
| 1257 |
|
| 1258 |
|
| 1259 |
#ifndef CYTHON_REFNANNY |
| 1260 |
#define CYTHON_REFNANNY 0 |
| 1261 |
#endif |
| 1262 |
#if CYTHON_REFNANNY |
| 1263 |
typedef struct { |
| 1264 |
void (*INCREF)(void*, PyObject*, Py_ssize_t); |
| 1265 |
void (*DECREF)(void*, PyObject*, Py_ssize_t); |
| 1266 |
void (*GOTREF)(void*, PyObject*, Py_ssize_t); |
| 1267 |
void (*GIVEREF)(void*, PyObject*, Py_ssize_t); |
| 1268 |
void* (*SetupContext)(const char*, Py_ssize_t, const char*); |
| 1269 |
void (*FinishContext)(void**); |
| 1270 |
} __Pyx_RefNannyAPIStruct; |
| 1271 |
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; |
| 1272 |
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); |
| 1273 |
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; |
| 1274 |
#define __Pyx_RefNannySetupContext(name, acquire_gil)\ |
| 1275 |
if (acquire_gil) {\ |
| 1276 |
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ |
| 1277 |
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ |
| 1278 |
PyGILState_Release(__pyx_gilstate_save);\ |
| 1279 |
} else {\ |
| 1280 |
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\ |
| 1281 |
} |
| 1282 |
#define __Pyx_RefNannyFinishContextNogil() {\ |
| 1283 |
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ |
| 1284 |
__Pyx_RefNannyFinishContext();\ |
| 1285 |
PyGILState_Release(__pyx_gilstate_save);\ |
| 1286 |
} |
| 1287 |
#define __Pyx_RefNannyFinishContextNogil() {\ |
| 1288 |
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ |
| 1289 |
__Pyx_RefNannyFinishContext();\ |
| 1290 |
PyGILState_Release(__pyx_gilstate_save);\ |
| 1291 |
} |
| 1292 |
#define __Pyx_RefNannyFinishContext()\ |
| 1293 |
__Pyx_RefNanny->FinishContext(&__pyx_refnanny) |
| 1294 |
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) |
| 1295 |
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) |
| 1296 |
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) |
| 1297 |
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__)) |
| 1298 |
#define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0) |
| 1299 |
#define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0) |
| 1300 |
#define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0) |
| 1301 |
#define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0) |
| 1302 |
#else |
| 1303 |
#define __Pyx_RefNannyDeclarations |
| 1304 |
#define __Pyx_RefNannySetupContext(name, acquire_gil) |
| 1305 |
#define __Pyx_RefNannyFinishContextNogil() |
| 1306 |
#define __Pyx_RefNannyFinishContext() |
| 1307 |
#define __Pyx_INCREF(r) Py_INCREF(r) |
| 1308 |
#define __Pyx_DECREF(r) Py_DECREF(r) |
| 1309 |
#define __Pyx_GOTREF(r) |
| 1310 |
#define __Pyx_GIVEREF(r) |
| 1311 |
#define __Pyx_XINCREF(r) Py_XINCREF(r) |
| 1312 |
#define __Pyx_XDECREF(r) Py_XDECREF(r) |
| 1313 |
#define __Pyx_XGOTREF(r) |
| 1314 |
#define __Pyx_XGIVEREF(r) |
| 1315 |
#endif |
| 1316 |
#define __Pyx_Py_XDECREF_SET(r, v) do {\ |
| 1317 |
PyObject *tmp = (PyObject *) r;\ |
| 1318 |
r = v; Py_XDECREF(tmp);\ |
| 1319 |
} while (0) |
| 1320 |
#define __Pyx_XDECREF_SET(r, v) do {\ |
| 1321 |
PyObject *tmp = (PyObject *) r;\ |
| 1322 |
r = v; __Pyx_XDECREF(tmp);\ |
| 1323 |
} while (0) |
| 1324 |
#define __Pyx_DECREF_SET(r, v) do {\ |
| 1325 |
PyObject *tmp = (PyObject *) r;\ |
| 1326 |
r = v; __Pyx_DECREF(tmp);\ |
| 1327 |
} while (0) |
| 1328 |
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) |
| 1329 |
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) |
| 1330 |
|
| 1331 |
|
| 1332 |
#if CYTHON_FAST_THREAD_STATE |
| 1333 |
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) |
| 1334 |
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); |
| 1335 |
#else |
| 1336 |
#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) |
| 1337 |
#endif |
| 1338 |
|
| 1339 |
|
| 1340 |
#if CYTHON_FAST_THREAD_STATE |
| 1341 |
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; |
| 1342 |
#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; |
| 1343 |
#if PY_VERSION_HEX >= 0x030C00A6 |
| 1344 |
#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL) |
| 1345 |
#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL) |
| 1346 |
#else |
| 1347 |
#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL) |
| 1348 |
#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type) |
| 1349 |
#endif |
| 1350 |
#else |
| 1351 |
#define __Pyx_PyThreadState_declare |
| 1352 |
#define __Pyx_PyThreadState_assign |
| 1353 |
#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL) |
| 1354 |
#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred() |
| 1355 |
#endif |
| 1356 |
|
| 1357 |
|
| 1358 |
#if CYTHON_FAST_THREAD_STATE |
| 1359 |
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) |
| 1360 |
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) |
| 1361 |
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) |
| 1362 |
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) |
| 1363 |
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) |
| 1364 |
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); |
| 1365 |
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); |
| 1366 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6 |
| 1367 |
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) |
| 1368 |
#else |
| 1369 |
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) |
| 1370 |
#endif |
| 1371 |
#else |
| 1372 |
#define __Pyx_PyErr_Clear() PyErr_Clear() |
| 1373 |
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) |
| 1374 |
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) |
| 1375 |
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) |
| 1376 |
#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) |
| 1377 |
#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) |
| 1378 |
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) |
| 1379 |
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) |
| 1380 |
#endif |
| 1381 |
|
| 1382 |
|
| 1383 |
#if CYTHON_USE_TYPE_SLOTS |
| 1384 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); |
| 1385 |
#else |
| 1386 |
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) |
| 1387 |
#endif |
| 1388 |
|
| 1389 |
|
| 1390 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); |
| 1391 |
|
| 1392 |
|
| 1393 |
static PyObject *__Pyx_GetBuiltinName(PyObject *name); |
| 1394 |
|
| 1395 |
|
| 1396 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 1397 |
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n); |
| 1398 |
#endif |
| 1399 |
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_METH_FASTCALL |
| 1400 |
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n); |
| 1401 |
#endif |
| 1402 |
|
| 1403 |
|
| 1404 |
#include <string.h> |
| 1405 |
|
| 1406 |
|
| 1407 |
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); |
| 1408 |
|
| 1409 |
|
| 1410 |
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); |
| 1411 |
|
| 1412 |
|
| 1413 |
#if CYTHON_AVOID_BORROWED_REFS |
| 1414 |
#define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i) |
| 1415 |
#elif CYTHON_ASSUME_SAFE_MACROS |
| 1416 |
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i) |
| 1417 |
#else |
| 1418 |
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i) |
| 1419 |
#endif |
| 1420 |
#if CYTHON_AVOID_BORROWED_REFS |
| 1421 |
#define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) |
| 1422 |
#define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) |
| 1423 |
#else |
| 1424 |
#define __Pyx_Arg_NewRef_VARARGS(arg) arg |
| 1425 |
#define __Pyx_Arg_XDECREF_VARARGS(arg) |
| 1426 |
#endif |
| 1427 |
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) |
| 1428 |
#define __Pyx_KwValues_VARARGS(args, nargs) NULL |
| 1429 |
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s) |
| 1430 |
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw) |
| 1431 |
#if CYTHON_METH_FASTCALL |
| 1432 |
#define __Pyx_Arg_FASTCALL(args, i) args[i] |
| 1433 |
#define __Pyx_NumKwargs_FASTCALL(kwds) __Pyx_PyTuple_GET_SIZE(kwds) |
| 1434 |
#define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs)) |
| 1435 |
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s); |
| 1436 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 |
| 1437 |
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues); |
| 1438 |
#else |
| 1439 |
#define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) |
| 1440 |
#endif |
| 1441 |
#define __Pyx_Arg_NewRef_FASTCALL(arg) arg |
| 1442 |
|
| 1443 |
#define __Pyx_Arg_XDECREF_FASTCALL(arg) |
| 1444 |
#else |
| 1445 |
#define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS |
| 1446 |
#define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS |
| 1447 |
#define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS |
| 1448 |
#define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS |
| 1449 |
#define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS |
| 1450 |
#define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg) |
| 1451 |
#define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg) |
| 1452 |
#endif |
| 1453 |
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS |
| 1454 |
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start) |
| 1455 |
#else |
| 1456 |
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop) |
| 1457 |
#endif |
| 1458 |
#if CYTHON_METH_FASTCALL || (CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) |
| 1459 |
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start) |
| 1460 |
#else |
| 1461 |
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop) |
| 1462 |
#endif |
| 1463 |
|
| 1464 |
|
| 1465 |
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); |
| 1466 |
|
| 1467 |
|
| 1468 |
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues, |
| 1469 |
PyObject **argnames[], |
| 1470 |
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, |
| 1471 |
const char* function_name); |
| 1472 |
|
| 1473 |
|
| 1474 |
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, |
| 1475 |
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); |
| 1476 |
|
| 1477 |
|
| 1478 |
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS |
| 1479 |
#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) |
| 1480 |
#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) |
| 1481 |
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ |
| 1482 |
(version_var) = __PYX_GET_DICT_VERSION(dict);\ |
| 1483 |
(cache_var) = (value); |
| 1484 |
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ |
| 1485 |
static PY_UINT64_T __pyx_dict_version = 0;\ |
| 1486 |
static PyObject *__pyx_dict_cached_value = NULL;\ |
| 1487 |
if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ |
| 1488 |
(VAR) = __pyx_dict_cached_value;\ |
| 1489 |
} else {\ |
| 1490 |
(VAR) = __pyx_dict_cached_value = (LOOKUP);\ |
| 1491 |
__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ |
| 1492 |
}\ |
| 1493 |
} |
| 1494 |
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); |
| 1495 |
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); |
| 1496 |
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); |
| 1497 |
#else |
| 1498 |
#define __PYX_GET_DICT_VERSION(dict) (0) |
| 1499 |
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) |
| 1500 |
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); |
| 1501 |
#endif |
| 1502 |
|
| 1503 |
|
| 1504 |
#if CYTHON_USE_DICT_VERSIONS |
| 1505 |
#define __Pyx_GetModuleGlobalName(var, name) do {\ |
| 1506 |
static PY_UINT64_T __pyx_dict_version = 0;\ |
| 1507 |
static PyObject *__pyx_dict_cached_value = NULL;\ |
| 1508 |
(var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_mstate_global->__pyx_d))) ?\ |
| 1509 |
(likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ |
| 1510 |
__Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ |
| 1511 |
} while(0) |
| 1512 |
#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\ |
| 1513 |
PY_UINT64_T __pyx_dict_version;\ |
| 1514 |
PyObject *__pyx_dict_cached_value;\ |
| 1515 |
(var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ |
| 1516 |
} while(0) |
| 1517 |
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); |
| 1518 |
#else |
| 1519 |
#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) |
| 1520 |
#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) |
| 1521 |
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); |
| 1522 |
#endif |
| 1523 |
|
| 1524 |
|
| 1525 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 1526 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); |
| 1527 |
#else |
| 1528 |
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) |
| 1529 |
#endif |
| 1530 |
|
| 1531 |
|
| 1532 |
#if CYTHON_FAST_PYCALL |
| 1533 |
#if !CYTHON_VECTORCALL |
| 1534 |
#define __Pyx_PyFunction_FastCall(func, args, nargs)\ |
| 1535 |
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) |
| 1536 |
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); |
| 1537 |
#endif |
| 1538 |
#define __Pyx_BUILD_ASSERT_EXPR(cond)\ |
| 1539 |
(sizeof(char [1 - 2*!(cond)]) - 1) |
| 1540 |
#ifndef Py_MEMBER_SIZE |
| 1541 |
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) |
| 1542 |
#endif |
| 1543 |
#if !CYTHON_VECTORCALL |
| 1544 |
#if PY_VERSION_HEX >= 0x03080000 |
| 1545 |
#include "frameobject.h" |
| 1546 |
#define __Pxy_PyFrame_Initialize_Offsets() |
| 1547 |
#define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) |
| 1548 |
#else |
| 1549 |
static size_t __pyx_pyframe_localsplus_offset = 0; |
| 1550 |
#include "frameobject.h" |
| 1551 |
#define __Pxy_PyFrame_Initialize_Offsets()\ |
| 1552 |
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ |
| 1553 |
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) |
| 1554 |
#define __Pyx_PyFrame_GetLocalsplus(frame)\ |
| 1555 |
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) |
| 1556 |
#endif |
| 1557 |
#endif |
| 1558 |
#endif |
| 1559 |
|
| 1560 |
|
| 1561 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 1562 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); |
| 1563 |
#endif |
| 1564 |
|
| 1565 |
|
| 1566 |
#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL) |
| 1567 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs); |
| 1568 |
|
| 1569 |
|
| 1570 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); |
| 1571 |
|
| 1572 |
|
| 1573 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); |
| 1574 |
|
| 1575 |
|
| 1576 |
static int __Pyx_VersionSanityCheck(void); |
| 1577 |
|
| 1578 |
|
| 1579 |
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases); |
| 1580 |
|
| 1581 |
|
| 1582 |
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); |
| 1583 |
|
| 1584 |
|
| 1585 |
#if CYTHON_USE_TYPE_SPECS |
| 1586 |
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type); |
| 1587 |
#endif |
| 1588 |
|
| 1589 |
|
| 1590 |
static PyObject *__Pyx_FetchSharedCythonABIModule(void); |
| 1591 |
|
| 1592 |
|
| 1593 |
#if !CYTHON_USE_TYPE_SPECS |
| 1594 |
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); |
| 1595 |
#else |
| 1596 |
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases); |
| 1597 |
#endif |
| 1598 |
|
| 1599 |
|
| 1600 |
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) |
| 1601 |
#define __Pyx_call_type_traverse(o, always_call, visit, arg) 0 |
| 1602 |
#else |
| 1603 |
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg); |
| 1604 |
#endif |
| 1605 |
|
| 1606 |
|
| 1607 |
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ); |
| 1608 |
|
| 1609 |
|
| 1610 |
#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) |
| 1611 |
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw); |
| 1612 |
#endif |
| 1613 |
|
| 1614 |
|
| 1615 |
#define __Pyx_CyFunction_USED |
| 1616 |
#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 |
| 1617 |
#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 |
| 1618 |
#define __Pyx_CYFUNCTION_CCLASS 0x04 |
| 1619 |
#define __Pyx_CYFUNCTION_COROUTINE 0x08 |
| 1620 |
#define __Pyx_CyFunction_GetClosure(f)\ |
| 1621 |
(((__pyx_CyFunctionObject *) (f))->func_closure) |
| 1622 |
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API |
| 1623 |
#define __Pyx_CyFunction_GetClassObj(f)\ |
| 1624 |
(((__pyx_CyFunctionObject *) (f))->func_classobj) |
| 1625 |
#else |
| 1626 |
#define __Pyx_CyFunction_GetClassObj(f)\ |
| 1627 |
((PyObject*) ((PyCMethodObject *) (f))->mm_class) |
| 1628 |
#endif |
| 1629 |
#define __Pyx_CyFunction_SetClassObj(f, classobj)\ |
| 1630 |
__Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj)) |
| 1631 |
#define __Pyx_CyFunction_Defaults(type, f)\ |
| 1632 |
((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) |
| 1633 |
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ |
| 1634 |
((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) |
| 1635 |
typedef struct { |
| 1636 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 1637 |
PyObject_HEAD |
| 1638 |
PyObject *func; |
| 1639 |
#elif PY_VERSION_HEX < 0x030900B1 |
| 1640 |
PyCFunctionObject func; |
| 1641 |
#else |
| 1642 |
PyCMethodObject func; |
| 1643 |
#endif |
| 1644 |
#if CYTHON_BACKPORT_VECTORCALL ||\ |
| 1645 |
(CYTHON_COMPILING_IN_LIMITED_API && CYTHON_METH_FASTCALL) |
| 1646 |
__pyx_vectorcallfunc func_vectorcall; |
| 1647 |
#endif |
| 1648 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 1649 |
PyObject *func_weakreflist; |
| 1650 |
#endif |
| 1651 |
PyObject *func_dict; |
| 1652 |
PyObject *func_name; |
| 1653 |
PyObject *func_qualname; |
| 1654 |
PyObject *func_doc; |
| 1655 |
PyObject *func_globals; |
| 1656 |
PyObject *func_code; |
| 1657 |
PyObject *func_closure; |
| 1658 |
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API |
| 1659 |
PyObject *func_classobj; |
| 1660 |
#endif |
| 1661 |
PyObject *defaults; |
| 1662 |
int flags; |
| 1663 |
PyObject *defaults_tuple; |
| 1664 |
PyObject *defaults_kwdict; |
| 1665 |
PyObject *(*defaults_getter)(PyObject *); |
| 1666 |
PyObject *func_annotations; |
| 1667 |
PyObject *func_is_coroutine; |
| 1668 |
} __pyx_CyFunctionObject; |
| 1669 |
#undef __Pyx_CyOrPyCFunction_Check |
| 1670 |
#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_mstate_global->__pyx_CyFunctionType) |
| 1671 |
#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_mstate_global->__pyx_CyFunctionType, &PyCFunction_Type) |
| 1672 |
#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_mstate_global->__pyx_CyFunctionType) |
| 1673 |
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc); |
| 1674 |
#undef __Pyx_IsSameCFunction |
| 1675 |
#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc) |
| 1676 |
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, |
| 1677 |
int flags, PyObject* qualname, |
| 1678 |
PyObject *closure, |
| 1679 |
PyObject *module, PyObject *globals, |
| 1680 |
PyObject* code); |
| 1681 |
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj); |
| 1682 |
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, |
| 1683 |
PyTypeObject *defaults_type); |
| 1684 |
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, |
| 1685 |
PyObject *tuple); |
| 1686 |
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, |
| 1687 |
PyObject *dict); |
| 1688 |
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, |
| 1689 |
PyObject *dict); |
| 1690 |
static int __pyx_CyFunction_init(PyObject *module); |
| 1691 |
#if CYTHON_METH_FASTCALL |
| 1692 |
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); |
| 1693 |
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); |
| 1694 |
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); |
| 1695 |
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames); |
| 1696 |
#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API |
| 1697 |
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall) |
| 1698 |
#else |
| 1699 |
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall) |
| 1700 |
#endif |
| 1701 |
#endif |
| 1702 |
|
| 1703 |
|
| 1704 |
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, |
| 1705 |
int flags, PyObject* qualname, |
| 1706 |
PyObject *closure, |
| 1707 |
PyObject *module, PyObject *globals, |
| 1708 |
PyObject* code); |
| 1709 |
|
| 1710 |
|
| 1711 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 |
| 1712 |
#define __Pyx_SetNameInClass(ns, name, value)\ |
| 1713 |
(likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) |
| 1714 |
#elif CYTHON_COMPILING_IN_CPYTHON |
| 1715 |
#define __Pyx_SetNameInClass(ns, name, value)\ |
| 1716 |
(likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) |
| 1717 |
#else |
| 1718 |
#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) |
| 1719 |
#endif |
| 1720 |
|
| 1721 |
|
| 1722 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); |
| 1723 |
|
| 1724 |
|
| 1725 |
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS |
| 1726 |
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0) |
| 1727 |
#define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1) |
| 1728 |
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error); |
| 1729 |
#else |
| 1730 |
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n) |
| 1731 |
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) |
| 1732 |
#endif |
| 1733 |
|
| 1734 |
|
| 1735 |
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, |
| 1736 |
PyObject *mkw, PyObject *modname, PyObject *doc); |
| 1737 |
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, |
| 1738 |
PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); |
| 1739 |
|
| 1740 |
|
| 1741 |
static void __pyx_module_cleanup(PyObject *self); |
| 1742 |
#if CYTHON_COMPILING_IN_PYPY |
| 1743 |
static int __Pyx_RegisterCleanup(void); |
| 1744 |
#else |
| 1745 |
#define __Pyx_RegisterCleanup() (0) |
| 1746 |
#endif |
| 1747 |
|
| 1748 |
|
| 1749 |
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME |
| 1750 |
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); |
| 1751 |
#else |
| 1752 |
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) |
| 1753 |
#endif |
| 1754 |
|
| 1755 |
|
| 1756 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 1757 |
typedef PyObject __Pyx_CachedCodeObjectType; |
| 1758 |
#else |
| 1759 |
typedef PyCodeObject __Pyx_CachedCodeObjectType; |
| 1760 |
#endif |
| 1761 |
typedef struct { |
| 1762 |
__Pyx_CachedCodeObjectType* code_object; |
| 1763 |
int code_line; |
| 1764 |
} __Pyx_CodeObjectCacheEntry; |
| 1765 |
struct __Pyx_CodeObjectCache { |
| 1766 |
int count; |
| 1767 |
int max_count; |
| 1768 |
__Pyx_CodeObjectCacheEntry* entries; |
| 1769 |
}; |
| 1770 |
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; |
| 1771 |
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); |
| 1772 |
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line); |
| 1773 |
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object); |
| 1774 |
|
| 1775 |
|
| 1776 |
static void __Pyx_AddTraceback(const char *funcname, int c_line, |
| 1777 |
int py_line, const char *filename); |
| 1778 |
|
| 1779 |
|
| 1780 |
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) |
| 1781 |
#define __Pyx_HAS_GCC_DIAGNOSTIC |
| 1782 |
#endif |
| 1783 |
|
| 1784 |
|
| 1785 |
static int __Pyx_Print(PyObject*, PyObject *, int); |
| 1786 |
|
| 1787 |
|
| 1788 |
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *); |
| 1789 |
|
| 1790 |
|
| 1791 |
static int __Pyx_PrintOne(PyObject* stream, PyObject *o); |
| 1792 |
|
| 1793 |
|
| 1794 |
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); |
| 1795 |
#if CYTHON_VECTORCALL |
| 1796 |
#if PY_VERSION_HEX >= 0x03090000 |
| 1797 |
#define __Pyx_Object_Vectorcall_CallFromBuilder PyObject_Vectorcall |
| 1798 |
#else |
| 1799 |
#define __Pyx_Object_Vectorcall_CallFromBuilder _PyObject_Vectorcall |
| 1800 |
#endif |
| 1801 |
#define __Pyx_MakeVectorcallBuilderKwds(n) PyTuple_New(n) |
| 1802 |
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n); |
| 1803 |
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n); |
| 1804 |
#else |
| 1805 |
#define __Pyx_Object_Vectorcall_CallFromBuilder __Pyx_PyObject_FastCallDict |
| 1806 |
#define __Pyx_MakeVectorcallBuilderKwds(n) PyDict_New() |
| 1807 |
#define __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n) PyDict_SetItem(builder, key, value) |
| 1808 |
#define __Pyx_VectorcallBuilder_AddArgStr(key, value, builder, args, n) PyDict_SetItemString(builder, key, value) |
| 1809 |
#endif |
| 1810 |
|
| 1811 |
|
| 1812 |
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value); |
| 1813 |
|
| 1814 |
|
| 1815 |
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value); |
| 1816 |
|
| 1817 |
|
| 1818 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 1819 |
typedef PyObject *__Pyx_TypeName; |
| 1820 |
#define __Pyx_FMT_TYPENAME "%U" |
| 1821 |
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp); |
| 1822 |
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj) |
| 1823 |
#else |
| 1824 |
typedef const char *__Pyx_TypeName; |
| 1825 |
#define __Pyx_FMT_TYPENAME "%.200s" |
| 1826 |
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name) |
| 1827 |
#define __Pyx_DECREF_TypeName(obj) |
| 1828 |
#endif |
| 1829 |
|
| 1830 |
|
| 1831 |
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *); |
| 1832 |
|
| 1833 |
|
| 1834 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 1835 |
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) |
| 1836 |
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2) |
| 1837 |
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); |
| 1838 |
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b); |
| 1839 |
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); |
| 1840 |
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); |
| 1841 |
#else |
| 1842 |
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) |
| 1843 |
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2)) |
| 1844 |
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) |
| 1845 |
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2) { |
| 1846 |
return PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2); |
| 1847 |
} |
| 1848 |
#endif |
| 1849 |
#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2) |
| 1850 |
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) |
| 1851 |
#ifdef PyExceptionInstance_Check |
| 1852 |
#define __Pyx_PyBaseException_Check(obj) PyExceptionInstance_Check(obj) |
| 1853 |
#else |
| 1854 |
#define __Pyx_PyBaseException_Check(obj) __Pyx_TypeCheck(obj, PyExc_BaseException) |
| 1855 |
#endif |
| 1856 |
|
| 1857 |
|
| 1858 |
static unsigned long __Pyx_get_runtime_version(void); |
| 1859 |
|
| 1860 |
|
| 1861 |
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer); |
| 1862 |
|
| 1863 |
|
| 1864 |
|
| 1865 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 1866 |
#define __PYX_LIMITED_ABI_SUFFIX "limited" |
| 1867 |
#else |
| 1868 |
#define __PYX_LIMITED_ABI_SUFFIX |
| 1869 |
#endif |
| 1870 |
#ifndef __PYX_MONITORING_ABI_SUFFIX |
| 1871 |
#define __PYX_MONITORING_ABI_SUFFIX |
| 1872 |
#endif |
| 1873 |
#if CYTHON_USE_TP_FINALIZE |
| 1874 |
#define __PYX_TP_FINALIZE_ABI_SUFFIX |
| 1875 |
#else |
| 1876 |
#define __PYX_TP_FINALIZE_ABI_SUFFIX "nofinalize" |
| 1877 |
#endif |
| 1878 |
#if CYTHON_USE_FREELISTS || !defined(__Pyx_AsyncGen_USED) |
| 1879 |
#define __PYX_FREELISTS_ABI_SUFFIX |
| 1880 |
#else |
| 1881 |
#define __PYX_FREELISTS_ABI_SUFFIX "nofreelists" |
| 1882 |
#endif |
| 1883 |
#define CYTHON_ABI __PYX_ABI_VERSION __PYX_LIMITED_ABI_SUFFIX __PYX_MONITORING_ABI_SUFFIX __PYX_TP_FINALIZE_ABI_SUFFIX __PYX_FREELISTS_ABI_SUFFIX |
| 1884 |
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI |
| 1885 |
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." |
| 1886 |
|
| 1887 |
|
| 1888 |
|
| 1889 |
|
| 1890 |
|
| 1891 |
|
| 1892 |
|
| 1893 |
#define __Pyx_MODULE_NAME "builtin_min_max" |
| 1894 |
extern int __pyx_module_is_main_builtin_min_max; |
| 1895 |
int __pyx_module_is_main_builtin_min_max = 0; |
| 1896 |
|
| 1897 |
|
| 1898 |
|
| 1899 |
static PyObject *__pyx_builtin_super; |
| 1900 |
static PyObject *__pyx_builtin_max; |
| 1901 |
|
| 1902 |
static const char __pyx_k_[] = "?"; |
| 1903 |
static const char __pyx_k_A[] = "\200\001\360\036\000\005\021\220\002\220\"\220A"; |
| 1904 |
static const char __pyx_k_a[] = "a"; |
| 1905 |
static const char __pyx_k_b[] = "b"; |
| 1906 |
static const char __pyx_k_c[] = "c"; |
| 1907 |
static const char __pyx_k_x[] = "x"; |
| 1908 |
static const char __pyx_k_3aq[] = "\200\001\360\016\000\005\014\2103\210a\210q"; |
| 1909 |
static const char __pyx_k_doc[] = "__doc__"; |
| 1910 |
static const char __pyx_k_end[] = "end"; |
| 1911 |
static const char __pyx_k_len[] = "__len__"; |
| 1912 |
static const char __pyx_k_max[] = "max"; |
| 1913 |
static const char __pyx_k_r_1[] = "\200\001\360\036\000\005\020\210r\220\022\2201"; |
| 1914 |
static const char __pyx_k_file[] = "file"; |
| 1915 |
static const char __pyx_k_func[] = "__func__"; |
| 1916 |
static const char __pyx_k_main[] = "__main__"; |
| 1917 |
static const char __pyx_k_max1[] = "max1"; |
| 1918 |
static const char __pyx_k_max3[] = "max3"; |
| 1919 |
static const char __pyx_k_min3[] = "min3"; |
| 1920 |
static const char __pyx_k_name[] = "__name__"; |
| 1921 |
static const char __pyx_k_self[] = "self"; |
| 1922 |
static const char __pyx_k_print[] = "print"; |
| 1923 |
static const char __pyx_k_super[] = "super"; |
| 1924 |
static const char __pyx_k_module[] = "__module__"; |
| 1925 |
static const char __pyx_k_my_int[] = "my_int"; |
| 1926 |
static const char __pyx_k_my_list[] = "my_list"; |
| 1927 |
static const char __pyx_k_prepare[] = "__prepare__"; |
| 1928 |
static const char __pyx_k_my_pyint[] = "my_pyint"; |
| 1929 |
static const char __pyx_k_qualname[] = "__qualname__"; |
| 1930 |
static const char __pyx_k_A_a_uA_XQ[] = "\200A\330\010\016\210a\330\010\017\210u\220A\220[\240\005\240X\250Q"; |
| 1931 |
static const char __pyx_k_loud_list[] = "loud_list"; |
| 1932 |
static const char __pyx_k_metaclass[] = "__metaclass__"; |
| 1933 |
static const char __pyx_k_min3_list[] = "min3_list"; |
| 1934 |
static const char __pyx_k_test_max2[] = "test_max2"; |
| 1935 |
static const char __pyx_k_test_max3[] = "test_max3"; |
| 1936 |
static const char __pyx_k_test_maxN[] = "test_maxN"; |
| 1937 |
static const char __pyx_k_test_min2[] = "test_min2"; |
| 1938 |
static const char __pyx_k_test_min3[] = "test_min3"; |
| 1939 |
static const char __pyx_k_test_minN[] = "test_minN"; |
| 1940 |
static const char __pyx_k_max3_typed[] = "max3_typed"; |
| 1941 |
static const char __pyx_k_min3_tuple[] = "min3_tuple"; |
| 1942 |
static const char __pyx_k_min3_typed[] = "min3_typed"; |
| 1943 |
static const char __pyx_k_mro_entries[] = "__mro_entries__"; |
| 1944 |
static const char __pyx_k_is_coroutine[] = "_is_coroutine"; |
| 1945 |
static const char __pyx_k_literal_max3[] = "literal_max3"; |
| 1946 |
static const char __pyx_k_literal_min3[] = "literal_min3"; |
| 1947 |
static const char __pyx_k_calling___len[] = "calling __len__"; |
| 1948 |
static const char __pyx_k_builtin_min_max[] = "builtin_min_max"; |
| 1949 |
static const char __pyx_k_loud_list___len[] = "loud_list.__len__"; |
| 1950 |
static const char __pyx_k_4r_82Rxr_82Rxr_1[] = "\200\001\360\016\000\005\014\2104\210r\220\022\2208\2302\230R\230x\240r\250\022\2508\2602\260R\260x\270r\300\022\3001"; |
| 1951 |
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines"; |
| 1952 |
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; |
| 1953 |
static const char __pyx_k_a_1_1ARr_hj_1A_j_xt3aq[] = "\200\001\360\034\000\005\027\220a\330\004\033\2301\330\004\032\230)\2401\240A\240R\240r\250\021\340\004\016\210h\220j\240\003\2401\240A\330\004\016\210j\230\007\230x\240t\2503\250a\250q"; |
| 1954 |
static const char __pyx_k_a_1_1ARr_c_c_ha_ha_j_hc_c_A[] = "\200\001\360$\000\005\027\220a\330\004\033\2301\330\004\032\230)\2401\240A\240R\240r\250\021\340\004\016\210c\220\021\330\004\016\210c\220\021\330\004\016\210h\220a\340\004\016\210h\220a\330\004\016\210j\230\001\340\004\016\210h\220c\230\021\230!\330\004\016\210c\220\021\220*\230A"; |
| 1955 |
static const char __pyx_k_tests_run_builtin_min_max_pyx[] = "tests/run/builtin_min_max.pyx"; |
| 1956 |
static const char __pyx_k_a_1_1ARr_hc_Jhc_hhc_83aq_hhc_Jh[] = "\200\001\360\036\000\005\027\220a\330\004\033\2301\330\004\032\230)\2401\240A\240R\240r\250\021\340\004\016\210h\220c\230\030\240\023\240J\250h\260c\270\021\270!\330\004\016\210h\220h\230c\240\032\2508\2603\260a\260q\330\004\016\210h\220h\230c\240\030\250\023\250J\260h\270c\300\021\300!"; |
| 1957 |
|
| 1958 |
static PyObject *__pyx_pf_15builtin_min_max_9loud_list___len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); |
| 1959 |
static PyObject *__pyx_pf_15builtin_min_max_min3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c); |
| 1960 |
static PyObject *__pyx_pf_15builtin_min_max_2min3_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c); |
| 1961 |
static PyObject *__pyx_pf_15builtin_min_max_4min3_tuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c); |
| 1962 |
static PyObject *__pyx_pf_15builtin_min_max_6min3_typed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_a, int __pyx_v_b, int __pyx_v_c); |
| 1963 |
static PyObject *__pyx_pf_15builtin_min_max_8literal_min3(CYTHON_UNUSED PyObject *__pyx_self); |
| 1964 |
static PyObject *__pyx_pf_15builtin_min_max_10test_min2(CYTHON_UNUSED PyObject *__pyx_self); |
| 1965 |
static PyObject *__pyx_pf_15builtin_min_max_12test_min3(CYTHON_UNUSED PyObject *__pyx_self); |
| 1966 |
static PyObject *__pyx_pf_15builtin_min_max_14test_minN(CYTHON_UNUSED PyObject *__pyx_self); |
| 1967 |
static PyObject *__pyx_pf_15builtin_min_max_16max3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c); |
| 1968 |
static PyObject *__pyx_pf_15builtin_min_max_18max3_typed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_a, int __pyx_v_b, int __pyx_v_c); |
| 1969 |
static PyObject *__pyx_pf_15builtin_min_max_20literal_max3(CYTHON_UNUSED PyObject *__pyx_self); |
| 1970 |
static PyObject *__pyx_pf_15builtin_min_max_22max1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); |
| 1971 |
static PyObject *__pyx_pf_15builtin_min_max_24test_max2(CYTHON_UNUSED PyObject *__pyx_self); |
| 1972 |
static PyObject *__pyx_pf_15builtin_min_max_26test_max3(CYTHON_UNUSED PyObject *__pyx_self); |
| 1973 |
static PyObject *__pyx_pf_15builtin_min_max_28test_maxN(CYTHON_UNUSED PyObject *__pyx_self); |
| 1974 |
|
| 1975 |
|
| 1976 |
|
| 1977 |
#ifndef CYTHON_SMALL_CODE |
| 1978 |
#if defined(__clang__) |
| 1979 |
#define CYTHON_SMALL_CODE |
| 1980 |
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) |
| 1981 |
#define CYTHON_SMALL_CODE __attribute__((cold)) |
| 1982 |
#else |
| 1983 |
#define CYTHON_SMALL_CODE |
| 1984 |
#endif |
| 1985 |
#endif |
| 1986 |
|
| 1987 |
typedef struct { |
| 1988 |
PyObject *__pyx_d; |
| 1989 |
PyObject *__pyx_b; |
| 1990 |
PyObject *__pyx_cython_runtime; |
| 1991 |
PyObject *__pyx_empty_tuple; |
| 1992 |
PyObject *__pyx_empty_bytes; |
| 1993 |
PyObject *__pyx_empty_unicode; |
| 1994 |
#ifdef __Pyx_CyFunction_USED |
| 1995 |
PyTypeObject *__pyx_CyFunctionType; |
| 1996 |
#endif |
| 1997 |
#ifdef __Pyx_FusedFunction_USED |
| 1998 |
PyTypeObject *__pyx_FusedFunctionType; |
| 1999 |
#endif |
| 2000 |
#ifdef __Pyx_Generator_USED |
| 2001 |
PyTypeObject *__pyx_GeneratorType; |
| 2002 |
#endif |
| 2003 |
#ifdef __Pyx_IterableCoroutine_USED |
| 2004 |
PyTypeObject *__pyx_IterableCoroutineType; |
| 2005 |
#endif |
| 2006 |
#ifdef __Pyx_Coroutine_USED |
| 2007 |
PyTypeObject *__pyx_CoroutineAwaitType; |
| 2008 |
#endif |
| 2009 |
#ifdef __Pyx_Coroutine_USED |
| 2010 |
PyTypeObject *__pyx_CoroutineType; |
| 2011 |
#endif |
| 2012 |
PyObject *__pyx_codeobj_tab[16]; |
| 2013 |
PyObject *__pyx_string_tab[47]; |
| 2014 |
PyObject *__pyx_int_1; |
| 2015 |
PyObject *__pyx_int_2; |
| 2016 |
PyObject *__pyx_int_3; |
| 2017 |
|
| 2018 |
|
| 2019 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 2020 |
PyObject *__Pyx_CachedMethodType; |
| 2021 |
#endif |
| 2022 |
|
| 2023 |
|
| 2024 |
PyObject* __pyx_print; |
| 2025 |
PyObject* __pyx_print_kwargs; |
| 2026 |
|
| 2027 |
|
| 2028 |
} __pyx_mstatetype; |
| 2029 |
|
| 2030 |
#if CYTHON_USE_MODULE_STATE |
| 2031 |
#ifdef __cplusplus |
| 2032 |
namespace { |
| 2033 |
extern struct PyModuleDef __pyx_moduledef; |
| 2034 |
} |
| 2035 |
#else |
| 2036 |
static struct PyModuleDef __pyx_moduledef; |
| 2037 |
#endif |
| 2038 |
|
| 2039 |
#define __pyx_mstate_global (__Pyx_PyModule_GetState(PyState_FindModule(&__pyx_moduledef))) |
| 2040 |
|
| 2041 |
#define __pyx_m (PyState_FindModule(&__pyx_moduledef)) |
| 2042 |
#else |
| 2043 |
static __pyx_mstatetype __pyx_mstate_global_static = |
| 2044 |
#ifdef __cplusplus |
| 2045 |
{}; |
| 2046 |
#else |
| 2047 |
{0}; |
| 2048 |
#endif |
| 2049 |
static __pyx_mstatetype *__pyx_mstate_global = &__pyx_mstate_global_static; |
| 2050 |
#endif |
| 2051 |
|
| 2052 |
#define __pyx_kp_u_ __pyx_string_tab[0] |
| 2053 |
#define __pyx_n_u_a __pyx_string_tab[1] |
| 2054 |
#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[2] |
| 2055 |
#define __pyx_n_u_b __pyx_string_tab[3] |
| 2056 |
#define __pyx_n_u_builtin_min_max __pyx_string_tab[4] |
| 2057 |
#define __pyx_n_u_c __pyx_string_tab[5] |
| 2058 |
#define __pyx_kp_u_calling___len __pyx_string_tab[6] |
| 2059 |
#define __pyx_n_u_cline_in_traceback __pyx_string_tab[7] |
| 2060 |
#define __pyx_n_u_doc __pyx_string_tab[8] |
| 2061 |
#define __pyx_n_u_end __pyx_string_tab[9] |
| 2062 |
#define __pyx_n_u_file __pyx_string_tab[10] |
| 2063 |
#define __pyx_n_u_func __pyx_string_tab[11] |
| 2064 |
#define __pyx_n_u_is_coroutine __pyx_string_tab[12] |
| 2065 |
#define __pyx_n_u_len __pyx_string_tab[13] |
| 2066 |
#define __pyx_n_u_literal_max3 __pyx_string_tab[14] |
| 2067 |
#define __pyx_n_u_literal_min3 __pyx_string_tab[15] |
| 2068 |
#define __pyx_n_u_loud_list __pyx_string_tab[16] |
| 2069 |
#define __pyx_n_u_loud_list___len __pyx_string_tab[17] |
| 2070 |
#define __pyx_n_u_main __pyx_string_tab[18] |
| 2071 |
#define __pyx_n_u_max __pyx_string_tab[19] |
| 2072 |
#define __pyx_n_u_max1 __pyx_string_tab[20] |
| 2073 |
#define __pyx_n_u_max3 __pyx_string_tab[21] |
| 2074 |
#define __pyx_n_u_max3_typed __pyx_string_tab[22] |
| 2075 |
#define __pyx_n_u_metaclass __pyx_string_tab[23] |
| 2076 |
#define __pyx_n_u_min3 __pyx_string_tab[24] |
| 2077 |
#define __pyx_n_u_min3_list __pyx_string_tab[25] |
| 2078 |
#define __pyx_n_u_min3_tuple __pyx_string_tab[26] |
| 2079 |
#define __pyx_n_u_min3_typed __pyx_string_tab[27] |
| 2080 |
#define __pyx_n_u_module __pyx_string_tab[28] |
| 2081 |
#define __pyx_n_u_mro_entries __pyx_string_tab[29] |
| 2082 |
#define __pyx_n_u_my_int __pyx_string_tab[30] |
| 2083 |
#define __pyx_n_u_my_list __pyx_string_tab[31] |
| 2084 |
#define __pyx_n_u_my_pyint __pyx_string_tab[32] |
| 2085 |
#define __pyx_n_u_name __pyx_string_tab[33] |
| 2086 |
#define __pyx_n_u_prepare __pyx_string_tab[34] |
| 2087 |
#define __pyx_n_u_print __pyx_string_tab[35] |
| 2088 |
#define __pyx_n_u_qualname __pyx_string_tab[36] |
| 2089 |
#define __pyx_n_u_self __pyx_string_tab[37] |
| 2090 |
#define __pyx_n_u_super __pyx_string_tab[38] |
| 2091 |
#define __pyx_n_u_test_max2 __pyx_string_tab[39] |
| 2092 |
#define __pyx_n_u_test_max3 __pyx_string_tab[40] |
| 2093 |
#define __pyx_n_u_test_maxN __pyx_string_tab[41] |
| 2094 |
#define __pyx_n_u_test_min2 __pyx_string_tab[42] |
| 2095 |
#define __pyx_n_u_test_min3 __pyx_string_tab[43] |
| 2096 |
#define __pyx_n_u_test_minN __pyx_string_tab[44] |
| 2097 |
#define __pyx_kp_u_tests_run_builtin_min_max_pyx __pyx_string_tab[45] |
| 2098 |
#define __pyx_n_u_x __pyx_string_tab[46] |
| 2099 |
|
| 2100 |
#if CYTHON_USE_MODULE_STATE |
| 2101 |
static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { |
| 2102 |
__pyx_mstatetype *clear_module_state = __Pyx_PyModule_GetState(m); |
| 2103 |
if (!clear_module_state) return 0; |
| 2104 |
Py_CLEAR(clear_module_state->__pyx_d); |
| 2105 |
Py_CLEAR(clear_module_state->__pyx_b); |
| 2106 |
Py_CLEAR(clear_module_state->__pyx_cython_runtime); |
| 2107 |
Py_CLEAR(clear_module_state->__pyx_empty_tuple); |
| 2108 |
Py_CLEAR(clear_module_state->__pyx_empty_bytes); |
| 2109 |
Py_CLEAR(clear_module_state->__pyx_empty_unicode); |
| 2110 |
#ifdef __Pyx_CyFunction_USED |
| 2111 |
Py_CLEAR(clear_module_state->__pyx_CyFunctionType); |
| 2112 |
#endif |
| 2113 |
#ifdef __Pyx_FusedFunction_USED |
| 2114 |
Py_CLEAR(clear_module_state->__pyx_FusedFunctionType); |
| 2115 |
#endif |
| 2116 |
for (int i=0; i<16; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } |
| 2117 |
for (int i=0; i<47; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } |
| 2118 |
Py_CLEAR(clear_module_state->__pyx_int_1); |
| 2119 |
Py_CLEAR(clear_module_state->__pyx_int_2); |
| 2120 |
Py_CLEAR(clear_module_state->__pyx_int_3); |
| 2121 |
return 0; |
| 2122 |
} |
| 2123 |
#endif |
| 2124 |
|
| 2125 |
#if CYTHON_USE_MODULE_STATE |
| 2126 |
static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { |
| 2127 |
__pyx_mstatetype *traverse_module_state = __Pyx_PyModule_GetState(m); |
| 2128 |
if (!traverse_module_state) return 0; |
| 2129 |
Py_VISIT(traverse_module_state->__pyx_d); |
| 2130 |
Py_VISIT(traverse_module_state->__pyx_b); |
| 2131 |
Py_VISIT(traverse_module_state->__pyx_cython_runtime); |
| 2132 |
__Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_tuple); |
| 2133 |
__Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_bytes); |
| 2134 |
__Pyx_VISIT_CONST(traverse_module_state->__pyx_empty_unicode); |
| 2135 |
#ifdef __Pyx_CyFunction_USED |
| 2136 |
Py_VISIT(traverse_module_state->__pyx_CyFunctionType); |
| 2137 |
#endif |
| 2138 |
#ifdef __Pyx_FusedFunction_USED |
| 2139 |
Py_VISIT(traverse_module_state->__pyx_FusedFunctionType); |
| 2140 |
#endif |
| 2141 |
for (int i=0; i<16; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } |
| 2142 |
for (int i=0; i<47; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } |
| 2143 |
__Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1); |
| 2144 |
__Pyx_VISIT_CONST(traverse_module_state->__pyx_int_2); |
| 2145 |
__Pyx_VISIT_CONST(traverse_module_state->__pyx_int_3); |
| 2146 |
return 0; |
| 2147 |
} |
| 2148 |
#endif |
| 2149 |
|
| 2150 |
|
| 2151 |
|
| 2152 |
|
| 2153 |
|
| 2154 |
|
| 2155 |
|
| 2156 |
|
| 2157 |
|
| 2158 |
|
| 2159 |
|
| 2160 |
static PyObject *__pyx_pw_15builtin_min_max_9loud_list_1__len__(PyObject *__pyx_self, |
| 2161 |
#if CYTHON_METH_FASTCALL |
| 2162 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2163 |
#else |
| 2164 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2165 |
#endif |
| 2166 |
); |
| 2167 |
static PyMethodDef __pyx_mdef_15builtin_min_max_9loud_list_1__len__ = {"__len__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_9loud_list_1__len__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; |
| 2168 |
static PyObject *__pyx_pw_15builtin_min_max_9loud_list_1__len__(PyObject *__pyx_self, |
| 2169 |
#if CYTHON_METH_FASTCALL |
| 2170 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2171 |
#else |
| 2172 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2173 |
#endif |
| 2174 |
) { |
| 2175 |
PyObject *__pyx_v_self = 0; |
| 2176 |
#if !CYTHON_METH_FASTCALL |
| 2177 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 2178 |
#endif |
| 2179 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 2180 |
PyObject* values[1] = {0}; |
| 2181 |
int __pyx_lineno = 0; |
| 2182 |
const char *__pyx_filename = NULL; |
| 2183 |
int __pyx_clineno = 0; |
| 2184 |
PyObject *__pyx_r = 0; |
| 2185 |
__Pyx_RefNannyDeclarations |
| 2186 |
__Pyx_RefNannySetupContext("__len__ (wrapper)", 0); |
| 2187 |
#if !CYTHON_METH_FASTCALL |
| 2188 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 2189 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 2190 |
#else |
| 2191 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 2192 |
#endif |
| 2193 |
#endif |
| 2194 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 2195 |
{ |
| 2196 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_self,0}; |
| 2197 |
if (__pyx_kwds) { |
| 2198 |
Py_ssize_t kw_args; |
| 2199 |
switch (__pyx_nargs) { |
| 2200 |
case 1: |
| 2201 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2202 |
CYTHON_FALLTHROUGH; |
| 2203 |
case 0: break; |
| 2204 |
default: goto __pyx_L5_argtuple_error; |
| 2205 |
} |
| 2206 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 2207 |
switch (__pyx_nargs) { |
| 2208 |
case 0: |
| 2209 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_self)) != 0)) { |
| 2210 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 2211 |
kw_args--; |
| 2212 |
} |
| 2213 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 8, __pyx_L3_error) |
| 2214 |
else goto __pyx_L5_argtuple_error; |
| 2215 |
} |
| 2216 |
if (unlikely(kw_args > 0)) { |
| 2217 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 2218 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__len__") < 0)) __PYX_ERR(0, 8, __pyx_L3_error) |
| 2219 |
} |
| 2220 |
} else if (unlikely(__pyx_nargs != 1)) { |
| 2221 |
goto __pyx_L5_argtuple_error; |
| 2222 |
} else { |
| 2223 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2224 |
} |
| 2225 |
__pyx_v_self = values[0]; |
| 2226 |
} |
| 2227 |
goto __pyx_L6_skip; |
| 2228 |
__pyx_L5_argtuple_error:; |
| 2229 |
__Pyx_RaiseArgtupleInvalid("__len__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 8, __pyx_L3_error) |
| 2230 |
__pyx_L6_skip:; |
| 2231 |
goto __pyx_L4_argument_unpacking_done; |
| 2232 |
__pyx_L3_error:; |
| 2233 |
{ |
| 2234 |
Py_ssize_t __pyx_temp; |
| 2235 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2236 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2237 |
} |
| 2238 |
} |
| 2239 |
__Pyx_AddTraceback("builtin_min_max.loud_list.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2240 |
__Pyx_RefNannyFinishContext(); |
| 2241 |
return NULL; |
| 2242 |
__pyx_L4_argument_unpacking_done:; |
| 2243 |
__pyx_r = __pyx_pf_15builtin_min_max_9loud_list___len__(__pyx_self, __pyx_v_self); |
| 2244 |
|
| 2245 |
|
| 2246 |
{ |
| 2247 |
Py_ssize_t __pyx_temp; |
| 2248 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2249 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2250 |
} |
| 2251 |
} |
| 2252 |
__Pyx_RefNannyFinishContext(); |
| 2253 |
return __pyx_r; |
| 2254 |
} |
| 2255 |
|
| 2256 |
static PyObject *__pyx_pf_15builtin_min_max_9loud_list___len__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { |
| 2257 |
PyObject *__pyx_r = NULL; |
| 2258 |
__Pyx_RefNannyDeclarations |
| 2259 |
PyObject *__pyx_t_1 = NULL; |
| 2260 |
PyObject *__pyx_t_2 = NULL; |
| 2261 |
int __pyx_lineno = 0; |
| 2262 |
const char *__pyx_filename = NULL; |
| 2263 |
int __pyx_clineno = 0; |
| 2264 |
__Pyx_RefNannySetupContext("__len__", 0); |
| 2265 |
|
| 2266 |
|
| 2267 |
|
| 2268 |
|
| 2269 |
|
| 2270 |
|
| 2271 |
|
| 2272 |
|
| 2273 |
if (__Pyx_PrintOne(0, __pyx_mstate_global->__pyx_kp_u_calling___len) < 0) __PYX_ERR(0, 9, __pyx_L1_error) |
| 2274 |
|
| 2275 |
|
| 2276 |
|
| 2277 |
|
| 2278 |
|
| 2279 |
|
| 2280 |
|
| 2281 |
|
| 2282 |
__Pyx_XDECREF(__pyx_r); |
| 2283 |
|
| 2284 |
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) |
| 2285 |
__Pyx_GOTREF(__pyx_t_1); |
| 2286 |
|
| 2287 |
__pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) |
| 2288 |
__Pyx_GOTREF(__pyx_t_2); |
| 2289 |
__Pyx_GIVEREF(__pyx_t_1); |
| 2290 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 10, __pyx_L1_error); |
| 2291 |
__Pyx_INCREF(__pyx_v_self); |
| 2292 |
__Pyx_GIVEREF(__pyx_v_self); |
| 2293 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self) != (0)) __PYX_ERR(0, 10, __pyx_L1_error); |
| 2294 |
__pyx_t_1 = 0; |
| 2295 |
|
| 2296 |
|
| 2297 |
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) |
| 2298 |
__Pyx_GOTREF(__pyx_t_1); |
| 2299 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 2300 |
|
| 2301 |
|
| 2302 |
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) |
| 2303 |
__Pyx_GOTREF(__pyx_t_2); |
| 2304 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 2305 |
|
| 2306 |
|
| 2307 |
__pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) |
| 2308 |
__Pyx_GOTREF(__pyx_t_1); |
| 2309 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 2310 |
|
| 2311 |
__pyx_r = __pyx_t_1; |
| 2312 |
__pyx_t_1 = 0; |
| 2313 |
|
| 2314 |
goto __pyx_L0; |
| 2315 |
|
| 2316 |
|
| 2317 |
|
| 2318 |
|
| 2319 |
|
| 2320 |
|
| 2321 |
|
| 2322 |
|
| 2323 |
|
| 2324 |
|
| 2325 |
__pyx_L1_error:; |
| 2326 |
__Pyx_XDECREF(__pyx_t_1); |
| 2327 |
__Pyx_XDECREF(__pyx_t_2); |
| 2328 |
__Pyx_AddTraceback("builtin_min_max.loud_list.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2329 |
__pyx_r = NULL; |
| 2330 |
__pyx_L0:; |
| 2331 |
__Pyx_XGIVEREF(__pyx_r); |
| 2332 |
__Pyx_RefNannyFinishContext(); |
| 2333 |
return __pyx_r; |
| 2334 |
} |
| 2335 |
|
| 2336 |
|
| 2337 |
|
| 2338 |
|
| 2339 |
|
| 2340 |
|
| 2341 |
|
| 2342 |
|
| 2343 |
|
| 2344 |
|
| 2345 |
static PyObject *__pyx_pw_15builtin_min_max_1min3(PyObject *__pyx_self, |
| 2346 |
#if CYTHON_METH_FASTCALL |
| 2347 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2348 |
#else |
| 2349 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2350 |
#endif |
| 2351 |
); |
| 2352 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_min3, "\n >>> min3(1,2,3)\n 1\n >>> min3(2,3,1)\n 1\n >>> min3(2,1,3)\n 1\n >>> min3(3,1,2)\n 1\n >>> min3(3,2,1)\n 1\n "); |
| 2353 |
static PyMethodDef __pyx_mdef_15builtin_min_max_1min3 = {"min3", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_1min3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_min3}; |
| 2354 |
static PyObject *__pyx_pw_15builtin_min_max_1min3(PyObject *__pyx_self, |
| 2355 |
#if CYTHON_METH_FASTCALL |
| 2356 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2357 |
#else |
| 2358 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2359 |
#endif |
| 2360 |
) { |
| 2361 |
PyObject *__pyx_v_a = 0; |
| 2362 |
PyObject *__pyx_v_b = 0; |
| 2363 |
PyObject *__pyx_v_c = 0; |
| 2364 |
#if !CYTHON_METH_FASTCALL |
| 2365 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 2366 |
#endif |
| 2367 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 2368 |
PyObject* values[3] = {0,0,0}; |
| 2369 |
int __pyx_lineno = 0; |
| 2370 |
const char *__pyx_filename = NULL; |
| 2371 |
int __pyx_clineno = 0; |
| 2372 |
PyObject *__pyx_r = 0; |
| 2373 |
__Pyx_RefNannyDeclarations |
| 2374 |
__Pyx_RefNannySetupContext("min3 (wrapper)", 0); |
| 2375 |
#if !CYTHON_METH_FASTCALL |
| 2376 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 2377 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 2378 |
#else |
| 2379 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 2380 |
#endif |
| 2381 |
#endif |
| 2382 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 2383 |
{ |
| 2384 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,0}; |
| 2385 |
if (__pyx_kwds) { |
| 2386 |
Py_ssize_t kw_args; |
| 2387 |
switch (__pyx_nargs) { |
| 2388 |
case 3: |
| 2389 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 2390 |
CYTHON_FALLTHROUGH; |
| 2391 |
case 2: |
| 2392 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 2393 |
CYTHON_FALLTHROUGH; |
| 2394 |
case 1: |
| 2395 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2396 |
CYTHON_FALLTHROUGH; |
| 2397 |
case 0: break; |
| 2398 |
default: goto __pyx_L5_argtuple_error; |
| 2399 |
} |
| 2400 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 2401 |
switch (__pyx_nargs) { |
| 2402 |
case 0: |
| 2403 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_a)) != 0)) { |
| 2404 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 2405 |
kw_args--; |
| 2406 |
} |
| 2407 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 15, __pyx_L3_error) |
| 2408 |
else goto __pyx_L5_argtuple_error; |
| 2409 |
CYTHON_FALLTHROUGH; |
| 2410 |
case 1: |
| 2411 |
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_b)) != 0)) { |
| 2412 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]); |
| 2413 |
kw_args--; |
| 2414 |
} |
| 2415 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 15, __pyx_L3_error) |
| 2416 |
else { |
| 2417 |
__Pyx_RaiseArgtupleInvalid("min3", 1, 3, 3, 1); __PYX_ERR(0, 15, __pyx_L3_error) |
| 2418 |
} |
| 2419 |
CYTHON_FALLTHROUGH; |
| 2420 |
case 2: |
| 2421 |
if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_c)) != 0)) { |
| 2422 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]); |
| 2423 |
kw_args--; |
| 2424 |
} |
| 2425 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 15, __pyx_L3_error) |
| 2426 |
else { |
| 2427 |
__Pyx_RaiseArgtupleInvalid("min3", 1, 3, 3, 2); __PYX_ERR(0, 15, __pyx_L3_error) |
| 2428 |
} |
| 2429 |
} |
| 2430 |
if (unlikely(kw_args > 0)) { |
| 2431 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 2432 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "min3") < 0)) __PYX_ERR(0, 15, __pyx_L3_error) |
| 2433 |
} |
| 2434 |
} else if (unlikely(__pyx_nargs != 3)) { |
| 2435 |
goto __pyx_L5_argtuple_error; |
| 2436 |
} else { |
| 2437 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2438 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 2439 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 2440 |
} |
| 2441 |
__pyx_v_a = values[0]; |
| 2442 |
__pyx_v_b = values[1]; |
| 2443 |
__pyx_v_c = values[2]; |
| 2444 |
} |
| 2445 |
goto __pyx_L6_skip; |
| 2446 |
__pyx_L5_argtuple_error:; |
| 2447 |
__Pyx_RaiseArgtupleInvalid("min3", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 15, __pyx_L3_error) |
| 2448 |
__pyx_L6_skip:; |
| 2449 |
goto __pyx_L4_argument_unpacking_done; |
| 2450 |
__pyx_L3_error:; |
| 2451 |
{ |
| 2452 |
Py_ssize_t __pyx_temp; |
| 2453 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2454 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2455 |
} |
| 2456 |
} |
| 2457 |
__Pyx_AddTraceback("builtin_min_max.min3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2458 |
__Pyx_RefNannyFinishContext(); |
| 2459 |
return NULL; |
| 2460 |
__pyx_L4_argument_unpacking_done:; |
| 2461 |
__pyx_r = __pyx_pf_15builtin_min_max_min3(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c); |
| 2462 |
|
| 2463 |
|
| 2464 |
{ |
| 2465 |
Py_ssize_t __pyx_temp; |
| 2466 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2467 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2468 |
} |
| 2469 |
} |
| 2470 |
__Pyx_RefNannyFinishContext(); |
| 2471 |
return __pyx_r; |
| 2472 |
} |
| 2473 |
|
| 2474 |
static PyObject *__pyx_pf_15builtin_min_max_min3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { |
| 2475 |
PyObject *__pyx_r = NULL; |
| 2476 |
__Pyx_RefNannyDeclarations |
| 2477 |
PyObject *__pyx_t_1 = NULL; |
| 2478 |
PyObject *__pyx_t_2 = NULL; |
| 2479 |
PyObject *__pyx_t_3 = NULL; |
| 2480 |
PyObject *__pyx_t_4 = NULL; |
| 2481 |
PyObject *__pyx_t_5 = NULL; |
| 2482 |
int __pyx_t_6; |
| 2483 |
int __pyx_lineno = 0; |
| 2484 |
const char *__pyx_filename = NULL; |
| 2485 |
int __pyx_clineno = 0; |
| 2486 |
__Pyx_RefNannySetupContext("min3", 0); |
| 2487 |
|
| 2488 |
|
| 2489 |
|
| 2490 |
|
| 2491 |
|
| 2492 |
|
| 2493 |
|
| 2494 |
|
| 2495 |
__Pyx_XDECREF(__pyx_r); |
| 2496 |
__Pyx_INCREF(__pyx_v_b); |
| 2497 |
|
| 2498 |
__pyx_t_1 = __pyx_v_b; |
| 2499 |
__Pyx_INCREF(__pyx_v_c); |
| 2500 |
|
| 2501 |
__pyx_t_2 = __pyx_v_c; |
| 2502 |
__Pyx_INCREF(__pyx_v_a); |
| 2503 |
|
| 2504 |
__pyx_t_3 = __pyx_v_a; |
| 2505 |
|
| 2506 |
|
| 2507 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error) |
| 2508 |
|
| 2509 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 30, __pyx_L1_error) |
| 2510 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 2511 |
|
| 2512 |
if (__pyx_t_6) { |
| 2513 |
__Pyx_INCREF(__pyx_t_1); |
| 2514 |
__pyx_t_4 = __pyx_t_1; |
| 2515 |
} else { |
| 2516 |
__Pyx_INCREF(__pyx_t_3); |
| 2517 |
__pyx_t_4 = __pyx_t_3; |
| 2518 |
} |
| 2519 |
|
| 2520 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 2521 |
|
| 2522 |
__Pyx_INCREF(__pyx_t_4); |
| 2523 |
|
| 2524 |
__pyx_t_3 = __pyx_t_4; |
| 2525 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 2526 |
|
| 2527 |
|
| 2528 |
|
| 2529 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 30, __pyx_L1_error) |
| 2530 |
|
| 2531 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 30, __pyx_L1_error) |
| 2532 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 2533 |
|
| 2534 |
if (__pyx_t_6) { |
| 2535 |
__Pyx_INCREF(__pyx_t_2); |
| 2536 |
__pyx_t_4 = __pyx_t_2; |
| 2537 |
} else { |
| 2538 |
__Pyx_INCREF(__pyx_t_3); |
| 2539 |
__pyx_t_4 = __pyx_t_3; |
| 2540 |
} |
| 2541 |
|
| 2542 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 2543 |
|
| 2544 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 2545 |
|
| 2546 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 2547 |
|
| 2548 |
__Pyx_INCREF(__pyx_t_4); |
| 2549 |
__pyx_r = __pyx_t_4; |
| 2550 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 2551 |
|
| 2552 |
goto __pyx_L0; |
| 2553 |
|
| 2554 |
|
| 2555 |
|
| 2556 |
|
| 2557 |
|
| 2558 |
|
| 2559 |
|
| 2560 |
|
| 2561 |
|
| 2562 |
|
| 2563 |
__pyx_L1_error:; |
| 2564 |
__Pyx_XDECREF(__pyx_t_1); |
| 2565 |
__Pyx_XDECREF(__pyx_t_2); |
| 2566 |
__Pyx_XDECREF(__pyx_t_3); |
| 2567 |
__Pyx_XDECREF(__pyx_t_4); |
| 2568 |
__Pyx_XDECREF(__pyx_t_5); |
| 2569 |
__Pyx_AddTraceback("builtin_min_max.min3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2570 |
__pyx_r = NULL; |
| 2571 |
__pyx_L0:; |
| 2572 |
__Pyx_XGIVEREF(__pyx_r); |
| 2573 |
__Pyx_RefNannyFinishContext(); |
| 2574 |
return __pyx_r; |
| 2575 |
} |
| 2576 |
|
| 2577 |
|
| 2578 |
|
| 2579 |
|
| 2580 |
|
| 2581 |
|
| 2582 |
|
| 2583 |
|
| 2584 |
|
| 2585 |
|
| 2586 |
static PyObject *__pyx_pw_15builtin_min_max_3min3_list(PyObject *__pyx_self, |
| 2587 |
#if CYTHON_METH_FASTCALL |
| 2588 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2589 |
#else |
| 2590 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2591 |
#endif |
| 2592 |
); |
| 2593 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_2min3_list, "\n >>> min3_list(1,2,3)\n 1\n >>> min3_list(2,3,1)\n 1\n >>> min3_list(2,1,3)\n 1\n >>> min3_list(3,1,2)\n 1\n >>> min3_list(3,2,1)\n 1\n "); |
| 2594 |
static PyMethodDef __pyx_mdef_15builtin_min_max_3min3_list = {"min3_list", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_3min3_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_2min3_list}; |
| 2595 |
static PyObject *__pyx_pw_15builtin_min_max_3min3_list(PyObject *__pyx_self, |
| 2596 |
#if CYTHON_METH_FASTCALL |
| 2597 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2598 |
#else |
| 2599 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2600 |
#endif |
| 2601 |
) { |
| 2602 |
PyObject *__pyx_v_a = 0; |
| 2603 |
PyObject *__pyx_v_b = 0; |
| 2604 |
PyObject *__pyx_v_c = 0; |
| 2605 |
#if !CYTHON_METH_FASTCALL |
| 2606 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 2607 |
#endif |
| 2608 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 2609 |
PyObject* values[3] = {0,0,0}; |
| 2610 |
int __pyx_lineno = 0; |
| 2611 |
const char *__pyx_filename = NULL; |
| 2612 |
int __pyx_clineno = 0; |
| 2613 |
PyObject *__pyx_r = 0; |
| 2614 |
__Pyx_RefNannyDeclarations |
| 2615 |
__Pyx_RefNannySetupContext("min3_list (wrapper)", 0); |
| 2616 |
#if !CYTHON_METH_FASTCALL |
| 2617 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 2618 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 2619 |
#else |
| 2620 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 2621 |
#endif |
| 2622 |
#endif |
| 2623 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 2624 |
{ |
| 2625 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,0}; |
| 2626 |
if (__pyx_kwds) { |
| 2627 |
Py_ssize_t kw_args; |
| 2628 |
switch (__pyx_nargs) { |
| 2629 |
case 3: |
| 2630 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 2631 |
CYTHON_FALLTHROUGH; |
| 2632 |
case 2: |
| 2633 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 2634 |
CYTHON_FALLTHROUGH; |
| 2635 |
case 1: |
| 2636 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2637 |
CYTHON_FALLTHROUGH; |
| 2638 |
case 0: break; |
| 2639 |
default: goto __pyx_L5_argtuple_error; |
| 2640 |
} |
| 2641 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 2642 |
switch (__pyx_nargs) { |
| 2643 |
case 0: |
| 2644 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_a)) != 0)) { |
| 2645 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 2646 |
kw_args--; |
| 2647 |
} |
| 2648 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error) |
| 2649 |
else goto __pyx_L5_argtuple_error; |
| 2650 |
CYTHON_FALLTHROUGH; |
| 2651 |
case 1: |
| 2652 |
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_b)) != 0)) { |
| 2653 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]); |
| 2654 |
kw_args--; |
| 2655 |
} |
| 2656 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error) |
| 2657 |
else { |
| 2658 |
__Pyx_RaiseArgtupleInvalid("min3_list", 1, 3, 3, 1); __PYX_ERR(0, 33, __pyx_L3_error) |
| 2659 |
} |
| 2660 |
CYTHON_FALLTHROUGH; |
| 2661 |
case 2: |
| 2662 |
if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_c)) != 0)) { |
| 2663 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]); |
| 2664 |
kw_args--; |
| 2665 |
} |
| 2666 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L3_error) |
| 2667 |
else { |
| 2668 |
__Pyx_RaiseArgtupleInvalid("min3_list", 1, 3, 3, 2); __PYX_ERR(0, 33, __pyx_L3_error) |
| 2669 |
} |
| 2670 |
} |
| 2671 |
if (unlikely(kw_args > 0)) { |
| 2672 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 2673 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "min3_list") < 0)) __PYX_ERR(0, 33, __pyx_L3_error) |
| 2674 |
} |
| 2675 |
} else if (unlikely(__pyx_nargs != 3)) { |
| 2676 |
goto __pyx_L5_argtuple_error; |
| 2677 |
} else { |
| 2678 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2679 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 2680 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 2681 |
} |
| 2682 |
__pyx_v_a = values[0]; |
| 2683 |
__pyx_v_b = values[1]; |
| 2684 |
__pyx_v_c = values[2]; |
| 2685 |
} |
| 2686 |
goto __pyx_L6_skip; |
| 2687 |
__pyx_L5_argtuple_error:; |
| 2688 |
__Pyx_RaiseArgtupleInvalid("min3_list", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 33, __pyx_L3_error) |
| 2689 |
__pyx_L6_skip:; |
| 2690 |
goto __pyx_L4_argument_unpacking_done; |
| 2691 |
__pyx_L3_error:; |
| 2692 |
{ |
| 2693 |
Py_ssize_t __pyx_temp; |
| 2694 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2695 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2696 |
} |
| 2697 |
} |
| 2698 |
__Pyx_AddTraceback("builtin_min_max.min3_list", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2699 |
__Pyx_RefNannyFinishContext(); |
| 2700 |
return NULL; |
| 2701 |
__pyx_L4_argument_unpacking_done:; |
| 2702 |
__pyx_r = __pyx_pf_15builtin_min_max_2min3_list(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c); |
| 2703 |
|
| 2704 |
|
| 2705 |
{ |
| 2706 |
Py_ssize_t __pyx_temp; |
| 2707 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2708 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2709 |
} |
| 2710 |
} |
| 2711 |
__Pyx_RefNannyFinishContext(); |
| 2712 |
return __pyx_r; |
| 2713 |
} |
| 2714 |
|
| 2715 |
static PyObject *__pyx_pf_15builtin_min_max_2min3_list(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { |
| 2716 |
PyObject *__pyx_r = NULL; |
| 2717 |
__Pyx_RefNannyDeclarations |
| 2718 |
PyObject *__pyx_t_1 = NULL; |
| 2719 |
PyObject *__pyx_t_2 = NULL; |
| 2720 |
PyObject *__pyx_t_3 = NULL; |
| 2721 |
PyObject *__pyx_t_4 = NULL; |
| 2722 |
PyObject *__pyx_t_5 = NULL; |
| 2723 |
int __pyx_t_6; |
| 2724 |
int __pyx_lineno = 0; |
| 2725 |
const char *__pyx_filename = NULL; |
| 2726 |
int __pyx_clineno = 0; |
| 2727 |
__Pyx_RefNannySetupContext("min3_list", 0); |
| 2728 |
|
| 2729 |
|
| 2730 |
|
| 2731 |
|
| 2732 |
|
| 2733 |
|
| 2734 |
|
| 2735 |
|
| 2736 |
__Pyx_XDECREF(__pyx_r); |
| 2737 |
__Pyx_INCREF(__pyx_v_b); |
| 2738 |
|
| 2739 |
__pyx_t_1 = __pyx_v_b; |
| 2740 |
__Pyx_INCREF(__pyx_v_c); |
| 2741 |
|
| 2742 |
__pyx_t_2 = __pyx_v_c; |
| 2743 |
__Pyx_INCREF(__pyx_v_a); |
| 2744 |
|
| 2745 |
__pyx_t_3 = __pyx_v_a; |
| 2746 |
|
| 2747 |
|
| 2748 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error) |
| 2749 |
|
| 2750 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) |
| 2751 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 2752 |
|
| 2753 |
if (__pyx_t_6) { |
| 2754 |
__Pyx_INCREF(__pyx_t_1); |
| 2755 |
__pyx_t_4 = __pyx_t_1; |
| 2756 |
} else { |
| 2757 |
__Pyx_INCREF(__pyx_t_3); |
| 2758 |
__pyx_t_4 = __pyx_t_3; |
| 2759 |
} |
| 2760 |
|
| 2761 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 2762 |
|
| 2763 |
__Pyx_INCREF(__pyx_t_4); |
| 2764 |
|
| 2765 |
__pyx_t_3 = __pyx_t_4; |
| 2766 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 2767 |
|
| 2768 |
|
| 2769 |
|
| 2770 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 48, __pyx_L1_error) |
| 2771 |
|
| 2772 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 48, __pyx_L1_error) |
| 2773 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 2774 |
|
| 2775 |
if (__pyx_t_6) { |
| 2776 |
__Pyx_INCREF(__pyx_t_2); |
| 2777 |
__pyx_t_4 = __pyx_t_2; |
| 2778 |
} else { |
| 2779 |
__Pyx_INCREF(__pyx_t_3); |
| 2780 |
__pyx_t_4 = __pyx_t_3; |
| 2781 |
} |
| 2782 |
|
| 2783 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 2784 |
|
| 2785 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 2786 |
|
| 2787 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 2788 |
|
| 2789 |
__Pyx_INCREF(__pyx_t_4); |
| 2790 |
__pyx_r = __pyx_t_4; |
| 2791 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 2792 |
|
| 2793 |
goto __pyx_L0; |
| 2794 |
|
| 2795 |
|
| 2796 |
|
| 2797 |
|
| 2798 |
|
| 2799 |
|
| 2800 |
|
| 2801 |
|
| 2802 |
|
| 2803 |
|
| 2804 |
__pyx_L1_error:; |
| 2805 |
__Pyx_XDECREF(__pyx_t_1); |
| 2806 |
__Pyx_XDECREF(__pyx_t_2); |
| 2807 |
__Pyx_XDECREF(__pyx_t_3); |
| 2808 |
__Pyx_XDECREF(__pyx_t_4); |
| 2809 |
__Pyx_XDECREF(__pyx_t_5); |
| 2810 |
__Pyx_AddTraceback("builtin_min_max.min3_list", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2811 |
__pyx_r = NULL; |
| 2812 |
__pyx_L0:; |
| 2813 |
__Pyx_XGIVEREF(__pyx_r); |
| 2814 |
__Pyx_RefNannyFinishContext(); |
| 2815 |
return __pyx_r; |
| 2816 |
} |
| 2817 |
|
| 2818 |
|
| 2819 |
|
| 2820 |
|
| 2821 |
|
| 2822 |
|
| 2823 |
|
| 2824 |
|
| 2825 |
|
| 2826 |
|
| 2827 |
static PyObject *__pyx_pw_15builtin_min_max_5min3_tuple(PyObject *__pyx_self, |
| 2828 |
#if CYTHON_METH_FASTCALL |
| 2829 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2830 |
#else |
| 2831 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2832 |
#endif |
| 2833 |
); |
| 2834 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_4min3_tuple, "\n >>> min3_tuple(1,2,3)\n 1\n >>> min3_tuple(2,3,1)\n 1\n >>> min3_tuple(2,1,3)\n 1\n >>> min3_tuple(3,1,2)\n 1\n >>> min3_tuple(3,2,1)\n 1\n "); |
| 2835 |
static PyMethodDef __pyx_mdef_15builtin_min_max_5min3_tuple = {"min3_tuple", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_5min3_tuple, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_4min3_tuple}; |
| 2836 |
static PyObject *__pyx_pw_15builtin_min_max_5min3_tuple(PyObject *__pyx_self, |
| 2837 |
#if CYTHON_METH_FASTCALL |
| 2838 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 2839 |
#else |
| 2840 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 2841 |
#endif |
| 2842 |
) { |
| 2843 |
PyObject *__pyx_v_a = 0; |
| 2844 |
PyObject *__pyx_v_b = 0; |
| 2845 |
PyObject *__pyx_v_c = 0; |
| 2846 |
#if !CYTHON_METH_FASTCALL |
| 2847 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 2848 |
#endif |
| 2849 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 2850 |
PyObject* values[3] = {0,0,0}; |
| 2851 |
int __pyx_lineno = 0; |
| 2852 |
const char *__pyx_filename = NULL; |
| 2853 |
int __pyx_clineno = 0; |
| 2854 |
PyObject *__pyx_r = 0; |
| 2855 |
__Pyx_RefNannyDeclarations |
| 2856 |
__Pyx_RefNannySetupContext("min3_tuple (wrapper)", 0); |
| 2857 |
#if !CYTHON_METH_FASTCALL |
| 2858 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 2859 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 2860 |
#else |
| 2861 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 2862 |
#endif |
| 2863 |
#endif |
| 2864 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 2865 |
{ |
| 2866 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,0}; |
| 2867 |
if (__pyx_kwds) { |
| 2868 |
Py_ssize_t kw_args; |
| 2869 |
switch (__pyx_nargs) { |
| 2870 |
case 3: |
| 2871 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 2872 |
CYTHON_FALLTHROUGH; |
| 2873 |
case 2: |
| 2874 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 2875 |
CYTHON_FALLTHROUGH; |
| 2876 |
case 1: |
| 2877 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2878 |
CYTHON_FALLTHROUGH; |
| 2879 |
case 0: break; |
| 2880 |
default: goto __pyx_L5_argtuple_error; |
| 2881 |
} |
| 2882 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 2883 |
switch (__pyx_nargs) { |
| 2884 |
case 0: |
| 2885 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_a)) != 0)) { |
| 2886 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 2887 |
kw_args--; |
| 2888 |
} |
| 2889 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L3_error) |
| 2890 |
else goto __pyx_L5_argtuple_error; |
| 2891 |
CYTHON_FALLTHROUGH; |
| 2892 |
case 1: |
| 2893 |
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_b)) != 0)) { |
| 2894 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]); |
| 2895 |
kw_args--; |
| 2896 |
} |
| 2897 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L3_error) |
| 2898 |
else { |
| 2899 |
__Pyx_RaiseArgtupleInvalid("min3_tuple", 1, 3, 3, 1); __PYX_ERR(0, 51, __pyx_L3_error) |
| 2900 |
} |
| 2901 |
CYTHON_FALLTHROUGH; |
| 2902 |
case 2: |
| 2903 |
if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_c)) != 0)) { |
| 2904 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]); |
| 2905 |
kw_args--; |
| 2906 |
} |
| 2907 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 51, __pyx_L3_error) |
| 2908 |
else { |
| 2909 |
__Pyx_RaiseArgtupleInvalid("min3_tuple", 1, 3, 3, 2); __PYX_ERR(0, 51, __pyx_L3_error) |
| 2910 |
} |
| 2911 |
} |
| 2912 |
if (unlikely(kw_args > 0)) { |
| 2913 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 2914 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "min3_tuple") < 0)) __PYX_ERR(0, 51, __pyx_L3_error) |
| 2915 |
} |
| 2916 |
} else if (unlikely(__pyx_nargs != 3)) { |
| 2917 |
goto __pyx_L5_argtuple_error; |
| 2918 |
} else { |
| 2919 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 2920 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 2921 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 2922 |
} |
| 2923 |
__pyx_v_a = values[0]; |
| 2924 |
__pyx_v_b = values[1]; |
| 2925 |
__pyx_v_c = values[2]; |
| 2926 |
} |
| 2927 |
goto __pyx_L6_skip; |
| 2928 |
__pyx_L5_argtuple_error:; |
| 2929 |
__Pyx_RaiseArgtupleInvalid("min3_tuple", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 51, __pyx_L3_error) |
| 2930 |
__pyx_L6_skip:; |
| 2931 |
goto __pyx_L4_argument_unpacking_done; |
| 2932 |
__pyx_L3_error:; |
| 2933 |
{ |
| 2934 |
Py_ssize_t __pyx_temp; |
| 2935 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2936 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2937 |
} |
| 2938 |
} |
| 2939 |
__Pyx_AddTraceback("builtin_min_max.min3_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 2940 |
__Pyx_RefNannyFinishContext(); |
| 2941 |
return NULL; |
| 2942 |
__pyx_L4_argument_unpacking_done:; |
| 2943 |
__pyx_r = __pyx_pf_15builtin_min_max_4min3_tuple(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c); |
| 2944 |
|
| 2945 |
|
| 2946 |
{ |
| 2947 |
Py_ssize_t __pyx_temp; |
| 2948 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 2949 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 2950 |
} |
| 2951 |
} |
| 2952 |
__Pyx_RefNannyFinishContext(); |
| 2953 |
return __pyx_r; |
| 2954 |
} |
| 2955 |
|
| 2956 |
static PyObject *__pyx_pf_15builtin_min_max_4min3_tuple(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { |
| 2957 |
PyObject *__pyx_r = NULL; |
| 2958 |
__Pyx_RefNannyDeclarations |
| 2959 |
PyObject *__pyx_t_1 = NULL; |
| 2960 |
PyObject *__pyx_t_2 = NULL; |
| 2961 |
PyObject *__pyx_t_3 = NULL; |
| 2962 |
PyObject *__pyx_t_4 = NULL; |
| 2963 |
PyObject *__pyx_t_5 = NULL; |
| 2964 |
int __pyx_t_6; |
| 2965 |
int __pyx_lineno = 0; |
| 2966 |
const char *__pyx_filename = NULL; |
| 2967 |
int __pyx_clineno = 0; |
| 2968 |
__Pyx_RefNannySetupContext("min3_tuple", 0); |
| 2969 |
|
| 2970 |
|
| 2971 |
|
| 2972 |
|
| 2973 |
|
| 2974 |
|
| 2975 |
|
| 2976 |
|
| 2977 |
__Pyx_XDECREF(__pyx_r); |
| 2978 |
__Pyx_INCREF(__pyx_v_b); |
| 2979 |
|
| 2980 |
__pyx_t_1 = __pyx_v_b; |
| 2981 |
__Pyx_INCREF(__pyx_v_c); |
| 2982 |
|
| 2983 |
__pyx_t_2 = __pyx_v_c; |
| 2984 |
__Pyx_INCREF(__pyx_v_a); |
| 2985 |
|
| 2986 |
__pyx_t_3 = __pyx_v_a; |
| 2987 |
|
| 2988 |
|
| 2989 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error) |
| 2990 |
|
| 2991 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 66, __pyx_L1_error) |
| 2992 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 2993 |
|
| 2994 |
if (__pyx_t_6) { |
| 2995 |
__Pyx_INCREF(__pyx_t_1); |
| 2996 |
__pyx_t_4 = __pyx_t_1; |
| 2997 |
} else { |
| 2998 |
__Pyx_INCREF(__pyx_t_3); |
| 2999 |
__pyx_t_4 = __pyx_t_3; |
| 3000 |
} |
| 3001 |
|
| 3002 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 3003 |
|
| 3004 |
__Pyx_INCREF(__pyx_t_4); |
| 3005 |
|
| 3006 |
__pyx_t_3 = __pyx_t_4; |
| 3007 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 3008 |
|
| 3009 |
|
| 3010 |
|
| 3011 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 66, __pyx_L1_error) |
| 3012 |
|
| 3013 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 66, __pyx_L1_error) |
| 3014 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 3015 |
|
| 3016 |
if (__pyx_t_6) { |
| 3017 |
__Pyx_INCREF(__pyx_t_2); |
| 3018 |
__pyx_t_4 = __pyx_t_2; |
| 3019 |
} else { |
| 3020 |
__Pyx_INCREF(__pyx_t_3); |
| 3021 |
__pyx_t_4 = __pyx_t_3; |
| 3022 |
} |
| 3023 |
|
| 3024 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 3025 |
|
| 3026 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 3027 |
|
| 3028 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3029 |
|
| 3030 |
__Pyx_INCREF(__pyx_t_4); |
| 3031 |
__pyx_r = __pyx_t_4; |
| 3032 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 3033 |
|
| 3034 |
goto __pyx_L0; |
| 3035 |
|
| 3036 |
|
| 3037 |
|
| 3038 |
|
| 3039 |
|
| 3040 |
|
| 3041 |
|
| 3042 |
|
| 3043 |
|
| 3044 |
|
| 3045 |
__pyx_L1_error:; |
| 3046 |
__Pyx_XDECREF(__pyx_t_1); |
| 3047 |
__Pyx_XDECREF(__pyx_t_2); |
| 3048 |
__Pyx_XDECREF(__pyx_t_3); |
| 3049 |
__Pyx_XDECREF(__pyx_t_4); |
| 3050 |
__Pyx_XDECREF(__pyx_t_5); |
| 3051 |
__Pyx_AddTraceback("builtin_min_max.min3_tuple", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3052 |
__pyx_r = NULL; |
| 3053 |
__pyx_L0:; |
| 3054 |
__Pyx_XGIVEREF(__pyx_r); |
| 3055 |
__Pyx_RefNannyFinishContext(); |
| 3056 |
return __pyx_r; |
| 3057 |
} |
| 3058 |
|
| 3059 |
|
| 3060 |
|
| 3061 |
|
| 3062 |
|
| 3063 |
|
| 3064 |
|
| 3065 |
|
| 3066 |
|
| 3067 |
|
| 3068 |
static PyObject *__pyx_pw_15builtin_min_max_7min3_typed(PyObject *__pyx_self, |
| 3069 |
#if CYTHON_METH_FASTCALL |
| 3070 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 3071 |
#else |
| 3072 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 3073 |
#endif |
| 3074 |
); |
| 3075 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_6min3_typed, "\n >>> min3_typed(1,2,3)\n 1\n >>> min3_typed(2,3,1)\n 1\n >>> min3_typed(2,1,3)\n 1\n >>> min3_typed(3,1,2)\n 1\n >>> min3_typed(3,2,1)\n 1\n "); |
| 3076 |
static PyMethodDef __pyx_mdef_15builtin_min_max_7min3_typed = {"min3_typed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_7min3_typed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_6min3_typed}; |
| 3077 |
static PyObject *__pyx_pw_15builtin_min_max_7min3_typed(PyObject *__pyx_self, |
| 3078 |
#if CYTHON_METH_FASTCALL |
| 3079 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 3080 |
#else |
| 3081 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 3082 |
#endif |
| 3083 |
) { |
| 3084 |
int __pyx_v_a; |
| 3085 |
int __pyx_v_b; |
| 3086 |
int __pyx_v_c; |
| 3087 |
#if !CYTHON_METH_FASTCALL |
| 3088 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 3089 |
#endif |
| 3090 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 3091 |
PyObject* values[3] = {0,0,0}; |
| 3092 |
int __pyx_lineno = 0; |
| 3093 |
const char *__pyx_filename = NULL; |
| 3094 |
int __pyx_clineno = 0; |
| 3095 |
PyObject *__pyx_r = 0; |
| 3096 |
__Pyx_RefNannyDeclarations |
| 3097 |
__Pyx_RefNannySetupContext("min3_typed (wrapper)", 0); |
| 3098 |
#if !CYTHON_METH_FASTCALL |
| 3099 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 3100 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 3101 |
#else |
| 3102 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 3103 |
#endif |
| 3104 |
#endif |
| 3105 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 3106 |
{ |
| 3107 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,0}; |
| 3108 |
if (__pyx_kwds) { |
| 3109 |
Py_ssize_t kw_args; |
| 3110 |
switch (__pyx_nargs) { |
| 3111 |
case 3: |
| 3112 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 3113 |
CYTHON_FALLTHROUGH; |
| 3114 |
case 2: |
| 3115 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 3116 |
CYTHON_FALLTHROUGH; |
| 3117 |
case 1: |
| 3118 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 3119 |
CYTHON_FALLTHROUGH; |
| 3120 |
case 0: break; |
| 3121 |
default: goto __pyx_L5_argtuple_error; |
| 3122 |
} |
| 3123 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 3124 |
switch (__pyx_nargs) { |
| 3125 |
case 0: |
| 3126 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_a)) != 0)) { |
| 3127 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 3128 |
kw_args--; |
| 3129 |
} |
| 3130 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error) |
| 3131 |
else goto __pyx_L5_argtuple_error; |
| 3132 |
CYTHON_FALLTHROUGH; |
| 3133 |
case 1: |
| 3134 |
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_b)) != 0)) { |
| 3135 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]); |
| 3136 |
kw_args--; |
| 3137 |
} |
| 3138 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error) |
| 3139 |
else { |
| 3140 |
__Pyx_RaiseArgtupleInvalid("min3_typed", 1, 3, 3, 1); __PYX_ERR(0, 69, __pyx_L3_error) |
| 3141 |
} |
| 3142 |
CYTHON_FALLTHROUGH; |
| 3143 |
case 2: |
| 3144 |
if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_c)) != 0)) { |
| 3145 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]); |
| 3146 |
kw_args--; |
| 3147 |
} |
| 3148 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 69, __pyx_L3_error) |
| 3149 |
else { |
| 3150 |
__Pyx_RaiseArgtupleInvalid("min3_typed", 1, 3, 3, 2); __PYX_ERR(0, 69, __pyx_L3_error) |
| 3151 |
} |
| 3152 |
} |
| 3153 |
if (unlikely(kw_args > 0)) { |
| 3154 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 3155 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "min3_typed") < 0)) __PYX_ERR(0, 69, __pyx_L3_error) |
| 3156 |
} |
| 3157 |
} else if (unlikely(__pyx_nargs != 3)) { |
| 3158 |
goto __pyx_L5_argtuple_error; |
| 3159 |
} else { |
| 3160 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 3161 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 3162 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 3163 |
} |
| 3164 |
__pyx_v_a = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_a == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 71, __pyx_L3_error) |
| 3165 |
__pyx_v_b = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_b == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 71, __pyx_L3_error) |
| 3166 |
__pyx_v_c = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_c == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 71, __pyx_L3_error) |
| 3167 |
} |
| 3168 |
goto __pyx_L6_skip; |
| 3169 |
__pyx_L5_argtuple_error:; |
| 3170 |
__Pyx_RaiseArgtupleInvalid("min3_typed", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 69, __pyx_L3_error) |
| 3171 |
__pyx_L6_skip:; |
| 3172 |
goto __pyx_L4_argument_unpacking_done; |
| 3173 |
__pyx_L3_error:; |
| 3174 |
{ |
| 3175 |
Py_ssize_t __pyx_temp; |
| 3176 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 3177 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 3178 |
} |
| 3179 |
} |
| 3180 |
__Pyx_AddTraceback("builtin_min_max.min3_typed", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3181 |
__Pyx_RefNannyFinishContext(); |
| 3182 |
return NULL; |
| 3183 |
__pyx_L4_argument_unpacking_done:; |
| 3184 |
__pyx_r = __pyx_pf_15builtin_min_max_6min3_typed(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c); |
| 3185 |
|
| 3186 |
|
| 3187 |
{ |
| 3188 |
Py_ssize_t __pyx_temp; |
| 3189 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 3190 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 3191 |
} |
| 3192 |
} |
| 3193 |
__Pyx_RefNannyFinishContext(); |
| 3194 |
return __pyx_r; |
| 3195 |
} |
| 3196 |
|
| 3197 |
static PyObject *__pyx_pf_15builtin_min_max_6min3_typed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_a, int __pyx_v_b, int __pyx_v_c) { |
| 3198 |
PyObject *__pyx_r = NULL; |
| 3199 |
__Pyx_RefNannyDeclarations |
| 3200 |
int __pyx_t_1; |
| 3201 |
int __pyx_t_2; |
| 3202 |
int __pyx_t_3; |
| 3203 |
int __pyx_t_4; |
| 3204 |
int __pyx_t_5; |
| 3205 |
PyObject *__pyx_t_6 = NULL; |
| 3206 |
int __pyx_lineno = 0; |
| 3207 |
const char *__pyx_filename = NULL; |
| 3208 |
int __pyx_clineno = 0; |
| 3209 |
__Pyx_RefNannySetupContext("min3_typed", 0); |
| 3210 |
|
| 3211 |
|
| 3212 |
|
| 3213 |
|
| 3214 |
|
| 3215 |
|
| 3216 |
|
| 3217 |
|
| 3218 |
__Pyx_XDECREF(__pyx_r); |
| 3219 |
|
| 3220 |
__pyx_t_1 = __pyx_v_b; |
| 3221 |
|
| 3222 |
__pyx_t_2 = __pyx_v_c; |
| 3223 |
|
| 3224 |
__pyx_t_3 = __pyx_v_a; |
| 3225 |
|
| 3226 |
|
| 3227 |
__pyx_t_5 = (__pyx_t_1 < __pyx_t_3); |
| 3228 |
if (__pyx_t_5) { |
| 3229 |
__pyx_t_4 = __pyx_t_1; |
| 3230 |
} else { |
| 3231 |
__pyx_t_4 = __pyx_t_3; |
| 3232 |
} |
| 3233 |
|
| 3234 |
|
| 3235 |
|
| 3236 |
__pyx_t_3 = __pyx_t_4; |
| 3237 |
|
| 3238 |
|
| 3239 |
|
| 3240 |
__pyx_t_5 = (__pyx_t_2 < __pyx_t_3); |
| 3241 |
if (__pyx_t_5) { |
| 3242 |
__pyx_t_4 = __pyx_t_2; |
| 3243 |
} else { |
| 3244 |
__pyx_t_4 = __pyx_t_3; |
| 3245 |
} |
| 3246 |
|
| 3247 |
|
| 3248 |
|
| 3249 |
|
| 3250 |
|
| 3251 |
__pyx_t_6 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error) |
| 3252 |
__Pyx_GOTREF(__pyx_t_6); |
| 3253 |
|
| 3254 |
__pyx_r = __pyx_t_6; |
| 3255 |
__pyx_t_6 = 0; |
| 3256 |
|
| 3257 |
goto __pyx_L0; |
| 3258 |
|
| 3259 |
|
| 3260 |
|
| 3261 |
|
| 3262 |
|
| 3263 |
|
| 3264 |
|
| 3265 |
|
| 3266 |
|
| 3267 |
|
| 3268 |
__pyx_L1_error:; |
| 3269 |
__Pyx_XDECREF(__pyx_t_6); |
| 3270 |
__Pyx_AddTraceback("builtin_min_max.min3_typed", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3271 |
__pyx_r = NULL; |
| 3272 |
__pyx_L0:; |
| 3273 |
__Pyx_XGIVEREF(__pyx_r); |
| 3274 |
__Pyx_RefNannyFinishContext(); |
| 3275 |
return __pyx_r; |
| 3276 |
} |
| 3277 |
|
| 3278 |
|
| 3279 |
|
| 3280 |
|
| 3281 |
|
| 3282 |
|
| 3283 |
|
| 3284 |
|
| 3285 |
|
| 3286 |
|
| 3287 |
static PyObject *__pyx_pw_15builtin_min_max_9literal_min3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 3288 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_8literal_min3, "\n >>> literal_min3()\n (1, 1, 1, 1, 1)\n "); |
| 3289 |
static PyMethodDef __pyx_mdef_15builtin_min_max_9literal_min3 = {"literal_min3", (PyCFunction)__pyx_pw_15builtin_min_max_9literal_min3, METH_NOARGS, __pyx_doc_15builtin_min_max_8literal_min3}; |
| 3290 |
static PyObject *__pyx_pw_15builtin_min_max_9literal_min3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 3291 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 3292 |
PyObject *__pyx_r = 0; |
| 3293 |
__Pyx_RefNannyDeclarations |
| 3294 |
__Pyx_RefNannySetupContext("literal_min3 (wrapper)", 0); |
| 3295 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 3296 |
__pyx_r = __pyx_pf_15builtin_min_max_8literal_min3(__pyx_self); |
| 3297 |
|
| 3298 |
|
| 3299 |
__Pyx_RefNannyFinishContext(); |
| 3300 |
return __pyx_r; |
| 3301 |
} |
| 3302 |
|
| 3303 |
static PyObject *__pyx_pf_15builtin_min_max_8literal_min3(CYTHON_UNUSED PyObject *__pyx_self) { |
| 3304 |
PyObject *__pyx_r = NULL; |
| 3305 |
__Pyx_RefNannyDeclarations |
| 3306 |
long __pyx_t_1; |
| 3307 |
long __pyx_t_2; |
| 3308 |
long __pyx_t_3; |
| 3309 |
long __pyx_t_4; |
| 3310 |
int __pyx_t_5; |
| 3311 |
PyObject *__pyx_t_6 = NULL; |
| 3312 |
PyObject *__pyx_t_7 = NULL; |
| 3313 |
PyObject *__pyx_t_8 = NULL; |
| 3314 |
PyObject *__pyx_t_9 = NULL; |
| 3315 |
PyObject *__pyx_t_10 = NULL; |
| 3316 |
PyObject *__pyx_t_11 = NULL; |
| 3317 |
int __pyx_lineno = 0; |
| 3318 |
const char *__pyx_filename = NULL; |
| 3319 |
int __pyx_clineno = 0; |
| 3320 |
__Pyx_RefNannySetupContext("literal_min3", 0); |
| 3321 |
|
| 3322 |
|
| 3323 |
|
| 3324 |
|
| 3325 |
|
| 3326 |
|
| 3327 |
|
| 3328 |
|
| 3329 |
__Pyx_XDECREF(__pyx_r); |
| 3330 |
|
| 3331 |
__pyx_t_1 = 2; |
| 3332 |
|
| 3333 |
__pyx_t_2 = 3; |
| 3334 |
|
| 3335 |
__pyx_t_3 = 1; |
| 3336 |
|
| 3337 |
|
| 3338 |
__pyx_t_5 = (__pyx_t_1 < __pyx_t_3); |
| 3339 |
if (__pyx_t_5) { |
| 3340 |
__pyx_t_4 = __pyx_t_1; |
| 3341 |
} else { |
| 3342 |
__pyx_t_4 = __pyx_t_3; |
| 3343 |
} |
| 3344 |
|
| 3345 |
|
| 3346 |
|
| 3347 |
__pyx_t_3 = __pyx_t_4; |
| 3348 |
|
| 3349 |
|
| 3350 |
|
| 3351 |
__pyx_t_5 = (__pyx_t_2 < __pyx_t_3); |
| 3352 |
if (__pyx_t_5) { |
| 3353 |
__pyx_t_4 = __pyx_t_2; |
| 3354 |
} else { |
| 3355 |
__pyx_t_4 = __pyx_t_3; |
| 3356 |
} |
| 3357 |
|
| 3358 |
|
| 3359 |
|
| 3360 |
|
| 3361 |
|
| 3362 |
__pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error) |
| 3363 |
__Pyx_GOTREF(__pyx_t_6); |
| 3364 |
|
| 3365 |
|
| 3366 |
__pyx_t_4 = 1; |
| 3367 |
|
| 3368 |
__pyx_t_1 = 3; |
| 3369 |
|
| 3370 |
__pyx_t_2 = 2; |
| 3371 |
|
| 3372 |
|
| 3373 |
__pyx_t_5 = (__pyx_t_4 < __pyx_t_2); |
| 3374 |
if (__pyx_t_5) { |
| 3375 |
__pyx_t_3 = __pyx_t_4; |
| 3376 |
} else { |
| 3377 |
__pyx_t_3 = __pyx_t_2; |
| 3378 |
} |
| 3379 |
|
| 3380 |
|
| 3381 |
|
| 3382 |
__pyx_t_2 = __pyx_t_3; |
| 3383 |
|
| 3384 |
|
| 3385 |
|
| 3386 |
__pyx_t_5 = (__pyx_t_1 < __pyx_t_2); |
| 3387 |
if (__pyx_t_5) { |
| 3388 |
__pyx_t_3 = __pyx_t_1; |
| 3389 |
} else { |
| 3390 |
__pyx_t_3 = __pyx_t_2; |
| 3391 |
} |
| 3392 |
|
| 3393 |
|
| 3394 |
|
| 3395 |
|
| 3396 |
|
| 3397 |
__pyx_t_7 = __Pyx_PyLong_From_long(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L1_error) |
| 3398 |
__Pyx_GOTREF(__pyx_t_7); |
| 3399 |
|
| 3400 |
|
| 3401 |
__pyx_t_3 = 3; |
| 3402 |
|
| 3403 |
__pyx_t_4 = 1; |
| 3404 |
|
| 3405 |
__pyx_t_1 = 2; |
| 3406 |
|
| 3407 |
|
| 3408 |
__pyx_t_5 = (__pyx_t_3 < __pyx_t_1); |
| 3409 |
if (__pyx_t_5) { |
| 3410 |
__pyx_t_2 = __pyx_t_3; |
| 3411 |
} else { |
| 3412 |
__pyx_t_2 = __pyx_t_1; |
| 3413 |
} |
| 3414 |
|
| 3415 |
|
| 3416 |
|
| 3417 |
__pyx_t_1 = __pyx_t_2; |
| 3418 |
|
| 3419 |
|
| 3420 |
|
| 3421 |
__pyx_t_5 = (__pyx_t_4 < __pyx_t_1); |
| 3422 |
if (__pyx_t_5) { |
| 3423 |
__pyx_t_2 = __pyx_t_4; |
| 3424 |
} else { |
| 3425 |
__pyx_t_2 = __pyx_t_1; |
| 3426 |
} |
| 3427 |
|
| 3428 |
|
| 3429 |
|
| 3430 |
|
| 3431 |
|
| 3432 |
__pyx_t_8 = __Pyx_PyLong_From_long(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 94, __pyx_L1_error) |
| 3433 |
__Pyx_GOTREF(__pyx_t_8); |
| 3434 |
|
| 3435 |
|
| 3436 |
__pyx_t_2 = 1; |
| 3437 |
|
| 3438 |
__pyx_t_3 = 2; |
| 3439 |
|
| 3440 |
__pyx_t_4 = 3; |
| 3441 |
|
| 3442 |
|
| 3443 |
__pyx_t_5 = (__pyx_t_2 < __pyx_t_4); |
| 3444 |
if (__pyx_t_5) { |
| 3445 |
__pyx_t_1 = __pyx_t_2; |
| 3446 |
} else { |
| 3447 |
__pyx_t_1 = __pyx_t_4; |
| 3448 |
} |
| 3449 |
|
| 3450 |
|
| 3451 |
|
| 3452 |
__pyx_t_4 = __pyx_t_1; |
| 3453 |
|
| 3454 |
|
| 3455 |
|
| 3456 |
__pyx_t_5 = (__pyx_t_3 < __pyx_t_4); |
| 3457 |
if (__pyx_t_5) { |
| 3458 |
__pyx_t_1 = __pyx_t_3; |
| 3459 |
} else { |
| 3460 |
__pyx_t_1 = __pyx_t_4; |
| 3461 |
} |
| 3462 |
|
| 3463 |
|
| 3464 |
|
| 3465 |
|
| 3466 |
|
| 3467 |
__pyx_t_9 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L1_error) |
| 3468 |
__Pyx_GOTREF(__pyx_t_9); |
| 3469 |
|
| 3470 |
|
| 3471 |
__pyx_t_1 = 2; |
| 3472 |
|
| 3473 |
__pyx_t_2 = 1; |
| 3474 |
|
| 3475 |
__pyx_t_3 = 3; |
| 3476 |
|
| 3477 |
|
| 3478 |
__pyx_t_5 = (__pyx_t_1 < __pyx_t_3); |
| 3479 |
if (__pyx_t_5) { |
| 3480 |
__pyx_t_4 = __pyx_t_1; |
| 3481 |
} else { |
| 3482 |
__pyx_t_4 = __pyx_t_3; |
| 3483 |
} |
| 3484 |
|
| 3485 |
|
| 3486 |
|
| 3487 |
__pyx_t_3 = __pyx_t_4; |
| 3488 |
|
| 3489 |
|
| 3490 |
|
| 3491 |
__pyx_t_5 = (__pyx_t_2 < __pyx_t_3); |
| 3492 |
if (__pyx_t_5) { |
| 3493 |
__pyx_t_4 = __pyx_t_2; |
| 3494 |
} else { |
| 3495 |
__pyx_t_4 = __pyx_t_3; |
| 3496 |
} |
| 3497 |
|
| 3498 |
|
| 3499 |
|
| 3500 |
|
| 3501 |
|
| 3502 |
__pyx_t_10 = __Pyx_PyLong_From_long(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 94, __pyx_L1_error) |
| 3503 |
__Pyx_GOTREF(__pyx_t_10); |
| 3504 |
|
| 3505 |
|
| 3506 |
__pyx_t_11 = PyTuple_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 94, __pyx_L1_error) |
| 3507 |
__Pyx_GOTREF(__pyx_t_11); |
| 3508 |
__Pyx_GIVEREF(__pyx_t_6); |
| 3509 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 94, __pyx_L1_error); |
| 3510 |
__Pyx_GIVEREF(__pyx_t_7); |
| 3511 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 94, __pyx_L1_error); |
| 3512 |
__Pyx_GIVEREF(__pyx_t_8); |
| 3513 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 94, __pyx_L1_error); |
| 3514 |
__Pyx_GIVEREF(__pyx_t_9); |
| 3515 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_9) != (0)) __PYX_ERR(0, 94, __pyx_L1_error); |
| 3516 |
__Pyx_GIVEREF(__pyx_t_10); |
| 3517 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_10) != (0)) __PYX_ERR(0, 94, __pyx_L1_error); |
| 3518 |
__pyx_t_6 = 0; |
| 3519 |
__pyx_t_7 = 0; |
| 3520 |
__pyx_t_8 = 0; |
| 3521 |
__pyx_t_9 = 0; |
| 3522 |
__pyx_t_10 = 0; |
| 3523 |
|
| 3524 |
|
| 3525 |
|
| 3526 |
|
| 3527 |
|
| 3528 |
__pyx_r = __pyx_t_11; |
| 3529 |
__pyx_t_11 = 0; |
| 3530 |
|
| 3531 |
goto __pyx_L0; |
| 3532 |
|
| 3533 |
|
| 3534 |
|
| 3535 |
|
| 3536 |
|
| 3537 |
|
| 3538 |
|
| 3539 |
|
| 3540 |
|
| 3541 |
|
| 3542 |
__pyx_L1_error:; |
| 3543 |
__Pyx_XDECREF(__pyx_t_6); |
| 3544 |
__Pyx_XDECREF(__pyx_t_7); |
| 3545 |
__Pyx_XDECREF(__pyx_t_8); |
| 3546 |
__Pyx_XDECREF(__pyx_t_9); |
| 3547 |
__Pyx_XDECREF(__pyx_t_10); |
| 3548 |
__Pyx_XDECREF(__pyx_t_11); |
| 3549 |
__Pyx_AddTraceback("builtin_min_max.literal_min3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3550 |
__pyx_r = NULL; |
| 3551 |
__pyx_L0:; |
| 3552 |
__Pyx_XGIVEREF(__pyx_r); |
| 3553 |
__Pyx_RefNannyFinishContext(); |
| 3554 |
return __pyx_r; |
| 3555 |
} |
| 3556 |
|
| 3557 |
|
| 3558 |
|
| 3559 |
|
| 3560 |
|
| 3561 |
|
| 3562 |
|
| 3563 |
|
| 3564 |
|
| 3565 |
|
| 3566 |
static PyObject *__pyx_pw_15builtin_min_max_11test_min2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 3567 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_10test_min2, "\n >>> test_min2()\n 1\n 1\n 1\n 1\n 1\n calling __len__\n 1\n calling __len__\n 1\n "); |
| 3568 |
static PyMethodDef __pyx_mdef_15builtin_min_max_11test_min2 = {"test_min2", (PyCFunction)__pyx_pw_15builtin_min_max_11test_min2, METH_NOARGS, __pyx_doc_15builtin_min_max_10test_min2}; |
| 3569 |
static PyObject *__pyx_pw_15builtin_min_max_11test_min2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 3570 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 3571 |
PyObject *__pyx_r = 0; |
| 3572 |
__Pyx_RefNannyDeclarations |
| 3573 |
__Pyx_RefNannySetupContext("test_min2 (wrapper)", 0); |
| 3574 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 3575 |
__pyx_r = __pyx_pf_15builtin_min_max_10test_min2(__pyx_self); |
| 3576 |
|
| 3577 |
|
| 3578 |
__Pyx_RefNannyFinishContext(); |
| 3579 |
return __pyx_r; |
| 3580 |
} |
| 3581 |
|
| 3582 |
static PyObject *__pyx_pf_15builtin_min_max_10test_min2(CYTHON_UNUSED PyObject *__pyx_self) { |
| 3583 |
int __pyx_v_my_int; |
| 3584 |
PyObject *__pyx_v_my_pyint = 0; |
| 3585 |
PyObject *__pyx_v_my_list = 0; |
| 3586 |
PyObject *__pyx_r = NULL; |
| 3587 |
__Pyx_RefNannyDeclarations |
| 3588 |
PyObject *__pyx_t_1 = NULL; |
| 3589 |
PyObject *__pyx_t_2 = NULL; |
| 3590 |
PyObject *__pyx_t_3 = NULL; |
| 3591 |
PyObject *__pyx_t_4 = NULL; |
| 3592 |
unsigned int __pyx_t_5; |
| 3593 |
long __pyx_t_6; |
| 3594 |
long __pyx_t_7; |
| 3595 |
long __pyx_t_8; |
| 3596 |
int __pyx_t_9; |
| 3597 |
int __pyx_t_10; |
| 3598 |
Py_ssize_t __pyx_t_11; |
| 3599 |
Py_ssize_t __pyx_t_12; |
| 3600 |
int __pyx_lineno = 0; |
| 3601 |
const char *__pyx_filename = NULL; |
| 3602 |
int __pyx_clineno = 0; |
| 3603 |
__Pyx_RefNannySetupContext("test_min2", 0); |
| 3604 |
|
| 3605 |
|
| 3606 |
|
| 3607 |
|
| 3608 |
|
| 3609 |
|
| 3610 |
|
| 3611 |
|
| 3612 |
__pyx_v_my_int = 1; |
| 3613 |
|
| 3614 |
|
| 3615 |
|
| 3616 |
|
| 3617 |
|
| 3618 |
|
| 3619 |
|
| 3620 |
|
| 3621 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 3622 |
__pyx_v_my_pyint = __pyx_mstate_global->__pyx_int_2; |
| 3623 |
|
| 3624 |
|
| 3625 |
|
| 3626 |
|
| 3627 |
|
| 3628 |
|
| 3629 |
|
| 3630 |
|
| 3631 |
|
| 3632 |
|
| 3633 |
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error) |
| 3634 |
__Pyx_GOTREF(__pyx_t_2); |
| 3635 |
|
| 3636 |
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 117, __pyx_L1_error) |
| 3637 |
__Pyx_GOTREF(__pyx_t_3); |
| 3638 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); |
| 3639 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); |
| 3640 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 117, __pyx_L1_error); |
| 3641 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 3642 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2); |
| 3643 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 117, __pyx_L1_error); |
| 3644 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_3); |
| 3645 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3); |
| 3646 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 117, __pyx_L1_error); |
| 3647 |
|
| 3648 |
__pyx_t_4 = NULL; |
| 3649 |
|
| 3650 |
__pyx_t_5 = 0; |
| 3651 |
#if CYTHON_UNPACK_METHODS |
| 3652 |
if (unlikely(PyMethod_Check(__pyx_t_2))) { |
| 3653 |
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); |
| 3654 |
assert(__pyx_t_4); |
| 3655 |
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); |
| 3656 |
__Pyx_INCREF(__pyx_t_4); |
| 3657 |
__Pyx_INCREF(function); |
| 3658 |
__Pyx_DECREF_SET(__pyx_t_2, function); |
| 3659 |
__pyx_t_5 = 1; |
| 3660 |
} |
| 3661 |
#endif |
| 3662 |
{ |
| 3663 |
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; |
| 3664 |
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); |
| 3665 |
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 3666 |
|
| 3667 |
|
| 3668 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 3669 |
|
| 3670 |
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) |
| 3671 |
__Pyx_GOTREF(__pyx_t_1); |
| 3672 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 3673 |
|
| 3674 |
} |
| 3675 |
__pyx_v_my_list = __pyx_t_1; |
| 3676 |
__pyx_t_1 = 0; |
| 3677 |
|
| 3678 |
|
| 3679 |
|
| 3680 |
|
| 3681 |
|
| 3682 |
|
| 3683 |
|
| 3684 |
|
| 3685 |
|
| 3686 |
|
| 3687 |
__pyx_t_6 = 2; |
| 3688 |
|
| 3689 |
__pyx_t_7 = 1; |
| 3690 |
|
| 3691 |
|
| 3692 |
__pyx_t_9 = (__pyx_t_6 < __pyx_t_7); |
| 3693 |
if (__pyx_t_9) { |
| 3694 |
__pyx_t_8 = __pyx_t_6; |
| 3695 |
} else { |
| 3696 |
__pyx_t_8 = __pyx_t_7; |
| 3697 |
} |
| 3698 |
|
| 3699 |
|
| 3700 |
|
| 3701 |
|
| 3702 |
__pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) |
| 3703 |
__Pyx_GOTREF(__pyx_t_1); |
| 3704 |
|
| 3705 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error) |
| 3706 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3707 |
|
| 3708 |
|
| 3709 |
|
| 3710 |
|
| 3711 |
|
| 3712 |
|
| 3713 |
|
| 3714 |
|
| 3715 |
|
| 3716 |
|
| 3717 |
__pyx_t_10 = __pyx_v_my_int; |
| 3718 |
|
| 3719 |
__pyx_t_8 = 2; |
| 3720 |
|
| 3721 |
|
| 3722 |
__pyx_t_9 = (__pyx_t_10 < __pyx_t_8); |
| 3723 |
if (__pyx_t_9) { |
| 3724 |
__pyx_t_6 = __pyx_t_10; |
| 3725 |
} else { |
| 3726 |
__pyx_t_6 = __pyx_t_8; |
| 3727 |
} |
| 3728 |
|
| 3729 |
|
| 3730 |
|
| 3731 |
|
| 3732 |
__pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) |
| 3733 |
__Pyx_GOTREF(__pyx_t_1); |
| 3734 |
|
| 3735 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 120, __pyx_L1_error) |
| 3736 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3737 |
|
| 3738 |
|
| 3739 |
|
| 3740 |
|
| 3741 |
|
| 3742 |
|
| 3743 |
|
| 3744 |
|
| 3745 |
|
| 3746 |
|
| 3747 |
__pyx_t_6 = 2; |
| 3748 |
|
| 3749 |
__pyx_t_10 = __pyx_v_my_int; |
| 3750 |
|
| 3751 |
|
| 3752 |
__pyx_t_9 = (__pyx_t_6 < __pyx_t_10); |
| 3753 |
if (__pyx_t_9) { |
| 3754 |
__pyx_t_8 = __pyx_t_6; |
| 3755 |
} else { |
| 3756 |
__pyx_t_8 = __pyx_t_10; |
| 3757 |
} |
| 3758 |
|
| 3759 |
|
| 3760 |
|
| 3761 |
|
| 3762 |
__pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) |
| 3763 |
__Pyx_GOTREF(__pyx_t_1); |
| 3764 |
|
| 3765 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 121, __pyx_L1_error) |
| 3766 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3767 |
|
| 3768 |
|
| 3769 |
|
| 3770 |
|
| 3771 |
|
| 3772 |
|
| 3773 |
|
| 3774 |
|
| 3775 |
|
| 3776 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 3777 |
|
| 3778 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 3779 |
|
| 3780 |
__pyx_t_10 = __pyx_v_my_int; |
| 3781 |
|
| 3782 |
|
| 3783 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error) |
| 3784 |
__Pyx_GOTREF(__pyx_t_3); |
| 3785 |
|
| 3786 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) |
| 3787 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 3788 |
|
| 3789 |
|
| 3790 |
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 123, __pyx_L1_error) |
| 3791 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 3792 |
|
| 3793 |
if (__pyx_t_9) { |
| 3794 |
__Pyx_INCREF(__pyx_t_1); |
| 3795 |
__pyx_t_2 = __pyx_t_1; |
| 3796 |
} else { |
| 3797 |
|
| 3798 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 123, __pyx_L1_error) |
| 3799 |
__Pyx_GOTREF(__pyx_t_4); |
| 3800 |
__pyx_t_2 = __pyx_t_4; |
| 3801 |
__pyx_t_4 = 0; |
| 3802 |
|
| 3803 |
} |
| 3804 |
|
| 3805 |
|
| 3806 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3807 |
|
| 3808 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 123, __pyx_L1_error) |
| 3809 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 3810 |
|
| 3811 |
|
| 3812 |
|
| 3813 |
|
| 3814 |
|
| 3815 |
|
| 3816 |
|
| 3817 |
|
| 3818 |
|
| 3819 |
|
| 3820 |
__pyx_t_10 = __pyx_v_my_int; |
| 3821 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 3822 |
|
| 3823 |
__pyx_t_2 = __pyx_v_my_pyint; |
| 3824 |
|
| 3825 |
|
| 3826 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 124, __pyx_L1_error) |
| 3827 |
__Pyx_GOTREF(__pyx_t_4); |
| 3828 |
|
| 3829 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) |
| 3830 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 3831 |
|
| 3832 |
|
| 3833 |
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 124, __pyx_L1_error) |
| 3834 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 3835 |
|
| 3836 |
if (__pyx_t_9) { |
| 3837 |
|
| 3838 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error) |
| 3839 |
__Pyx_GOTREF(__pyx_t_3); |
| 3840 |
__pyx_t_1 = __pyx_t_3; |
| 3841 |
__pyx_t_3 = 0; |
| 3842 |
|
| 3843 |
} else { |
| 3844 |
__Pyx_INCREF(__pyx_t_2); |
| 3845 |
__pyx_t_1 = __pyx_t_2; |
| 3846 |
} |
| 3847 |
|
| 3848 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 3849 |
|
| 3850 |
|
| 3851 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 124, __pyx_L1_error) |
| 3852 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3853 |
|
| 3854 |
|
| 3855 |
|
| 3856 |
|
| 3857 |
|
| 3858 |
|
| 3859 |
|
| 3860 |
|
| 3861 |
|
| 3862 |
|
| 3863 |
__pyx_t_11 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 126, __pyx_L1_error) |
| 3864 |
|
| 3865 |
__pyx_t_10 = __pyx_v_my_int; |
| 3866 |
|
| 3867 |
|
| 3868 |
__pyx_t_9 = (__pyx_t_11 < __pyx_t_10); |
| 3869 |
if (__pyx_t_9) { |
| 3870 |
__pyx_t_12 = __pyx_t_11; |
| 3871 |
} else { |
| 3872 |
__pyx_t_12 = __pyx_t_10; |
| 3873 |
} |
| 3874 |
|
| 3875 |
|
| 3876 |
|
| 3877 |
|
| 3878 |
__pyx_t_1 = PyLong_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error) |
| 3879 |
__Pyx_GOTREF(__pyx_t_1); |
| 3880 |
|
| 3881 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 126, __pyx_L1_error) |
| 3882 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3883 |
|
| 3884 |
|
| 3885 |
|
| 3886 |
|
| 3887 |
|
| 3888 |
|
| 3889 |
|
| 3890 |
|
| 3891 |
|
| 3892 |
|
| 3893 |
__pyx_t_10 = __pyx_v_my_int; |
| 3894 |
|
| 3895 |
__pyx_t_12 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 127, __pyx_L1_error) |
| 3896 |
|
| 3897 |
|
| 3898 |
__pyx_t_9 = (__pyx_t_10 < __pyx_t_12); |
| 3899 |
if (__pyx_t_9) { |
| 3900 |
__pyx_t_11 = __pyx_t_10; |
| 3901 |
} else { |
| 3902 |
__pyx_t_11 = __pyx_t_12; |
| 3903 |
} |
| 3904 |
|
| 3905 |
|
| 3906 |
|
| 3907 |
|
| 3908 |
__pyx_t_1 = PyLong_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error) |
| 3909 |
__Pyx_GOTREF(__pyx_t_1); |
| 3910 |
|
| 3911 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 127, __pyx_L1_error) |
| 3912 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 3913 |
|
| 3914 |
|
| 3915 |
|
| 3916 |
|
| 3917 |
|
| 3918 |
|
| 3919 |
|
| 3920 |
|
| 3921 |
|
| 3922 |
|
| 3923 |
|
| 3924 |
__pyx_r = Py_None; __Pyx_INCREF(Py_None); |
| 3925 |
goto __pyx_L0; |
| 3926 |
__pyx_L1_error:; |
| 3927 |
__Pyx_XDECREF(__pyx_t_1); |
| 3928 |
__Pyx_XDECREF(__pyx_t_2); |
| 3929 |
__Pyx_XDECREF(__pyx_t_3); |
| 3930 |
__Pyx_XDECREF(__pyx_t_4); |
| 3931 |
__Pyx_AddTraceback("builtin_min_max.test_min2", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 3932 |
__pyx_r = NULL; |
| 3933 |
__pyx_L0:; |
| 3934 |
__Pyx_XDECREF(__pyx_v_my_pyint); |
| 3935 |
__Pyx_XDECREF(__pyx_v_my_list); |
| 3936 |
__Pyx_XGIVEREF(__pyx_r); |
| 3937 |
__Pyx_RefNannyFinishContext(); |
| 3938 |
return __pyx_r; |
| 3939 |
} |
| 3940 |
|
| 3941 |
|
| 3942 |
|
| 3943 |
|
| 3944 |
|
| 3945 |
|
| 3946 |
|
| 3947 |
|
| 3948 |
|
| 3949 |
|
| 3950 |
static PyObject *__pyx_pw_15builtin_min_max_13test_min3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 3951 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_12test_min3, "\n >>> test_min3()\n calling __len__\n 1\n calling __len__\n calling __len__\n 2\n "); |
| 3952 |
static PyMethodDef __pyx_mdef_15builtin_min_max_13test_min3 = {"test_min3", (PyCFunction)__pyx_pw_15builtin_min_max_13test_min3, METH_NOARGS, __pyx_doc_15builtin_min_max_12test_min3}; |
| 3953 |
static PyObject *__pyx_pw_15builtin_min_max_13test_min3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 3954 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 3955 |
PyObject *__pyx_r = 0; |
| 3956 |
__Pyx_RefNannyDeclarations |
| 3957 |
__Pyx_RefNannySetupContext("test_min3 (wrapper)", 0); |
| 3958 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 3959 |
__pyx_r = __pyx_pf_15builtin_min_max_12test_min3(__pyx_self); |
| 3960 |
|
| 3961 |
|
| 3962 |
__Pyx_RefNannyFinishContext(); |
| 3963 |
return __pyx_r; |
| 3964 |
} |
| 3965 |
|
| 3966 |
static PyObject *__pyx_pf_15builtin_min_max_12test_min3(CYTHON_UNUSED PyObject *__pyx_self) { |
| 3967 |
int __pyx_v_my_int; |
| 3968 |
PyObject *__pyx_v_my_pyint = 0; |
| 3969 |
PyObject *__pyx_v_my_list = 0; |
| 3970 |
PyObject *__pyx_r = NULL; |
| 3971 |
__Pyx_RefNannyDeclarations |
| 3972 |
PyObject *__pyx_t_1 = NULL; |
| 3973 |
PyObject *__pyx_t_2 = NULL; |
| 3974 |
PyObject *__pyx_t_3 = NULL; |
| 3975 |
PyObject *__pyx_t_4 = NULL; |
| 3976 |
unsigned int __pyx_t_5; |
| 3977 |
Py_ssize_t __pyx_t_6; |
| 3978 |
int __pyx_t_7; |
| 3979 |
int __pyx_t_8; |
| 3980 |
PyObject *__pyx_t_9 = NULL; |
| 3981 |
int __pyx_lineno = 0; |
| 3982 |
const char *__pyx_filename = NULL; |
| 3983 |
int __pyx_clineno = 0; |
| 3984 |
__Pyx_RefNannySetupContext("test_min3", 0); |
| 3985 |
|
| 3986 |
|
| 3987 |
|
| 3988 |
|
| 3989 |
|
| 3990 |
|
| 3991 |
|
| 3992 |
|
| 3993 |
__pyx_v_my_int = 1; |
| 3994 |
|
| 3995 |
|
| 3996 |
|
| 3997 |
|
| 3998 |
|
| 3999 |
|
| 4000 |
|
| 4001 |
|
| 4002 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 4003 |
__pyx_v_my_pyint = __pyx_mstate_global->__pyx_int_2; |
| 4004 |
|
| 4005 |
|
| 4006 |
|
| 4007 |
|
| 4008 |
|
| 4009 |
|
| 4010 |
|
| 4011 |
|
| 4012 |
|
| 4013 |
|
| 4014 |
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) |
| 4015 |
__Pyx_GOTREF(__pyx_t_2); |
| 4016 |
|
| 4017 |
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error) |
| 4018 |
__Pyx_GOTREF(__pyx_t_3); |
| 4019 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); |
| 4020 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); |
| 4021 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); |
| 4022 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 4023 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2); |
| 4024 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); |
| 4025 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_3); |
| 4026 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3); |
| 4027 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 146, __pyx_L1_error); |
| 4028 |
|
| 4029 |
__pyx_t_4 = NULL; |
| 4030 |
|
| 4031 |
__pyx_t_5 = 0; |
| 4032 |
#if CYTHON_UNPACK_METHODS |
| 4033 |
if (unlikely(PyMethod_Check(__pyx_t_2))) { |
| 4034 |
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); |
| 4035 |
assert(__pyx_t_4); |
| 4036 |
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); |
| 4037 |
__Pyx_INCREF(__pyx_t_4); |
| 4038 |
__Pyx_INCREF(function); |
| 4039 |
__Pyx_DECREF_SET(__pyx_t_2, function); |
| 4040 |
__pyx_t_5 = 1; |
| 4041 |
} |
| 4042 |
#endif |
| 4043 |
{ |
| 4044 |
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; |
| 4045 |
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); |
| 4046 |
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4047 |
|
| 4048 |
|
| 4049 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4050 |
|
| 4051 |
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) |
| 4052 |
__Pyx_GOTREF(__pyx_t_1); |
| 4053 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4054 |
|
| 4055 |
} |
| 4056 |
__pyx_v_my_list = __pyx_t_1; |
| 4057 |
__pyx_t_1 = 0; |
| 4058 |
|
| 4059 |
|
| 4060 |
|
| 4061 |
|
| 4062 |
|
| 4063 |
|
| 4064 |
|
| 4065 |
|
| 4066 |
|
| 4067 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 4068 |
|
| 4069 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 4070 |
|
| 4071 |
__pyx_t_6 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4072 |
|
| 4073 |
__pyx_t_7 = __pyx_v_my_int; |
| 4074 |
|
| 4075 |
|
| 4076 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4077 |
__Pyx_GOTREF(__pyx_t_3); |
| 4078 |
|
| 4079 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4080 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4081 |
|
| 4082 |
|
| 4083 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4084 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4085 |
|
| 4086 |
if (__pyx_t_8) { |
| 4087 |
__Pyx_INCREF(__pyx_t_1); |
| 4088 |
__pyx_t_2 = __pyx_t_1; |
| 4089 |
} else { |
| 4090 |
|
| 4091 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4092 |
__Pyx_GOTREF(__pyx_t_4); |
| 4093 |
__pyx_t_2 = __pyx_t_4; |
| 4094 |
__pyx_t_4 = 0; |
| 4095 |
|
| 4096 |
} |
| 4097 |
|
| 4098 |
|
| 4099 |
__Pyx_INCREF(__pyx_t_2); |
| 4100 |
|
| 4101 |
__pyx_t_4 = __pyx_t_2; |
| 4102 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4103 |
|
| 4104 |
|
| 4105 |
|
| 4106 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4107 |
__Pyx_GOTREF(__pyx_t_3); |
| 4108 |
|
| 4109 |
__pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4110 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4111 |
|
| 4112 |
|
| 4113 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4114 |
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; |
| 4115 |
|
| 4116 |
if (__pyx_t_8) { |
| 4117 |
|
| 4118 |
__pyx_t_9 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4119 |
__Pyx_GOTREF(__pyx_t_9); |
| 4120 |
__pyx_t_2 = __pyx_t_9; |
| 4121 |
__pyx_t_9 = 0; |
| 4122 |
|
| 4123 |
} else { |
| 4124 |
__Pyx_INCREF(__pyx_t_4); |
| 4125 |
__pyx_t_2 = __pyx_t_4; |
| 4126 |
} |
| 4127 |
|
| 4128 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4129 |
|
| 4130 |
|
| 4131 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4132 |
|
| 4133 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 148, __pyx_L1_error) |
| 4134 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4135 |
|
| 4136 |
|
| 4137 |
|
| 4138 |
|
| 4139 |
|
| 4140 |
|
| 4141 |
|
| 4142 |
|
| 4143 |
|
| 4144 |
|
| 4145 |
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_list, __pyx_mstate_global->__pyx_n_u_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4146 |
__Pyx_GOTREF(__pyx_t_2); |
| 4147 |
|
| 4148 |
__pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4149 |
__Pyx_GOTREF(__pyx_t_1); |
| 4150 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4151 |
|
| 4152 |
|
| 4153 |
__pyx_t_6 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4154 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 4155 |
|
| 4156 |
__pyx_t_2 = __pyx_v_my_pyint; |
| 4157 |
|
| 4158 |
|
| 4159 |
__pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4160 |
|
| 4161 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4162 |
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; |
| 4163 |
|
| 4164 |
if (__pyx_t_8) { |
| 4165 |
__Pyx_INCREF(__pyx_t_1); |
| 4166 |
__pyx_t_4 = __pyx_t_1; |
| 4167 |
} else { |
| 4168 |
__Pyx_INCREF(__pyx_t_2); |
| 4169 |
__pyx_t_4 = __pyx_t_2; |
| 4170 |
} |
| 4171 |
|
| 4172 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4173 |
|
| 4174 |
__Pyx_INCREF(__pyx_t_4); |
| 4175 |
|
| 4176 |
__pyx_t_2 = __pyx_t_4; |
| 4177 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4178 |
|
| 4179 |
|
| 4180 |
|
| 4181 |
__pyx_t_9 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4182 |
__Pyx_GOTREF(__pyx_t_9); |
| 4183 |
|
| 4184 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4185 |
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; |
| 4186 |
|
| 4187 |
|
| 4188 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4189 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4190 |
|
| 4191 |
if (__pyx_t_8) { |
| 4192 |
|
| 4193 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4194 |
__Pyx_GOTREF(__pyx_t_3); |
| 4195 |
__pyx_t_4 = __pyx_t_3; |
| 4196 |
__pyx_t_3 = 0; |
| 4197 |
|
| 4198 |
} else { |
| 4199 |
__Pyx_INCREF(__pyx_t_2); |
| 4200 |
__pyx_t_4 = __pyx_t_2; |
| 4201 |
} |
| 4202 |
|
| 4203 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4204 |
|
| 4205 |
|
| 4206 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4207 |
|
| 4208 |
if (__Pyx_PrintOne(0, __pyx_t_4) < 0) __PYX_ERR(0, 149, __pyx_L1_error) |
| 4209 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4210 |
|
| 4211 |
|
| 4212 |
|
| 4213 |
|
| 4214 |
|
| 4215 |
|
| 4216 |
|
| 4217 |
|
| 4218 |
|
| 4219 |
|
| 4220 |
|
| 4221 |
__pyx_r = Py_None; __Pyx_INCREF(Py_None); |
| 4222 |
goto __pyx_L0; |
| 4223 |
__pyx_L1_error:; |
| 4224 |
__Pyx_XDECREF(__pyx_t_1); |
| 4225 |
__Pyx_XDECREF(__pyx_t_2); |
| 4226 |
__Pyx_XDECREF(__pyx_t_3); |
| 4227 |
__Pyx_XDECREF(__pyx_t_4); |
| 4228 |
__Pyx_XDECREF(__pyx_t_9); |
| 4229 |
__Pyx_AddTraceback("builtin_min_max.test_min3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4230 |
__pyx_r = NULL; |
| 4231 |
__pyx_L0:; |
| 4232 |
__Pyx_XDECREF(__pyx_v_my_pyint); |
| 4233 |
__Pyx_XDECREF(__pyx_v_my_list); |
| 4234 |
__Pyx_XGIVEREF(__pyx_r); |
| 4235 |
__Pyx_RefNannyFinishContext(); |
| 4236 |
return __pyx_r; |
| 4237 |
} |
| 4238 |
|
| 4239 |
|
| 4240 |
|
| 4241 |
|
| 4242 |
|
| 4243 |
|
| 4244 |
|
| 4245 |
|
| 4246 |
|
| 4247 |
|
| 4248 |
static PyObject *__pyx_pw_15builtin_min_max_15test_minN(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 4249 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_14test_minN, "\n >>> test_minN()\n calling __len__\n 0\n calling __len__\n 0\n calling __len__\n 0\n "); |
| 4250 |
static PyMethodDef __pyx_mdef_15builtin_min_max_15test_minN = {"test_minN", (PyCFunction)__pyx_pw_15builtin_min_max_15test_minN, METH_NOARGS, __pyx_doc_15builtin_min_max_14test_minN}; |
| 4251 |
static PyObject *__pyx_pw_15builtin_min_max_15test_minN(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 4252 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 4253 |
PyObject *__pyx_r = 0; |
| 4254 |
__Pyx_RefNannyDeclarations |
| 4255 |
__Pyx_RefNannySetupContext("test_minN (wrapper)", 0); |
| 4256 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 4257 |
__pyx_r = __pyx_pf_15builtin_min_max_14test_minN(__pyx_self); |
| 4258 |
|
| 4259 |
|
| 4260 |
__Pyx_RefNannyFinishContext(); |
| 4261 |
return __pyx_r; |
| 4262 |
} |
| 4263 |
|
| 4264 |
static PyObject *__pyx_pf_15builtin_min_max_14test_minN(CYTHON_UNUSED PyObject *__pyx_self) { |
| 4265 |
int __pyx_v_my_int; |
| 4266 |
PyObject *__pyx_v_my_pyint = 0; |
| 4267 |
PyObject *__pyx_v_my_list = 0; |
| 4268 |
PyObject *__pyx_r = NULL; |
| 4269 |
__Pyx_RefNannyDeclarations |
| 4270 |
PyObject *__pyx_t_1 = NULL; |
| 4271 |
PyObject *__pyx_t_2 = NULL; |
| 4272 |
PyObject *__pyx_t_3 = NULL; |
| 4273 |
PyObject *__pyx_t_4 = NULL; |
| 4274 |
unsigned int __pyx_t_5; |
| 4275 |
long __pyx_t_6; |
| 4276 |
int __pyx_t_7; |
| 4277 |
long __pyx_t_8; |
| 4278 |
int __pyx_t_9; |
| 4279 |
Py_ssize_t __pyx_t_10; |
| 4280 |
int __pyx_t_11; |
| 4281 |
long __pyx_t_12; |
| 4282 |
int __pyx_t_13; |
| 4283 |
long __pyx_t_14; |
| 4284 |
PyObject *__pyx_t_15 = NULL; |
| 4285 |
int __pyx_t_16; |
| 4286 |
int __pyx_t_17; |
| 4287 |
int __pyx_lineno = 0; |
| 4288 |
const char *__pyx_filename = NULL; |
| 4289 |
int __pyx_clineno = 0; |
| 4290 |
__Pyx_RefNannySetupContext("test_minN", 0); |
| 4291 |
|
| 4292 |
|
| 4293 |
|
| 4294 |
|
| 4295 |
|
| 4296 |
|
| 4297 |
|
| 4298 |
|
| 4299 |
__pyx_v_my_int = 1; |
| 4300 |
|
| 4301 |
|
| 4302 |
|
| 4303 |
|
| 4304 |
|
| 4305 |
|
| 4306 |
|
| 4307 |
|
| 4308 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 4309 |
__pyx_v_my_pyint = __pyx_mstate_global->__pyx_int_2; |
| 4310 |
|
| 4311 |
|
| 4312 |
|
| 4313 |
|
| 4314 |
|
| 4315 |
|
| 4316 |
|
| 4317 |
|
| 4318 |
|
| 4319 |
|
| 4320 |
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error) |
| 4321 |
__Pyx_GOTREF(__pyx_t_2); |
| 4322 |
|
| 4323 |
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error) |
| 4324 |
__Pyx_GOTREF(__pyx_t_3); |
| 4325 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); |
| 4326 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); |
| 4327 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 169, __pyx_L1_error); |
| 4328 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 4329 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2); |
| 4330 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 169, __pyx_L1_error); |
| 4331 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_3); |
| 4332 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3); |
| 4333 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 169, __pyx_L1_error); |
| 4334 |
|
| 4335 |
__pyx_t_4 = NULL; |
| 4336 |
|
| 4337 |
__pyx_t_5 = 0; |
| 4338 |
#if CYTHON_UNPACK_METHODS |
| 4339 |
if (unlikely(PyMethod_Check(__pyx_t_2))) { |
| 4340 |
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); |
| 4341 |
assert(__pyx_t_4); |
| 4342 |
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); |
| 4343 |
__Pyx_INCREF(__pyx_t_4); |
| 4344 |
__Pyx_INCREF(function); |
| 4345 |
__Pyx_DECREF_SET(__pyx_t_2, function); |
| 4346 |
__pyx_t_5 = 1; |
| 4347 |
} |
| 4348 |
#endif |
| 4349 |
{ |
| 4350 |
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; |
| 4351 |
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); |
| 4352 |
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4353 |
|
| 4354 |
|
| 4355 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4356 |
|
| 4357 |
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error) |
| 4358 |
__Pyx_GOTREF(__pyx_t_1); |
| 4359 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4360 |
|
| 4361 |
} |
| 4362 |
__pyx_v_my_list = __pyx_t_1; |
| 4363 |
__pyx_t_1 = 0; |
| 4364 |
|
| 4365 |
|
| 4366 |
|
| 4367 |
|
| 4368 |
|
| 4369 |
|
| 4370 |
|
| 4371 |
|
| 4372 |
|
| 4373 |
|
| 4374 |
__pyx_t_6 = 2; |
| 4375 |
|
| 4376 |
__pyx_t_7 = __pyx_v_my_int; |
| 4377 |
|
| 4378 |
__pyx_t_8 = 0; |
| 4379 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 4380 |
|
| 4381 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 4382 |
|
| 4383 |
__pyx_t_9 = __pyx_v_my_int; |
| 4384 |
|
| 4385 |
__pyx_t_10 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4386 |
|
| 4387 |
__pyx_t_11 = __pyx_v_my_int; |
| 4388 |
|
| 4389 |
|
| 4390 |
__pyx_t_13 = (__pyx_t_6 < __pyx_t_11); |
| 4391 |
if (__pyx_t_13) { |
| 4392 |
__pyx_t_12 = __pyx_t_6; |
| 4393 |
} else { |
| 4394 |
__pyx_t_12 = __pyx_t_11; |
| 4395 |
} |
| 4396 |
|
| 4397 |
|
| 4398 |
|
| 4399 |
__pyx_t_14 = __pyx_t_12; |
| 4400 |
|
| 4401 |
|
| 4402 |
|
| 4403 |
__pyx_t_13 = (__pyx_t_7 < __pyx_t_14); |
| 4404 |
if (__pyx_t_13) { |
| 4405 |
__pyx_t_12 = __pyx_t_7; |
| 4406 |
} else { |
| 4407 |
__pyx_t_12 = __pyx_t_14; |
| 4408 |
} |
| 4409 |
|
| 4410 |
|
| 4411 |
|
| 4412 |
__pyx_t_14 = __pyx_t_12; |
| 4413 |
|
| 4414 |
|
| 4415 |
|
| 4416 |
__pyx_t_13 = (__pyx_t_8 < __pyx_t_14); |
| 4417 |
if (__pyx_t_13) { |
| 4418 |
__pyx_t_12 = __pyx_t_8; |
| 4419 |
} else { |
| 4420 |
__pyx_t_12 = __pyx_t_14; |
| 4421 |
} |
| 4422 |
|
| 4423 |
|
| 4424 |
|
| 4425 |
__pyx_t_14 = __pyx_t_12; |
| 4426 |
|
| 4427 |
|
| 4428 |
|
| 4429 |
__pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4430 |
__Pyx_GOTREF(__pyx_t_3); |
| 4431 |
|
| 4432 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4433 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4434 |
|
| 4435 |
|
| 4436 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4437 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4438 |
|
| 4439 |
if (__pyx_t_13) { |
| 4440 |
__Pyx_INCREF(__pyx_t_1); |
| 4441 |
__pyx_t_2 = __pyx_t_1; |
| 4442 |
} else { |
| 4443 |
|
| 4444 |
__pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4445 |
__Pyx_GOTREF(__pyx_t_4); |
| 4446 |
__pyx_t_2 = __pyx_t_4; |
| 4447 |
__pyx_t_4 = 0; |
| 4448 |
|
| 4449 |
} |
| 4450 |
|
| 4451 |
|
| 4452 |
__Pyx_INCREF(__pyx_t_2); |
| 4453 |
|
| 4454 |
__pyx_t_4 = __pyx_t_2; |
| 4455 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4456 |
|
| 4457 |
|
| 4458 |
|
| 4459 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4460 |
__Pyx_GOTREF(__pyx_t_3); |
| 4461 |
|
| 4462 |
__pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4463 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4464 |
|
| 4465 |
|
| 4466 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4467 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 4468 |
|
| 4469 |
if (__pyx_t_13) { |
| 4470 |
|
| 4471 |
__pyx_t_15 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4472 |
__Pyx_GOTREF(__pyx_t_15); |
| 4473 |
__pyx_t_2 = __pyx_t_15; |
| 4474 |
__pyx_t_15 = 0; |
| 4475 |
|
| 4476 |
} else { |
| 4477 |
__Pyx_INCREF(__pyx_t_4); |
| 4478 |
__pyx_t_2 = __pyx_t_4; |
| 4479 |
} |
| 4480 |
|
| 4481 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4482 |
|
| 4483 |
__Pyx_INCREF(__pyx_t_2); |
| 4484 |
|
| 4485 |
__pyx_t_4 = __pyx_t_2; |
| 4486 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4487 |
|
| 4488 |
|
| 4489 |
|
| 4490 |
__pyx_t_15 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4491 |
__Pyx_GOTREF(__pyx_t_15); |
| 4492 |
|
| 4493 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_15, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4494 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 4495 |
|
| 4496 |
|
| 4497 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4498 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4499 |
|
| 4500 |
if (__pyx_t_13) { |
| 4501 |
|
| 4502 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4503 |
__Pyx_GOTREF(__pyx_t_3); |
| 4504 |
__pyx_t_2 = __pyx_t_3; |
| 4505 |
__pyx_t_3 = 0; |
| 4506 |
|
| 4507 |
} else { |
| 4508 |
__Pyx_INCREF(__pyx_t_4); |
| 4509 |
__pyx_t_2 = __pyx_t_4; |
| 4510 |
} |
| 4511 |
|
| 4512 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4513 |
|
| 4514 |
|
| 4515 |
|
| 4516 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4517 |
|
| 4518 |
|
| 4519 |
|
| 4520 |
|
| 4521 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 171, __pyx_L1_error) |
| 4522 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4523 |
|
| 4524 |
|
| 4525 |
|
| 4526 |
|
| 4527 |
|
| 4528 |
|
| 4529 |
|
| 4530 |
|
| 4531 |
|
| 4532 |
|
| 4533 |
__pyx_t_7 = __pyx_v_my_int; |
| 4534 |
|
| 4535 |
__pyx_t_6 = 0; |
| 4536 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 4537 |
|
| 4538 |
__pyx_t_2 = __pyx_v_my_pyint; |
| 4539 |
|
| 4540 |
__pyx_t_9 = __pyx_v_my_int; |
| 4541 |
|
| 4542 |
__pyx_t_10 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4543 |
|
| 4544 |
__pyx_t_11 = __pyx_v_my_int; |
| 4545 |
|
| 4546 |
|
| 4547 |
__pyx_t_13 = (__pyx_t_7 < __pyx_t_11); |
| 4548 |
if (__pyx_t_13) { |
| 4549 |
__pyx_t_16 = __pyx_t_7; |
| 4550 |
} else { |
| 4551 |
__pyx_t_16 = __pyx_t_11; |
| 4552 |
} |
| 4553 |
|
| 4554 |
|
| 4555 |
|
| 4556 |
__pyx_t_11 = __pyx_t_16; |
| 4557 |
|
| 4558 |
|
| 4559 |
|
| 4560 |
__pyx_t_13 = (__pyx_t_6 < __pyx_t_11); |
| 4561 |
if (__pyx_t_13) { |
| 4562 |
__pyx_t_8 = __pyx_t_6; |
| 4563 |
} else { |
| 4564 |
__pyx_t_8 = __pyx_t_11; |
| 4565 |
} |
| 4566 |
|
| 4567 |
|
| 4568 |
|
| 4569 |
__pyx_t_14 = __pyx_t_8; |
| 4570 |
|
| 4571 |
|
| 4572 |
|
| 4573 |
__pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4574 |
__Pyx_GOTREF(__pyx_t_4); |
| 4575 |
|
| 4576 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4577 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4578 |
|
| 4579 |
|
| 4580 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4581 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4582 |
|
| 4583 |
if (__pyx_t_13) { |
| 4584 |
__Pyx_INCREF(__pyx_t_2); |
| 4585 |
__pyx_t_1 = __pyx_t_2; |
| 4586 |
} else { |
| 4587 |
|
| 4588 |
__pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4589 |
__Pyx_GOTREF(__pyx_t_3); |
| 4590 |
__pyx_t_1 = __pyx_t_3; |
| 4591 |
__pyx_t_3 = 0; |
| 4592 |
|
| 4593 |
} |
| 4594 |
|
| 4595 |
|
| 4596 |
__Pyx_INCREF(__pyx_t_1); |
| 4597 |
|
| 4598 |
__pyx_t_3 = __pyx_t_1; |
| 4599 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4600 |
|
| 4601 |
|
| 4602 |
|
| 4603 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4604 |
__Pyx_GOTREF(__pyx_t_4); |
| 4605 |
|
| 4606 |
__pyx_t_15 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4607 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4608 |
|
| 4609 |
|
| 4610 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4611 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 4612 |
|
| 4613 |
if (__pyx_t_13) { |
| 4614 |
|
| 4615 |
__pyx_t_15 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4616 |
__Pyx_GOTREF(__pyx_t_15); |
| 4617 |
__pyx_t_1 = __pyx_t_15; |
| 4618 |
__pyx_t_15 = 0; |
| 4619 |
|
| 4620 |
} else { |
| 4621 |
__Pyx_INCREF(__pyx_t_3); |
| 4622 |
__pyx_t_1 = __pyx_t_3; |
| 4623 |
} |
| 4624 |
|
| 4625 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4626 |
|
| 4627 |
__Pyx_INCREF(__pyx_t_1); |
| 4628 |
|
| 4629 |
__pyx_t_3 = __pyx_t_1; |
| 4630 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4631 |
|
| 4632 |
|
| 4633 |
|
| 4634 |
__pyx_t_15 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4635 |
__Pyx_GOTREF(__pyx_t_15); |
| 4636 |
|
| 4637 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_15, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4638 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 4639 |
|
| 4640 |
|
| 4641 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4642 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4643 |
|
| 4644 |
if (__pyx_t_13) { |
| 4645 |
|
| 4646 |
__pyx_t_4 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4647 |
__Pyx_GOTREF(__pyx_t_4); |
| 4648 |
__pyx_t_1 = __pyx_t_4; |
| 4649 |
__pyx_t_4 = 0; |
| 4650 |
|
| 4651 |
} else { |
| 4652 |
__Pyx_INCREF(__pyx_t_3); |
| 4653 |
__pyx_t_1 = __pyx_t_3; |
| 4654 |
} |
| 4655 |
|
| 4656 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4657 |
|
| 4658 |
|
| 4659 |
|
| 4660 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4661 |
|
| 4662 |
|
| 4663 |
|
| 4664 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 172, __pyx_L1_error) |
| 4665 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4666 |
|
| 4667 |
|
| 4668 |
|
| 4669 |
|
| 4670 |
|
| 4671 |
|
| 4672 |
|
| 4673 |
|
| 4674 |
|
| 4675 |
|
| 4676 |
__pyx_t_7 = __pyx_v_my_int; |
| 4677 |
|
| 4678 |
__pyx_t_6 = 2; |
| 4679 |
|
| 4680 |
__pyx_t_9 = __pyx_v_my_int; |
| 4681 |
|
| 4682 |
__pyx_t_14 = 0; |
| 4683 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 4684 |
|
| 4685 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 4686 |
|
| 4687 |
__pyx_t_11 = __pyx_v_my_int; |
| 4688 |
|
| 4689 |
__pyx_t_10 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4690 |
|
| 4691 |
__pyx_t_16 = __pyx_v_my_int; |
| 4692 |
|
| 4693 |
|
| 4694 |
__pyx_t_13 = (__pyx_t_7 < __pyx_t_16); |
| 4695 |
if (__pyx_t_13) { |
| 4696 |
__pyx_t_17 = __pyx_t_7; |
| 4697 |
} else { |
| 4698 |
__pyx_t_17 = __pyx_t_16; |
| 4699 |
} |
| 4700 |
|
| 4701 |
|
| 4702 |
|
| 4703 |
__pyx_t_16 = __pyx_t_17; |
| 4704 |
|
| 4705 |
|
| 4706 |
|
| 4707 |
__pyx_t_13 = (__pyx_t_6 < __pyx_t_16); |
| 4708 |
if (__pyx_t_13) { |
| 4709 |
__pyx_t_8 = __pyx_t_6; |
| 4710 |
} else { |
| 4711 |
__pyx_t_8 = __pyx_t_16; |
| 4712 |
} |
| 4713 |
|
| 4714 |
|
| 4715 |
|
| 4716 |
__pyx_t_12 = __pyx_t_8; |
| 4717 |
|
| 4718 |
|
| 4719 |
|
| 4720 |
__pyx_t_13 = (__pyx_t_9 < __pyx_t_12); |
| 4721 |
if (__pyx_t_13) { |
| 4722 |
__pyx_t_8 = __pyx_t_9; |
| 4723 |
} else { |
| 4724 |
__pyx_t_8 = __pyx_t_12; |
| 4725 |
} |
| 4726 |
|
| 4727 |
|
| 4728 |
|
| 4729 |
__pyx_t_12 = __pyx_t_8; |
| 4730 |
|
| 4731 |
|
| 4732 |
|
| 4733 |
__pyx_t_13 = (__pyx_t_14 < __pyx_t_12); |
| 4734 |
if (__pyx_t_13) { |
| 4735 |
__pyx_t_8 = __pyx_t_14; |
| 4736 |
} else { |
| 4737 |
__pyx_t_8 = __pyx_t_12; |
| 4738 |
} |
| 4739 |
|
| 4740 |
|
| 4741 |
|
| 4742 |
__pyx_t_12 = __pyx_t_8; |
| 4743 |
|
| 4744 |
|
| 4745 |
|
| 4746 |
__pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4747 |
__Pyx_GOTREF(__pyx_t_3); |
| 4748 |
|
| 4749 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4750 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4751 |
|
| 4752 |
|
| 4753 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4754 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4755 |
|
| 4756 |
if (__pyx_t_13) { |
| 4757 |
__Pyx_INCREF(__pyx_t_1); |
| 4758 |
__pyx_t_2 = __pyx_t_1; |
| 4759 |
} else { |
| 4760 |
|
| 4761 |
__pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4762 |
__Pyx_GOTREF(__pyx_t_4); |
| 4763 |
__pyx_t_2 = __pyx_t_4; |
| 4764 |
__pyx_t_4 = 0; |
| 4765 |
|
| 4766 |
} |
| 4767 |
|
| 4768 |
|
| 4769 |
__Pyx_INCREF(__pyx_t_2); |
| 4770 |
|
| 4771 |
__pyx_t_4 = __pyx_t_2; |
| 4772 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4773 |
|
| 4774 |
|
| 4775 |
|
| 4776 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4777 |
__Pyx_GOTREF(__pyx_t_3); |
| 4778 |
|
| 4779 |
__pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4780 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4781 |
|
| 4782 |
|
| 4783 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4784 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 4785 |
|
| 4786 |
if (__pyx_t_13) { |
| 4787 |
|
| 4788 |
__pyx_t_15 = __Pyx_PyLong_From_int(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4789 |
__Pyx_GOTREF(__pyx_t_15); |
| 4790 |
__pyx_t_2 = __pyx_t_15; |
| 4791 |
__pyx_t_15 = 0; |
| 4792 |
|
| 4793 |
} else { |
| 4794 |
__Pyx_INCREF(__pyx_t_4); |
| 4795 |
__pyx_t_2 = __pyx_t_4; |
| 4796 |
} |
| 4797 |
|
| 4798 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4799 |
|
| 4800 |
__Pyx_INCREF(__pyx_t_2); |
| 4801 |
|
| 4802 |
__pyx_t_4 = __pyx_t_2; |
| 4803 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4804 |
|
| 4805 |
|
| 4806 |
|
| 4807 |
__pyx_t_15 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4808 |
__Pyx_GOTREF(__pyx_t_15); |
| 4809 |
|
| 4810 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_15, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4811 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 4812 |
|
| 4813 |
|
| 4814 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4815 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 4816 |
|
| 4817 |
if (__pyx_t_13) { |
| 4818 |
|
| 4819 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4820 |
__Pyx_GOTREF(__pyx_t_3); |
| 4821 |
__pyx_t_2 = __pyx_t_3; |
| 4822 |
__pyx_t_3 = 0; |
| 4823 |
|
| 4824 |
} else { |
| 4825 |
__Pyx_INCREF(__pyx_t_4); |
| 4826 |
__pyx_t_2 = __pyx_t_4; |
| 4827 |
} |
| 4828 |
|
| 4829 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 4830 |
|
| 4831 |
|
| 4832 |
|
| 4833 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 4834 |
|
| 4835 |
|
| 4836 |
|
| 4837 |
|
| 4838 |
|
| 4839 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 173, __pyx_L1_error) |
| 4840 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 4841 |
|
| 4842 |
|
| 4843 |
|
| 4844 |
|
| 4845 |
|
| 4846 |
|
| 4847 |
|
| 4848 |
|
| 4849 |
|
| 4850 |
|
| 4851 |
|
| 4852 |
__pyx_r = Py_None; __Pyx_INCREF(Py_None); |
| 4853 |
goto __pyx_L0; |
| 4854 |
__pyx_L1_error:; |
| 4855 |
__Pyx_XDECREF(__pyx_t_1); |
| 4856 |
__Pyx_XDECREF(__pyx_t_2); |
| 4857 |
__Pyx_XDECREF(__pyx_t_3); |
| 4858 |
__Pyx_XDECREF(__pyx_t_4); |
| 4859 |
__Pyx_XDECREF(__pyx_t_15); |
| 4860 |
__Pyx_AddTraceback("builtin_min_max.test_minN", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4861 |
__pyx_r = NULL; |
| 4862 |
__pyx_L0:; |
| 4863 |
__Pyx_XDECREF(__pyx_v_my_pyint); |
| 4864 |
__Pyx_XDECREF(__pyx_v_my_list); |
| 4865 |
__Pyx_XGIVEREF(__pyx_r); |
| 4866 |
__Pyx_RefNannyFinishContext(); |
| 4867 |
return __pyx_r; |
| 4868 |
} |
| 4869 |
|
| 4870 |
|
| 4871 |
|
| 4872 |
|
| 4873 |
|
| 4874 |
|
| 4875 |
|
| 4876 |
|
| 4877 |
|
| 4878 |
|
| 4879 |
static PyObject *__pyx_pw_15builtin_min_max_17max3(PyObject *__pyx_self, |
| 4880 |
#if CYTHON_METH_FASTCALL |
| 4881 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 4882 |
#else |
| 4883 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 4884 |
#endif |
| 4885 |
); |
| 4886 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_16max3, "\n >>> max3(1,2,3)\n 3\n >>> max3(2,3,1)\n 3\n >>> max3(2,1,3)\n 3\n >>> max3(3,1,2)\n 3\n >>> max3(3,2,1)\n 3\n "); |
| 4887 |
static PyMethodDef __pyx_mdef_15builtin_min_max_17max3 = {"max3", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_17max3, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_16max3}; |
| 4888 |
static PyObject *__pyx_pw_15builtin_min_max_17max3(PyObject *__pyx_self, |
| 4889 |
#if CYTHON_METH_FASTCALL |
| 4890 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 4891 |
#else |
| 4892 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 4893 |
#endif |
| 4894 |
) { |
| 4895 |
PyObject *__pyx_v_a = 0; |
| 4896 |
PyObject *__pyx_v_b = 0; |
| 4897 |
PyObject *__pyx_v_c = 0; |
| 4898 |
#if !CYTHON_METH_FASTCALL |
| 4899 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 4900 |
#endif |
| 4901 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 4902 |
PyObject* values[3] = {0,0,0}; |
| 4903 |
int __pyx_lineno = 0; |
| 4904 |
const char *__pyx_filename = NULL; |
| 4905 |
int __pyx_clineno = 0; |
| 4906 |
PyObject *__pyx_r = 0; |
| 4907 |
__Pyx_RefNannyDeclarations |
| 4908 |
__Pyx_RefNannySetupContext("max3 (wrapper)", 0); |
| 4909 |
#if !CYTHON_METH_FASTCALL |
| 4910 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 4911 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 4912 |
#else |
| 4913 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 4914 |
#endif |
| 4915 |
#endif |
| 4916 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 4917 |
{ |
| 4918 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,0}; |
| 4919 |
if (__pyx_kwds) { |
| 4920 |
Py_ssize_t kw_args; |
| 4921 |
switch (__pyx_nargs) { |
| 4922 |
case 3: |
| 4923 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 4924 |
CYTHON_FALLTHROUGH; |
| 4925 |
case 2: |
| 4926 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 4927 |
CYTHON_FALLTHROUGH; |
| 4928 |
case 1: |
| 4929 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 4930 |
CYTHON_FALLTHROUGH; |
| 4931 |
case 0: break; |
| 4932 |
default: goto __pyx_L5_argtuple_error; |
| 4933 |
} |
| 4934 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 4935 |
switch (__pyx_nargs) { |
| 4936 |
case 0: |
| 4937 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_a)) != 0)) { |
| 4938 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 4939 |
kw_args--; |
| 4940 |
} |
| 4941 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) |
| 4942 |
else goto __pyx_L5_argtuple_error; |
| 4943 |
CYTHON_FALLTHROUGH; |
| 4944 |
case 1: |
| 4945 |
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_b)) != 0)) { |
| 4946 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]); |
| 4947 |
kw_args--; |
| 4948 |
} |
| 4949 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) |
| 4950 |
else { |
| 4951 |
__Pyx_RaiseArgtupleInvalid("max3", 1, 3, 3, 1); __PYX_ERR(0, 178, __pyx_L3_error) |
| 4952 |
} |
| 4953 |
CYTHON_FALLTHROUGH; |
| 4954 |
case 2: |
| 4955 |
if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_c)) != 0)) { |
| 4956 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]); |
| 4957 |
kw_args--; |
| 4958 |
} |
| 4959 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 178, __pyx_L3_error) |
| 4960 |
else { |
| 4961 |
__Pyx_RaiseArgtupleInvalid("max3", 1, 3, 3, 2); __PYX_ERR(0, 178, __pyx_L3_error) |
| 4962 |
} |
| 4963 |
} |
| 4964 |
if (unlikely(kw_args > 0)) { |
| 4965 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 4966 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "max3") < 0)) __PYX_ERR(0, 178, __pyx_L3_error) |
| 4967 |
} |
| 4968 |
} else if (unlikely(__pyx_nargs != 3)) { |
| 4969 |
goto __pyx_L5_argtuple_error; |
| 4970 |
} else { |
| 4971 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 4972 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 4973 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 4974 |
} |
| 4975 |
__pyx_v_a = values[0]; |
| 4976 |
__pyx_v_b = values[1]; |
| 4977 |
__pyx_v_c = values[2]; |
| 4978 |
} |
| 4979 |
goto __pyx_L6_skip; |
| 4980 |
__pyx_L5_argtuple_error:; |
| 4981 |
__Pyx_RaiseArgtupleInvalid("max3", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 178, __pyx_L3_error) |
| 4982 |
__pyx_L6_skip:; |
| 4983 |
goto __pyx_L4_argument_unpacking_done; |
| 4984 |
__pyx_L3_error:; |
| 4985 |
{ |
| 4986 |
Py_ssize_t __pyx_temp; |
| 4987 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 4988 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 4989 |
} |
| 4990 |
} |
| 4991 |
__Pyx_AddTraceback("builtin_min_max.max3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 4992 |
__Pyx_RefNannyFinishContext(); |
| 4993 |
return NULL; |
| 4994 |
__pyx_L4_argument_unpacking_done:; |
| 4995 |
__pyx_r = __pyx_pf_15builtin_min_max_16max3(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c); |
| 4996 |
|
| 4997 |
|
| 4998 |
{ |
| 4999 |
Py_ssize_t __pyx_temp; |
| 5000 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 5001 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 5002 |
} |
| 5003 |
} |
| 5004 |
__Pyx_RefNannyFinishContext(); |
| 5005 |
return __pyx_r; |
| 5006 |
} |
| 5007 |
|
| 5008 |
static PyObject *__pyx_pf_15builtin_min_max_16max3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { |
| 5009 |
PyObject *__pyx_r = NULL; |
| 5010 |
__Pyx_RefNannyDeclarations |
| 5011 |
PyObject *__pyx_t_1 = NULL; |
| 5012 |
PyObject *__pyx_t_2 = NULL; |
| 5013 |
PyObject *__pyx_t_3 = NULL; |
| 5014 |
PyObject *__pyx_t_4 = NULL; |
| 5015 |
PyObject *__pyx_t_5 = NULL; |
| 5016 |
int __pyx_t_6; |
| 5017 |
int __pyx_lineno = 0; |
| 5018 |
const char *__pyx_filename = NULL; |
| 5019 |
int __pyx_clineno = 0; |
| 5020 |
__Pyx_RefNannySetupContext("max3", 0); |
| 5021 |
|
| 5022 |
|
| 5023 |
|
| 5024 |
|
| 5025 |
|
| 5026 |
|
| 5027 |
|
| 5028 |
|
| 5029 |
__Pyx_XDECREF(__pyx_r); |
| 5030 |
__Pyx_INCREF(__pyx_v_b); |
| 5031 |
|
| 5032 |
__pyx_t_1 = __pyx_v_b; |
| 5033 |
__Pyx_INCREF(__pyx_v_c); |
| 5034 |
|
| 5035 |
__pyx_t_2 = __pyx_v_c; |
| 5036 |
__Pyx_INCREF(__pyx_v_a); |
| 5037 |
|
| 5038 |
__pyx_t_3 = __pyx_v_a; |
| 5039 |
|
| 5040 |
|
| 5041 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 193, __pyx_L1_error) |
| 5042 |
|
| 5043 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 193, __pyx_L1_error) |
| 5044 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 5045 |
|
| 5046 |
if (__pyx_t_6) { |
| 5047 |
__Pyx_INCREF(__pyx_t_1); |
| 5048 |
__pyx_t_4 = __pyx_t_1; |
| 5049 |
} else { |
| 5050 |
__Pyx_INCREF(__pyx_t_3); |
| 5051 |
__pyx_t_4 = __pyx_t_3; |
| 5052 |
} |
| 5053 |
|
| 5054 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 5055 |
|
| 5056 |
__Pyx_INCREF(__pyx_t_4); |
| 5057 |
|
| 5058 |
__pyx_t_3 = __pyx_t_4; |
| 5059 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 5060 |
|
| 5061 |
|
| 5062 |
|
| 5063 |
__pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 193, __pyx_L1_error) |
| 5064 |
|
| 5065 |
__pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 193, __pyx_L1_error) |
| 5066 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 5067 |
|
| 5068 |
if (__pyx_t_6) { |
| 5069 |
__Pyx_INCREF(__pyx_t_2); |
| 5070 |
__pyx_t_4 = __pyx_t_2; |
| 5071 |
} else { |
| 5072 |
__Pyx_INCREF(__pyx_t_3); |
| 5073 |
__pyx_t_4 = __pyx_t_3; |
| 5074 |
} |
| 5075 |
|
| 5076 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 5077 |
|
| 5078 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 5079 |
|
| 5080 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 5081 |
|
| 5082 |
__Pyx_INCREF(__pyx_t_4); |
| 5083 |
__pyx_r = __pyx_t_4; |
| 5084 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 5085 |
|
| 5086 |
goto __pyx_L0; |
| 5087 |
|
| 5088 |
|
| 5089 |
|
| 5090 |
|
| 5091 |
|
| 5092 |
|
| 5093 |
|
| 5094 |
|
| 5095 |
|
| 5096 |
|
| 5097 |
__pyx_L1_error:; |
| 5098 |
__Pyx_XDECREF(__pyx_t_1); |
| 5099 |
__Pyx_XDECREF(__pyx_t_2); |
| 5100 |
__Pyx_XDECREF(__pyx_t_3); |
| 5101 |
__Pyx_XDECREF(__pyx_t_4); |
| 5102 |
__Pyx_XDECREF(__pyx_t_5); |
| 5103 |
__Pyx_AddTraceback("builtin_min_max.max3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5104 |
__pyx_r = NULL; |
| 5105 |
__pyx_L0:; |
| 5106 |
__Pyx_XGIVEREF(__pyx_r); |
| 5107 |
__Pyx_RefNannyFinishContext(); |
| 5108 |
return __pyx_r; |
| 5109 |
} |
| 5110 |
|
| 5111 |
|
| 5112 |
|
| 5113 |
|
| 5114 |
|
| 5115 |
|
| 5116 |
|
| 5117 |
|
| 5118 |
|
| 5119 |
|
| 5120 |
static PyObject *__pyx_pw_15builtin_min_max_19max3_typed(PyObject *__pyx_self, |
| 5121 |
#if CYTHON_METH_FASTCALL |
| 5122 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 5123 |
#else |
| 5124 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 5125 |
#endif |
| 5126 |
); |
| 5127 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_18max3_typed, "\n >>> max3_typed(1,2,3)\n 3\n >>> max3_typed(2,3,1)\n 3\n >>> max3_typed(2,1,3)\n 3\n >>> max3_typed(3,1,2)\n 3\n >>> max3_typed(3,2,1)\n 3\n "); |
| 5128 |
static PyMethodDef __pyx_mdef_15builtin_min_max_19max3_typed = {"max3_typed", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_19max3_typed, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_18max3_typed}; |
| 5129 |
static PyObject *__pyx_pw_15builtin_min_max_19max3_typed(PyObject *__pyx_self, |
| 5130 |
#if CYTHON_METH_FASTCALL |
| 5131 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 5132 |
#else |
| 5133 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 5134 |
#endif |
| 5135 |
) { |
| 5136 |
int __pyx_v_a; |
| 5137 |
int __pyx_v_b; |
| 5138 |
int __pyx_v_c; |
| 5139 |
#if !CYTHON_METH_FASTCALL |
| 5140 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 5141 |
#endif |
| 5142 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 5143 |
PyObject* values[3] = {0,0,0}; |
| 5144 |
int __pyx_lineno = 0; |
| 5145 |
const char *__pyx_filename = NULL; |
| 5146 |
int __pyx_clineno = 0; |
| 5147 |
PyObject *__pyx_r = 0; |
| 5148 |
__Pyx_RefNannyDeclarations |
| 5149 |
__Pyx_RefNannySetupContext("max3_typed (wrapper)", 0); |
| 5150 |
#if !CYTHON_METH_FASTCALL |
| 5151 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 5152 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 5153 |
#else |
| 5154 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 5155 |
#endif |
| 5156 |
#endif |
| 5157 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 5158 |
{ |
| 5159 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_a,&__pyx_mstate_global->__pyx_n_u_b,&__pyx_mstate_global->__pyx_n_u_c,0}; |
| 5160 |
if (__pyx_kwds) { |
| 5161 |
Py_ssize_t kw_args; |
| 5162 |
switch (__pyx_nargs) { |
| 5163 |
case 3: |
| 5164 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 5165 |
CYTHON_FALLTHROUGH; |
| 5166 |
case 2: |
| 5167 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 5168 |
CYTHON_FALLTHROUGH; |
| 5169 |
case 1: |
| 5170 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 5171 |
CYTHON_FALLTHROUGH; |
| 5172 |
case 0: break; |
| 5173 |
default: goto __pyx_L5_argtuple_error; |
| 5174 |
} |
| 5175 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 5176 |
switch (__pyx_nargs) { |
| 5177 |
case 0: |
| 5178 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_a)) != 0)) { |
| 5179 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 5180 |
kw_args--; |
| 5181 |
} |
| 5182 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error) |
| 5183 |
else goto __pyx_L5_argtuple_error; |
| 5184 |
CYTHON_FALLTHROUGH; |
| 5185 |
case 1: |
| 5186 |
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_b)) != 0)) { |
| 5187 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]); |
| 5188 |
kw_args--; |
| 5189 |
} |
| 5190 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error) |
| 5191 |
else { |
| 5192 |
__Pyx_RaiseArgtupleInvalid("max3_typed", 1, 3, 3, 1); __PYX_ERR(0, 196, __pyx_L3_error) |
| 5193 |
} |
| 5194 |
CYTHON_FALLTHROUGH; |
| 5195 |
case 2: |
| 5196 |
if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_c)) != 0)) { |
| 5197 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[2]); |
| 5198 |
kw_args--; |
| 5199 |
} |
| 5200 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error) |
| 5201 |
else { |
| 5202 |
__Pyx_RaiseArgtupleInvalid("max3_typed", 1, 3, 3, 2); __PYX_ERR(0, 196, __pyx_L3_error) |
| 5203 |
} |
| 5204 |
} |
| 5205 |
if (unlikely(kw_args > 0)) { |
| 5206 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 5207 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "max3_typed") < 0)) __PYX_ERR(0, 196, __pyx_L3_error) |
| 5208 |
} |
| 5209 |
} else if (unlikely(__pyx_nargs != 3)) { |
| 5210 |
goto __pyx_L5_argtuple_error; |
| 5211 |
} else { |
| 5212 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 5213 |
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); |
| 5214 |
values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); |
| 5215 |
} |
| 5216 |
__pyx_v_a = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_a == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) |
| 5217 |
__pyx_v_b = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_b == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) |
| 5218 |
__pyx_v_c = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_c == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) |
| 5219 |
} |
| 5220 |
goto __pyx_L6_skip; |
| 5221 |
__pyx_L5_argtuple_error:; |
| 5222 |
__Pyx_RaiseArgtupleInvalid("max3_typed", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 196, __pyx_L3_error) |
| 5223 |
__pyx_L6_skip:; |
| 5224 |
goto __pyx_L4_argument_unpacking_done; |
| 5225 |
__pyx_L3_error:; |
| 5226 |
{ |
| 5227 |
Py_ssize_t __pyx_temp; |
| 5228 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 5229 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 5230 |
} |
| 5231 |
} |
| 5232 |
__Pyx_AddTraceback("builtin_min_max.max3_typed", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5233 |
__Pyx_RefNannyFinishContext(); |
| 5234 |
return NULL; |
| 5235 |
__pyx_L4_argument_unpacking_done:; |
| 5236 |
__pyx_r = __pyx_pf_15builtin_min_max_18max3_typed(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c); |
| 5237 |
|
| 5238 |
|
| 5239 |
{ |
| 5240 |
Py_ssize_t __pyx_temp; |
| 5241 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 5242 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 5243 |
} |
| 5244 |
} |
| 5245 |
__Pyx_RefNannyFinishContext(); |
| 5246 |
return __pyx_r; |
| 5247 |
} |
| 5248 |
|
| 5249 |
static PyObject *__pyx_pf_15builtin_min_max_18max3_typed(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_a, int __pyx_v_b, int __pyx_v_c) { |
| 5250 |
PyObject *__pyx_r = NULL; |
| 5251 |
__Pyx_RefNannyDeclarations |
| 5252 |
int __pyx_t_1; |
| 5253 |
int __pyx_t_2; |
| 5254 |
int __pyx_t_3; |
| 5255 |
int __pyx_t_4; |
| 5256 |
int __pyx_t_5; |
| 5257 |
PyObject *__pyx_t_6 = NULL; |
| 5258 |
int __pyx_lineno = 0; |
| 5259 |
const char *__pyx_filename = NULL; |
| 5260 |
int __pyx_clineno = 0; |
| 5261 |
__Pyx_RefNannySetupContext("max3_typed", 0); |
| 5262 |
|
| 5263 |
|
| 5264 |
|
| 5265 |
|
| 5266 |
|
| 5267 |
|
| 5268 |
|
| 5269 |
|
| 5270 |
__Pyx_XDECREF(__pyx_r); |
| 5271 |
|
| 5272 |
__pyx_t_1 = __pyx_v_b; |
| 5273 |
|
| 5274 |
__pyx_t_2 = __pyx_v_c; |
| 5275 |
|
| 5276 |
__pyx_t_3 = __pyx_v_a; |
| 5277 |
|
| 5278 |
|
| 5279 |
__pyx_t_5 = (__pyx_t_1 > __pyx_t_3); |
| 5280 |
if (__pyx_t_5) { |
| 5281 |
__pyx_t_4 = __pyx_t_1; |
| 5282 |
} else { |
| 5283 |
__pyx_t_4 = __pyx_t_3; |
| 5284 |
} |
| 5285 |
|
| 5286 |
|
| 5287 |
|
| 5288 |
__pyx_t_3 = __pyx_t_4; |
| 5289 |
|
| 5290 |
|
| 5291 |
|
| 5292 |
__pyx_t_5 = (__pyx_t_2 > __pyx_t_3); |
| 5293 |
if (__pyx_t_5) { |
| 5294 |
__pyx_t_4 = __pyx_t_2; |
| 5295 |
} else { |
| 5296 |
__pyx_t_4 = __pyx_t_3; |
| 5297 |
} |
| 5298 |
|
| 5299 |
|
| 5300 |
|
| 5301 |
|
| 5302 |
|
| 5303 |
__pyx_t_6 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 211, __pyx_L1_error) |
| 5304 |
__Pyx_GOTREF(__pyx_t_6); |
| 5305 |
|
| 5306 |
__pyx_r = __pyx_t_6; |
| 5307 |
__pyx_t_6 = 0; |
| 5308 |
|
| 5309 |
goto __pyx_L0; |
| 5310 |
|
| 5311 |
|
| 5312 |
|
| 5313 |
|
| 5314 |
|
| 5315 |
|
| 5316 |
|
| 5317 |
|
| 5318 |
|
| 5319 |
|
| 5320 |
__pyx_L1_error:; |
| 5321 |
__Pyx_XDECREF(__pyx_t_6); |
| 5322 |
__Pyx_AddTraceback("builtin_min_max.max3_typed", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5323 |
__pyx_r = NULL; |
| 5324 |
__pyx_L0:; |
| 5325 |
__Pyx_XGIVEREF(__pyx_r); |
| 5326 |
__Pyx_RefNannyFinishContext(); |
| 5327 |
return __pyx_r; |
| 5328 |
} |
| 5329 |
|
| 5330 |
|
| 5331 |
|
| 5332 |
|
| 5333 |
|
| 5334 |
|
| 5335 |
|
| 5336 |
|
| 5337 |
|
| 5338 |
|
| 5339 |
static PyObject *__pyx_pw_15builtin_min_max_21literal_max3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 5340 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_20literal_max3, "\n >>> literal_max3()\n (3, 3, 3, 3, 3)\n "); |
| 5341 |
static PyMethodDef __pyx_mdef_15builtin_min_max_21literal_max3 = {"literal_max3", (PyCFunction)__pyx_pw_15builtin_min_max_21literal_max3, METH_NOARGS, __pyx_doc_15builtin_min_max_20literal_max3}; |
| 5342 |
static PyObject *__pyx_pw_15builtin_min_max_21literal_max3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 5343 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 5344 |
PyObject *__pyx_r = 0; |
| 5345 |
__Pyx_RefNannyDeclarations |
| 5346 |
__Pyx_RefNannySetupContext("literal_max3 (wrapper)", 0); |
| 5347 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 5348 |
__pyx_r = __pyx_pf_15builtin_min_max_20literal_max3(__pyx_self); |
| 5349 |
|
| 5350 |
|
| 5351 |
__Pyx_RefNannyFinishContext(); |
| 5352 |
return __pyx_r; |
| 5353 |
} |
| 5354 |
|
| 5355 |
static PyObject *__pyx_pf_15builtin_min_max_20literal_max3(CYTHON_UNUSED PyObject *__pyx_self) { |
| 5356 |
PyObject *__pyx_r = NULL; |
| 5357 |
__Pyx_RefNannyDeclarations |
| 5358 |
long __pyx_t_1; |
| 5359 |
long __pyx_t_2; |
| 5360 |
long __pyx_t_3; |
| 5361 |
long __pyx_t_4; |
| 5362 |
int __pyx_t_5; |
| 5363 |
PyObject *__pyx_t_6 = NULL; |
| 5364 |
PyObject *__pyx_t_7 = NULL; |
| 5365 |
PyObject *__pyx_t_8 = NULL; |
| 5366 |
PyObject *__pyx_t_9 = NULL; |
| 5367 |
PyObject *__pyx_t_10 = NULL; |
| 5368 |
PyObject *__pyx_t_11 = NULL; |
| 5369 |
int __pyx_lineno = 0; |
| 5370 |
const char *__pyx_filename = NULL; |
| 5371 |
int __pyx_clineno = 0; |
| 5372 |
__Pyx_RefNannySetupContext("literal_max3", 0); |
| 5373 |
|
| 5374 |
|
| 5375 |
|
| 5376 |
|
| 5377 |
|
| 5378 |
|
| 5379 |
|
| 5380 |
|
| 5381 |
__Pyx_XDECREF(__pyx_r); |
| 5382 |
|
| 5383 |
__pyx_t_1 = 2; |
| 5384 |
|
| 5385 |
__pyx_t_2 = 3; |
| 5386 |
|
| 5387 |
__pyx_t_3 = 1; |
| 5388 |
|
| 5389 |
|
| 5390 |
__pyx_t_5 = (__pyx_t_1 > __pyx_t_3); |
| 5391 |
if (__pyx_t_5) { |
| 5392 |
__pyx_t_4 = __pyx_t_1; |
| 5393 |
} else { |
| 5394 |
__pyx_t_4 = __pyx_t_3; |
| 5395 |
} |
| 5396 |
|
| 5397 |
|
| 5398 |
|
| 5399 |
__pyx_t_3 = __pyx_t_4; |
| 5400 |
|
| 5401 |
|
| 5402 |
|
| 5403 |
__pyx_t_5 = (__pyx_t_2 > __pyx_t_3); |
| 5404 |
if (__pyx_t_5) { |
| 5405 |
__pyx_t_4 = __pyx_t_2; |
| 5406 |
} else { |
| 5407 |
__pyx_t_4 = __pyx_t_3; |
| 5408 |
} |
| 5409 |
|
| 5410 |
|
| 5411 |
|
| 5412 |
|
| 5413 |
|
| 5414 |
__pyx_t_6 = __Pyx_PyLong_From_long(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L1_error) |
| 5415 |
__Pyx_GOTREF(__pyx_t_6); |
| 5416 |
|
| 5417 |
|
| 5418 |
__pyx_t_4 = 1; |
| 5419 |
|
| 5420 |
__pyx_t_1 = 3; |
| 5421 |
|
| 5422 |
__pyx_t_2 = 2; |
| 5423 |
|
| 5424 |
|
| 5425 |
__pyx_t_5 = (__pyx_t_4 > __pyx_t_2); |
| 5426 |
if (__pyx_t_5) { |
| 5427 |
__pyx_t_3 = __pyx_t_4; |
| 5428 |
} else { |
| 5429 |
__pyx_t_3 = __pyx_t_2; |
| 5430 |
} |
| 5431 |
|
| 5432 |
|
| 5433 |
|
| 5434 |
__pyx_t_2 = __pyx_t_3; |
| 5435 |
|
| 5436 |
|
| 5437 |
|
| 5438 |
__pyx_t_5 = (__pyx_t_1 > __pyx_t_2); |
| 5439 |
if (__pyx_t_5) { |
| 5440 |
__pyx_t_3 = __pyx_t_1; |
| 5441 |
} else { |
| 5442 |
__pyx_t_3 = __pyx_t_2; |
| 5443 |
} |
| 5444 |
|
| 5445 |
|
| 5446 |
|
| 5447 |
|
| 5448 |
|
| 5449 |
__pyx_t_7 = __Pyx_PyLong_From_long(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 221, __pyx_L1_error) |
| 5450 |
__Pyx_GOTREF(__pyx_t_7); |
| 5451 |
|
| 5452 |
|
| 5453 |
__pyx_t_3 = 3; |
| 5454 |
|
| 5455 |
__pyx_t_4 = 1; |
| 5456 |
|
| 5457 |
__pyx_t_1 = 2; |
| 5458 |
|
| 5459 |
|
| 5460 |
__pyx_t_5 = (__pyx_t_3 > __pyx_t_1); |
| 5461 |
if (__pyx_t_5) { |
| 5462 |
__pyx_t_2 = __pyx_t_3; |
| 5463 |
} else { |
| 5464 |
__pyx_t_2 = __pyx_t_1; |
| 5465 |
} |
| 5466 |
|
| 5467 |
|
| 5468 |
|
| 5469 |
__pyx_t_1 = __pyx_t_2; |
| 5470 |
|
| 5471 |
|
| 5472 |
|
| 5473 |
__pyx_t_5 = (__pyx_t_4 > __pyx_t_1); |
| 5474 |
if (__pyx_t_5) { |
| 5475 |
__pyx_t_2 = __pyx_t_4; |
| 5476 |
} else { |
| 5477 |
__pyx_t_2 = __pyx_t_1; |
| 5478 |
} |
| 5479 |
|
| 5480 |
|
| 5481 |
|
| 5482 |
|
| 5483 |
|
| 5484 |
__pyx_t_8 = __Pyx_PyLong_From_long(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 221, __pyx_L1_error) |
| 5485 |
__Pyx_GOTREF(__pyx_t_8); |
| 5486 |
|
| 5487 |
|
| 5488 |
__pyx_t_2 = 1; |
| 5489 |
|
| 5490 |
__pyx_t_3 = 2; |
| 5491 |
|
| 5492 |
__pyx_t_4 = 3; |
| 5493 |
|
| 5494 |
|
| 5495 |
__pyx_t_5 = (__pyx_t_2 > __pyx_t_4); |
| 5496 |
if (__pyx_t_5) { |
| 5497 |
__pyx_t_1 = __pyx_t_2; |
| 5498 |
} else { |
| 5499 |
__pyx_t_1 = __pyx_t_4; |
| 5500 |
} |
| 5501 |
|
| 5502 |
|
| 5503 |
|
| 5504 |
__pyx_t_4 = __pyx_t_1; |
| 5505 |
|
| 5506 |
|
| 5507 |
|
| 5508 |
__pyx_t_5 = (__pyx_t_3 > __pyx_t_4); |
| 5509 |
if (__pyx_t_5) { |
| 5510 |
__pyx_t_1 = __pyx_t_3; |
| 5511 |
} else { |
| 5512 |
__pyx_t_1 = __pyx_t_4; |
| 5513 |
} |
| 5514 |
|
| 5515 |
|
| 5516 |
|
| 5517 |
|
| 5518 |
|
| 5519 |
__pyx_t_9 = __Pyx_PyLong_From_long(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 221, __pyx_L1_error) |
| 5520 |
__Pyx_GOTREF(__pyx_t_9); |
| 5521 |
|
| 5522 |
|
| 5523 |
__pyx_t_1 = 2; |
| 5524 |
|
| 5525 |
__pyx_t_2 = 1; |
| 5526 |
|
| 5527 |
__pyx_t_3 = 3; |
| 5528 |
|
| 5529 |
|
| 5530 |
__pyx_t_5 = (__pyx_t_1 > __pyx_t_3); |
| 5531 |
if (__pyx_t_5) { |
| 5532 |
__pyx_t_4 = __pyx_t_1; |
| 5533 |
} else { |
| 5534 |
__pyx_t_4 = __pyx_t_3; |
| 5535 |
} |
| 5536 |
|
| 5537 |
|
| 5538 |
|
| 5539 |
__pyx_t_3 = __pyx_t_4; |
| 5540 |
|
| 5541 |
|
| 5542 |
|
| 5543 |
__pyx_t_5 = (__pyx_t_2 > __pyx_t_3); |
| 5544 |
if (__pyx_t_5) { |
| 5545 |
__pyx_t_4 = __pyx_t_2; |
| 5546 |
} else { |
| 5547 |
__pyx_t_4 = __pyx_t_3; |
| 5548 |
} |
| 5549 |
|
| 5550 |
|
| 5551 |
|
| 5552 |
|
| 5553 |
|
| 5554 |
__pyx_t_10 = __Pyx_PyLong_From_long(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 221, __pyx_L1_error) |
| 5555 |
__Pyx_GOTREF(__pyx_t_10); |
| 5556 |
|
| 5557 |
|
| 5558 |
__pyx_t_11 = PyTuple_New(5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 221, __pyx_L1_error) |
| 5559 |
__Pyx_GOTREF(__pyx_t_11); |
| 5560 |
__Pyx_GIVEREF(__pyx_t_6); |
| 5561 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); |
| 5562 |
__Pyx_GIVEREF(__pyx_t_7); |
| 5563 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); |
| 5564 |
__Pyx_GIVEREF(__pyx_t_8); |
| 5565 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_8) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); |
| 5566 |
__Pyx_GIVEREF(__pyx_t_9); |
| 5567 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_9) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); |
| 5568 |
__Pyx_GIVEREF(__pyx_t_10); |
| 5569 |
if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_10) != (0)) __PYX_ERR(0, 221, __pyx_L1_error); |
| 5570 |
__pyx_t_6 = 0; |
| 5571 |
__pyx_t_7 = 0; |
| 5572 |
__pyx_t_8 = 0; |
| 5573 |
__pyx_t_9 = 0; |
| 5574 |
__pyx_t_10 = 0; |
| 5575 |
|
| 5576 |
|
| 5577 |
|
| 5578 |
|
| 5579 |
|
| 5580 |
__pyx_r = __pyx_t_11; |
| 5581 |
__pyx_t_11 = 0; |
| 5582 |
|
| 5583 |
goto __pyx_L0; |
| 5584 |
|
| 5585 |
|
| 5586 |
|
| 5587 |
|
| 5588 |
|
| 5589 |
|
| 5590 |
|
| 5591 |
|
| 5592 |
|
| 5593 |
|
| 5594 |
__pyx_L1_error:; |
| 5595 |
__Pyx_XDECREF(__pyx_t_6); |
| 5596 |
__Pyx_XDECREF(__pyx_t_7); |
| 5597 |
__Pyx_XDECREF(__pyx_t_8); |
| 5598 |
__Pyx_XDECREF(__pyx_t_9); |
| 5599 |
__Pyx_XDECREF(__pyx_t_10); |
| 5600 |
__Pyx_XDECREF(__pyx_t_11); |
| 5601 |
__Pyx_AddTraceback("builtin_min_max.literal_max3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5602 |
__pyx_r = NULL; |
| 5603 |
__pyx_L0:; |
| 5604 |
__Pyx_XGIVEREF(__pyx_r); |
| 5605 |
__Pyx_RefNannyFinishContext(); |
| 5606 |
return __pyx_r; |
| 5607 |
} |
| 5608 |
|
| 5609 |
|
| 5610 |
|
| 5611 |
|
| 5612 |
|
| 5613 |
|
| 5614 |
|
| 5615 |
|
| 5616 |
|
| 5617 |
|
| 5618 |
static PyObject *__pyx_pw_15builtin_min_max_23max1(PyObject *__pyx_self, |
| 5619 |
#if CYTHON_METH_FASTCALL |
| 5620 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 5621 |
#else |
| 5622 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 5623 |
#endif |
| 5624 |
); |
| 5625 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_22max1, "\n >>> max1([1, 2, 3])\n 3\n >>> max1([2])\n 2\n "); |
| 5626 |
static PyMethodDef __pyx_mdef_15builtin_min_max_23max1 = {"max1", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15builtin_min_max_23max1, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_15builtin_min_max_22max1}; |
| 5627 |
static PyObject *__pyx_pw_15builtin_min_max_23max1(PyObject *__pyx_self, |
| 5628 |
#if CYTHON_METH_FASTCALL |
| 5629 |
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds |
| 5630 |
#else |
| 5631 |
PyObject *__pyx_args, PyObject *__pyx_kwds |
| 5632 |
#endif |
| 5633 |
) { |
| 5634 |
PyObject *__pyx_v_x = 0; |
| 5635 |
#if !CYTHON_METH_FASTCALL |
| 5636 |
CYTHON_UNUSED Py_ssize_t __pyx_nargs; |
| 5637 |
#endif |
| 5638 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 5639 |
PyObject* values[1] = {0}; |
| 5640 |
int __pyx_lineno = 0; |
| 5641 |
const char *__pyx_filename = NULL; |
| 5642 |
int __pyx_clineno = 0; |
| 5643 |
PyObject *__pyx_r = 0; |
| 5644 |
__Pyx_RefNannyDeclarations |
| 5645 |
__Pyx_RefNannySetupContext("max1 (wrapper)", 0); |
| 5646 |
#if !CYTHON_METH_FASTCALL |
| 5647 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 5648 |
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args); |
| 5649 |
#else |
| 5650 |
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; |
| 5651 |
#endif |
| 5652 |
#endif |
| 5653 |
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); |
| 5654 |
{ |
| 5655 |
PyObject **__pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0}; |
| 5656 |
if (__pyx_kwds) { |
| 5657 |
Py_ssize_t kw_args; |
| 5658 |
switch (__pyx_nargs) { |
| 5659 |
case 1: |
| 5660 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 5661 |
CYTHON_FALLTHROUGH; |
| 5662 |
case 0: break; |
| 5663 |
default: goto __pyx_L5_argtuple_error; |
| 5664 |
} |
| 5665 |
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds); |
| 5666 |
switch (__pyx_nargs) { |
| 5667 |
case 0: |
| 5668 |
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_mstate_global->__pyx_n_u_x)) != 0)) { |
| 5669 |
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]); |
| 5670 |
kw_args--; |
| 5671 |
} |
| 5672 |
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 224, __pyx_L3_error) |
| 5673 |
else goto __pyx_L5_argtuple_error; |
| 5674 |
} |
| 5675 |
if (unlikely(kw_args > 0)) { |
| 5676 |
const Py_ssize_t kwd_pos_args = __pyx_nargs; |
| 5677 |
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "max1") < 0)) __PYX_ERR(0, 224, __pyx_L3_error) |
| 5678 |
} |
| 5679 |
} else if (unlikely(__pyx_nargs != 1)) { |
| 5680 |
goto __pyx_L5_argtuple_error; |
| 5681 |
} else { |
| 5682 |
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); |
| 5683 |
} |
| 5684 |
__pyx_v_x = values[0]; |
| 5685 |
} |
| 5686 |
goto __pyx_L6_skip; |
| 5687 |
__pyx_L5_argtuple_error:; |
| 5688 |
__Pyx_RaiseArgtupleInvalid("max1", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) |
| 5689 |
__pyx_L6_skip:; |
| 5690 |
goto __pyx_L4_argument_unpacking_done; |
| 5691 |
__pyx_L3_error:; |
| 5692 |
{ |
| 5693 |
Py_ssize_t __pyx_temp; |
| 5694 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 5695 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 5696 |
} |
| 5697 |
} |
| 5698 |
__Pyx_AddTraceback("builtin_min_max.max1", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5699 |
__Pyx_RefNannyFinishContext(); |
| 5700 |
return NULL; |
| 5701 |
__pyx_L4_argument_unpacking_done:; |
| 5702 |
__pyx_r = __pyx_pf_15builtin_min_max_22max1(__pyx_self, __pyx_v_x); |
| 5703 |
|
| 5704 |
|
| 5705 |
{ |
| 5706 |
Py_ssize_t __pyx_temp; |
| 5707 |
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { |
| 5708 |
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); |
| 5709 |
} |
| 5710 |
} |
| 5711 |
__Pyx_RefNannyFinishContext(); |
| 5712 |
return __pyx_r; |
| 5713 |
} |
| 5714 |
|
| 5715 |
static PyObject *__pyx_pf_15builtin_min_max_22max1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { |
| 5716 |
PyObject *__pyx_r = NULL; |
| 5717 |
__Pyx_RefNannyDeclarations |
| 5718 |
PyObject *__pyx_t_1 = NULL; |
| 5719 |
int __pyx_lineno = 0; |
| 5720 |
const char *__pyx_filename = NULL; |
| 5721 |
int __pyx_clineno = 0; |
| 5722 |
__Pyx_RefNannySetupContext("max1", 0); |
| 5723 |
|
| 5724 |
|
| 5725 |
|
| 5726 |
|
| 5727 |
|
| 5728 |
|
| 5729 |
|
| 5730 |
|
| 5731 |
__Pyx_XDECREF(__pyx_r); |
| 5732 |
|
| 5733 |
__pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L1_error) |
| 5734 |
__Pyx_GOTREF(__pyx_t_1); |
| 5735 |
__pyx_r = __pyx_t_1; |
| 5736 |
__pyx_t_1 = 0; |
| 5737 |
|
| 5738 |
goto __pyx_L0; |
| 5739 |
|
| 5740 |
|
| 5741 |
|
| 5742 |
|
| 5743 |
|
| 5744 |
|
| 5745 |
|
| 5746 |
|
| 5747 |
|
| 5748 |
|
| 5749 |
__pyx_L1_error:; |
| 5750 |
__Pyx_XDECREF(__pyx_t_1); |
| 5751 |
__Pyx_AddTraceback("builtin_min_max.max1", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 5752 |
__pyx_r = NULL; |
| 5753 |
__pyx_L0:; |
| 5754 |
__Pyx_XGIVEREF(__pyx_r); |
| 5755 |
__Pyx_RefNannyFinishContext(); |
| 5756 |
return __pyx_r; |
| 5757 |
} |
| 5758 |
|
| 5759 |
|
| 5760 |
|
| 5761 |
|
| 5762 |
|
| 5763 |
|
| 5764 |
|
| 5765 |
|
| 5766 |
|
| 5767 |
|
| 5768 |
static PyObject *__pyx_pw_15builtin_min_max_25test_max2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 5769 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_24test_max2, "\n >>> test_max2()\n 2\n 2\n 2\n 2\n 2\n calling __len__\n 3\n calling __len__\n 3\n "); |
| 5770 |
static PyMethodDef __pyx_mdef_15builtin_min_max_25test_max2 = {"test_max2", (PyCFunction)__pyx_pw_15builtin_min_max_25test_max2, METH_NOARGS, __pyx_doc_15builtin_min_max_24test_max2}; |
| 5771 |
static PyObject *__pyx_pw_15builtin_min_max_25test_max2(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 5772 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 5773 |
PyObject *__pyx_r = 0; |
| 5774 |
__Pyx_RefNannyDeclarations |
| 5775 |
__Pyx_RefNannySetupContext("test_max2 (wrapper)", 0); |
| 5776 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 5777 |
__pyx_r = __pyx_pf_15builtin_min_max_24test_max2(__pyx_self); |
| 5778 |
|
| 5779 |
|
| 5780 |
__Pyx_RefNannyFinishContext(); |
| 5781 |
return __pyx_r; |
| 5782 |
} |
| 5783 |
|
| 5784 |
static PyObject *__pyx_pf_15builtin_min_max_24test_max2(CYTHON_UNUSED PyObject *__pyx_self) { |
| 5785 |
int __pyx_v_my_int; |
| 5786 |
PyObject *__pyx_v_my_pyint = 0; |
| 5787 |
PyObject *__pyx_v_my_list = 0; |
| 5788 |
PyObject *__pyx_r = NULL; |
| 5789 |
__Pyx_RefNannyDeclarations |
| 5790 |
PyObject *__pyx_t_1 = NULL; |
| 5791 |
PyObject *__pyx_t_2 = NULL; |
| 5792 |
PyObject *__pyx_t_3 = NULL; |
| 5793 |
PyObject *__pyx_t_4 = NULL; |
| 5794 |
unsigned int __pyx_t_5; |
| 5795 |
long __pyx_t_6; |
| 5796 |
long __pyx_t_7; |
| 5797 |
long __pyx_t_8; |
| 5798 |
int __pyx_t_9; |
| 5799 |
int __pyx_t_10; |
| 5800 |
Py_ssize_t __pyx_t_11; |
| 5801 |
Py_ssize_t __pyx_t_12; |
| 5802 |
int __pyx_lineno = 0; |
| 5803 |
const char *__pyx_filename = NULL; |
| 5804 |
int __pyx_clineno = 0; |
| 5805 |
__Pyx_RefNannySetupContext("test_max2", 0); |
| 5806 |
|
| 5807 |
|
| 5808 |
|
| 5809 |
|
| 5810 |
|
| 5811 |
|
| 5812 |
|
| 5813 |
|
| 5814 |
__pyx_v_my_int = 1; |
| 5815 |
|
| 5816 |
|
| 5817 |
|
| 5818 |
|
| 5819 |
|
| 5820 |
|
| 5821 |
|
| 5822 |
|
| 5823 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 5824 |
__pyx_v_my_pyint = __pyx_mstate_global->__pyx_int_2; |
| 5825 |
|
| 5826 |
|
| 5827 |
|
| 5828 |
|
| 5829 |
|
| 5830 |
|
| 5831 |
|
| 5832 |
|
| 5833 |
|
| 5834 |
|
| 5835 |
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error) |
| 5836 |
__Pyx_GOTREF(__pyx_t_2); |
| 5837 |
|
| 5838 |
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error) |
| 5839 |
__Pyx_GOTREF(__pyx_t_3); |
| 5840 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); |
| 5841 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); |
| 5842 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 254, __pyx_L1_error); |
| 5843 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 5844 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2); |
| 5845 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 254, __pyx_L1_error); |
| 5846 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_3); |
| 5847 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3); |
| 5848 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 254, __pyx_L1_error); |
| 5849 |
|
| 5850 |
__pyx_t_4 = NULL; |
| 5851 |
|
| 5852 |
__pyx_t_5 = 0; |
| 5853 |
#if CYTHON_UNPACK_METHODS |
| 5854 |
if (unlikely(PyMethod_Check(__pyx_t_2))) { |
| 5855 |
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); |
| 5856 |
assert(__pyx_t_4); |
| 5857 |
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); |
| 5858 |
__Pyx_INCREF(__pyx_t_4); |
| 5859 |
__Pyx_INCREF(function); |
| 5860 |
__Pyx_DECREF_SET(__pyx_t_2, function); |
| 5861 |
__pyx_t_5 = 1; |
| 5862 |
} |
| 5863 |
#endif |
| 5864 |
{ |
| 5865 |
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; |
| 5866 |
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); |
| 5867 |
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 5868 |
|
| 5869 |
|
| 5870 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 5871 |
|
| 5872 |
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) |
| 5873 |
__Pyx_GOTREF(__pyx_t_1); |
| 5874 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 5875 |
|
| 5876 |
} |
| 5877 |
__pyx_v_my_list = __pyx_t_1; |
| 5878 |
__pyx_t_1 = 0; |
| 5879 |
|
| 5880 |
|
| 5881 |
|
| 5882 |
|
| 5883 |
|
| 5884 |
|
| 5885 |
|
| 5886 |
|
| 5887 |
|
| 5888 |
|
| 5889 |
__pyx_t_6 = 2; |
| 5890 |
|
| 5891 |
__pyx_t_7 = 1; |
| 5892 |
|
| 5893 |
|
| 5894 |
__pyx_t_9 = (__pyx_t_6 > __pyx_t_7); |
| 5895 |
if (__pyx_t_9) { |
| 5896 |
__pyx_t_8 = __pyx_t_6; |
| 5897 |
} else { |
| 5898 |
__pyx_t_8 = __pyx_t_7; |
| 5899 |
} |
| 5900 |
|
| 5901 |
|
| 5902 |
|
| 5903 |
|
| 5904 |
__pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) |
| 5905 |
__Pyx_GOTREF(__pyx_t_1); |
| 5906 |
|
| 5907 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 256, __pyx_L1_error) |
| 5908 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 5909 |
|
| 5910 |
|
| 5911 |
|
| 5912 |
|
| 5913 |
|
| 5914 |
|
| 5915 |
|
| 5916 |
|
| 5917 |
|
| 5918 |
|
| 5919 |
__pyx_t_10 = __pyx_v_my_int; |
| 5920 |
|
| 5921 |
__pyx_t_8 = 2; |
| 5922 |
|
| 5923 |
|
| 5924 |
__pyx_t_9 = (__pyx_t_10 > __pyx_t_8); |
| 5925 |
if (__pyx_t_9) { |
| 5926 |
__pyx_t_6 = __pyx_t_10; |
| 5927 |
} else { |
| 5928 |
__pyx_t_6 = __pyx_t_8; |
| 5929 |
} |
| 5930 |
|
| 5931 |
|
| 5932 |
|
| 5933 |
|
| 5934 |
__pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error) |
| 5935 |
__Pyx_GOTREF(__pyx_t_1); |
| 5936 |
|
| 5937 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 257, __pyx_L1_error) |
| 5938 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 5939 |
|
| 5940 |
|
| 5941 |
|
| 5942 |
|
| 5943 |
|
| 5944 |
|
| 5945 |
|
| 5946 |
|
| 5947 |
|
| 5948 |
|
| 5949 |
__pyx_t_6 = 2; |
| 5950 |
|
| 5951 |
__pyx_t_10 = __pyx_v_my_int; |
| 5952 |
|
| 5953 |
|
| 5954 |
__pyx_t_9 = (__pyx_t_6 > __pyx_t_10); |
| 5955 |
if (__pyx_t_9) { |
| 5956 |
__pyx_t_8 = __pyx_t_6; |
| 5957 |
} else { |
| 5958 |
__pyx_t_8 = __pyx_t_10; |
| 5959 |
} |
| 5960 |
|
| 5961 |
|
| 5962 |
|
| 5963 |
|
| 5964 |
__pyx_t_1 = __Pyx_PyLong_From_long(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) |
| 5965 |
__Pyx_GOTREF(__pyx_t_1); |
| 5966 |
|
| 5967 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 258, __pyx_L1_error) |
| 5968 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 5969 |
|
| 5970 |
|
| 5971 |
|
| 5972 |
|
| 5973 |
|
| 5974 |
|
| 5975 |
|
| 5976 |
|
| 5977 |
|
| 5978 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 5979 |
|
| 5980 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 5981 |
|
| 5982 |
__pyx_t_10 = __pyx_v_my_int; |
| 5983 |
|
| 5984 |
|
| 5985 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error) |
| 5986 |
__Pyx_GOTREF(__pyx_t_3); |
| 5987 |
|
| 5988 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) |
| 5989 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 5990 |
|
| 5991 |
|
| 5992 |
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 260, __pyx_L1_error) |
| 5993 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 5994 |
|
| 5995 |
if (__pyx_t_9) { |
| 5996 |
__Pyx_INCREF(__pyx_t_1); |
| 5997 |
__pyx_t_2 = __pyx_t_1; |
| 5998 |
} else { |
| 5999 |
|
| 6000 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 260, __pyx_L1_error) |
| 6001 |
__Pyx_GOTREF(__pyx_t_4); |
| 6002 |
__pyx_t_2 = __pyx_t_4; |
| 6003 |
__pyx_t_4 = 0; |
| 6004 |
|
| 6005 |
} |
| 6006 |
|
| 6007 |
|
| 6008 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6009 |
|
| 6010 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 260, __pyx_L1_error) |
| 6011 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6012 |
|
| 6013 |
|
| 6014 |
|
| 6015 |
|
| 6016 |
|
| 6017 |
|
| 6018 |
|
| 6019 |
|
| 6020 |
|
| 6021 |
|
| 6022 |
__pyx_t_10 = __pyx_v_my_int; |
| 6023 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 6024 |
|
| 6025 |
__pyx_t_2 = __pyx_v_my_pyint; |
| 6026 |
|
| 6027 |
|
| 6028 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error) |
| 6029 |
__Pyx_GOTREF(__pyx_t_4); |
| 6030 |
|
| 6031 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error) |
| 6032 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6033 |
|
| 6034 |
|
| 6035 |
__pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 261, __pyx_L1_error) |
| 6036 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6037 |
|
| 6038 |
if (__pyx_t_9) { |
| 6039 |
|
| 6040 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error) |
| 6041 |
__Pyx_GOTREF(__pyx_t_3); |
| 6042 |
__pyx_t_1 = __pyx_t_3; |
| 6043 |
__pyx_t_3 = 0; |
| 6044 |
|
| 6045 |
} else { |
| 6046 |
__Pyx_INCREF(__pyx_t_2); |
| 6047 |
__pyx_t_1 = __pyx_t_2; |
| 6048 |
} |
| 6049 |
|
| 6050 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6051 |
|
| 6052 |
|
| 6053 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 261, __pyx_L1_error) |
| 6054 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6055 |
|
| 6056 |
|
| 6057 |
|
| 6058 |
|
| 6059 |
|
| 6060 |
|
| 6061 |
|
| 6062 |
|
| 6063 |
|
| 6064 |
|
| 6065 |
__pyx_t_11 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 263, __pyx_L1_error) |
| 6066 |
|
| 6067 |
__pyx_t_10 = __pyx_v_my_int; |
| 6068 |
|
| 6069 |
|
| 6070 |
__pyx_t_9 = (__pyx_t_11 > __pyx_t_10); |
| 6071 |
if (__pyx_t_9) { |
| 6072 |
__pyx_t_12 = __pyx_t_11; |
| 6073 |
} else { |
| 6074 |
__pyx_t_12 = __pyx_t_10; |
| 6075 |
} |
| 6076 |
|
| 6077 |
|
| 6078 |
|
| 6079 |
|
| 6080 |
__pyx_t_1 = PyLong_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) |
| 6081 |
__Pyx_GOTREF(__pyx_t_1); |
| 6082 |
|
| 6083 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 263, __pyx_L1_error) |
| 6084 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6085 |
|
| 6086 |
|
| 6087 |
|
| 6088 |
|
| 6089 |
|
| 6090 |
|
| 6091 |
|
| 6092 |
|
| 6093 |
|
| 6094 |
|
| 6095 |
__pyx_t_10 = __pyx_v_my_int; |
| 6096 |
|
| 6097 |
__pyx_t_12 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 264, __pyx_L1_error) |
| 6098 |
|
| 6099 |
|
| 6100 |
__pyx_t_9 = (__pyx_t_10 > __pyx_t_12); |
| 6101 |
if (__pyx_t_9) { |
| 6102 |
__pyx_t_11 = __pyx_t_10; |
| 6103 |
} else { |
| 6104 |
__pyx_t_11 = __pyx_t_12; |
| 6105 |
} |
| 6106 |
|
| 6107 |
|
| 6108 |
|
| 6109 |
|
| 6110 |
__pyx_t_1 = PyLong_FromSsize_t(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) |
| 6111 |
__Pyx_GOTREF(__pyx_t_1); |
| 6112 |
|
| 6113 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 264, __pyx_L1_error) |
| 6114 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6115 |
|
| 6116 |
|
| 6117 |
|
| 6118 |
|
| 6119 |
|
| 6120 |
|
| 6121 |
|
| 6122 |
|
| 6123 |
|
| 6124 |
|
| 6125 |
|
| 6126 |
__pyx_r = Py_None; __Pyx_INCREF(Py_None); |
| 6127 |
goto __pyx_L0; |
| 6128 |
__pyx_L1_error:; |
| 6129 |
__Pyx_XDECREF(__pyx_t_1); |
| 6130 |
__Pyx_XDECREF(__pyx_t_2); |
| 6131 |
__Pyx_XDECREF(__pyx_t_3); |
| 6132 |
__Pyx_XDECREF(__pyx_t_4); |
| 6133 |
__Pyx_AddTraceback("builtin_min_max.test_max2", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6134 |
__pyx_r = NULL; |
| 6135 |
__pyx_L0:; |
| 6136 |
__Pyx_XDECREF(__pyx_v_my_pyint); |
| 6137 |
__Pyx_XDECREF(__pyx_v_my_list); |
| 6138 |
__Pyx_XGIVEREF(__pyx_r); |
| 6139 |
__Pyx_RefNannyFinishContext(); |
| 6140 |
return __pyx_r; |
| 6141 |
} |
| 6142 |
|
| 6143 |
|
| 6144 |
|
| 6145 |
|
| 6146 |
|
| 6147 |
|
| 6148 |
|
| 6149 |
|
| 6150 |
|
| 6151 |
|
| 6152 |
static PyObject *__pyx_pw_15builtin_min_max_27test_max3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 6153 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_26test_max3, "\n >>> test_max3()\n calling __len__\n 3\n calling __len__\n calling __len__\n 3\n "); |
| 6154 |
static PyMethodDef __pyx_mdef_15builtin_min_max_27test_max3 = {"test_max3", (PyCFunction)__pyx_pw_15builtin_min_max_27test_max3, METH_NOARGS, __pyx_doc_15builtin_min_max_26test_max3}; |
| 6155 |
static PyObject *__pyx_pw_15builtin_min_max_27test_max3(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 6156 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 6157 |
PyObject *__pyx_r = 0; |
| 6158 |
__Pyx_RefNannyDeclarations |
| 6159 |
__Pyx_RefNannySetupContext("test_max3 (wrapper)", 0); |
| 6160 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 6161 |
__pyx_r = __pyx_pf_15builtin_min_max_26test_max3(__pyx_self); |
| 6162 |
|
| 6163 |
|
| 6164 |
__Pyx_RefNannyFinishContext(); |
| 6165 |
return __pyx_r; |
| 6166 |
} |
| 6167 |
|
| 6168 |
static PyObject *__pyx_pf_15builtin_min_max_26test_max3(CYTHON_UNUSED PyObject *__pyx_self) { |
| 6169 |
int __pyx_v_my_int; |
| 6170 |
PyObject *__pyx_v_my_pyint = 0; |
| 6171 |
PyObject *__pyx_v_my_list = 0; |
| 6172 |
PyObject *__pyx_r = NULL; |
| 6173 |
__Pyx_RefNannyDeclarations |
| 6174 |
PyObject *__pyx_t_1 = NULL; |
| 6175 |
PyObject *__pyx_t_2 = NULL; |
| 6176 |
PyObject *__pyx_t_3 = NULL; |
| 6177 |
PyObject *__pyx_t_4 = NULL; |
| 6178 |
unsigned int __pyx_t_5; |
| 6179 |
Py_ssize_t __pyx_t_6; |
| 6180 |
int __pyx_t_7; |
| 6181 |
int __pyx_t_8; |
| 6182 |
PyObject *__pyx_t_9 = NULL; |
| 6183 |
int __pyx_lineno = 0; |
| 6184 |
const char *__pyx_filename = NULL; |
| 6185 |
int __pyx_clineno = 0; |
| 6186 |
__Pyx_RefNannySetupContext("test_max3", 0); |
| 6187 |
|
| 6188 |
|
| 6189 |
|
| 6190 |
|
| 6191 |
|
| 6192 |
|
| 6193 |
|
| 6194 |
|
| 6195 |
__pyx_v_my_int = 1; |
| 6196 |
|
| 6197 |
|
| 6198 |
|
| 6199 |
|
| 6200 |
|
| 6201 |
|
| 6202 |
|
| 6203 |
|
| 6204 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 6205 |
__pyx_v_my_pyint = __pyx_mstate_global->__pyx_int_2; |
| 6206 |
|
| 6207 |
|
| 6208 |
|
| 6209 |
|
| 6210 |
|
| 6211 |
|
| 6212 |
|
| 6213 |
|
| 6214 |
|
| 6215 |
|
| 6216 |
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) |
| 6217 |
__Pyx_GOTREF(__pyx_t_2); |
| 6218 |
|
| 6219 |
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L1_error) |
| 6220 |
__Pyx_GOTREF(__pyx_t_3); |
| 6221 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); |
| 6222 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); |
| 6223 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 283, __pyx_L1_error); |
| 6224 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 6225 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2); |
| 6226 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 283, __pyx_L1_error); |
| 6227 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_3); |
| 6228 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3); |
| 6229 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 283, __pyx_L1_error); |
| 6230 |
|
| 6231 |
__pyx_t_4 = NULL; |
| 6232 |
|
| 6233 |
__pyx_t_5 = 0; |
| 6234 |
#if CYTHON_UNPACK_METHODS |
| 6235 |
if (unlikely(PyMethod_Check(__pyx_t_2))) { |
| 6236 |
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); |
| 6237 |
assert(__pyx_t_4); |
| 6238 |
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); |
| 6239 |
__Pyx_INCREF(__pyx_t_4); |
| 6240 |
__Pyx_INCREF(function); |
| 6241 |
__Pyx_DECREF_SET(__pyx_t_2, function); |
| 6242 |
__pyx_t_5 = 1; |
| 6243 |
} |
| 6244 |
#endif |
| 6245 |
{ |
| 6246 |
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; |
| 6247 |
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); |
| 6248 |
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6249 |
|
| 6250 |
|
| 6251 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6252 |
|
| 6253 |
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) |
| 6254 |
__Pyx_GOTREF(__pyx_t_1); |
| 6255 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6256 |
|
| 6257 |
} |
| 6258 |
__pyx_v_my_list = __pyx_t_1; |
| 6259 |
__pyx_t_1 = 0; |
| 6260 |
|
| 6261 |
|
| 6262 |
|
| 6263 |
|
| 6264 |
|
| 6265 |
|
| 6266 |
|
| 6267 |
|
| 6268 |
|
| 6269 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 6270 |
|
| 6271 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 6272 |
|
| 6273 |
__pyx_t_6 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6274 |
|
| 6275 |
__pyx_t_7 = __pyx_v_my_int; |
| 6276 |
|
| 6277 |
|
| 6278 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6279 |
__Pyx_GOTREF(__pyx_t_3); |
| 6280 |
|
| 6281 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6282 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6283 |
|
| 6284 |
|
| 6285 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6286 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6287 |
|
| 6288 |
if (__pyx_t_8) { |
| 6289 |
__Pyx_INCREF(__pyx_t_1); |
| 6290 |
__pyx_t_2 = __pyx_t_1; |
| 6291 |
} else { |
| 6292 |
|
| 6293 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6294 |
__Pyx_GOTREF(__pyx_t_4); |
| 6295 |
__pyx_t_2 = __pyx_t_4; |
| 6296 |
__pyx_t_4 = 0; |
| 6297 |
|
| 6298 |
} |
| 6299 |
|
| 6300 |
|
| 6301 |
__Pyx_INCREF(__pyx_t_2); |
| 6302 |
|
| 6303 |
__pyx_t_4 = __pyx_t_2; |
| 6304 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6305 |
|
| 6306 |
|
| 6307 |
|
| 6308 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6309 |
__Pyx_GOTREF(__pyx_t_3); |
| 6310 |
|
| 6311 |
__pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6312 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6313 |
|
| 6314 |
|
| 6315 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6316 |
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; |
| 6317 |
|
| 6318 |
if (__pyx_t_8) { |
| 6319 |
|
| 6320 |
__pyx_t_9 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6321 |
__Pyx_GOTREF(__pyx_t_9); |
| 6322 |
__pyx_t_2 = __pyx_t_9; |
| 6323 |
__pyx_t_9 = 0; |
| 6324 |
|
| 6325 |
} else { |
| 6326 |
__Pyx_INCREF(__pyx_t_4); |
| 6327 |
__pyx_t_2 = __pyx_t_4; |
| 6328 |
} |
| 6329 |
|
| 6330 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6331 |
|
| 6332 |
|
| 6333 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6334 |
|
| 6335 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 285, __pyx_L1_error) |
| 6336 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6337 |
|
| 6338 |
|
| 6339 |
|
| 6340 |
|
| 6341 |
|
| 6342 |
|
| 6343 |
|
| 6344 |
|
| 6345 |
|
| 6346 |
|
| 6347 |
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_my_list, __pyx_mstate_global->__pyx_n_u_len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6348 |
__Pyx_GOTREF(__pyx_t_2); |
| 6349 |
|
| 6350 |
__pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6351 |
__Pyx_GOTREF(__pyx_t_1); |
| 6352 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6353 |
|
| 6354 |
|
| 6355 |
__pyx_t_6 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6356 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 6357 |
|
| 6358 |
__pyx_t_2 = __pyx_v_my_pyint; |
| 6359 |
|
| 6360 |
|
| 6361 |
__pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6362 |
|
| 6363 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6364 |
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; |
| 6365 |
|
| 6366 |
if (__pyx_t_8) { |
| 6367 |
__Pyx_INCREF(__pyx_t_1); |
| 6368 |
__pyx_t_4 = __pyx_t_1; |
| 6369 |
} else { |
| 6370 |
__Pyx_INCREF(__pyx_t_2); |
| 6371 |
__pyx_t_4 = __pyx_t_2; |
| 6372 |
} |
| 6373 |
|
| 6374 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6375 |
|
| 6376 |
__Pyx_INCREF(__pyx_t_4); |
| 6377 |
|
| 6378 |
__pyx_t_2 = __pyx_t_4; |
| 6379 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6380 |
|
| 6381 |
|
| 6382 |
|
| 6383 |
__pyx_t_9 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6384 |
__Pyx_GOTREF(__pyx_t_9); |
| 6385 |
|
| 6386 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6387 |
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; |
| 6388 |
|
| 6389 |
|
| 6390 |
__pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6391 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6392 |
|
| 6393 |
if (__pyx_t_8) { |
| 6394 |
|
| 6395 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6396 |
__Pyx_GOTREF(__pyx_t_3); |
| 6397 |
__pyx_t_4 = __pyx_t_3; |
| 6398 |
__pyx_t_3 = 0; |
| 6399 |
|
| 6400 |
} else { |
| 6401 |
__Pyx_INCREF(__pyx_t_2); |
| 6402 |
__pyx_t_4 = __pyx_t_2; |
| 6403 |
} |
| 6404 |
|
| 6405 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6406 |
|
| 6407 |
|
| 6408 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6409 |
|
| 6410 |
if (__Pyx_PrintOne(0, __pyx_t_4) < 0) __PYX_ERR(0, 286, __pyx_L1_error) |
| 6411 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6412 |
|
| 6413 |
|
| 6414 |
|
| 6415 |
|
| 6416 |
|
| 6417 |
|
| 6418 |
|
| 6419 |
|
| 6420 |
|
| 6421 |
|
| 6422 |
|
| 6423 |
__pyx_r = Py_None; __Pyx_INCREF(Py_None); |
| 6424 |
goto __pyx_L0; |
| 6425 |
__pyx_L1_error:; |
| 6426 |
__Pyx_XDECREF(__pyx_t_1); |
| 6427 |
__Pyx_XDECREF(__pyx_t_2); |
| 6428 |
__Pyx_XDECREF(__pyx_t_3); |
| 6429 |
__Pyx_XDECREF(__pyx_t_4); |
| 6430 |
__Pyx_XDECREF(__pyx_t_9); |
| 6431 |
__Pyx_AddTraceback("builtin_min_max.test_max3", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 6432 |
__pyx_r = NULL; |
| 6433 |
__pyx_L0:; |
| 6434 |
__Pyx_XDECREF(__pyx_v_my_pyint); |
| 6435 |
__Pyx_XDECREF(__pyx_v_my_list); |
| 6436 |
__Pyx_XGIVEREF(__pyx_r); |
| 6437 |
__Pyx_RefNannyFinishContext(); |
| 6438 |
return __pyx_r; |
| 6439 |
} |
| 6440 |
|
| 6441 |
|
| 6442 |
|
| 6443 |
|
| 6444 |
|
| 6445 |
|
| 6446 |
|
| 6447 |
|
| 6448 |
|
| 6449 |
|
| 6450 |
static PyObject *__pyx_pw_15builtin_min_max_29test_maxN(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); |
| 6451 |
PyDoc_STRVAR(__pyx_doc_15builtin_min_max_28test_maxN, "\n >>> test_maxN()\n calling __len__\n 3\n calling __len__\n 3\n calling __len__\n 3\n "); |
| 6452 |
static PyMethodDef __pyx_mdef_15builtin_min_max_29test_maxN = {"test_maxN", (PyCFunction)__pyx_pw_15builtin_min_max_29test_maxN, METH_NOARGS, __pyx_doc_15builtin_min_max_28test_maxN}; |
| 6453 |
static PyObject *__pyx_pw_15builtin_min_max_29test_maxN(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { |
| 6454 |
CYTHON_UNUSED PyObject *const *__pyx_kwvalues; |
| 6455 |
PyObject *__pyx_r = 0; |
| 6456 |
__Pyx_RefNannyDeclarations |
| 6457 |
__Pyx_RefNannySetupContext("test_maxN (wrapper)", 0); |
| 6458 |
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); |
| 6459 |
__pyx_r = __pyx_pf_15builtin_min_max_28test_maxN(__pyx_self); |
| 6460 |
|
| 6461 |
|
| 6462 |
__Pyx_RefNannyFinishContext(); |
| 6463 |
return __pyx_r; |
| 6464 |
} |
| 6465 |
|
| 6466 |
static PyObject *__pyx_pf_15builtin_min_max_28test_maxN(CYTHON_UNUSED PyObject *__pyx_self) { |
| 6467 |
int __pyx_v_my_int; |
| 6468 |
PyObject *__pyx_v_my_pyint = 0; |
| 6469 |
PyObject *__pyx_v_my_list = 0; |
| 6470 |
PyObject *__pyx_r = NULL; |
| 6471 |
__Pyx_RefNannyDeclarations |
| 6472 |
PyObject *__pyx_t_1 = NULL; |
| 6473 |
PyObject *__pyx_t_2 = NULL; |
| 6474 |
PyObject *__pyx_t_3 = NULL; |
| 6475 |
PyObject *__pyx_t_4 = NULL; |
| 6476 |
unsigned int __pyx_t_5; |
| 6477 |
long __pyx_t_6; |
| 6478 |
int __pyx_t_7; |
| 6479 |
long __pyx_t_8; |
| 6480 |
int __pyx_t_9; |
| 6481 |
Py_ssize_t __pyx_t_10; |
| 6482 |
int __pyx_t_11; |
| 6483 |
long __pyx_t_12; |
| 6484 |
int __pyx_t_13; |
| 6485 |
long __pyx_t_14; |
| 6486 |
PyObject *__pyx_t_15 = NULL; |
| 6487 |
int __pyx_t_16; |
| 6488 |
int __pyx_t_17; |
| 6489 |
int __pyx_lineno = 0; |
| 6490 |
const char *__pyx_filename = NULL; |
| 6491 |
int __pyx_clineno = 0; |
| 6492 |
__Pyx_RefNannySetupContext("test_maxN", 0); |
| 6493 |
|
| 6494 |
|
| 6495 |
|
| 6496 |
|
| 6497 |
|
| 6498 |
|
| 6499 |
|
| 6500 |
|
| 6501 |
__pyx_v_my_int = 1; |
| 6502 |
|
| 6503 |
|
| 6504 |
|
| 6505 |
|
| 6506 |
|
| 6507 |
|
| 6508 |
|
| 6509 |
|
| 6510 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 6511 |
__pyx_v_my_pyint = __pyx_mstate_global->__pyx_int_2; |
| 6512 |
|
| 6513 |
|
| 6514 |
|
| 6515 |
|
| 6516 |
|
| 6517 |
|
| 6518 |
|
| 6519 |
|
| 6520 |
|
| 6521 |
|
| 6522 |
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_loud_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error) |
| 6523 |
__Pyx_GOTREF(__pyx_t_2); |
| 6524 |
|
| 6525 |
__pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 306, __pyx_L1_error) |
| 6526 |
__Pyx_GOTREF(__pyx_t_3); |
| 6527 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_1); |
| 6528 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_1); |
| 6529 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_mstate_global->__pyx_int_1) != (0)) __PYX_ERR(0, 306, __pyx_L1_error); |
| 6530 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_2); |
| 6531 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_2); |
| 6532 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_2) != (0)) __PYX_ERR(0, 306, __pyx_L1_error); |
| 6533 |
__Pyx_INCREF(__pyx_mstate_global->__pyx_int_3); |
| 6534 |
__Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_3); |
| 6535 |
if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_mstate_global->__pyx_int_3) != (0)) __PYX_ERR(0, 306, __pyx_L1_error); |
| 6536 |
|
| 6537 |
__pyx_t_4 = NULL; |
| 6538 |
|
| 6539 |
__pyx_t_5 = 0; |
| 6540 |
#if CYTHON_UNPACK_METHODS |
| 6541 |
if (unlikely(PyMethod_Check(__pyx_t_2))) { |
| 6542 |
__pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); |
| 6543 |
assert(__pyx_t_4); |
| 6544 |
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); |
| 6545 |
__Pyx_INCREF(__pyx_t_4); |
| 6546 |
__Pyx_INCREF(function); |
| 6547 |
__Pyx_DECREF_SET(__pyx_t_2, function); |
| 6548 |
__pyx_t_5 = 1; |
| 6549 |
} |
| 6550 |
#endif |
| 6551 |
{ |
| 6552 |
PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3}; |
| 6553 |
__pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5); |
| 6554 |
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6555 |
|
| 6556 |
|
| 6557 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6558 |
|
| 6559 |
if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error) |
| 6560 |
__Pyx_GOTREF(__pyx_t_1); |
| 6561 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6562 |
|
| 6563 |
} |
| 6564 |
__pyx_v_my_list = __pyx_t_1; |
| 6565 |
__pyx_t_1 = 0; |
| 6566 |
|
| 6567 |
|
| 6568 |
|
| 6569 |
|
| 6570 |
|
| 6571 |
|
| 6572 |
|
| 6573 |
|
| 6574 |
|
| 6575 |
|
| 6576 |
__pyx_t_6 = 2; |
| 6577 |
|
| 6578 |
__pyx_t_7 = __pyx_v_my_int; |
| 6579 |
|
| 6580 |
__pyx_t_8 = 0; |
| 6581 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 6582 |
|
| 6583 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 6584 |
|
| 6585 |
__pyx_t_9 = __pyx_v_my_int; |
| 6586 |
|
| 6587 |
__pyx_t_10 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6588 |
|
| 6589 |
__pyx_t_11 = __pyx_v_my_int; |
| 6590 |
|
| 6591 |
|
| 6592 |
__pyx_t_13 = (__pyx_t_6 > __pyx_t_11); |
| 6593 |
if (__pyx_t_13) { |
| 6594 |
__pyx_t_12 = __pyx_t_6; |
| 6595 |
} else { |
| 6596 |
__pyx_t_12 = __pyx_t_11; |
| 6597 |
} |
| 6598 |
|
| 6599 |
|
| 6600 |
|
| 6601 |
__pyx_t_14 = __pyx_t_12; |
| 6602 |
|
| 6603 |
|
| 6604 |
|
| 6605 |
__pyx_t_13 = (__pyx_t_7 > __pyx_t_14); |
| 6606 |
if (__pyx_t_13) { |
| 6607 |
__pyx_t_12 = __pyx_t_7; |
| 6608 |
} else { |
| 6609 |
__pyx_t_12 = __pyx_t_14; |
| 6610 |
} |
| 6611 |
|
| 6612 |
|
| 6613 |
|
| 6614 |
__pyx_t_14 = __pyx_t_12; |
| 6615 |
|
| 6616 |
|
| 6617 |
|
| 6618 |
__pyx_t_13 = (__pyx_t_8 > __pyx_t_14); |
| 6619 |
if (__pyx_t_13) { |
| 6620 |
__pyx_t_12 = __pyx_t_8; |
| 6621 |
} else { |
| 6622 |
__pyx_t_12 = __pyx_t_14; |
| 6623 |
} |
| 6624 |
|
| 6625 |
|
| 6626 |
|
| 6627 |
__pyx_t_14 = __pyx_t_12; |
| 6628 |
|
| 6629 |
|
| 6630 |
|
| 6631 |
__pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6632 |
__Pyx_GOTREF(__pyx_t_3); |
| 6633 |
|
| 6634 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6635 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6636 |
|
| 6637 |
|
| 6638 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6639 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6640 |
|
| 6641 |
if (__pyx_t_13) { |
| 6642 |
__Pyx_INCREF(__pyx_t_1); |
| 6643 |
__pyx_t_2 = __pyx_t_1; |
| 6644 |
} else { |
| 6645 |
|
| 6646 |
__pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6647 |
__Pyx_GOTREF(__pyx_t_4); |
| 6648 |
__pyx_t_2 = __pyx_t_4; |
| 6649 |
__pyx_t_4 = 0; |
| 6650 |
|
| 6651 |
} |
| 6652 |
|
| 6653 |
|
| 6654 |
__Pyx_INCREF(__pyx_t_2); |
| 6655 |
|
| 6656 |
__pyx_t_4 = __pyx_t_2; |
| 6657 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6658 |
|
| 6659 |
|
| 6660 |
|
| 6661 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6662 |
__Pyx_GOTREF(__pyx_t_3); |
| 6663 |
|
| 6664 |
__pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6665 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6666 |
|
| 6667 |
|
| 6668 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6669 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 6670 |
|
| 6671 |
if (__pyx_t_13) { |
| 6672 |
|
| 6673 |
__pyx_t_15 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6674 |
__Pyx_GOTREF(__pyx_t_15); |
| 6675 |
__pyx_t_2 = __pyx_t_15; |
| 6676 |
__pyx_t_15 = 0; |
| 6677 |
|
| 6678 |
} else { |
| 6679 |
__Pyx_INCREF(__pyx_t_4); |
| 6680 |
__pyx_t_2 = __pyx_t_4; |
| 6681 |
} |
| 6682 |
|
| 6683 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6684 |
|
| 6685 |
__Pyx_INCREF(__pyx_t_2); |
| 6686 |
|
| 6687 |
__pyx_t_4 = __pyx_t_2; |
| 6688 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6689 |
|
| 6690 |
|
| 6691 |
|
| 6692 |
__pyx_t_15 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6693 |
__Pyx_GOTREF(__pyx_t_15); |
| 6694 |
|
| 6695 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_15, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6696 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 6697 |
|
| 6698 |
|
| 6699 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6700 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6701 |
|
| 6702 |
if (__pyx_t_13) { |
| 6703 |
|
| 6704 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6705 |
__Pyx_GOTREF(__pyx_t_3); |
| 6706 |
__pyx_t_2 = __pyx_t_3; |
| 6707 |
__pyx_t_3 = 0; |
| 6708 |
|
| 6709 |
} else { |
| 6710 |
__Pyx_INCREF(__pyx_t_4); |
| 6711 |
__pyx_t_2 = __pyx_t_4; |
| 6712 |
} |
| 6713 |
|
| 6714 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6715 |
|
| 6716 |
|
| 6717 |
|
| 6718 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6719 |
|
| 6720 |
|
| 6721 |
|
| 6722 |
|
| 6723 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 308, __pyx_L1_error) |
| 6724 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6725 |
|
| 6726 |
|
| 6727 |
|
| 6728 |
|
| 6729 |
|
| 6730 |
|
| 6731 |
|
| 6732 |
|
| 6733 |
|
| 6734 |
|
| 6735 |
__pyx_t_7 = __pyx_v_my_int; |
| 6736 |
|
| 6737 |
__pyx_t_6 = 0; |
| 6738 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 6739 |
|
| 6740 |
__pyx_t_2 = __pyx_v_my_pyint; |
| 6741 |
|
| 6742 |
__pyx_t_9 = __pyx_v_my_int; |
| 6743 |
|
| 6744 |
__pyx_t_10 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6745 |
|
| 6746 |
__pyx_t_11 = __pyx_v_my_int; |
| 6747 |
|
| 6748 |
|
| 6749 |
__pyx_t_13 = (__pyx_t_7 > __pyx_t_11); |
| 6750 |
if (__pyx_t_13) { |
| 6751 |
__pyx_t_16 = __pyx_t_7; |
| 6752 |
} else { |
| 6753 |
__pyx_t_16 = __pyx_t_11; |
| 6754 |
} |
| 6755 |
|
| 6756 |
|
| 6757 |
|
| 6758 |
__pyx_t_11 = __pyx_t_16; |
| 6759 |
|
| 6760 |
|
| 6761 |
|
| 6762 |
__pyx_t_13 = (__pyx_t_6 > __pyx_t_11); |
| 6763 |
if (__pyx_t_13) { |
| 6764 |
__pyx_t_8 = __pyx_t_6; |
| 6765 |
} else { |
| 6766 |
__pyx_t_8 = __pyx_t_11; |
| 6767 |
} |
| 6768 |
|
| 6769 |
|
| 6770 |
|
| 6771 |
__pyx_t_14 = __pyx_t_8; |
| 6772 |
|
| 6773 |
|
| 6774 |
|
| 6775 |
__pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6776 |
__Pyx_GOTREF(__pyx_t_4); |
| 6777 |
|
| 6778 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6779 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6780 |
|
| 6781 |
|
| 6782 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6783 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6784 |
|
| 6785 |
if (__pyx_t_13) { |
| 6786 |
__Pyx_INCREF(__pyx_t_2); |
| 6787 |
__pyx_t_1 = __pyx_t_2; |
| 6788 |
} else { |
| 6789 |
|
| 6790 |
__pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6791 |
__Pyx_GOTREF(__pyx_t_3); |
| 6792 |
__pyx_t_1 = __pyx_t_3; |
| 6793 |
__pyx_t_3 = 0; |
| 6794 |
|
| 6795 |
} |
| 6796 |
|
| 6797 |
|
| 6798 |
__Pyx_INCREF(__pyx_t_1); |
| 6799 |
|
| 6800 |
__pyx_t_3 = __pyx_t_1; |
| 6801 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6802 |
|
| 6803 |
|
| 6804 |
|
| 6805 |
__pyx_t_4 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6806 |
__Pyx_GOTREF(__pyx_t_4); |
| 6807 |
|
| 6808 |
__pyx_t_15 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6809 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6810 |
|
| 6811 |
|
| 6812 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6813 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 6814 |
|
| 6815 |
if (__pyx_t_13) { |
| 6816 |
|
| 6817 |
__pyx_t_15 = __Pyx_PyLong_From_int(__pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6818 |
__Pyx_GOTREF(__pyx_t_15); |
| 6819 |
__pyx_t_1 = __pyx_t_15; |
| 6820 |
__pyx_t_15 = 0; |
| 6821 |
|
| 6822 |
} else { |
| 6823 |
__Pyx_INCREF(__pyx_t_3); |
| 6824 |
__pyx_t_1 = __pyx_t_3; |
| 6825 |
} |
| 6826 |
|
| 6827 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6828 |
|
| 6829 |
__Pyx_INCREF(__pyx_t_1); |
| 6830 |
|
| 6831 |
__pyx_t_3 = __pyx_t_1; |
| 6832 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6833 |
|
| 6834 |
|
| 6835 |
|
| 6836 |
__pyx_t_15 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6837 |
__Pyx_GOTREF(__pyx_t_15); |
| 6838 |
|
| 6839 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_15, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6840 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 6841 |
|
| 6842 |
|
| 6843 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6844 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6845 |
|
| 6846 |
if (__pyx_t_13) { |
| 6847 |
|
| 6848 |
__pyx_t_4 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6849 |
__Pyx_GOTREF(__pyx_t_4); |
| 6850 |
__pyx_t_1 = __pyx_t_4; |
| 6851 |
__pyx_t_4 = 0; |
| 6852 |
|
| 6853 |
} else { |
| 6854 |
__Pyx_INCREF(__pyx_t_3); |
| 6855 |
__pyx_t_1 = __pyx_t_3; |
| 6856 |
} |
| 6857 |
|
| 6858 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6859 |
|
| 6860 |
|
| 6861 |
|
| 6862 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6863 |
|
| 6864 |
|
| 6865 |
|
| 6866 |
if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 309, __pyx_L1_error) |
| 6867 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 6868 |
|
| 6869 |
|
| 6870 |
|
| 6871 |
|
| 6872 |
|
| 6873 |
|
| 6874 |
|
| 6875 |
|
| 6876 |
|
| 6877 |
|
| 6878 |
__pyx_t_7 = __pyx_v_my_int; |
| 6879 |
|
| 6880 |
__pyx_t_6 = 2; |
| 6881 |
|
| 6882 |
__pyx_t_9 = __pyx_v_my_int; |
| 6883 |
|
| 6884 |
__pyx_t_14 = 0; |
| 6885 |
__Pyx_INCREF(__pyx_v_my_pyint); |
| 6886 |
|
| 6887 |
__pyx_t_1 = __pyx_v_my_pyint; |
| 6888 |
|
| 6889 |
__pyx_t_11 = __pyx_v_my_int; |
| 6890 |
|
| 6891 |
__pyx_t_10 = PyObject_Length(__pyx_v_my_list); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6892 |
|
| 6893 |
__pyx_t_16 = __pyx_v_my_int; |
| 6894 |
|
| 6895 |
|
| 6896 |
__pyx_t_13 = (__pyx_t_7 > __pyx_t_16); |
| 6897 |
if (__pyx_t_13) { |
| 6898 |
__pyx_t_17 = __pyx_t_7; |
| 6899 |
} else { |
| 6900 |
__pyx_t_17 = __pyx_t_16; |
| 6901 |
} |
| 6902 |
|
| 6903 |
|
| 6904 |
|
| 6905 |
__pyx_t_16 = __pyx_t_17; |
| 6906 |
|
| 6907 |
|
| 6908 |
|
| 6909 |
__pyx_t_13 = (__pyx_t_6 > __pyx_t_16); |
| 6910 |
if (__pyx_t_13) { |
| 6911 |
__pyx_t_8 = __pyx_t_6; |
| 6912 |
} else { |
| 6913 |
__pyx_t_8 = __pyx_t_16; |
| 6914 |
} |
| 6915 |
|
| 6916 |
|
| 6917 |
|
| 6918 |
__pyx_t_12 = __pyx_t_8; |
| 6919 |
|
| 6920 |
|
| 6921 |
|
| 6922 |
__pyx_t_13 = (__pyx_t_9 > __pyx_t_12); |
| 6923 |
if (__pyx_t_13) { |
| 6924 |
__pyx_t_8 = __pyx_t_9; |
| 6925 |
} else { |
| 6926 |
__pyx_t_8 = __pyx_t_12; |
| 6927 |
} |
| 6928 |
|
| 6929 |
|
| 6930 |
|
| 6931 |
__pyx_t_12 = __pyx_t_8; |
| 6932 |
|
| 6933 |
|
| 6934 |
|
| 6935 |
__pyx_t_13 = (__pyx_t_14 > __pyx_t_12); |
| 6936 |
if (__pyx_t_13) { |
| 6937 |
__pyx_t_8 = __pyx_t_14; |
| 6938 |
} else { |
| 6939 |
__pyx_t_8 = __pyx_t_12; |
| 6940 |
} |
| 6941 |
|
| 6942 |
|
| 6943 |
|
| 6944 |
__pyx_t_12 = __pyx_t_8; |
| 6945 |
|
| 6946 |
|
| 6947 |
|
| 6948 |
__pyx_t_3 = __Pyx_PyLong_From_long(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6949 |
__Pyx_GOTREF(__pyx_t_3); |
| 6950 |
|
| 6951 |
__pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6952 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6953 |
|
| 6954 |
|
| 6955 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6956 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 6957 |
|
| 6958 |
if (__pyx_t_13) { |
| 6959 |
__Pyx_INCREF(__pyx_t_1); |
| 6960 |
__pyx_t_2 = __pyx_t_1; |
| 6961 |
} else { |
| 6962 |
|
| 6963 |
__pyx_t_4 = __Pyx_PyLong_From_long(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6964 |
__Pyx_GOTREF(__pyx_t_4); |
| 6965 |
__pyx_t_2 = __pyx_t_4; |
| 6966 |
__pyx_t_4 = 0; |
| 6967 |
|
| 6968 |
} |
| 6969 |
|
| 6970 |
|
| 6971 |
__Pyx_INCREF(__pyx_t_2); |
| 6972 |
|
| 6973 |
__pyx_t_4 = __pyx_t_2; |
| 6974 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 6975 |
|
| 6976 |
|
| 6977 |
|
| 6978 |
__pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6979 |
__Pyx_GOTREF(__pyx_t_3); |
| 6980 |
|
| 6981 |
__pyx_t_15 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6982 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 6983 |
|
| 6984 |
|
| 6985 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_15); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6986 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 6987 |
|
| 6988 |
if (__pyx_t_13) { |
| 6989 |
|
| 6990 |
__pyx_t_15 = __Pyx_PyLong_From_int(__pyx_t_11); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 6991 |
__Pyx_GOTREF(__pyx_t_15); |
| 6992 |
__pyx_t_2 = __pyx_t_15; |
| 6993 |
__pyx_t_15 = 0; |
| 6994 |
|
| 6995 |
} else { |
| 6996 |
__Pyx_INCREF(__pyx_t_4); |
| 6997 |
__pyx_t_2 = __pyx_t_4; |
| 6998 |
} |
| 6999 |
|
| 7000 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 7001 |
|
| 7002 |
__Pyx_INCREF(__pyx_t_2); |
| 7003 |
|
| 7004 |
__pyx_t_4 = __pyx_t_2; |
| 7005 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 7006 |
|
| 7007 |
|
| 7008 |
|
| 7009 |
__pyx_t_15 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 7010 |
__Pyx_GOTREF(__pyx_t_15); |
| 7011 |
|
| 7012 |
__pyx_t_3 = PyObject_RichCompare(__pyx_t_15, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 7013 |
__Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; |
| 7014 |
|
| 7015 |
|
| 7016 |
__pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 310, __pyx_L1_error) |
| 7017 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7018 |
|
| 7019 |
if (__pyx_t_13) { |
| 7020 |
|
| 7021 |
__pyx_t_3 = PyLong_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error) |
| 7022 |
__Pyx_GOTREF(__pyx_t_3); |
| 7023 |
__pyx_t_2 = __pyx_t_3; |
| 7024 |
__pyx_t_3 = 0; |
| 7025 |
|
| 7026 |
} else { |
| 7027 |
__Pyx_INCREF(__pyx_t_4); |
| 7028 |
__pyx_t_2 = __pyx_t_4; |
| 7029 |
} |
| 7030 |
|
| 7031 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 7032 |
|
| 7033 |
|
| 7034 |
|
| 7035 |
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; |
| 7036 |
|
| 7037 |
|
| 7038 |
|
| 7039 |
|
| 7040 |
|
| 7041 |
if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 310, __pyx_L1_error) |
| 7042 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 7043 |
|
| 7044 |
|
| 7045 |
|
| 7046 |
|
| 7047 |
|
| 7048 |
|
| 7049 |
|
| 7050 |
|
| 7051 |
|
| 7052 |
|
| 7053 |
|
| 7054 |
__pyx_r = Py_None; __Pyx_INCREF(Py_None); |
| 7055 |
goto __pyx_L0; |
| 7056 |
__pyx_L1_error:; |
| 7057 |
__Pyx_XDECREF(__pyx_t_1); |
| 7058 |
__Pyx_XDECREF(__pyx_t_2); |
| 7059 |
__Pyx_XDECREF(__pyx_t_3); |
| 7060 |
__Pyx_XDECREF(__pyx_t_4); |
| 7061 |
__Pyx_XDECREF(__pyx_t_15); |
| 7062 |
__Pyx_AddTraceback("builtin_min_max.test_maxN", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7063 |
__pyx_r = NULL; |
| 7064 |
__pyx_L0:; |
| 7065 |
__Pyx_XDECREF(__pyx_v_my_pyint); |
| 7066 |
__Pyx_XDECREF(__pyx_v_my_list); |
| 7067 |
__Pyx_XGIVEREF(__pyx_r); |
| 7068 |
__Pyx_RefNannyFinishContext(); |
| 7069 |
return __pyx_r; |
| 7070 |
} |
| 7071 |
|
| 7072 |
|
| 7073 |
static PyMethodDef __pyx_methods[] = { |
| 7074 |
{0, 0, 0, 0} |
| 7075 |
}; |
| 7076 |
|
| 7077 |
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate); |
| 7078 |
static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate); |
| 7079 |
static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void); |
| 7080 |
static CYTHON_SMALL_CODE int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate); |
| 7081 |
static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(__pyx_mstatetype *__pyx_mstate); |
| 7082 |
static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate); |
| 7083 |
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate); |
| 7084 |
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate); |
| 7085 |
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate); |
| 7086 |
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate); |
| 7087 |
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate); |
| 7088 |
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate); |
| 7089 |
static CYTHON_SMALL_CODE int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate); |
| 7090 |
|
| 7091 |
|
| 7092 |
static int __Pyx_modinit_global_init_code(__pyx_mstatetype *__pyx_mstate) { |
| 7093 |
__Pyx_RefNannyDeclarations |
| 7094 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7095 |
__Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); |
| 7096 |
|
| 7097 |
__Pyx_RefNannyFinishContext(); |
| 7098 |
return 0; |
| 7099 |
} |
| 7100 |
|
| 7101 |
static int __Pyx_modinit_variable_export_code(__pyx_mstatetype *__pyx_mstate) { |
| 7102 |
__Pyx_RefNannyDeclarations |
| 7103 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7104 |
__Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); |
| 7105 |
|
| 7106 |
__Pyx_RefNannyFinishContext(); |
| 7107 |
return 0; |
| 7108 |
} |
| 7109 |
|
| 7110 |
static int __Pyx_modinit_function_export_code(__pyx_mstatetype *__pyx_mstate) { |
| 7111 |
__Pyx_RefNannyDeclarations |
| 7112 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7113 |
__Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); |
| 7114 |
|
| 7115 |
__Pyx_RefNannyFinishContext(); |
| 7116 |
return 0; |
| 7117 |
} |
| 7118 |
|
| 7119 |
static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { |
| 7120 |
__Pyx_RefNannyDeclarations |
| 7121 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7122 |
__Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); |
| 7123 |
|
| 7124 |
__Pyx_RefNannyFinishContext(); |
| 7125 |
return 0; |
| 7126 |
} |
| 7127 |
|
| 7128 |
static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) { |
| 7129 |
__Pyx_RefNannyDeclarations |
| 7130 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7131 |
__Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); |
| 7132 |
|
| 7133 |
__Pyx_RefNannyFinishContext(); |
| 7134 |
return 0; |
| 7135 |
} |
| 7136 |
|
| 7137 |
static int __Pyx_modinit_variable_import_code(__pyx_mstatetype *__pyx_mstate) { |
| 7138 |
__Pyx_RefNannyDeclarations |
| 7139 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7140 |
__Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); |
| 7141 |
|
| 7142 |
__Pyx_RefNannyFinishContext(); |
| 7143 |
return 0; |
| 7144 |
} |
| 7145 |
|
| 7146 |
static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) { |
| 7147 |
__Pyx_RefNannyDeclarations |
| 7148 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7149 |
__Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); |
| 7150 |
|
| 7151 |
__Pyx_RefNannyFinishContext(); |
| 7152 |
return 0; |
| 7153 |
} |
| 7154 |
|
| 7155 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7156 |
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); |
| 7157 |
static int __pyx_pymod_exec_builtin_min_max(PyObject* module); |
| 7158 |
static PyModuleDef_Slot __pyx_moduledef_slots[] = { |
| 7159 |
{Py_mod_create, (void*)__pyx_pymod_create}, |
| 7160 |
{Py_mod_exec, (void*)__pyx_pymod_exec_builtin_min_max}, |
| 7161 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING |
| 7162 |
{Py_mod_gil, Py_MOD_GIL_USED}, |
| 7163 |
#endif |
| 7164 |
{0, NULL} |
| 7165 |
}; |
| 7166 |
#endif |
| 7167 |
|
| 7168 |
#ifdef __cplusplus |
| 7169 |
namespace { |
| 7170 |
struct PyModuleDef __pyx_moduledef = |
| 7171 |
#else |
| 7172 |
static struct PyModuleDef __pyx_moduledef = |
| 7173 |
#endif |
| 7174 |
{ |
| 7175 |
PyModuleDef_HEAD_INIT, |
| 7176 |
"builtin_min_max", |
| 7177 |
0, |
| 7178 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7179 |
0, |
| 7180 |
#elif CYTHON_USE_MODULE_STATE |
| 7181 |
sizeof(__pyx_mstatetype), |
| 7182 |
#else |
| 7183 |
-1, |
| 7184 |
#endif |
| 7185 |
__pyx_methods , |
| 7186 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7187 |
__pyx_moduledef_slots, |
| 7188 |
#else |
| 7189 |
NULL, |
| 7190 |
#endif |
| 7191 |
#if CYTHON_USE_MODULE_STATE |
| 7192 |
__pyx_m_traverse, |
| 7193 |
__pyx_m_clear, |
| 7194 |
(freefunc)__pyx_module_cleanup |
| 7195 |
#else |
| 7196 |
NULL, |
| 7197 |
NULL, |
| 7198 |
(freefunc)__pyx_module_cleanup |
| 7199 |
#endif |
| 7200 |
}; |
| 7201 |
#ifdef __cplusplus |
| 7202 |
} |
| 7203 |
#endif |
| 7204 |
|
| 7205 |
|
| 7206 |
#ifndef CYTHON_NO_PYINIT_EXPORT |
| 7207 |
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC |
| 7208 |
#else |
| 7209 |
#ifdef __cplusplus |
| 7210 |
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * |
| 7211 |
#else |
| 7212 |
#define __Pyx_PyMODINIT_FUNC PyObject * |
| 7213 |
#endif |
| 7214 |
#endif |
| 7215 |
|
| 7216 |
__Pyx_PyMODINIT_FUNC PyInit_builtin_min_max(void) CYTHON_SMALL_CODE; |
| 7217 |
__Pyx_PyMODINIT_FUNC PyInit_builtin_min_max(void) |
| 7218 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7219 |
{ |
| 7220 |
if (__Pyx_VersionSanityCheck() < 0) return NULL; |
| 7221 |
return PyModuleDef_Init(&__pyx_moduledef); |
| 7222 |
} |
| 7223 |
|
| 7224 |
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x030A0000 |
| 7225 |
static PY_INT64_T __Pyx_GetCurrentInterpreterId(void) { |
| 7226 |
PyObject *module = PyImport_ImportModule("_interpreters"); |
| 7227 |
if (!module) { |
| 7228 |
PyErr_Clear(); |
| 7229 |
module = PyImport_ImportModule("_xxsubinterpreters"); |
| 7230 |
if (!module) return -1; |
| 7231 |
} |
| 7232 |
PyObject *current = PyObject_CallMethod(module, "get_current", NULL); |
| 7233 |
Py_DECREF(module); |
| 7234 |
if (PyTuple_Check(current)) { |
| 7235 |
PyObject *new_current = PyTuple_GetItem(current, 0); |
| 7236 |
Py_DECREF(current); |
| 7237 |
if (!new_current) return -1; |
| 7238 |
Py_INCREF(new_current); |
| 7239 |
current = new_current; |
| 7240 |
} |
| 7241 |
if (!current) return -1; |
| 7242 |
long long as_c_int = PyLong_AsLongLong(current); |
| 7243 |
Py_DECREF(current); |
| 7244 |
return as_c_int; |
| 7245 |
} |
| 7246 |
#endif |
| 7247 |
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { |
| 7248 |
static PY_INT64_T main_interpreter_id = -1; |
| 7249 |
#if CYTHON_COMPILING_IN_GRAAL |
| 7250 |
PY_INT64_T current_id = PyInterpreterState_GetIDFromThreadState(PyThreadState_Get()); |
| 7251 |
#elif CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX >= 0x030A0000 |
| 7252 |
PY_INT64_T current_id = PyThreadState_GetInterpreter(PyThreadState_Get()); |
| 7253 |
#elif CYTHON_COMPILING_IN_LIMITED_API |
| 7254 |
PY_INT64_T current_id = __Pyx_GetCurrentInterpreterId(); |
| 7255 |
#else |
| 7256 |
PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); |
| 7257 |
#endif |
| 7258 |
if (main_interpreter_id == -1) { |
| 7259 |
main_interpreter_id = current_id; |
| 7260 |
return (unlikely(current_id == -1)) ? -1 : 0; |
| 7261 |
} else if (unlikely(main_interpreter_id != current_id)) |
| 7262 |
{ |
| 7263 |
PyErr_SetString( |
| 7264 |
PyExc_ImportError, |
| 7265 |
"Interpreter change detected - this module can only be loaded into one interpreter per process."); |
| 7266 |
return -1; |
| 7267 |
} |
| 7268 |
return 0; |
| 7269 |
} |
| 7270 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 7271 |
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none) |
| 7272 |
#else |
| 7273 |
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) |
| 7274 |
#endif |
| 7275 |
{ |
| 7276 |
PyObject *value = PyObject_GetAttrString(spec, from_name); |
| 7277 |
int result = 0; |
| 7278 |
if (likely(value)) { |
| 7279 |
if (allow_none || value != Py_None) { |
| 7280 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 7281 |
result = PyModule_AddObject(module, to_name, value); |
| 7282 |
#else |
| 7283 |
result = PyDict_SetItemString(moddict, to_name, value); |
| 7284 |
#endif |
| 7285 |
} |
| 7286 |
Py_DECREF(value); |
| 7287 |
} else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { |
| 7288 |
PyErr_Clear(); |
| 7289 |
} else { |
| 7290 |
result = -1; |
| 7291 |
} |
| 7292 |
return result; |
| 7293 |
} |
| 7294 |
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) { |
| 7295 |
PyObject *module = NULL, *moddict, *modname; |
| 7296 |
CYTHON_UNUSED_VAR(def); |
| 7297 |
if (__Pyx_check_single_interpreter()) |
| 7298 |
return NULL; |
| 7299 |
if (__pyx_m) |
| 7300 |
return __Pyx_NewRef(__pyx_m); |
| 7301 |
modname = PyObject_GetAttrString(spec, "name"); |
| 7302 |
if (unlikely(!modname)) goto bad; |
| 7303 |
module = PyModule_NewObject(modname); |
| 7304 |
Py_DECREF(modname); |
| 7305 |
if (unlikely(!module)) goto bad; |
| 7306 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 7307 |
moddict = module; |
| 7308 |
#else |
| 7309 |
moddict = PyModule_GetDict(module); |
| 7310 |
if (unlikely(!moddict)) goto bad; |
| 7311 |
#endif |
| 7312 |
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; |
| 7313 |
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; |
| 7314 |
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; |
| 7315 |
if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; |
| 7316 |
return module; |
| 7317 |
bad: |
| 7318 |
Py_XDECREF(module); |
| 7319 |
return NULL; |
| 7320 |
} |
| 7321 |
|
| 7322 |
|
| 7323 |
static CYTHON_SMALL_CODE int __pyx_pymod_exec_builtin_min_max(PyObject *__pyx_pyinit_module) |
| 7324 |
#endif |
| 7325 |
{ |
| 7326 |
#if !CYTHON_PEP489_MULTI_PHASE_INIT |
| 7327 |
if (__Pyx_VersionSanityCheck() < 0) return NULL; |
| 7328 |
#endif |
| 7329 |
int stringtab_initialized = 0; |
| 7330 |
#if CYTHON_USE_MODULE_STATE |
| 7331 |
int pystate_addmodule_run = 0; |
| 7332 |
#endif |
| 7333 |
__pyx_mstatetype *__pyx_mstate = NULL; |
| 7334 |
PyObject *__pyx_t_1 = NULL; |
| 7335 |
PyObject *__pyx_t_2 = NULL; |
| 7336 |
PyObject *__pyx_t_3 = NULL; |
| 7337 |
PyObject *__pyx_t_4 = NULL; |
| 7338 |
PyObject *__pyx_t_5 = NULL; |
| 7339 |
int __pyx_lineno = 0; |
| 7340 |
const char *__pyx_filename = NULL; |
| 7341 |
int __pyx_clineno = 0; |
| 7342 |
__Pyx_RefNannyDeclarations |
| 7343 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7344 |
if (__pyx_m) { |
| 7345 |
if (__pyx_m == __pyx_pyinit_module) return 0; |
| 7346 |
PyErr_SetString(PyExc_RuntimeError, "Module 'builtin_min_max' has already been imported. Re-initialisation is not supported."); |
| 7347 |
return -1; |
| 7348 |
} |
| 7349 |
#else |
| 7350 |
if (__pyx_m) return __Pyx_NewRef(__pyx_m); |
| 7351 |
#endif |
| 7352 |
|
| 7353 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7354 |
__pyx_m = __pyx_pyinit_module; |
| 7355 |
Py_INCREF(__pyx_m); |
| 7356 |
#else |
| 7357 |
#if CYTHON_USE_MODULE_STATE |
| 7358 |
|
| 7359 |
__pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7360 |
{ |
| 7361 |
int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); |
| 7362 |
__pyx_t_1 = 0; |
| 7363 |
if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7364 |
pystate_addmodule_run = 1; |
| 7365 |
} |
| 7366 |
|
| 7367 |
#else |
| 7368 |
__pyx_m = PyModule_Create(&__pyx_moduledef); |
| 7369 |
if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7370 |
#endif |
| 7371 |
#if CYTHON_COMPILING_IN_CPYTHON_FREETHREADING |
| 7372 |
PyUnstable_Module_SetGIL(__pyx_m, Py_MOD_GIL_USED); |
| 7373 |
#endif |
| 7374 |
#endif |
| 7375 |
__pyx_mstate = __pyx_mstate_global; |
| 7376 |
CYTHON_UNUSED_VAR(__pyx_t_1); |
| 7377 |
__pyx_mstate->__pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_mstate->__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7378 |
Py_INCREF(__pyx_mstate->__pyx_d); |
| 7379 |
__pyx_mstate->__pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_mstate->__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7380 |
__pyx_mstate->__pyx_cython_runtime = __Pyx_PyImport_AddModuleRef("cython_runtime"); if (unlikely(!__pyx_mstate->__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7381 |
if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_mstate->__pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7382 |
|
| 7383 |
#if CYTHON_REFNANNY |
| 7384 |
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); |
| 7385 |
if (!__Pyx_RefNanny) { |
| 7386 |
PyErr_Clear(); |
| 7387 |
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); |
| 7388 |
if (!__Pyx_RefNanny) |
| 7389 |
Py_FatalError("failed to import 'refnanny' module"); |
| 7390 |
} |
| 7391 |
#endif |
| 7392 |
|
| 7393 |
__Pyx_RefNannySetupContext("PyInit_builtin_min_max", 0); |
| 7394 |
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) |
| 7395 |
#ifdef __Pxy_PyFrame_Initialize_Offsets |
| 7396 |
__Pxy_PyFrame_Initialize_Offsets(); |
| 7397 |
#endif |
| 7398 |
__pyx_mstate->__pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_mstate->__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7399 |
__pyx_mstate->__pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7400 |
__pyx_mstate->__pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_mstate->__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7401 |
#ifdef __Pyx_CyFunction_USED |
| 7402 |
if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7403 |
#endif |
| 7404 |
#ifdef __Pyx_FusedFunction_USED |
| 7405 |
if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7406 |
#endif |
| 7407 |
#ifdef __Pyx_Coroutine_USED |
| 7408 |
if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7409 |
#endif |
| 7410 |
#ifdef __Pyx_Generator_USED |
| 7411 |
if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7412 |
#endif |
| 7413 |
#ifdef __Pyx_AsyncGen_USED |
| 7414 |
if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7415 |
#endif |
| 7416 |
|
| 7417 |
|
| 7418 |
if (__Pyx_InitConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7419 |
stringtab_initialized = 1; |
| 7420 |
if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7421 |
if (__pyx_module_is_main_builtin_min_max) { |
| 7422 |
if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_name, __pyx_mstate_global->__pyx_n_u_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7423 |
} |
| 7424 |
{ |
| 7425 |
PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7426 |
if (!PyDict_GetItemString(modules, "builtin_min_max")) { |
| 7427 |
if (unlikely((PyDict_SetItemString(modules, "builtin_min_max", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7428 |
} |
| 7429 |
} |
| 7430 |
|
| 7431 |
if (__Pyx_InitCachedBuiltins(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7432 |
|
| 7433 |
if (__Pyx_InitCachedConstants(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7434 |
if (__Pyx_CreateCodeObjects(__pyx_mstate) < 0) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7435 |
|
| 7436 |
(void)__Pyx_modinit_global_init_code(__pyx_mstate); |
| 7437 |
(void)__Pyx_modinit_variable_export_code(__pyx_mstate); |
| 7438 |
(void)__Pyx_modinit_function_export_code(__pyx_mstate); |
| 7439 |
(void)__Pyx_modinit_type_init_code(__pyx_mstate); |
| 7440 |
(void)__Pyx_modinit_type_import_code(__pyx_mstate); |
| 7441 |
(void)__Pyx_modinit_variable_import_code(__pyx_mstate); |
| 7442 |
(void)__Pyx_modinit_function_import_code(__pyx_mstate); |
| 7443 |
|
| 7444 |
|
| 7445 |
|
| 7446 |
|
| 7447 |
|
| 7448 |
|
| 7449 |
|
| 7450 |
|
| 7451 |
|
| 7452 |
|
| 7453 |
__pyx_t_2 = PyTuple_Pack(1, ((PyObject *)(&PyList_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7454 |
__Pyx_GOTREF(__pyx_t_2); |
| 7455 |
|
| 7456 |
__pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7457 |
__Pyx_GOTREF(__pyx_t_3); |
| 7458 |
|
| 7459 |
__pyx_t_4 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7460 |
__Pyx_GOTREF(__pyx_t_4); |
| 7461 |
|
| 7462 |
__pyx_t_5 = __Pyx_Py3MetaclassPrepare(__pyx_t_4, __pyx_t_3, __pyx_mstate_global->__pyx_n_u_loud_list, __pyx_mstate_global->__pyx_n_u_loud_list, (PyObject *) NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, (PyObject *) NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7463 |
__Pyx_GOTREF(__pyx_t_5); |
| 7464 |
if (__pyx_t_3 != __pyx_t_2) { |
| 7465 |
if (unlikely((PyDict_SetItemString(__pyx_t_5, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7466 |
} |
| 7467 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 7468 |
|
| 7469 |
|
| 7470 |
|
| 7471 |
|
| 7472 |
|
| 7473 |
|
| 7474 |
|
| 7475 |
|
| 7476 |
|
| 7477 |
|
| 7478 |
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_9loud_list_1__len__, 0, __pyx_mstate_global->__pyx_n_u_loud_list___len, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) |
| 7479 |
__Pyx_GOTREF(__pyx_t_2); |
| 7480 |
if (__Pyx_SetNameInClass(__pyx_t_5, __pyx_mstate_global->__pyx_n_u_len, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) |
| 7481 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 7482 |
|
| 7483 |
|
| 7484 |
|
| 7485 |
|
| 7486 |
|
| 7487 |
|
| 7488 |
|
| 7489 |
|
| 7490 |
|
| 7491 |
|
| 7492 |
__pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_loud_list, __pyx_t_3, __pyx_t_5, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7493 |
__Pyx_GOTREF(__pyx_t_2); |
| 7494 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_loud_list, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error) |
| 7495 |
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; |
| 7496 |
|
| 7497 |
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; |
| 7498 |
|
| 7499 |
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; |
| 7500 |
|
| 7501 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7502 |
|
| 7503 |
|
| 7504 |
|
| 7505 |
|
| 7506 |
|
| 7507 |
|
| 7508 |
|
| 7509 |
|
| 7510 |
|
| 7511 |
|
| 7512 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_1min3, 0, __pyx_mstate_global->__pyx_n_u_min3, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error) |
| 7513 |
__Pyx_GOTREF(__pyx_t_3); |
| 7514 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_min3, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error) |
| 7515 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7516 |
|
| 7517 |
|
| 7518 |
|
| 7519 |
|
| 7520 |
|
| 7521 |
|
| 7522 |
|
| 7523 |
|
| 7524 |
|
| 7525 |
|
| 7526 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_3min3_list, 0, __pyx_mstate_global->__pyx_n_u_min3_list, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 33, __pyx_L1_error) |
| 7527 |
__Pyx_GOTREF(__pyx_t_3); |
| 7528 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_min3_list, __pyx_t_3) < 0) __PYX_ERR(0, 33, __pyx_L1_error) |
| 7529 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7530 |
|
| 7531 |
|
| 7532 |
|
| 7533 |
|
| 7534 |
|
| 7535 |
|
| 7536 |
|
| 7537 |
|
| 7538 |
|
| 7539 |
|
| 7540 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_5min3_tuple, 0, __pyx_mstate_global->__pyx_n_u_min3_tuple, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) |
| 7541 |
__Pyx_GOTREF(__pyx_t_3); |
| 7542 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_min3_tuple, __pyx_t_3) < 0) __PYX_ERR(0, 51, __pyx_L1_error) |
| 7543 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7544 |
|
| 7545 |
|
| 7546 |
|
| 7547 |
|
| 7548 |
|
| 7549 |
|
| 7550 |
|
| 7551 |
|
| 7552 |
|
| 7553 |
|
| 7554 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_7min3_typed, 0, __pyx_mstate_global->__pyx_n_u_min3_typed, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) |
| 7555 |
__Pyx_GOTREF(__pyx_t_3); |
| 7556 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_min3_typed, __pyx_t_3) < 0) __PYX_ERR(0, 69, __pyx_L1_error) |
| 7557 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7558 |
|
| 7559 |
|
| 7560 |
|
| 7561 |
|
| 7562 |
|
| 7563 |
|
| 7564 |
|
| 7565 |
|
| 7566 |
|
| 7567 |
|
| 7568 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_9literal_min3, 0, __pyx_mstate_global->__pyx_n_u_literal_min3, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 87, __pyx_L1_error) |
| 7569 |
__Pyx_GOTREF(__pyx_t_3); |
| 7570 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_literal_min3, __pyx_t_3) < 0) __PYX_ERR(0, 87, __pyx_L1_error) |
| 7571 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7572 |
|
| 7573 |
|
| 7574 |
|
| 7575 |
|
| 7576 |
|
| 7577 |
|
| 7578 |
|
| 7579 |
|
| 7580 |
|
| 7581 |
|
| 7582 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_11test_min2, 0, __pyx_mstate_global->__pyx_n_u_test_min2, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 97, __pyx_L1_error) |
| 7583 |
__Pyx_GOTREF(__pyx_t_3); |
| 7584 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_min2, __pyx_t_3) < 0) __PYX_ERR(0, 97, __pyx_L1_error) |
| 7585 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7586 |
|
| 7587 |
|
| 7588 |
|
| 7589 |
|
| 7590 |
|
| 7591 |
|
| 7592 |
|
| 7593 |
|
| 7594 |
|
| 7595 |
|
| 7596 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_13test_min3, 0, __pyx_mstate_global->__pyx_n_u_test_min3, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error) |
| 7597 |
__Pyx_GOTREF(__pyx_t_3); |
| 7598 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_min3, __pyx_t_3) < 0) __PYX_ERR(0, 130, __pyx_L1_error) |
| 7599 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7600 |
|
| 7601 |
|
| 7602 |
|
| 7603 |
|
| 7604 |
|
| 7605 |
|
| 7606 |
|
| 7607 |
|
| 7608 |
|
| 7609 |
|
| 7610 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_15test_minN, 0, __pyx_mstate_global->__pyx_n_u_test_minN, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error) |
| 7611 |
__Pyx_GOTREF(__pyx_t_3); |
| 7612 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_minN, __pyx_t_3) < 0) __PYX_ERR(0, 152, __pyx_L1_error) |
| 7613 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7614 |
|
| 7615 |
|
| 7616 |
|
| 7617 |
|
| 7618 |
|
| 7619 |
|
| 7620 |
|
| 7621 |
|
| 7622 |
|
| 7623 |
|
| 7624 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_17max3, 0, __pyx_mstate_global->__pyx_n_u_max3, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error) |
| 7625 |
__Pyx_GOTREF(__pyx_t_3); |
| 7626 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_max3, __pyx_t_3) < 0) __PYX_ERR(0, 178, __pyx_L1_error) |
| 7627 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7628 |
|
| 7629 |
|
| 7630 |
|
| 7631 |
|
| 7632 |
|
| 7633 |
|
| 7634 |
|
| 7635 |
|
| 7636 |
|
| 7637 |
|
| 7638 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_19max3_typed, 0, __pyx_mstate_global->__pyx_n_u_max3_typed, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 196, __pyx_L1_error) |
| 7639 |
__Pyx_GOTREF(__pyx_t_3); |
| 7640 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_max3_typed, __pyx_t_3) < 0) __PYX_ERR(0, 196, __pyx_L1_error) |
| 7641 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7642 |
|
| 7643 |
|
| 7644 |
|
| 7645 |
|
| 7646 |
|
| 7647 |
|
| 7648 |
|
| 7649 |
|
| 7650 |
|
| 7651 |
|
| 7652 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_21literal_max3, 0, __pyx_mstate_global->__pyx_n_u_literal_max3, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 214, __pyx_L1_error) |
| 7653 |
__Pyx_GOTREF(__pyx_t_3); |
| 7654 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_literal_max3, __pyx_t_3) < 0) __PYX_ERR(0, 214, __pyx_L1_error) |
| 7655 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7656 |
|
| 7657 |
|
| 7658 |
|
| 7659 |
|
| 7660 |
|
| 7661 |
|
| 7662 |
|
| 7663 |
|
| 7664 |
|
| 7665 |
|
| 7666 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_23max1, 0, __pyx_mstate_global->__pyx_n_u_max1, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) |
| 7667 |
__Pyx_GOTREF(__pyx_t_3); |
| 7668 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_max1, __pyx_t_3) < 0) __PYX_ERR(0, 224, __pyx_L1_error) |
| 7669 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7670 |
|
| 7671 |
|
| 7672 |
|
| 7673 |
|
| 7674 |
|
| 7675 |
|
| 7676 |
|
| 7677 |
|
| 7678 |
|
| 7679 |
|
| 7680 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_25test_max2, 0, __pyx_mstate_global->__pyx_n_u_test_max2, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error) |
| 7681 |
__Pyx_GOTREF(__pyx_t_3); |
| 7682 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_max2, __pyx_t_3) < 0) __PYX_ERR(0, 234, __pyx_L1_error) |
| 7683 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7684 |
|
| 7685 |
|
| 7686 |
|
| 7687 |
|
| 7688 |
|
| 7689 |
|
| 7690 |
|
| 7691 |
|
| 7692 |
|
| 7693 |
|
| 7694 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_27test_max3, 0, __pyx_mstate_global->__pyx_n_u_test_max3, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 267, __pyx_L1_error) |
| 7695 |
__Pyx_GOTREF(__pyx_t_3); |
| 7696 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_max3, __pyx_t_3) < 0) __PYX_ERR(0, 267, __pyx_L1_error) |
| 7697 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7698 |
|
| 7699 |
|
| 7700 |
|
| 7701 |
|
| 7702 |
|
| 7703 |
|
| 7704 |
|
| 7705 |
|
| 7706 |
|
| 7707 |
|
| 7708 |
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_15builtin_min_max_29test_maxN, 0, __pyx_mstate_global->__pyx_n_u_test_maxN, NULL, __pyx_mstate_global->__pyx_n_u_builtin_min_max, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) |
| 7709 |
__Pyx_GOTREF(__pyx_t_3); |
| 7710 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test_maxN, __pyx_t_3) < 0) __PYX_ERR(0, 289, __pyx_L1_error) |
| 7711 |
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; |
| 7712 |
|
| 7713 |
|
| 7714 |
|
| 7715 |
|
| 7716 |
|
| 7717 |
|
| 7718 |
|
| 7719 |
|
| 7720 |
|
| 7721 |
|
| 7722 |
|
| 7723 |
|
| 7724 |
if (__Pyx_RegisterCleanup()) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7725 |
goto __pyx_L0; |
| 7726 |
__pyx_L1_error:; |
| 7727 |
__Pyx_XDECREF(__pyx_t_2); |
| 7728 |
__Pyx_XDECREF(__pyx_t_3); |
| 7729 |
__Pyx_XDECREF(__pyx_t_4); |
| 7730 |
__Pyx_XDECREF(__pyx_t_5); |
| 7731 |
if (__pyx_m) { |
| 7732 |
if (__pyx_mstate->__pyx_d && stringtab_initialized) { |
| 7733 |
__Pyx_AddTraceback("init builtin_min_max", __pyx_clineno, __pyx_lineno, __pyx_filename); |
| 7734 |
} |
| 7735 |
#if !CYTHON_USE_MODULE_STATE |
| 7736 |
Py_CLEAR(__pyx_m); |
| 7737 |
#else |
| 7738 |
Py_DECREF(__pyx_m); |
| 7739 |
if (pystate_addmodule_run) { |
| 7740 |
PyObject *tp, *value, *tb; |
| 7741 |
PyErr_Fetch(&tp, &value, &tb); |
| 7742 |
PyState_RemoveModule(&__pyx_moduledef); |
| 7743 |
PyErr_Restore(tp, value, tb); |
| 7744 |
} |
| 7745 |
#endif |
| 7746 |
} else if (!PyErr_Occurred()) { |
| 7747 |
PyErr_SetString(PyExc_ImportError, "init builtin_min_max"); |
| 7748 |
} |
| 7749 |
__pyx_L0:; |
| 7750 |
__Pyx_RefNannyFinishContext(); |
| 7751 |
#if CYTHON_PEP489_MULTI_PHASE_INIT |
| 7752 |
return (__pyx_m != NULL) ? 0 : -1; |
| 7753 |
#else |
| 7754 |
return __pyx_m; |
| 7755 |
#endif |
| 7756 |
} |
| 7757 |
|
| 7758 |
|
| 7759 |
typedef struct { |
| 7760 |
const char *s; |
| 7761 |
#if 29 <= 65535 |
| 7762 |
const unsigned short n; |
| 7763 |
#elif 29 / 2 < INT_MAX |
| 7764 |
const unsigned int n; |
| 7765 |
#elif 29 / 2 < LONG_MAX |
| 7766 |
const unsigned long n; |
| 7767 |
#else |
| 7768 |
const Py_ssize_t n; |
| 7769 |
#endif |
| 7770 |
#if 1 <= 31 |
| 7771 |
const unsigned int encoding : 5; |
| 7772 |
#elif 1 <= 255 |
| 7773 |
const unsigned char encoding; |
| 7774 |
#elif 1 <= 65535 |
| 7775 |
const unsigned short encoding; |
| 7776 |
#else |
| 7777 |
const Py_ssize_t encoding; |
| 7778 |
#endif |
| 7779 |
const unsigned int is_unicode : 1; |
| 7780 |
const unsigned int intern : 1; |
| 7781 |
} __Pyx_StringTabEntry; |
| 7782 |
static const char * const __pyx_string_tab_encodings[] = { 0 }; |
| 7783 |
static const __Pyx_StringTabEntry __pyx_string_tab[] = { |
| 7784 |
{__pyx_k_, sizeof(__pyx_k_), 0, 1, 0}, |
| 7785 |
{__pyx_k_a, sizeof(__pyx_k_a), 0, 1, 1}, |
| 7786 |
{__pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 1, 1}, |
| 7787 |
{__pyx_k_b, sizeof(__pyx_k_b), 0, 1, 1}, |
| 7788 |
{__pyx_k_builtin_min_max, sizeof(__pyx_k_builtin_min_max), 0, 1, 1}, |
| 7789 |
{__pyx_k_c, sizeof(__pyx_k_c), 0, 1, 1}, |
| 7790 |
{__pyx_k_calling___len, sizeof(__pyx_k_calling___len), 0, 1, 0}, |
| 7791 |
{__pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 1, 1}, |
| 7792 |
{__pyx_k_doc, sizeof(__pyx_k_doc), 0, 1, 1}, |
| 7793 |
{__pyx_k_end, sizeof(__pyx_k_end), 0, 1, 1}, |
| 7794 |
{__pyx_k_file, sizeof(__pyx_k_file), 0, 1, 1}, |
| 7795 |
{__pyx_k_func, sizeof(__pyx_k_func), 0, 1, 1}, |
| 7796 |
{__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, |
| 7797 |
{__pyx_k_len, sizeof(__pyx_k_len), 0, 1, 1}, |
| 7798 |
{__pyx_k_literal_max3, sizeof(__pyx_k_literal_max3), 0, 1, 1}, |
| 7799 |
{__pyx_k_literal_min3, sizeof(__pyx_k_literal_min3), 0, 1, 1}, |
| 7800 |
{__pyx_k_loud_list, sizeof(__pyx_k_loud_list), 0, 1, 1}, |
| 7801 |
{__pyx_k_loud_list___len, sizeof(__pyx_k_loud_list___len), 0, 1, 1}, |
| 7802 |
{__pyx_k_main, sizeof(__pyx_k_main), 0, 1, 1}, |
| 7803 |
{__pyx_k_max, sizeof(__pyx_k_max), 0, 1, 1}, |
| 7804 |
{__pyx_k_max1, sizeof(__pyx_k_max1), 0, 1, 1}, |
| 7805 |
{__pyx_k_max3, sizeof(__pyx_k_max3), 0, 1, 1}, |
| 7806 |
{__pyx_k_max3_typed, sizeof(__pyx_k_max3_typed), 0, 1, 1}, |
| 7807 |
{__pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 1, 1}, |
| 7808 |
{__pyx_k_min3, sizeof(__pyx_k_min3), 0, 1, 1}, |
| 7809 |
{__pyx_k_min3_list, sizeof(__pyx_k_min3_list), 0, 1, 1}, |
| 7810 |
{__pyx_k_min3_tuple, sizeof(__pyx_k_min3_tuple), 0, 1, 1}, |
| 7811 |
{__pyx_k_min3_typed, sizeof(__pyx_k_min3_typed), 0, 1, 1}, |
| 7812 |
{__pyx_k_module, sizeof(__pyx_k_module), 0, 1, 1}, |
| 7813 |
{__pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 1, 1}, |
| 7814 |
{__pyx_k_my_int, sizeof(__pyx_k_my_int), 0, 1, 1}, |
| 7815 |
{__pyx_k_my_list, sizeof(__pyx_k_my_list), 0, 1, 1}, |
| 7816 |
{__pyx_k_my_pyint, sizeof(__pyx_k_my_pyint), 0, 1, 1}, |
| 7817 |
{__pyx_k_name, sizeof(__pyx_k_name), 0, 1, 1}, |
| 7818 |
{__pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 1, 1}, |
| 7819 |
{__pyx_k_print, sizeof(__pyx_k_print), 0, 1, 1}, |
| 7820 |
{__pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 1, 1}, |
| 7821 |
{__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, |
| 7822 |
{__pyx_k_super, sizeof(__pyx_k_super), 0, 1, 1}, |
| 7823 |
{__pyx_k_test_max2, sizeof(__pyx_k_test_max2), 0, 1, 1}, |
| 7824 |
{__pyx_k_test_max3, sizeof(__pyx_k_test_max3), 0, 1, 1}, |
| 7825 |
{__pyx_k_test_maxN, sizeof(__pyx_k_test_maxN), 0, 1, 1}, |
| 7826 |
{__pyx_k_test_min2, sizeof(__pyx_k_test_min2), 0, 1, 1}, |
| 7827 |
{__pyx_k_test_min3, sizeof(__pyx_k_test_min3), 0, 1, 1}, |
| 7828 |
{__pyx_k_test_minN, sizeof(__pyx_k_test_minN), 0, 1, 1}, |
| 7829 |
{__pyx_k_tests_run_builtin_min_max_pyx, sizeof(__pyx_k_tests_run_builtin_min_max_pyx), 0, 1, 0}, |
| 7830 |
{__pyx_k_x, sizeof(__pyx_k_x), 0, 1, 1}, |
| 7831 |
{0, 0, 0, 0, 0} |
| 7832 |
}; |
| 7833 |
|
| 7834 |
static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names); |
| 7835 |
|
| 7836 |
|
| 7837 |
|
| 7838 |
static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { |
| 7839 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7840 |
__pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_super); if (!__pyx_builtin_super) __PYX_ERR(0, 10, __pyx_L1_error) |
| 7841 |
__pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_max); if (!__pyx_builtin_max) __PYX_ERR(0, 231, __pyx_L1_error) |
| 7842 |
return 0; |
| 7843 |
__pyx_L1_error:; |
| 7844 |
return -1; |
| 7845 |
} |
| 7846 |
|
| 7847 |
|
| 7848 |
static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { |
| 7849 |
__Pyx_RefNannyDeclarations |
| 7850 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7851 |
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); |
| 7852 |
__Pyx_RefNannyFinishContext(); |
| 7853 |
return 0; |
| 7854 |
} |
| 7855 |
|
| 7856 |
|
| 7857 |
static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) { |
| 7858 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 7859 |
if (__Pyx_InitStrings(__pyx_string_tab, __pyx_mstate->__pyx_string_tab, __pyx_string_tab_encodings) < 0) __PYX_ERR(0, 1, __pyx_L1_error); |
| 7860 |
__pyx_mstate->__pyx_int_1 = PyLong_FromLong(1); if (unlikely(!__pyx_mstate->__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7861 |
__pyx_mstate->__pyx_int_2 = PyLong_FromLong(2); if (unlikely(!__pyx_mstate->__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7862 |
__pyx_mstate->__pyx_int_3 = PyLong_FromLong(3); if (unlikely(!__pyx_mstate->__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7863 |
return 0; |
| 7864 |
__pyx_L1_error:; |
| 7865 |
return -1; |
| 7866 |
} |
| 7867 |
|
| 7868 |
typedef struct { |
| 7869 |
unsigned int argcount : 2; |
| 7870 |
unsigned int num_posonly_args : 1; |
| 7871 |
unsigned int num_kwonly_args : 1; |
| 7872 |
unsigned int nlocals : 2; |
| 7873 |
unsigned int flags : 10; |
| 7874 |
unsigned int first_line : 9; |
| 7875 |
unsigned int line_table_length : 11; |
| 7876 |
} __Pyx_PyCode_New_function_description; |
| 7877 |
|
| 7878 |
static PyObject* __Pyx_PyCode_New( |
| 7879 |
__Pyx_PyCode_New_function_description descr, |
| 7880 |
PyObject **varnames, |
| 7881 |
PyObject *filename, |
| 7882 |
PyObject *funcname, |
| 7883 |
const char *line_table, |
| 7884 |
PyObject *tuple_dedup_map |
| 7885 |
); |
| 7886 |
|
| 7887 |
|
| 7888 |
static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { |
| 7889 |
PyObject* tuple_dedup_map = PyDict_New(); |
| 7890 |
if (unlikely(!tuple_dedup_map)) return -1; |
| 7891 |
{ |
| 7892 |
__Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 8, 22}; |
| 7893 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_self}; |
| 7894 |
__pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_len, __pyx_k_A_a_uA_XQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; |
| 7895 |
} |
| 7896 |
{ |
| 7897 |
__Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 15, 13}; |
| 7898 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c}; |
| 7899 |
__pyx_mstate_global->__pyx_codeobj_tab[1] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_min3, __pyx_k_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[1])) goto bad; |
| 7900 |
} |
| 7901 |
{ |
| 7902 |
__Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 33, 13}; |
| 7903 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c}; |
| 7904 |
__pyx_mstate_global->__pyx_codeobj_tab[2] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_min3_list, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[2])) goto bad; |
| 7905 |
} |
| 7906 |
{ |
| 7907 |
__Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 51, 13}; |
| 7908 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c}; |
| 7909 |
__pyx_mstate_global->__pyx_codeobj_tab[3] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_min3_tuple, __pyx_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[3])) goto bad; |
| 7910 |
} |
| 7911 |
{ |
| 7912 |
__Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 69, 13}; |
| 7913 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c}; |
| 7914 |
__pyx_mstate_global->__pyx_codeobj_tab[4] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_min3_typed, __pyx_k_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[4])) goto bad; |
| 7915 |
} |
| 7916 |
{ |
| 7917 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 87, 39}; |
| 7918 |
PyObject* varnames[] = {0}; |
| 7919 |
__pyx_mstate_global->__pyx_codeobj_tab[5] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_literal_min3, __pyx_k_4r_82Rxr_82Rxr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[5])) goto bad; |
| 7920 |
} |
| 7921 |
{ |
| 7922 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 97, 86}; |
| 7923 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_my_int, __pyx_mstate->__pyx_n_u_my_pyint, __pyx_mstate->__pyx_n_u_my_list}; |
| 7924 |
__pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_test_min2, __pyx_k_a_1_1ARr_c_c_ha_ha_j_hc_c_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; |
| 7925 |
} |
| 7926 |
{ |
| 7927 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 130, 59}; |
| 7928 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_my_int, __pyx_mstate->__pyx_n_u_my_pyint, __pyx_mstate->__pyx_n_u_my_list}; |
| 7929 |
__pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_test_min3, __pyx_k_a_1_1ARr_hj_1A_j_xt3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; |
| 7930 |
} |
| 7931 |
{ |
| 7932 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 152, 92}; |
| 7933 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_my_int, __pyx_mstate->__pyx_n_u_my_pyint, __pyx_mstate->__pyx_n_u_my_list}; |
| 7934 |
__pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_test_minN, __pyx_k_a_1_1ARr_hc_Jhc_hhc_83aq_hhc_Jh, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; |
| 7935 |
} |
| 7936 |
{ |
| 7937 |
__Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 178, 13}; |
| 7938 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c}; |
| 7939 |
__pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_max3, __pyx_k_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; |
| 7940 |
} |
| 7941 |
{ |
| 7942 |
__Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 196, 13}; |
| 7943 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_a, __pyx_mstate->__pyx_n_u_b, __pyx_mstate->__pyx_n_u_c}; |
| 7944 |
__pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_max3_typed, __pyx_k_r_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; |
| 7945 |
} |
| 7946 |
{ |
| 7947 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 0, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 214, 39}; |
| 7948 |
PyObject* varnames[] = {0}; |
| 7949 |
__pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_literal_max3, __pyx_k_4r_82Rxr_82Rxr_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; |
| 7950 |
} |
| 7951 |
{ |
| 7952 |
__Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224, 13}; |
| 7953 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_x}; |
| 7954 |
__pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_max1, __pyx_k_3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; |
| 7955 |
} |
| 7956 |
{ |
| 7957 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 234, 86}; |
| 7958 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_my_int, __pyx_mstate->__pyx_n_u_my_pyint, __pyx_mstate->__pyx_n_u_my_list}; |
| 7959 |
__pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_test_max2, __pyx_k_a_1_1ARr_c_c_ha_ha_j_hc_c_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; |
| 7960 |
} |
| 7961 |
{ |
| 7962 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 267, 59}; |
| 7963 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_my_int, __pyx_mstate->__pyx_n_u_my_pyint, __pyx_mstate->__pyx_n_u_my_list}; |
| 7964 |
__pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_test_max3, __pyx_k_a_1_1ARr_hj_1A_j_xt3aq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; |
| 7965 |
} |
| 7966 |
{ |
| 7967 |
__Pyx_PyCode_New_function_description descr = {0, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 289, 92}; |
| 7968 |
PyObject* varnames[] = {__pyx_mstate->__pyx_n_u_my_int, __pyx_mstate->__pyx_n_u_my_pyint, __pyx_mstate->__pyx_n_u_my_list}; |
| 7969 |
__pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_tests_run_builtin_min_max_pyx, __pyx_mstate->__pyx_n_u_test_maxN, __pyx_k_a_1_1ARr_hc_Jhc_hhc_83aq_hhc_Jh, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; |
| 7970 |
} |
| 7971 |
Py_DECREF(tuple_dedup_map); |
| 7972 |
return 0; |
| 7973 |
bad: |
| 7974 |
Py_DECREF(tuple_dedup_map); |
| 7975 |
return -1; |
| 7976 |
} |
| 7977 |
|
| 7978 |
|
| 7979 |
static int __Pyx_InitGlobals(void) { |
| 7980 |
|
| 7981 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 7982 |
{ |
| 7983 |
PyObject *typesModule=NULL; |
| 7984 |
typesModule = PyImport_ImportModule("types"); |
| 7985 |
if (typesModule) { |
| 7986 |
__pyx_mstate_global->__Pyx_CachedMethodType = PyObject_GetAttrString(typesModule, "MethodType"); |
| 7987 |
Py_DECREF(typesModule); |
| 7988 |
} |
| 7989 |
} |
| 7990 |
#endif |
| 7991 |
|
| 7992 |
if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error) |
| 7993 |
|
| 7994 |
return 0; |
| 7995 |
__pyx_L1_error:; |
| 7996 |
return -1; |
| 7997 |
} |
| 7998 |
|
| 7999 |
|
| 8000 |
static void __Pyx_CleanupGlobals(__pyx_mstatetype *__pyx_mstate) { |
| 8001 |
CYTHON_UNUSED_VAR(__pyx_mstate); |
| 8002 |
|
| 8003 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 8004 |
Py_CLEAR(__pyx_mstate_global->__Pyx_CachedMethodType); |
| 8005 |
#endif |
| 8006 |
|
| 8007 |
|
| 8008 |
if (__pyx_code_cache.entries) { |
| 8009 |
__Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; |
| 8010 |
int i, count = __pyx_code_cache.count; |
| 8011 |
__pyx_code_cache.count = 0; |
| 8012 |
__pyx_code_cache.max_count = 0; |
| 8013 |
__pyx_code_cache.entries = NULL; |
| 8014 |
for (i=0; i<count; i++) { |
| 8015 |
Py_DECREF(entries[i].code_object); |
| 8016 |
} |
| 8017 |
PyMem_Free(entries); |
| 8018 |
} |
| 8019 |
|
| 8020 |
|
| 8021 |
Py_CLEAR(__pyx_mstate_global->__pyx_print); |
| 8022 |
Py_CLEAR(__pyx_mstate_global->__pyx_print_kwargs); |
| 8023 |
|
| 8024 |
} |
| 8025 |
|
| 8026 |
static void __pyx_module_cleanup(CYTHON_UNUSED PyObject *self) { |
| 8027 |
__pyx_mstatetype *__pyx_mstate; |
| 8028 |
if (!PyState_FindModule(&__pyx_moduledef)) return; |
| 8029 |
__pyx_mstate = __Pyx_PyModule_GetState(self); |
| 8030 |
|
| 8031 |
__Pyx_CleanupGlobals(__pyx_mstate); |
| 8032 |
|
| 8033 |
|
| 8034 |
Py_CLEAR(__pyx_builtin_super); |
| 8035 |
Py_CLEAR(__pyx_builtin_max); |
| 8036 |
|
| 8037 |
Py_CLEAR(__pyx_mstate->__pyx_empty_tuple); |
| 8038 |
Py_CLEAR(__pyx_mstate->__pyx_cython_runtime); |
| 8039 |
Py_CLEAR(__pyx_mstate->__pyx_b); |
| 8040 |
Py_CLEAR(__pyx_mstate->__pyx_d); |
| 8041 |
} |
| 8042 |
|
| 8043 |
|
| 8044 |
#ifdef _MSC_VER |
| 8045 |
#pragma warning( push ) |
| 8046 |
|
| 8047 |
|
| 8048 |
|
| 8049 |
|
| 8050 |
#pragma warning( disable : 4127 ) |
| 8051 |
#endif |
| 8052 |
|
| 8053 |
|
| 8054 |
|
| 8055 |
|
| 8056 |
|
| 8057 |
|
| 8058 |
|
| 8059 |
#if CYTHON_REFNANNY |
| 8060 |
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { |
| 8061 |
PyObject *m = NULL, *p = NULL; |
| 8062 |
void *r = NULL; |
| 8063 |
m = PyImport_ImportModule(modname); |
| 8064 |
if (!m) goto end; |
| 8065 |
p = PyObject_GetAttrString(m, "RefNannyAPI"); |
| 8066 |
if (!p) goto end; |
| 8067 |
r = PyLong_AsVoidPtr(p); |
| 8068 |
end: |
| 8069 |
Py_XDECREF(p); |
| 8070 |
Py_XDECREF(m); |
| 8071 |
return (__Pyx_RefNannyAPIStruct *)r; |
| 8072 |
} |
| 8073 |
#endif |
| 8074 |
|
| 8075 |
|
| 8076 |
#if CYTHON_FAST_THREAD_STATE |
| 8077 |
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { |
| 8078 |
Py_ssize_t i, n; |
| 8079 |
n = PyTuple_GET_SIZE(tuple); |
| 8080 |
for (i=0; i<n; i++) { |
| 8081 |
if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; |
| 8082 |
} |
| 8083 |
for (i=0; i<n; i++) { |
| 8084 |
if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1; |
| 8085 |
} |
| 8086 |
return 0; |
| 8087 |
} |
| 8088 |
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) { |
| 8089 |
int result; |
| 8090 |
PyObject *exc_type; |
| 8091 |
#if PY_VERSION_HEX >= 0x030C00A6 |
| 8092 |
PyObject *current_exception = tstate->current_exception; |
| 8093 |
if (unlikely(!current_exception)) return 0; |
| 8094 |
exc_type = (PyObject*) Py_TYPE(current_exception); |
| 8095 |
if (exc_type == err) return 1; |
| 8096 |
#else |
| 8097 |
exc_type = tstate->curexc_type; |
| 8098 |
if (exc_type == err) return 1; |
| 8099 |
if (unlikely(!exc_type)) return 0; |
| 8100 |
#endif |
| 8101 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8102 |
Py_INCREF(exc_type); |
| 8103 |
#endif |
| 8104 |
if (unlikely(PyTuple_Check(err))) { |
| 8105 |
result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); |
| 8106 |
} else { |
| 8107 |
result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err); |
| 8108 |
} |
| 8109 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8110 |
Py_DECREF(exc_type); |
| 8111 |
#endif |
| 8112 |
return result; |
| 8113 |
} |
| 8114 |
#endif |
| 8115 |
|
| 8116 |
|
| 8117 |
#if CYTHON_FAST_THREAD_STATE |
| 8118 |
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { |
| 8119 |
#if PY_VERSION_HEX >= 0x030C00A6 |
| 8120 |
PyObject *tmp_value; |
| 8121 |
assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value))); |
| 8122 |
if (value) { |
| 8123 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8124 |
if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb)) |
| 8125 |
#endif |
| 8126 |
PyException_SetTraceback(value, tb); |
| 8127 |
} |
| 8128 |
tmp_value = tstate->current_exception; |
| 8129 |
tstate->current_exception = value; |
| 8130 |
Py_XDECREF(tmp_value); |
| 8131 |
Py_XDECREF(type); |
| 8132 |
Py_XDECREF(tb); |
| 8133 |
#else |
| 8134 |
PyObject *tmp_type, *tmp_value, *tmp_tb; |
| 8135 |
tmp_type = tstate->curexc_type; |
| 8136 |
tmp_value = tstate->curexc_value; |
| 8137 |
tmp_tb = tstate->curexc_traceback; |
| 8138 |
tstate->curexc_type = type; |
| 8139 |
tstate->curexc_value = value; |
| 8140 |
tstate->curexc_traceback = tb; |
| 8141 |
Py_XDECREF(tmp_type); |
| 8142 |
Py_XDECREF(tmp_value); |
| 8143 |
Py_XDECREF(tmp_tb); |
| 8144 |
#endif |
| 8145 |
} |
| 8146 |
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { |
| 8147 |
#if PY_VERSION_HEX >= 0x030C00A6 |
| 8148 |
PyObject* exc_value; |
| 8149 |
exc_value = tstate->current_exception; |
| 8150 |
tstate->current_exception = 0; |
| 8151 |
*value = exc_value; |
| 8152 |
*type = NULL; |
| 8153 |
*tb = NULL; |
| 8154 |
if (exc_value) { |
| 8155 |
*type = (PyObject*) Py_TYPE(exc_value); |
| 8156 |
Py_INCREF(*type); |
| 8157 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8158 |
*tb = ((PyBaseExceptionObject*) exc_value)->traceback; |
| 8159 |
Py_XINCREF(*tb); |
| 8160 |
#else |
| 8161 |
*tb = PyException_GetTraceback(exc_value); |
| 8162 |
#endif |
| 8163 |
} |
| 8164 |
#else |
| 8165 |
*type = tstate->curexc_type; |
| 8166 |
*value = tstate->curexc_value; |
| 8167 |
*tb = tstate->curexc_traceback; |
| 8168 |
tstate->curexc_type = 0; |
| 8169 |
tstate->curexc_value = 0; |
| 8170 |
tstate->curexc_traceback = 0; |
| 8171 |
#endif |
| 8172 |
} |
| 8173 |
#endif |
| 8174 |
|
| 8175 |
|
| 8176 |
#if CYTHON_USE_TYPE_SLOTS |
| 8177 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { |
| 8178 |
PyTypeObject* tp = Py_TYPE(obj); |
| 8179 |
if (likely(tp->tp_getattro)) |
| 8180 |
return tp->tp_getattro(obj, attr_name); |
| 8181 |
return PyObject_GetAttr(obj, attr_name); |
| 8182 |
} |
| 8183 |
#endif |
| 8184 |
|
| 8185 |
|
| 8186 |
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1 |
| 8187 |
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { |
| 8188 |
__Pyx_PyThreadState_declare |
| 8189 |
__Pyx_PyThreadState_assign |
| 8190 |
if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) |
| 8191 |
__Pyx_PyErr_Clear(); |
| 8192 |
} |
| 8193 |
#endif |
| 8194 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { |
| 8195 |
PyObject *result; |
| 8196 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1 |
| 8197 |
(void) PyObject_GetOptionalAttr(obj, attr_name, &result); |
| 8198 |
return result; |
| 8199 |
#else |
| 8200 |
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS |
| 8201 |
PyTypeObject* tp = Py_TYPE(obj); |
| 8202 |
if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { |
| 8203 |
return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); |
| 8204 |
} |
| 8205 |
#endif |
| 8206 |
result = __Pyx_PyObject_GetAttrStr(obj, attr_name); |
| 8207 |
if (unlikely(!result)) { |
| 8208 |
__Pyx_PyObject_GetAttrStr_ClearAttributeError(); |
| 8209 |
} |
| 8210 |
return result; |
| 8211 |
#endif |
| 8212 |
} |
| 8213 |
|
| 8214 |
|
| 8215 |
static PyObject *__Pyx_GetBuiltinName(PyObject *name) { |
| 8216 |
PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_b, name); |
| 8217 |
if (unlikely(!result) && !PyErr_Occurred()) { |
| 8218 |
PyErr_Format(PyExc_NameError, |
| 8219 |
"name '%U' is not defined", name); |
| 8220 |
} |
| 8221 |
return result; |
| 8222 |
} |
| 8223 |
|
| 8224 |
|
| 8225 |
#if !CYTHON_COMPILING_IN_CPYTHON && CYTHON_METH_FASTCALL |
| 8226 |
static CYTHON_INLINE PyObject * |
| 8227 |
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) |
| 8228 |
{ |
| 8229 |
PyObject *res; |
| 8230 |
Py_ssize_t i; |
| 8231 |
if (n <= 0) { |
| 8232 |
return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); |
| 8233 |
} |
| 8234 |
res = PyTuple_New(n); |
| 8235 |
if (unlikely(res == NULL)) return NULL; |
| 8236 |
for (i = 0; i < n; i++) { |
| 8237 |
if (unlikely(__Pyx_PyTuple_SET_ITEM(res, i, src[i]) < 0)) { |
| 8238 |
Py_DECREF(res); |
| 8239 |
return NULL; |
| 8240 |
} |
| 8241 |
Py_INCREF(src[i]); |
| 8242 |
} |
| 8243 |
return res; |
| 8244 |
} |
| 8245 |
#elif CYTHON_COMPILING_IN_CPYTHON |
| 8246 |
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { |
| 8247 |
PyObject *v; |
| 8248 |
Py_ssize_t i; |
| 8249 |
for (i = 0; i < length; i++) { |
| 8250 |
v = dest[i] = src[i]; |
| 8251 |
Py_INCREF(v); |
| 8252 |
} |
| 8253 |
} |
| 8254 |
static CYTHON_INLINE PyObject * |
| 8255 |
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n) |
| 8256 |
{ |
| 8257 |
PyObject *res; |
| 8258 |
if (n <= 0) { |
| 8259 |
return __Pyx_NewRef(__pyx_mstate_global->__pyx_empty_tuple); |
| 8260 |
} |
| 8261 |
res = PyTuple_New(n); |
| 8262 |
if (unlikely(res == NULL)) return NULL; |
| 8263 |
__Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n); |
| 8264 |
return res; |
| 8265 |
} |
| 8266 |
static CYTHON_INLINE PyObject * |
| 8267 |
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n) |
| 8268 |
{ |
| 8269 |
PyObject *res; |
| 8270 |
if (n <= 0) { |
| 8271 |
return PyList_New(0); |
| 8272 |
} |
| 8273 |
res = PyList_New(n); |
| 8274 |
if (unlikely(res == NULL)) return NULL; |
| 8275 |
__Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n); |
| 8276 |
return res; |
| 8277 |
} |
| 8278 |
#endif |
| 8279 |
|
| 8280 |
|
| 8281 |
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { |
| 8282 |
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL ||\ |
| 8283 |
!(CYTHON_ASSUME_SAFE_SIZE && CYTHON_ASSUME_SAFE_MACROS) |
| 8284 |
return PyObject_RichCompareBool(s1, s2, equals); |
| 8285 |
#else |
| 8286 |
if (s1 == s2) { |
| 8287 |
return (equals == Py_EQ); |
| 8288 |
} else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { |
| 8289 |
const char *ps1, *ps2; |
| 8290 |
Py_ssize_t length = PyBytes_GET_SIZE(s1); |
| 8291 |
if (length != PyBytes_GET_SIZE(s2)) |
| 8292 |
return (equals == Py_NE); |
| 8293 |
ps1 = PyBytes_AS_STRING(s1); |
| 8294 |
ps2 = PyBytes_AS_STRING(s2); |
| 8295 |
if (ps1[0] != ps2[0]) { |
| 8296 |
return (equals == Py_NE); |
| 8297 |
} else if (length == 1) { |
| 8298 |
return (equals == Py_EQ); |
| 8299 |
} else { |
| 8300 |
int result; |
| 8301 |
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) |
| 8302 |
Py_hash_t hash1, hash2; |
| 8303 |
hash1 = ((PyBytesObject*)s1)->ob_shash; |
| 8304 |
hash2 = ((PyBytesObject*)s2)->ob_shash; |
| 8305 |
if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { |
| 8306 |
return (equals == Py_NE); |
| 8307 |
} |
| 8308 |
#endif |
| 8309 |
result = memcmp(ps1, ps2, (size_t)length); |
| 8310 |
return (equals == Py_EQ) ? (result == 0) : (result != 0); |
| 8311 |
} |
| 8312 |
} else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { |
| 8313 |
return (equals == Py_NE); |
| 8314 |
} else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { |
| 8315 |
return (equals == Py_NE); |
| 8316 |
} else { |
| 8317 |
int result; |
| 8318 |
PyObject* py_result = PyObject_RichCompare(s1, s2, equals); |
| 8319 |
if (!py_result) |
| 8320 |
return -1; |
| 8321 |
result = __Pyx_PyObject_IsTrue(py_result); |
| 8322 |
Py_DECREF(py_result); |
| 8323 |
return result; |
| 8324 |
} |
| 8325 |
#endif |
| 8326 |
} |
| 8327 |
|
| 8328 |
|
| 8329 |
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { |
| 8330 |
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_GRAAL |
| 8331 |
return PyObject_RichCompareBool(s1, s2, equals); |
| 8332 |
#else |
| 8333 |
int s1_is_unicode, s2_is_unicode; |
| 8334 |
if (s1 == s2) { |
| 8335 |
goto return_eq; |
| 8336 |
} |
| 8337 |
s1_is_unicode = PyUnicode_CheckExact(s1); |
| 8338 |
s2_is_unicode = PyUnicode_CheckExact(s2); |
| 8339 |
if (s1_is_unicode & s2_is_unicode) { |
| 8340 |
Py_ssize_t length, length2; |
| 8341 |
int kind; |
| 8342 |
void *data1, *data2; |
| 8343 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 8344 |
if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) |
| 8345 |
return -1; |
| 8346 |
#endif |
| 8347 |
length = __Pyx_PyUnicode_GET_LENGTH(s1); |
| 8348 |
#if !CYTHON_ASSUME_SAFE_SIZE |
| 8349 |
if (unlikely(length < 0)) return -1; |
| 8350 |
#endif |
| 8351 |
length2 = __Pyx_PyUnicode_GET_LENGTH(s2); |
| 8352 |
#if !CYTHON_ASSUME_SAFE_SIZE |
| 8353 |
if (unlikely(length2 < 0)) return -1; |
| 8354 |
#endif |
| 8355 |
if (length != length2) { |
| 8356 |
goto return_ne; |
| 8357 |
} |
| 8358 |
#if CYTHON_USE_UNICODE_INTERNALS |
| 8359 |
{ |
| 8360 |
Py_hash_t hash1, hash2; |
| 8361 |
hash1 = ((PyASCIIObject*)s1)->hash; |
| 8362 |
hash2 = ((PyASCIIObject*)s2)->hash; |
| 8363 |
if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { |
| 8364 |
goto return_ne; |
| 8365 |
} |
| 8366 |
} |
| 8367 |
#endif |
| 8368 |
kind = __Pyx_PyUnicode_KIND(s1); |
| 8369 |
if (kind != __Pyx_PyUnicode_KIND(s2)) { |
| 8370 |
goto return_ne; |
| 8371 |
} |
| 8372 |
data1 = __Pyx_PyUnicode_DATA(s1); |
| 8373 |
data2 = __Pyx_PyUnicode_DATA(s2); |
| 8374 |
if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { |
| 8375 |
goto return_ne; |
| 8376 |
} else if (length == 1) { |
| 8377 |
goto return_eq; |
| 8378 |
} else { |
| 8379 |
int result = memcmp(data1, data2, (size_t)(length * kind)); |
| 8380 |
return (equals == Py_EQ) ? (result == 0) : (result != 0); |
| 8381 |
} |
| 8382 |
} else if ((s1 == Py_None) & s2_is_unicode) { |
| 8383 |
goto return_ne; |
| 8384 |
} else if ((s2 == Py_None) & s1_is_unicode) { |
| 8385 |
goto return_ne; |
| 8386 |
} else { |
| 8387 |
int result; |
| 8388 |
PyObject* py_result = PyObject_RichCompare(s1, s2, equals); |
| 8389 |
if (!py_result) |
| 8390 |
return -1; |
| 8391 |
result = __Pyx_PyObject_IsTrue(py_result); |
| 8392 |
Py_DECREF(py_result); |
| 8393 |
return result; |
| 8394 |
} |
| 8395 |
return_eq: |
| 8396 |
return (equals == Py_EQ); |
| 8397 |
return_ne: |
| 8398 |
return (equals == Py_NE); |
| 8399 |
#endif |
| 8400 |
} |
| 8401 |
|
| 8402 |
|
| 8403 |
#if CYTHON_METH_FASTCALL |
| 8404 |
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s) |
| 8405 |
{ |
| 8406 |
Py_ssize_t i, n = __Pyx_PyTuple_GET_SIZE(kwnames); |
| 8407 |
#if !CYTHON_ASSUME_SAFE_SIZE |
| 8408 |
if (unlikely(n == -1)) return NULL; |
| 8409 |
#endif |
| 8410 |
for (i = 0; i < n; i++) |
| 8411 |
{ |
| 8412 |
PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); |
| 8413 |
#if !CYTHON_ASSUME_SAFE_MACROS |
| 8414 |
if (unlikely(!namei)) return NULL; |
| 8415 |
#endif |
| 8416 |
if (s == namei) return kwvalues[i]; |
| 8417 |
} |
| 8418 |
for (i = 0; i < n; i++) |
| 8419 |
{ |
| 8420 |
PyObject *namei = __Pyx_PyTuple_GET_ITEM(kwnames, i); |
| 8421 |
#if !CYTHON_ASSUME_SAFE_MACROS |
| 8422 |
if (unlikely(!namei)) return NULL; |
| 8423 |
#endif |
| 8424 |
int eq = __Pyx_PyUnicode_Equals(s, namei, Py_EQ); |
| 8425 |
if (unlikely(eq != 0)) { |
| 8426 |
if (unlikely(eq < 0)) return NULL; |
| 8427 |
return kwvalues[i]; |
| 8428 |
} |
| 8429 |
} |
| 8430 |
return NULL; |
| 8431 |
} |
| 8432 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 |
| 8433 |
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { |
| 8434 |
Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames); |
| 8435 |
PyObject *dict; |
| 8436 |
dict = PyDict_New(); |
| 8437 |
if (unlikely(!dict)) |
| 8438 |
return NULL; |
| 8439 |
for (i=0; i<nkwargs; i++) { |
| 8440 |
PyObject *key = PyTuple_GET_ITEM(kwnames, i); |
| 8441 |
if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0)) |
| 8442 |
goto bad; |
| 8443 |
} |
| 8444 |
return dict; |
| 8445 |
bad: |
| 8446 |
Py_DECREF(dict); |
| 8447 |
return NULL; |
| 8448 |
} |
| 8449 |
#endif |
| 8450 |
#endif |
| 8451 |
|
| 8452 |
|
| 8453 |
static void __Pyx_RaiseDoubleKeywordsError( |
| 8454 |
const char* func_name, |
| 8455 |
PyObject* kw_name) |
| 8456 |
{ |
| 8457 |
PyErr_Format(PyExc_TypeError, |
| 8458 |
"%s() got multiple values for keyword argument '%U'", func_name, kw_name); |
| 8459 |
} |
| 8460 |
|
| 8461 |
|
| 8462 |
static int __Pyx_ParseOptionalKeywords( |
| 8463 |
PyObject *kwds, |
| 8464 |
PyObject *const *kwvalues, |
| 8465 |
PyObject **argnames[], |
| 8466 |
PyObject *kwds2, |
| 8467 |
PyObject *values[], |
| 8468 |
Py_ssize_t num_pos_args, |
| 8469 |
const char* function_name) |
| 8470 |
{ |
| 8471 |
PyObject *key = 0, *value = 0; |
| 8472 |
Py_ssize_t pos = 0; |
| 8473 |
PyObject*** name; |
| 8474 |
PyObject*** first_kw_arg = argnames + num_pos_args; |
| 8475 |
int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds)); |
| 8476 |
while (1) { |
| 8477 |
Py_XDECREF(key); key = NULL; |
| 8478 |
Py_XDECREF(value); value = NULL; |
| 8479 |
if (kwds_is_tuple) { |
| 8480 |
Py_ssize_t size; |
| 8481 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 8482 |
size = PyTuple_GET_SIZE(kwds); |
| 8483 |
#else |
| 8484 |
size = PyTuple_Size(kwds); |
| 8485 |
if (size < 0) goto bad; |
| 8486 |
#endif |
| 8487 |
if (pos >= size) break; |
| 8488 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8489 |
key = __Pyx_PySequence_ITEM(kwds, pos); |
| 8490 |
if (!key) goto bad; |
| 8491 |
#elif CYTHON_ASSUME_SAFE_MACROS |
| 8492 |
key = PyTuple_GET_ITEM(kwds, pos); |
| 8493 |
#else |
| 8494 |
key = PyTuple_GetItem(kwds, pos); |
| 8495 |
if (!key) goto bad; |
| 8496 |
#endif |
| 8497 |
value = kwvalues[pos]; |
| 8498 |
pos++; |
| 8499 |
} |
| 8500 |
else |
| 8501 |
{ |
| 8502 |
if (!PyDict_Next(kwds, &pos, &key, &value)) break; |
| 8503 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8504 |
Py_INCREF(key); |
| 8505 |
#endif |
| 8506 |
} |
| 8507 |
name = first_kw_arg; |
| 8508 |
while (*name && (**name != key)) name++; |
| 8509 |
if (*name) { |
| 8510 |
values[name-argnames] = value; |
| 8511 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8512 |
Py_INCREF(value); |
| 8513 |
Py_DECREF(key); |
| 8514 |
#endif |
| 8515 |
key = NULL; |
| 8516 |
value = NULL; |
| 8517 |
continue; |
| 8518 |
} |
| 8519 |
#if !CYTHON_AVOID_BORROWED_REFS |
| 8520 |
Py_INCREF(key); |
| 8521 |
#endif |
| 8522 |
Py_INCREF(value); |
| 8523 |
name = first_kw_arg; |
| 8524 |
if (likely(PyUnicode_Check(key))) { |
| 8525 |
while (*name) { |
| 8526 |
int cmp = ( |
| 8527 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 8528 |
(PyUnicode_GET_LENGTH(**name) != PyUnicode_GET_LENGTH(key)) ? 1 : |
| 8529 |
#endif |
| 8530 |
PyUnicode_Compare(**name, key) |
| 8531 |
); |
| 8532 |
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; |
| 8533 |
if (cmp == 0) { |
| 8534 |
values[name-argnames] = value; |
| 8535 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8536 |
value = NULL; |
| 8537 |
#endif |
| 8538 |
break; |
| 8539 |
} |
| 8540 |
name++; |
| 8541 |
} |
| 8542 |
if (*name) continue; |
| 8543 |
else { |
| 8544 |
PyObject*** argname = argnames; |
| 8545 |
while (argname != first_kw_arg) { |
| 8546 |
int cmp = (**argname == key) ? 0 : |
| 8547 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 8548 |
(PyUnicode_GET_LENGTH(**argname) != PyUnicode_GET_LENGTH(key)) ? 1 : |
| 8549 |
#endif |
| 8550 |
PyUnicode_Compare(**argname, key); |
| 8551 |
if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; |
| 8552 |
if (cmp == 0) goto arg_passed_twice; |
| 8553 |
argname++; |
| 8554 |
} |
| 8555 |
} |
| 8556 |
} else |
| 8557 |
goto invalid_keyword_type; |
| 8558 |
if (kwds2) { |
| 8559 |
if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; |
| 8560 |
} else { |
| 8561 |
goto invalid_keyword; |
| 8562 |
} |
| 8563 |
} |
| 8564 |
Py_XDECREF(key); |
| 8565 |
Py_XDECREF(value); |
| 8566 |
return 0; |
| 8567 |
arg_passed_twice: |
| 8568 |
__Pyx_RaiseDoubleKeywordsError(function_name, key); |
| 8569 |
goto bad; |
| 8570 |
invalid_keyword_type: |
| 8571 |
PyErr_Format(PyExc_TypeError, |
| 8572 |
"%.200s() keywords must be strings", function_name); |
| 8573 |
goto bad; |
| 8574 |
invalid_keyword: |
| 8575 |
PyErr_Format(PyExc_TypeError, |
| 8576 |
"%s() got an unexpected keyword argument '%U'", |
| 8577 |
function_name, key); |
| 8578 |
bad: |
| 8579 |
Py_XDECREF(key); |
| 8580 |
Py_XDECREF(value); |
| 8581 |
return -1; |
| 8582 |
} |
| 8583 |
|
| 8584 |
|
| 8585 |
static void __Pyx_RaiseArgtupleInvalid( |
| 8586 |
const char* func_name, |
| 8587 |
int exact, |
| 8588 |
Py_ssize_t num_min, |
| 8589 |
Py_ssize_t num_max, |
| 8590 |
Py_ssize_t num_found) |
| 8591 |
{ |
| 8592 |
Py_ssize_t num_expected; |
| 8593 |
const char *more_or_less; |
| 8594 |
if (num_found < num_min) { |
| 8595 |
num_expected = num_min; |
| 8596 |
more_or_less = "at least"; |
| 8597 |
} else { |
| 8598 |
num_expected = num_max; |
| 8599 |
more_or_less = "at most"; |
| 8600 |
} |
| 8601 |
if (exact) { |
| 8602 |
more_or_less = "exactly"; |
| 8603 |
} |
| 8604 |
PyErr_Format(PyExc_TypeError, |
| 8605 |
"%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", |
| 8606 |
func_name, more_or_less, num_expected, |
| 8607 |
(num_expected == 1) ? "" : "s", num_found); |
| 8608 |
} |
| 8609 |
|
| 8610 |
|
| 8611 |
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS |
| 8612 |
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { |
| 8613 |
PyObject *dict = Py_TYPE(obj)->tp_dict; |
| 8614 |
return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; |
| 8615 |
} |
| 8616 |
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { |
| 8617 |
PyObject **dictptr = NULL; |
| 8618 |
Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; |
| 8619 |
if (offset) { |
| 8620 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8621 |
dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); |
| 8622 |
#else |
| 8623 |
dictptr = _PyObject_GetDictPtr(obj); |
| 8624 |
#endif |
| 8625 |
} |
| 8626 |
return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; |
| 8627 |
} |
| 8628 |
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { |
| 8629 |
PyObject *dict = Py_TYPE(obj)->tp_dict; |
| 8630 |
if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) |
| 8631 |
return 0; |
| 8632 |
return obj_dict_version == __Pyx_get_object_dict_version(obj); |
| 8633 |
} |
| 8634 |
#endif |
| 8635 |
|
| 8636 |
|
| 8637 |
#if CYTHON_USE_DICT_VERSIONS |
| 8638 |
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) |
| 8639 |
#else |
| 8640 |
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) |
| 8641 |
#endif |
| 8642 |
{ |
| 8643 |
PyObject *result; |
| 8644 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 8645 |
if (unlikely(!__pyx_m)) { |
| 8646 |
return NULL; |
| 8647 |
} |
| 8648 |
result = PyObject_GetAttr(__pyx_m, name); |
| 8649 |
if (likely(result)) { |
| 8650 |
return result; |
| 8651 |
} |
| 8652 |
#elif !CYTHON_AVOID_BORROWED_REFS && !CYTHON_AVOID_THREAD_UNSAFE_BORROWED_REFS |
| 8653 |
result = _PyDict_GetItem_KnownHash(__pyx_mstate_global->__pyx_d, name, ((PyASCIIObject *) name)->hash); |
| 8654 |
__PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) |
| 8655 |
if (likely(result)) { |
| 8656 |
return __Pyx_NewRef(result); |
| 8657 |
} else if (unlikely(PyErr_Occurred())) { |
| 8658 |
return NULL; |
| 8659 |
} |
| 8660 |
#elif !CYTHON_AVOID_BORROWED_REFS |
| 8661 |
if (unlikely(__Pyx_PyDict_GetItemRef(__pyx_mstate_global->__pyx_d, name, &result) == -1)) PyErr_Clear(); |
| 8662 |
__PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) |
| 8663 |
if (likely(result)) { |
| 8664 |
return result; |
| 8665 |
} |
| 8666 |
#else |
| 8667 |
result = PyObject_GetItem(__pyx_mstate_global->__pyx_d, name); |
| 8668 |
__PYX_UPDATE_DICT_CACHE(__pyx_mstate_global->__pyx_d, result, *dict_cached_value, *dict_version) |
| 8669 |
if (likely(result)) { |
| 8670 |
return __Pyx_NewRef(result); |
| 8671 |
} |
| 8672 |
PyErr_Clear(); |
| 8673 |
#endif |
| 8674 |
return __Pyx_GetBuiltinName(name); |
| 8675 |
} |
| 8676 |
|
| 8677 |
|
| 8678 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8679 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { |
| 8680 |
PyObject *result; |
| 8681 |
ternaryfunc call = Py_TYPE(func)->tp_call; |
| 8682 |
if (unlikely(!call)) |
| 8683 |
return PyObject_Call(func, arg, kw); |
| 8684 |
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) |
| 8685 |
return NULL; |
| 8686 |
result = (*call)(func, arg, kw); |
| 8687 |
Py_LeaveRecursiveCall(); |
| 8688 |
if (unlikely(!result) && unlikely(!PyErr_Occurred())) { |
| 8689 |
PyErr_SetString( |
| 8690 |
PyExc_SystemError, |
| 8691 |
"NULL result without error in PyObject_Call"); |
| 8692 |
} |
| 8693 |
return result; |
| 8694 |
} |
| 8695 |
#endif |
| 8696 |
|
| 8697 |
|
| 8698 |
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL |
| 8699 |
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, |
| 8700 |
PyObject *globals) { |
| 8701 |
PyFrameObject *f; |
| 8702 |
PyThreadState *tstate = __Pyx_PyThreadState_Current; |
| 8703 |
PyObject **fastlocals; |
| 8704 |
Py_ssize_t i; |
| 8705 |
PyObject *result; |
| 8706 |
assert(globals != NULL); |
| 8707 |
|
| 8708 |
|
| 8709 |
|
| 8710 |
|
| 8711 |
assert(tstate != NULL); |
| 8712 |
f = PyFrame_New(tstate, co, globals, NULL); |
| 8713 |
if (f == NULL) { |
| 8714 |
return NULL; |
| 8715 |
} |
| 8716 |
fastlocals = __Pyx_PyFrame_GetLocalsplus(f); |
| 8717 |
for (i = 0; i < na; i++) { |
| 8718 |
Py_INCREF(*args); |
| 8719 |
fastlocals[i] = *args++; |
| 8720 |
} |
| 8721 |
result = PyEval_EvalFrameEx(f,0); |
| 8722 |
++tstate->recursion_depth; |
| 8723 |
Py_DECREF(f); |
| 8724 |
--tstate->recursion_depth; |
| 8725 |
return result; |
| 8726 |
} |
| 8727 |
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { |
| 8728 |
PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); |
| 8729 |
PyObject *globals = PyFunction_GET_GLOBALS(func); |
| 8730 |
PyObject *argdefs = PyFunction_GET_DEFAULTS(func); |
| 8731 |
PyObject *closure; |
| 8732 |
PyObject *kwdefs; |
| 8733 |
PyObject *kwtuple, **k; |
| 8734 |
PyObject **d; |
| 8735 |
Py_ssize_t nd; |
| 8736 |
Py_ssize_t nk; |
| 8737 |
PyObject *result; |
| 8738 |
assert(kwargs == NULL || PyDict_Check(kwargs)); |
| 8739 |
nk = kwargs ? PyDict_Size(kwargs) : 0; |
| 8740 |
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) { |
| 8741 |
return NULL; |
| 8742 |
} |
| 8743 |
if ( |
| 8744 |
co->co_kwonlyargcount == 0 && |
| 8745 |
likely(kwargs == NULL || nk == 0) && |
| 8746 |
co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { |
| 8747 |
if (argdefs == NULL && co->co_argcount == nargs) { |
| 8748 |
result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); |
| 8749 |
goto done; |
| 8750 |
} |
| 8751 |
else if (nargs == 0 && argdefs != NULL |
| 8752 |
&& co->co_argcount == Py_SIZE(argdefs)) { |
| 8753 |
|
| 8754 |
|
| 8755 |
args = &PyTuple_GET_ITEM(argdefs, 0); |
| 8756 |
result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); |
| 8757 |
goto done; |
| 8758 |
} |
| 8759 |
} |
| 8760 |
if (kwargs != NULL) { |
| 8761 |
Py_ssize_t pos, i; |
| 8762 |
kwtuple = PyTuple_New(2 * nk); |
| 8763 |
if (kwtuple == NULL) { |
| 8764 |
result = NULL; |
| 8765 |
goto done; |
| 8766 |
} |
| 8767 |
k = &PyTuple_GET_ITEM(kwtuple, 0); |
| 8768 |
pos = i = 0; |
| 8769 |
while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { |
| 8770 |
Py_INCREF(k[i]); |
| 8771 |
Py_INCREF(k[i+1]); |
| 8772 |
i += 2; |
| 8773 |
} |
| 8774 |
nk = i / 2; |
| 8775 |
} |
| 8776 |
else { |
| 8777 |
kwtuple = NULL; |
| 8778 |
k = NULL; |
| 8779 |
} |
| 8780 |
closure = PyFunction_GET_CLOSURE(func); |
| 8781 |
kwdefs = PyFunction_GET_KW_DEFAULTS(func); |
| 8782 |
if (argdefs != NULL) { |
| 8783 |
d = &PyTuple_GET_ITEM(argdefs, 0); |
| 8784 |
nd = Py_SIZE(argdefs); |
| 8785 |
} |
| 8786 |
else { |
| 8787 |
d = NULL; |
| 8788 |
nd = 0; |
| 8789 |
} |
| 8790 |
result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, |
| 8791 |
args, (int)nargs, |
| 8792 |
k, (int)nk, |
| 8793 |
d, (int)nd, kwdefs, closure); |
| 8794 |
Py_XDECREF(kwtuple); |
| 8795 |
done: |
| 8796 |
Py_LeaveRecursiveCall(); |
| 8797 |
return result; |
| 8798 |
} |
| 8799 |
#endif |
| 8800 |
|
| 8801 |
|
| 8802 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8803 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { |
| 8804 |
PyObject *self, *result; |
| 8805 |
PyCFunction cfunc; |
| 8806 |
cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func); |
| 8807 |
self = __Pyx_CyOrPyCFunction_GET_SELF(func); |
| 8808 |
if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) |
| 8809 |
return NULL; |
| 8810 |
result = cfunc(self, arg); |
| 8811 |
Py_LeaveRecursiveCall(); |
| 8812 |
if (unlikely(!result) && unlikely(!PyErr_Occurred())) { |
| 8813 |
PyErr_SetString( |
| 8814 |
PyExc_SystemError, |
| 8815 |
"NULL result without error in PyObject_Call"); |
| 8816 |
} |
| 8817 |
return result; |
| 8818 |
} |
| 8819 |
#endif |
| 8820 |
|
| 8821 |
|
| 8822 |
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API |
| 8823 |
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) { |
| 8824 |
PyObject *argstuple; |
| 8825 |
PyObject *result = 0; |
| 8826 |
size_t i; |
| 8827 |
argstuple = PyTuple_New((Py_ssize_t)nargs); |
| 8828 |
if (unlikely(!argstuple)) return NULL; |
| 8829 |
for (i = 0; i < nargs; i++) { |
| 8830 |
Py_INCREF(args[i]); |
| 8831 |
if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) != (0)) goto bad; |
| 8832 |
} |
| 8833 |
result = __Pyx_PyObject_Call(func, argstuple, kwargs); |
| 8834 |
bad: |
| 8835 |
Py_DECREF(argstuple); |
| 8836 |
return result; |
| 8837 |
} |
| 8838 |
#endif |
| 8839 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) { |
| 8840 |
Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs); |
| 8841 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8842 |
if (nargs == 0 && kwargs == NULL) { |
| 8843 |
if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS)) |
| 8844 |
return __Pyx_PyObject_CallMethO(func, NULL); |
| 8845 |
} |
| 8846 |
else if (nargs == 1 && kwargs == NULL) { |
| 8847 |
if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O)) |
| 8848 |
return __Pyx_PyObject_CallMethO(func, args[0]); |
| 8849 |
} |
| 8850 |
#endif |
| 8851 |
#if PY_VERSION_HEX < 0x030800B1 |
| 8852 |
#if CYTHON_FAST_PYCCALL |
| 8853 |
if (PyCFunction_Check(func)) { |
| 8854 |
if (kwargs) { |
| 8855 |
return _PyCFunction_FastCallDict(func, args, nargs, kwargs); |
| 8856 |
} else { |
| 8857 |
return _PyCFunction_FastCallKeywords(func, args, nargs, NULL); |
| 8858 |
} |
| 8859 |
} |
| 8860 |
if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) { |
| 8861 |
return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL); |
| 8862 |
} |
| 8863 |
#endif |
| 8864 |
#if CYTHON_FAST_PYCALL |
| 8865 |
if (PyFunction_Check(func)) { |
| 8866 |
return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs); |
| 8867 |
} |
| 8868 |
#endif |
| 8869 |
#endif |
| 8870 |
if (kwargs == NULL) { |
| 8871 |
#if CYTHON_VECTORCALL && !CYTHON_COMPILING_IN_LIMITED_API |
| 8872 |
#if PY_VERSION_HEX < 0x03090000 |
| 8873 |
vectorcallfunc f = _PyVectorcall_Function(func); |
| 8874 |
#else |
| 8875 |
vectorcallfunc f = PyVectorcall_Function(func); |
| 8876 |
#endif |
| 8877 |
if (f) { |
| 8878 |
return f(func, args, (size_t)nargs, NULL); |
| 8879 |
} |
| 8880 |
#elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL |
| 8881 |
if (__Pyx_CyFunction_CheckExact(func)) { |
| 8882 |
__pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func); |
| 8883 |
if (f) return f(func, args, (size_t)nargs, NULL); |
| 8884 |
} |
| 8885 |
#elif CYTHON_COMPILING_IN_LIMITED_API && CYTHON_VECTORCALL |
| 8886 |
return PyObject_Vectorcall(func, args, (size_t)nargs, NULL); |
| 8887 |
#endif |
| 8888 |
} |
| 8889 |
if (nargs == 0) { |
| 8890 |
return __Pyx_PyObject_Call(func, __pyx_mstate_global->__pyx_empty_tuple, kwargs); |
| 8891 |
} |
| 8892 |
#if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API |
| 8893 |
return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs); |
| 8894 |
#else |
| 8895 |
return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs); |
| 8896 |
#endif |
| 8897 |
} |
| 8898 |
|
| 8899 |
|
| 8900 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { |
| 8901 |
PyObject *arg[2] = {NULL, NULL}; |
| 8902 |
return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); |
| 8903 |
} |
| 8904 |
|
| 8905 |
|
| 8906 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { |
| 8907 |
PyObject *args[2] = {NULL, arg}; |
| 8908 |
return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); |
| 8909 |
} |
| 8910 |
|
| 8911 |
|
| 8912 |
static int __Pyx_VersionSanityCheck(void) { |
| 8913 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 8914 |
#if PY_VERSION_HEX < 0x03080000 |
| 8915 |
if (PySys_GetObject("gettotalrefcount")) { |
| 8916 |
#ifndef Py_DEBUG |
| 8917 |
PyErr_SetString( |
| 8918 |
PyExc_ImportError, |
| 8919 |
"Module was compiled with a non-debug version of Python but imported into a debug version." |
| 8920 |
); |
| 8921 |
return -1; |
| 8922 |
#endif |
| 8923 |
} else { |
| 8924 |
#ifdef Py_DEBUG |
| 8925 |
PyErr_SetString( |
| 8926 |
PyExc_ImportError, |
| 8927 |
"Module was compiled with a debug version of Python but imported into a non-debug version." |
| 8928 |
); |
| 8929 |
return -1; |
| 8930 |
#endif |
| 8931 |
} |
| 8932 |
#endif |
| 8933 |
#if PY_VERSION_HEX >= 0x030d0000 |
| 8934 |
if (PyRun_SimpleStringFlags( |
| 8935 |
"if " |
| 8936 |
#ifdef Py_GIL_DISABLED |
| 8937 |
"not " |
| 8938 |
#endif |
| 8939 |
"__import__('sysconfig').get_config_var('Py_GIL_DISABLED'): raise ImportError", |
| 8940 |
NULL |
| 8941 |
) == -1) { |
| 8942 |
PyErr_SetString( |
| 8943 |
PyExc_ImportError, |
| 8944 |
#ifdef Py_GIL_DISABLED |
| 8945 |
"Module was compiled with a freethreading build of Python but imported into a non-freethreading build." |
| 8946 |
#else |
| 8947 |
"Module was compiled with a non-freethreading build of Python but imported into a freethreading build." |
| 8948 |
#endif |
| 8949 |
); |
| 8950 |
return -1; |
| 8951 |
} |
| 8952 |
#endif |
| 8953 |
if (PySys_GetObject("getobjects")) { |
| 8954 |
#ifndef Py_TRACE_REFS |
| 8955 |
PyErr_SetString( |
| 8956 |
PyExc_ImportError, |
| 8957 |
"Module was compiled without Py_TRACE_REFS but imported into a build of Python with." |
| 8958 |
); |
| 8959 |
return -1; |
| 8960 |
#endif |
| 8961 |
} else { |
| 8962 |
#ifdef Py_TRACE_REFS |
| 8963 |
PyErr_SetString( |
| 8964 |
PyExc_ImportError, |
| 8965 |
"Module was compiled with Py_TRACE_REFS but imported into a build of Python without." |
| 8966 |
); |
| 8967 |
return -1; |
| 8968 |
#endif |
| 8969 |
} |
| 8970 |
const char code[] = "if __import__('sys').getsizeof(object()) != %u: raise ImportError"; |
| 8971 |
char formattedCode[sizeof(code)+50]; |
| 8972 |
PyOS_snprintf(formattedCode, sizeof(formattedCode), code, (unsigned int)sizeof(PyObject)); |
| 8973 |
if (PyRun_SimpleStringFlags(formattedCode, NULL) == -1) { |
| 8974 |
PyErr_SetString( |
| 8975 |
PyExc_ImportError, |
| 8976 |
"Runtime and compile-time PyObject size do not match." |
| 8977 |
); |
| 8978 |
return -1; |
| 8979 |
} |
| 8980 |
#endif |
| 8981 |
return 0; |
| 8982 |
} |
| 8983 |
|
| 8984 |
|
| 8985 |
static PyObject* |
| 8986 |
__Pyx_PEP560_update_bases(PyObject *bases) |
| 8987 |
{ |
| 8988 |
Py_ssize_t i, j, size_bases; |
| 8989 |
PyObject *base = NULL, *meth, *new_base, *result, *new_bases = NULL; |
| 8990 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 8991 |
size_bases = PyTuple_GET_SIZE(bases); |
| 8992 |
#else |
| 8993 |
size_bases = PyTuple_Size(bases); |
| 8994 |
if (size_bases < 0) return NULL; |
| 8995 |
#endif |
| 8996 |
for (i = 0; i < size_bases; i++) { |
| 8997 |
#if CYTHON_AVOID_BORROWED_REFS |
| 8998 |
Py_CLEAR(base); |
| 8999 |
#endif |
| 9000 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 9001 |
base = PyTuple_GET_ITEM(bases, i); |
| 9002 |
#else |
| 9003 |
base = PyTuple_GetItem(bases, i); |
| 9004 |
if (!base) goto error; |
| 9005 |
#endif |
| 9006 |
#if CYTHON_AVOID_BORROWED_REFS |
| 9007 |
Py_INCREF(base); |
| 9008 |
#endif |
| 9009 |
if (PyType_Check(base)) { |
| 9010 |
if (new_bases) { |
| 9011 |
if (PyList_Append(new_bases, base) < 0) { |
| 9012 |
goto error; |
| 9013 |
} |
| 9014 |
} |
| 9015 |
continue; |
| 9016 |
} |
| 9017 |
meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_mstate_global->__pyx_n_u_mro_entries); |
| 9018 |
if (!meth && PyErr_Occurred()) { |
| 9019 |
goto error; |
| 9020 |
} |
| 9021 |
if (!meth) { |
| 9022 |
if (new_bases) { |
| 9023 |
if (PyList_Append(new_bases, base) < 0) { |
| 9024 |
goto error; |
| 9025 |
} |
| 9026 |
} |
| 9027 |
continue; |
| 9028 |
} |
| 9029 |
new_base = __Pyx_PyObject_CallOneArg(meth, bases); |
| 9030 |
Py_DECREF(meth); |
| 9031 |
if (!new_base) { |
| 9032 |
goto error; |
| 9033 |
} |
| 9034 |
if (!PyTuple_Check(new_base)) { |
| 9035 |
PyErr_SetString(PyExc_TypeError, |
| 9036 |
"__mro_entries__ must return a tuple"); |
| 9037 |
Py_DECREF(new_base); |
| 9038 |
goto error; |
| 9039 |
} |
| 9040 |
if (!new_bases) { |
| 9041 |
if (!(new_bases = PyList_New(i))) { |
| 9042 |
goto error; |
| 9043 |
} |
| 9044 |
for (j = 0; j < i; j++) { |
| 9045 |
PyObject *base_from_list; |
| 9046 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 9047 |
base_from_list = PyTuple_GET_ITEM(bases, j); |
| 9048 |
PyList_SET_ITEM(new_bases, j, base_from_list); |
| 9049 |
Py_INCREF(base_from_list); |
| 9050 |
#else |
| 9051 |
base_from_list = PyTuple_GetItem(bases, j); |
| 9052 |
if (!base_from_list) goto error; |
| 9053 |
Py_INCREF(base_from_list); |
| 9054 |
if (PyList_SetItem(new_bases, j, base_from_list) < 0) goto error; |
| 9055 |
#endif |
| 9056 |
} |
| 9057 |
} |
| 9058 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 9059 |
j = PyList_GET_SIZE(new_bases); |
| 9060 |
#else |
| 9061 |
j = PyList_Size(new_bases); |
| 9062 |
if (j < 0) goto error; |
| 9063 |
#endif |
| 9064 |
if (PyList_SetSlice(new_bases, j, j, new_base) < 0) { |
| 9065 |
goto error; |
| 9066 |
} |
| 9067 |
Py_DECREF(new_base); |
| 9068 |
} |
| 9069 |
if (!new_bases) { |
| 9070 |
Py_INCREF(bases); |
| 9071 |
return bases; |
| 9072 |
} |
| 9073 |
result = PyList_AsTuple(new_bases); |
| 9074 |
Py_DECREF(new_bases); |
| 9075 |
#if CYTHON_AVOID_BORROWED_REFS |
| 9076 |
Py_XDECREF(base); |
| 9077 |
#endif |
| 9078 |
return result; |
| 9079 |
error: |
| 9080 |
Py_XDECREF(new_bases); |
| 9081 |
#if CYTHON_AVOID_BORROWED_REFS |
| 9082 |
Py_XDECREF(base); |
| 9083 |
#endif |
| 9084 |
return NULL; |
| 9085 |
} |
| 9086 |
|
| 9087 |
|
| 9088 |
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { |
| 9089 |
Py_ssize_t i, nbases; |
| 9090 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 9091 |
nbases = PyTuple_GET_SIZE(bases); |
| 9092 |
#else |
| 9093 |
nbases = PyTuple_Size(bases); |
| 9094 |
if (nbases < 0) return NULL; |
| 9095 |
#endif |
| 9096 |
for (i=0; i < nbases; i++) { |
| 9097 |
PyTypeObject *tmptype; |
| 9098 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 9099 |
PyObject *tmp = PyTuple_GET_ITEM(bases, i); |
| 9100 |
#else |
| 9101 |
PyObject *tmp = PyTuple_GetItem(bases, i); |
| 9102 |
if (!tmp) return NULL; |
| 9103 |
#endif |
| 9104 |
tmptype = Py_TYPE(tmp); |
| 9105 |
if (!metaclass) { |
| 9106 |
metaclass = tmptype; |
| 9107 |
continue; |
| 9108 |
} |
| 9109 |
if (PyType_IsSubtype(metaclass, tmptype)) |
| 9110 |
continue; |
| 9111 |
if (PyType_IsSubtype(tmptype, metaclass)) { |
| 9112 |
metaclass = tmptype; |
| 9113 |
continue; |
| 9114 |
} |
| 9115 |
PyErr_SetString(PyExc_TypeError, |
| 9116 |
"metaclass conflict: " |
| 9117 |
"the metaclass of a derived class " |
| 9118 |
"must be a (non-strict) subclass " |
| 9119 |
"of the metaclasses of all its bases"); |
| 9120 |
return NULL; |
| 9121 |
} |
| 9122 |
if (!metaclass) { |
| 9123 |
metaclass = &PyType_Type; |
| 9124 |
} |
| 9125 |
Py_INCREF((PyObject*) metaclass); |
| 9126 |
return (PyObject*) metaclass; |
| 9127 |
} |
| 9128 |
|
| 9129 |
|
| 9130 |
#if CYTHON_USE_TYPE_SPECS |
| 9131 |
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) { |
| 9132 |
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API |
| 9133 |
CYTHON_UNUSED_VAR(spec); |
| 9134 |
CYTHON_UNUSED_VAR(type); |
| 9135 |
#else |
| 9136 |
const PyType_Slot *slot = spec->slots; |
| 9137 |
while (slot && slot->slot && slot->slot != Py_tp_members) |
| 9138 |
slot++; |
| 9139 |
if (slot && slot->slot == Py_tp_members) { |
| 9140 |
int changed = 0; |
| 9141 |
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON) |
| 9142 |
const |
| 9143 |
#endif |
| 9144 |
PyMemberDef *memb = (PyMemberDef*) slot->pfunc; |
| 9145 |
while (memb && memb->name) { |
| 9146 |
if (memb->name[0] == '_' && memb->name[1] == '_') { |
| 9147 |
#if PY_VERSION_HEX < 0x030900b1 |
| 9148 |
if (strcmp(memb->name, "__weaklistoffset__") == 0) { |
| 9149 |
assert(memb->type == T_PYSSIZET); |
| 9150 |
assert(memb->flags == READONLY); |
| 9151 |
type->tp_weaklistoffset = memb->offset; |
| 9152 |
changed = 1; |
| 9153 |
} |
| 9154 |
else if (strcmp(memb->name, "__dictoffset__") == 0) { |
| 9155 |
assert(memb->type == T_PYSSIZET); |
| 9156 |
assert(memb->flags == READONLY); |
| 9157 |
type->tp_dictoffset = memb->offset; |
| 9158 |
changed = 1; |
| 9159 |
} |
| 9160 |
#if CYTHON_METH_FASTCALL |
| 9161 |
else if (strcmp(memb->name, "__vectorcalloffset__") == 0) { |
| 9162 |
assert(memb->type == T_PYSSIZET); |
| 9163 |
assert(memb->flags == READONLY); |
| 9164 |
#if PY_VERSION_HEX >= 0x030800b4 |
| 9165 |
type->tp_vectorcall_offset = memb->offset; |
| 9166 |
#else |
| 9167 |
type->tp_print = (printfunc) memb->offset; |
| 9168 |
#endif |
| 9169 |
changed = 1; |
| 9170 |
} |
| 9171 |
#endif |
| 9172 |
#else |
| 9173 |
if ((0)); |
| 9174 |
#endif |
| 9175 |
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON |
| 9176 |
else if (strcmp(memb->name, "__module__") == 0) { |
| 9177 |
PyObject *descr; |
| 9178 |
assert(memb->type == T_OBJECT); |
| 9179 |
assert(memb->flags == 0 || memb->flags == READONLY); |
| 9180 |
descr = PyDescr_NewMember(type, memb); |
| 9181 |
if (unlikely(!descr)) |
| 9182 |
return -1; |
| 9183 |
if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) { |
| 9184 |
Py_DECREF(descr); |
| 9185 |
return -1; |
| 9186 |
} |
| 9187 |
Py_DECREF(descr); |
| 9188 |
changed = 1; |
| 9189 |
} |
| 9190 |
#endif |
| 9191 |
} |
| 9192 |
memb++; |
| 9193 |
} |
| 9194 |
if (changed) |
| 9195 |
PyType_Modified(type); |
| 9196 |
} |
| 9197 |
#endif |
| 9198 |
return 0; |
| 9199 |
} |
| 9200 |
#endif |
| 9201 |
|
| 9202 |
|
| 9203 |
static PyObject *__Pyx_FetchSharedCythonABIModule(void) { |
| 9204 |
return __Pyx_PyImport_AddModuleRef(__PYX_ABI_MODULE_NAME); |
| 9205 |
} |
| 9206 |
|
| 9207 |
|
| 9208 |
static int __Pyx_VerifyCachedType(PyObject *cached_type, |
| 9209 |
const char *name, |
| 9210 |
Py_ssize_t basicsize, |
| 9211 |
Py_ssize_t expected_basicsize) { |
| 9212 |
if (!PyType_Check(cached_type)) { |
| 9213 |
PyErr_Format(PyExc_TypeError, |
| 9214 |
"Shared Cython type %.200s is not a type object", name); |
| 9215 |
return -1; |
| 9216 |
} |
| 9217 |
if (basicsize != expected_basicsize) { |
| 9218 |
PyErr_Format(PyExc_TypeError, |
| 9219 |
"Shared Cython type %.200s has the wrong size, try recompiling", |
| 9220 |
name); |
| 9221 |
return -1; |
| 9222 |
} |
| 9223 |
return 0; |
| 9224 |
} |
| 9225 |
#if !CYTHON_USE_TYPE_SPECS |
| 9226 |
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { |
| 9227 |
PyObject* abi_module; |
| 9228 |
const char* object_name; |
| 9229 |
PyTypeObject *cached_type = NULL; |
| 9230 |
abi_module = __Pyx_FetchSharedCythonABIModule(); |
| 9231 |
if (!abi_module) return NULL; |
| 9232 |
object_name = strrchr(type->tp_name, '.'); |
| 9233 |
object_name = object_name ? object_name+1 : type->tp_name; |
| 9234 |
cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name); |
| 9235 |
if (cached_type) { |
| 9236 |
if (__Pyx_VerifyCachedType( |
| 9237 |
(PyObject *)cached_type, |
| 9238 |
object_name, |
| 9239 |
cached_type->tp_basicsize, |
| 9240 |
type->tp_basicsize) < 0) { |
| 9241 |
goto bad; |
| 9242 |
} |
| 9243 |
goto done; |
| 9244 |
} |
| 9245 |
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; |
| 9246 |
PyErr_Clear(); |
| 9247 |
if (PyType_Ready(type) < 0) goto bad; |
| 9248 |
if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0) |
| 9249 |
goto bad; |
| 9250 |
Py_INCREF(type); |
| 9251 |
cached_type = type; |
| 9252 |
done: |
| 9253 |
Py_DECREF(abi_module); |
| 9254 |
return cached_type; |
| 9255 |
bad: |
| 9256 |
Py_XDECREF(cached_type); |
| 9257 |
cached_type = NULL; |
| 9258 |
goto done; |
| 9259 |
} |
| 9260 |
#else |
| 9261 |
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) { |
| 9262 |
PyObject *abi_module, *cached_type = NULL; |
| 9263 |
const char* object_name = strrchr(spec->name, '.'); |
| 9264 |
object_name = object_name ? object_name+1 : spec->name; |
| 9265 |
abi_module = __Pyx_FetchSharedCythonABIModule(); |
| 9266 |
if (!abi_module) return NULL; |
| 9267 |
cached_type = PyObject_GetAttrString(abi_module, object_name); |
| 9268 |
if (cached_type) { |
| 9269 |
Py_ssize_t basicsize; |
| 9270 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9271 |
PyObject *py_basicsize; |
| 9272 |
py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__"); |
| 9273 |
if (unlikely(!py_basicsize)) goto bad; |
| 9274 |
basicsize = PyLong_AsSsize_t(py_basicsize); |
| 9275 |
Py_DECREF(py_basicsize); |
| 9276 |
py_basicsize = 0; |
| 9277 |
if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; |
| 9278 |
#else |
| 9279 |
basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1; |
| 9280 |
#endif |
| 9281 |
if (__Pyx_VerifyCachedType( |
| 9282 |
cached_type, |
| 9283 |
object_name, |
| 9284 |
basicsize, |
| 9285 |
spec->basicsize) < 0) { |
| 9286 |
goto bad; |
| 9287 |
} |
| 9288 |
goto done; |
| 9289 |
} |
| 9290 |
if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; |
| 9291 |
PyErr_Clear(); |
| 9292 |
CYTHON_UNUSED_VAR(module); |
| 9293 |
cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases); |
| 9294 |
if (unlikely(!cached_type)) goto bad; |
| 9295 |
if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad; |
| 9296 |
if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad; |
| 9297 |
done: |
| 9298 |
Py_DECREF(abi_module); |
| 9299 |
assert(cached_type == NULL || PyType_Check(cached_type)); |
| 9300 |
return (PyTypeObject *) cached_type; |
| 9301 |
bad: |
| 9302 |
Py_XDECREF(cached_type); |
| 9303 |
cached_type = NULL; |
| 9304 |
goto done; |
| 9305 |
} |
| 9306 |
#endif |
| 9307 |
|
| 9308 |
|
| 9309 |
#if !CYTHON_USE_TYPE_SPECS || (!CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x03090000) |
| 9310 |
#else |
| 9311 |
static int __Pyx_call_type_traverse(PyObject *o, int always_call, visitproc visit, void *arg) { |
| 9312 |
#if CYTHON_COMPILING_IN_LIMITED_API && __PYX_LIMITED_VERSION_HEX < 0x03090000 |
| 9313 |
if (__Pyx_get_runtime_version() < 0x03090000) return 0; |
| 9314 |
#endif |
| 9315 |
if (!always_call) { |
| 9316 |
PyTypeObject *base = __Pyx_PyObject_GetSlot(o, tp_base, PyTypeObject*); |
| 9317 |
unsigned long flags = PyType_GetFlags(base); |
| 9318 |
if (flags & Py_TPFLAGS_HEAPTYPE) { |
| 9319 |
return 0; |
| 9320 |
} |
| 9321 |
} |
| 9322 |
Py_VISIT((PyObject*)Py_TYPE(o)); |
| 9323 |
return 0; |
| 9324 |
} |
| 9325 |
#endif |
| 9326 |
|
| 9327 |
|
| 9328 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9329 |
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { |
| 9330 |
PyObject *result; |
| 9331 |
CYTHON_UNUSED_VAR(typ); |
| 9332 |
if (!self) |
| 9333 |
return __Pyx_NewRef(func); |
| 9334 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030C0000 |
| 9335 |
{ |
| 9336 |
PyObject *args[] = {func, self}; |
| 9337 |
result = PyObject_Vectorcall(__pyx_mstate_global->__Pyx_CachedMethodType, args, 2, NULL); |
| 9338 |
} |
| 9339 |
#else |
| 9340 |
result = PyObject_CallFunctionObjArgs(__pyx_mstate_global->__Pyx_CachedMethodType, func, self, NULL); |
| 9341 |
#endif |
| 9342 |
return result; |
| 9343 |
} |
| 9344 |
#else |
| 9345 |
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) { |
| 9346 |
CYTHON_UNUSED_VAR(typ); |
| 9347 |
if (!self) |
| 9348 |
return __Pyx_NewRef(func); |
| 9349 |
return PyMethod_New(func, self); |
| 9350 |
} |
| 9351 |
#endif |
| 9352 |
|
| 9353 |
|
| 9354 |
#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) |
| 9355 |
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) |
| 9356 |
{ |
| 9357 |
PyObject *res = NULL; |
| 9358 |
PyObject *kwnames; |
| 9359 |
PyObject **newargs; |
| 9360 |
PyObject **kwvalues; |
| 9361 |
Py_ssize_t i, pos; |
| 9362 |
size_t j; |
| 9363 |
PyObject *key, *value; |
| 9364 |
unsigned long keys_are_strings; |
| 9365 |
#if !CYTHON_ASSUME_SAFE_SIZE |
| 9366 |
Py_ssize_t nkw = PyDict_Size(kw); |
| 9367 |
if (unlikely(nkw == -1)) return NULL; |
| 9368 |
#else |
| 9369 |
Py_ssize_t nkw = PyDict_GET_SIZE(kw); |
| 9370 |
#endif |
| 9371 |
newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0])); |
| 9372 |
if (unlikely(newargs == NULL)) { |
| 9373 |
PyErr_NoMemory(); |
| 9374 |
return NULL; |
| 9375 |
} |
| 9376 |
for (j = 0; j < nargs; j++) newargs[j] = args[j]; |
| 9377 |
kwnames = PyTuple_New(nkw); |
| 9378 |
if (unlikely(kwnames == NULL)) { |
| 9379 |
PyMem_Free(newargs); |
| 9380 |
return NULL; |
| 9381 |
} |
| 9382 |
kwvalues = newargs + nargs; |
| 9383 |
pos = i = 0; |
| 9384 |
keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS; |
| 9385 |
while (PyDict_Next(kw, &pos, &key, &value)) { |
| 9386 |
keys_are_strings &= |
| 9387 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9388 |
PyType_GetFlags(Py_TYPE(key)); |
| 9389 |
#else |
| 9390 |
Py_TYPE(key)->tp_flags; |
| 9391 |
#endif |
| 9392 |
Py_INCREF(key); |
| 9393 |
Py_INCREF(value); |
| 9394 |
#if !CYTHON_ASSUME_SAFE_MACROS |
| 9395 |
if (unlikely(PyTuple_SetItem(kwnames, i, key) < 0)) goto cleanup; |
| 9396 |
#else |
| 9397 |
PyTuple_SET_ITEM(kwnames, i, key); |
| 9398 |
#endif |
| 9399 |
kwvalues[i] = value; |
| 9400 |
i++; |
| 9401 |
} |
| 9402 |
if (unlikely(!keys_are_strings)) { |
| 9403 |
PyErr_SetString(PyExc_TypeError, "keywords must be strings"); |
| 9404 |
goto cleanup; |
| 9405 |
} |
| 9406 |
res = vc(func, newargs, nargs, kwnames); |
| 9407 |
cleanup: |
| 9408 |
Py_DECREF(kwnames); |
| 9409 |
for (i = 0; i < nkw; i++) |
| 9410 |
Py_DECREF(kwvalues[i]); |
| 9411 |
PyMem_Free(newargs); |
| 9412 |
return res; |
| 9413 |
} |
| 9414 |
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw) |
| 9415 |
{ |
| 9416 |
Py_ssize_t kw_size = |
| 9417 |
likely(kw == NULL) ? |
| 9418 |
0 : |
| 9419 |
#if !CYTHON_ASSUME_SAFE_SIZE |
| 9420 |
PyDict_Size(kw); |
| 9421 |
#else |
| 9422 |
PyDict_GET_SIZE(kw); |
| 9423 |
#endif |
| 9424 |
if (kw_size == 0) { |
| 9425 |
return vc(func, args, nargs, NULL); |
| 9426 |
} |
| 9427 |
#if !CYTHON_ASSUME_SAFE_SIZE |
| 9428 |
else if (unlikely(kw_size == -1)) { |
| 9429 |
return NULL; |
| 9430 |
} |
| 9431 |
#endif |
| 9432 |
return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw); |
| 9433 |
} |
| 9434 |
#endif |
| 9435 |
|
| 9436 |
|
| 9437 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9438 |
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunctionNoMethod(PyObject *func, void *cfunc) { |
| 9439 |
if (__Pyx_CyFunction_Check(func)) { |
| 9440 |
return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc; |
| 9441 |
} else if (PyCFunction_Check(func)) { |
| 9442 |
return PyCFunction_GetFunction(func) == (PyCFunction) cfunc; |
| 9443 |
} |
| 9444 |
return 0; |
| 9445 |
} |
| 9446 |
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { |
| 9447 |
if ((PyObject*)Py_TYPE(func) == __pyx_mstate_global->__Pyx_CachedMethodType) { |
| 9448 |
int result; |
| 9449 |
PyObject *newFunc = PyObject_GetAttr(func, __pyx_mstate_global->__pyx_n_u_func); |
| 9450 |
if (unlikely(!newFunc)) { |
| 9451 |
PyErr_Clear(); |
| 9452 |
return 0; |
| 9453 |
} |
| 9454 |
result = __Pyx__IsSameCyOrCFunctionNoMethod(newFunc, cfunc); |
| 9455 |
Py_DECREF(newFunc); |
| 9456 |
return result; |
| 9457 |
} |
| 9458 |
return __Pyx__IsSameCyOrCFunctionNoMethod(func, cfunc); |
| 9459 |
} |
| 9460 |
#else |
| 9461 |
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) { |
| 9462 |
if (PyMethod_Check(func)) { |
| 9463 |
func = PyMethod_GET_FUNCTION(func); |
| 9464 |
} |
| 9465 |
return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc; |
| 9466 |
} |
| 9467 |
#endif |
| 9468 |
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) { |
| 9469 |
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API |
| 9470 |
__Pyx_Py_XDECREF_SET( |
| 9471 |
__Pyx_CyFunction_GetClassObj(f), |
| 9472 |
((classobj) ? __Pyx_NewRef(classobj) : NULL)); |
| 9473 |
#else |
| 9474 |
__Pyx_Py_XDECREF_SET( |
| 9475 |
((PyCMethodObject *) (f))->mm_class, |
| 9476 |
(PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL)); |
| 9477 |
#endif |
| 9478 |
} |
| 9479 |
static PyObject * |
| 9480 |
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure) |
| 9481 |
{ |
| 9482 |
CYTHON_UNUSED_VAR(closure); |
| 9483 |
if (unlikely(op->func_doc == NULL)) { |
| 9484 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9485 |
op->func_doc = PyObject_GetAttrString(op->func, "__doc__"); |
| 9486 |
if (unlikely(!op->func_doc)) return NULL; |
| 9487 |
#else |
| 9488 |
if (((PyCFunctionObject*)op)->m_ml->ml_doc) { |
| 9489 |
op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc); |
| 9490 |
if (unlikely(op->func_doc == NULL)) |
| 9491 |
return NULL; |
| 9492 |
} else { |
| 9493 |
Py_INCREF(Py_None); |
| 9494 |
return Py_None; |
| 9495 |
} |
| 9496 |
#endif |
| 9497 |
} |
| 9498 |
Py_INCREF(op->func_doc); |
| 9499 |
return op->func_doc; |
| 9500 |
} |
| 9501 |
static int |
| 9502 |
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context) |
| 9503 |
{ |
| 9504 |
CYTHON_UNUSED_VAR(context); |
| 9505 |
if (value == NULL) { |
| 9506 |
value = Py_None; |
| 9507 |
} |
| 9508 |
Py_INCREF(value); |
| 9509 |
__Pyx_Py_XDECREF_SET(op->func_doc, value); |
| 9510 |
return 0; |
| 9511 |
} |
| 9512 |
static PyObject * |
| 9513 |
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context) |
| 9514 |
{ |
| 9515 |
CYTHON_UNUSED_VAR(context); |
| 9516 |
if (unlikely(op->func_name == NULL)) { |
| 9517 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9518 |
op->func_name = PyObject_GetAttrString(op->func, "__name__"); |
| 9519 |
#else |
| 9520 |
op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name); |
| 9521 |
#endif |
| 9522 |
if (unlikely(op->func_name == NULL)) |
| 9523 |
return NULL; |
| 9524 |
} |
| 9525 |
Py_INCREF(op->func_name); |
| 9526 |
return op->func_name; |
| 9527 |
} |
| 9528 |
static int |
| 9529 |
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context) |
| 9530 |
{ |
| 9531 |
CYTHON_UNUSED_VAR(context); |
| 9532 |
if (unlikely(value == NULL || !PyUnicode_Check(value))) { |
| 9533 |
PyErr_SetString(PyExc_TypeError, |
| 9534 |
"__name__ must be set to a string object"); |
| 9535 |
return -1; |
| 9536 |
} |
| 9537 |
Py_INCREF(value); |
| 9538 |
__Pyx_Py_XDECREF_SET(op->func_name, value); |
| 9539 |
return 0; |
| 9540 |
} |
| 9541 |
static PyObject * |
| 9542 |
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context) |
| 9543 |
{ |
| 9544 |
CYTHON_UNUSED_VAR(context); |
| 9545 |
Py_INCREF(op->func_qualname); |
| 9546 |
return op->func_qualname; |
| 9547 |
} |
| 9548 |
static int |
| 9549 |
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context) |
| 9550 |
{ |
| 9551 |
CYTHON_UNUSED_VAR(context); |
| 9552 |
if (unlikely(value == NULL || !PyUnicode_Check(value))) { |
| 9553 |
PyErr_SetString(PyExc_TypeError, |
| 9554 |
"__qualname__ must be set to a string object"); |
| 9555 |
return -1; |
| 9556 |
} |
| 9557 |
Py_INCREF(value); |
| 9558 |
__Pyx_Py_XDECREF_SET(op->func_qualname, value); |
| 9559 |
return 0; |
| 9560 |
} |
| 9561 |
static PyObject * |
| 9562 |
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context) |
| 9563 |
{ |
| 9564 |
CYTHON_UNUSED_VAR(context); |
| 9565 |
if (unlikely(op->func_dict == NULL)) { |
| 9566 |
op->func_dict = PyDict_New(); |
| 9567 |
if (unlikely(op->func_dict == NULL)) |
| 9568 |
return NULL; |
| 9569 |
} |
| 9570 |
Py_INCREF(op->func_dict); |
| 9571 |
return op->func_dict; |
| 9572 |
} |
| 9573 |
static int |
| 9574 |
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context) |
| 9575 |
{ |
| 9576 |
CYTHON_UNUSED_VAR(context); |
| 9577 |
if (unlikely(value == NULL)) { |
| 9578 |
PyErr_SetString(PyExc_TypeError, |
| 9579 |
"function's dictionary may not be deleted"); |
| 9580 |
return -1; |
| 9581 |
} |
| 9582 |
if (unlikely(!PyDict_Check(value))) { |
| 9583 |
PyErr_SetString(PyExc_TypeError, |
| 9584 |
"setting function's dictionary to a non-dict"); |
| 9585 |
return -1; |
| 9586 |
} |
| 9587 |
Py_INCREF(value); |
| 9588 |
__Pyx_Py_XDECREF_SET(op->func_dict, value); |
| 9589 |
return 0; |
| 9590 |
} |
| 9591 |
static PyObject * |
| 9592 |
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context) |
| 9593 |
{ |
| 9594 |
CYTHON_UNUSED_VAR(context); |
| 9595 |
Py_INCREF(op->func_globals); |
| 9596 |
return op->func_globals; |
| 9597 |
} |
| 9598 |
static PyObject * |
| 9599 |
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context) |
| 9600 |
{ |
| 9601 |
CYTHON_UNUSED_VAR(op); |
| 9602 |
CYTHON_UNUSED_VAR(context); |
| 9603 |
Py_INCREF(Py_None); |
| 9604 |
return Py_None; |
| 9605 |
} |
| 9606 |
static PyObject * |
| 9607 |
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context) |
| 9608 |
{ |
| 9609 |
PyObject* result = (op->func_code) ? op->func_code : Py_None; |
| 9610 |
CYTHON_UNUSED_VAR(context); |
| 9611 |
Py_INCREF(result); |
| 9612 |
return result; |
| 9613 |
} |
| 9614 |
static int |
| 9615 |
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { |
| 9616 |
int result = 0; |
| 9617 |
PyObject *res = op->defaults_getter((PyObject *) op); |
| 9618 |
if (unlikely(!res)) |
| 9619 |
return -1; |
| 9620 |
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS |
| 9621 |
op->defaults_tuple = PyTuple_GET_ITEM(res, 0); |
| 9622 |
Py_INCREF(op->defaults_tuple); |
| 9623 |
op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); |
| 9624 |
Py_INCREF(op->defaults_kwdict); |
| 9625 |
#else |
| 9626 |
op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0); |
| 9627 |
if (unlikely(!op->defaults_tuple)) result = -1; |
| 9628 |
else { |
| 9629 |
op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1); |
| 9630 |
if (unlikely(!op->defaults_kwdict)) result = -1; |
| 9631 |
} |
| 9632 |
#endif |
| 9633 |
Py_DECREF(res); |
| 9634 |
return result; |
| 9635 |
} |
| 9636 |
static int |
| 9637 |
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { |
| 9638 |
CYTHON_UNUSED_VAR(context); |
| 9639 |
if (!value) { |
| 9640 |
value = Py_None; |
| 9641 |
} else if (unlikely(value != Py_None && !PyTuple_Check(value))) { |
| 9642 |
PyErr_SetString(PyExc_TypeError, |
| 9643 |
"__defaults__ must be set to a tuple object"); |
| 9644 |
return -1; |
| 9645 |
} |
| 9646 |
PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not " |
| 9647 |
"currently affect the values used in function calls", 1); |
| 9648 |
Py_INCREF(value); |
| 9649 |
__Pyx_Py_XDECREF_SET(op->defaults_tuple, value); |
| 9650 |
return 0; |
| 9651 |
} |
| 9652 |
static PyObject * |
| 9653 |
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) { |
| 9654 |
PyObject* result = op->defaults_tuple; |
| 9655 |
CYTHON_UNUSED_VAR(context); |
| 9656 |
if (unlikely(!result)) { |
| 9657 |
if (op->defaults_getter) { |
| 9658 |
if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; |
| 9659 |
result = op->defaults_tuple; |
| 9660 |
} else { |
| 9661 |
result = Py_None; |
| 9662 |
} |
| 9663 |
} |
| 9664 |
Py_INCREF(result); |
| 9665 |
return result; |
| 9666 |
} |
| 9667 |
static int |
| 9668 |
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) { |
| 9669 |
CYTHON_UNUSED_VAR(context); |
| 9670 |
if (!value) { |
| 9671 |
value = Py_None; |
| 9672 |
} else if (unlikely(value != Py_None && !PyDict_Check(value))) { |
| 9673 |
PyErr_SetString(PyExc_TypeError, |
| 9674 |
"__kwdefaults__ must be set to a dict object"); |
| 9675 |
return -1; |
| 9676 |
} |
| 9677 |
PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not " |
| 9678 |
"currently affect the values used in function calls", 1); |
| 9679 |
Py_INCREF(value); |
| 9680 |
__Pyx_Py_XDECREF_SET(op->defaults_kwdict, value); |
| 9681 |
return 0; |
| 9682 |
} |
| 9683 |
static PyObject * |
| 9684 |
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) { |
| 9685 |
PyObject* result = op->defaults_kwdict; |
| 9686 |
CYTHON_UNUSED_VAR(context); |
| 9687 |
if (unlikely(!result)) { |
| 9688 |
if (op->defaults_getter) { |
| 9689 |
if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL; |
| 9690 |
result = op->defaults_kwdict; |
| 9691 |
} else { |
| 9692 |
result = Py_None; |
| 9693 |
} |
| 9694 |
} |
| 9695 |
Py_INCREF(result); |
| 9696 |
return result; |
| 9697 |
} |
| 9698 |
static int |
| 9699 |
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) { |
| 9700 |
CYTHON_UNUSED_VAR(context); |
| 9701 |
if (!value || value == Py_None) { |
| 9702 |
value = NULL; |
| 9703 |
} else if (unlikely(!PyDict_Check(value))) { |
| 9704 |
PyErr_SetString(PyExc_TypeError, |
| 9705 |
"__annotations__ must be set to a dict object"); |
| 9706 |
return -1; |
| 9707 |
} |
| 9708 |
Py_XINCREF(value); |
| 9709 |
__Pyx_Py_XDECREF_SET(op->func_annotations, value); |
| 9710 |
return 0; |
| 9711 |
} |
| 9712 |
static PyObject * |
| 9713 |
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) { |
| 9714 |
PyObject* result = op->func_annotations; |
| 9715 |
CYTHON_UNUSED_VAR(context); |
| 9716 |
if (unlikely(!result)) { |
| 9717 |
result = PyDict_New(); |
| 9718 |
if (unlikely(!result)) return NULL; |
| 9719 |
op->func_annotations = result; |
| 9720 |
} |
| 9721 |
Py_INCREF(result); |
| 9722 |
return result; |
| 9723 |
} |
| 9724 |
static PyObject * |
| 9725 |
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) { |
| 9726 |
int is_coroutine; |
| 9727 |
CYTHON_UNUSED_VAR(context); |
| 9728 |
if (op->func_is_coroutine) { |
| 9729 |
return __Pyx_NewRef(op->func_is_coroutine); |
| 9730 |
} |
| 9731 |
is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE; |
| 9732 |
if (is_coroutine) { |
| 9733 |
PyObject *module, *fromlist, *marker = __pyx_mstate_global->__pyx_n_u_is_coroutine; |
| 9734 |
fromlist = PyList_New(1); |
| 9735 |
if (unlikely(!fromlist)) return NULL; |
| 9736 |
Py_INCREF(marker); |
| 9737 |
#if CYTHON_ASSUME_SAFE_MACROS |
| 9738 |
PyList_SET_ITEM(fromlist, 0, marker); |
| 9739 |
#else |
| 9740 |
if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) { |
| 9741 |
Py_DECREF(marker); |
| 9742 |
Py_DECREF(fromlist); |
| 9743 |
return NULL; |
| 9744 |
} |
| 9745 |
#endif |
| 9746 |
module = PyImport_ImportModuleLevelObject(__pyx_mstate_global->__pyx_n_u_asyncio_coroutines, NULL, NULL, fromlist, 0); |
| 9747 |
Py_DECREF(fromlist); |
| 9748 |
if (unlikely(!module)) goto ignore; |
| 9749 |
op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker); |
| 9750 |
Py_DECREF(module); |
| 9751 |
if (likely(op->func_is_coroutine)) { |
| 9752 |
return __Pyx_NewRef(op->func_is_coroutine); |
| 9753 |
} |
| 9754 |
ignore: |
| 9755 |
PyErr_Clear(); |
| 9756 |
} |
| 9757 |
op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine); |
| 9758 |
return __Pyx_NewRef(op->func_is_coroutine); |
| 9759 |
} |
| 9760 |
static void __Pyx_CyFunction_raise_argument_count_error(__pyx_CyFunctionObject *func, const char* message, Py_ssize_t size) { |
| 9761 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9762 |
PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); |
| 9763 |
if (!py_name) return; |
| 9764 |
PyErr_Format(PyExc_TypeError, |
| 9765 |
"%.200S() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", |
| 9766 |
py_name, message, size); |
| 9767 |
Py_DECREF(py_name); |
| 9768 |
#else |
| 9769 |
const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; |
| 9770 |
PyErr_Format(PyExc_TypeError, |
| 9771 |
"%.200s() %s (%" CYTHON_FORMAT_SSIZE_T "d given)", |
| 9772 |
name, message, size); |
| 9773 |
#endif |
| 9774 |
} |
| 9775 |
static void __Pyx_CyFunction_raise_type_error(__pyx_CyFunctionObject *func, const char* message) { |
| 9776 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9777 |
PyObject *py_name = __Pyx_CyFunction_get_name(func, NULL); |
| 9778 |
if (!py_name) return; |
| 9779 |
PyErr_Format(PyExc_TypeError, |
| 9780 |
"%.200S() %s", |
| 9781 |
py_name, message); |
| 9782 |
Py_DECREF(py_name); |
| 9783 |
#else |
| 9784 |
const char* name = ((PyCFunctionObject*)func)->m_ml->ml_name; |
| 9785 |
PyErr_Format(PyExc_TypeError, |
| 9786 |
"%.200s() %s", |
| 9787 |
name, message); |
| 9788 |
#endif |
| 9789 |
} |
| 9790 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9791 |
static PyObject * |
| 9792 |
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) { |
| 9793 |
CYTHON_UNUSED_VAR(context); |
| 9794 |
return PyObject_GetAttrString(op->func, "__module__"); |
| 9795 |
} |
| 9796 |
static int |
| 9797 |
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) { |
| 9798 |
CYTHON_UNUSED_VAR(context); |
| 9799 |
return PyObject_SetAttrString(op->func, "__module__", value); |
| 9800 |
} |
| 9801 |
#endif |
| 9802 |
static PyGetSetDef __pyx_CyFunction_getsets[] = { |
| 9803 |
{"func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, |
| 9804 |
{"__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, |
| 9805 |
{"func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, |
| 9806 |
{"__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, |
| 9807 |
{"__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, |
| 9808 |
{"func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, |
| 9809 |
{"__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, |
| 9810 |
{"func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, |
| 9811 |
{"__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, |
| 9812 |
{"func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, |
| 9813 |
{"__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, |
| 9814 |
{"func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, |
| 9815 |
{"__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, |
| 9816 |
{"func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, |
| 9817 |
{"__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, |
| 9818 |
{"__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, |
| 9819 |
{"__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, |
| 9820 |
{"_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0}, |
| 9821 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9822 |
{"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0}, |
| 9823 |
#endif |
| 9824 |
{0, 0, 0, 0, 0} |
| 9825 |
}; |
| 9826 |
static PyMemberDef __pyx_CyFunction_members[] = { |
| 9827 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 9828 |
{"__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0}, |
| 9829 |
#endif |
| 9830 |
#if CYTHON_USE_TYPE_SPECS |
| 9831 |
{"__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0}, |
| 9832 |
#if CYTHON_METH_FASTCALL |
| 9833 |
#if CYTHON_BACKPORT_VECTORCALL || CYTHON_COMPILING_IN_LIMITED_API |
| 9834 |
{"__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0}, |
| 9835 |
#else |
| 9836 |
{"__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0}, |
| 9837 |
#endif |
| 9838 |
#endif |
| 9839 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9840 |
{"__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0}, |
| 9841 |
#else |
| 9842 |
{"__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0}, |
| 9843 |
#endif |
| 9844 |
#endif |
| 9845 |
{0, 0, 0, 0, 0} |
| 9846 |
}; |
| 9847 |
static PyObject * |
| 9848 |
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args) |
| 9849 |
{ |
| 9850 |
CYTHON_UNUSED_VAR(args); |
| 9851 |
Py_INCREF(m->func_qualname); |
| 9852 |
return m->func_qualname; |
| 9853 |
} |
| 9854 |
static PyMethodDef __pyx_CyFunction_methods[] = { |
| 9855 |
{"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, |
| 9856 |
{0, 0, 0, 0} |
| 9857 |
}; |
| 9858 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9859 |
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) |
| 9860 |
#else |
| 9861 |
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist) |
| 9862 |
#endif |
| 9863 |
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, |
| 9864 |
PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { |
| 9865 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 9866 |
PyCFunctionObject *cf = (PyCFunctionObject*) op; |
| 9867 |
#endif |
| 9868 |
if (unlikely(op == NULL)) |
| 9869 |
return NULL; |
| 9870 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9871 |
op->func = PyCFunction_NewEx(ml, (PyObject*)op, module); |
| 9872 |
if (unlikely(!op->func)) return NULL; |
| 9873 |
#endif |
| 9874 |
op->flags = flags; |
| 9875 |
__Pyx_CyFunction_weakreflist(op) = NULL; |
| 9876 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 9877 |
cf->m_ml = ml; |
| 9878 |
cf->m_self = (PyObject *) op; |
| 9879 |
#endif |
| 9880 |
Py_XINCREF(closure); |
| 9881 |
op->func_closure = closure; |
| 9882 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 9883 |
Py_XINCREF(module); |
| 9884 |
cf->m_module = module; |
| 9885 |
#endif |
| 9886 |
op->func_dict = NULL; |
| 9887 |
op->func_name = NULL; |
| 9888 |
Py_INCREF(qualname); |
| 9889 |
op->func_qualname = qualname; |
| 9890 |
op->func_doc = NULL; |
| 9891 |
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API |
| 9892 |
op->func_classobj = NULL; |
| 9893 |
#else |
| 9894 |
((PyCMethodObject*)op)->mm_class = NULL; |
| 9895 |
#endif |
| 9896 |
op->func_globals = globals; |
| 9897 |
Py_INCREF(op->func_globals); |
| 9898 |
Py_XINCREF(code); |
| 9899 |
op->func_code = code; |
| 9900 |
op->defaults = NULL; |
| 9901 |
op->defaults_tuple = NULL; |
| 9902 |
op->defaults_kwdict = NULL; |
| 9903 |
op->defaults_getter = NULL; |
| 9904 |
op->func_annotations = NULL; |
| 9905 |
op->func_is_coroutine = NULL; |
| 9906 |
#if CYTHON_METH_FASTCALL |
| 9907 |
switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) { |
| 9908 |
case METH_NOARGS: |
| 9909 |
__Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS; |
| 9910 |
break; |
| 9911 |
case METH_O: |
| 9912 |
__Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O; |
| 9913 |
break; |
| 9914 |
case METH_METHOD | METH_FASTCALL | METH_KEYWORDS: |
| 9915 |
__Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD; |
| 9916 |
break; |
| 9917 |
case METH_FASTCALL | METH_KEYWORDS: |
| 9918 |
__Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS; |
| 9919 |
break; |
| 9920 |
case METH_VARARGS | METH_KEYWORDS: |
| 9921 |
__Pyx_CyFunction_func_vectorcall(op) = NULL; |
| 9922 |
break; |
| 9923 |
default: |
| 9924 |
PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); |
| 9925 |
Py_DECREF(op); |
| 9926 |
return NULL; |
| 9927 |
} |
| 9928 |
#endif |
| 9929 |
return (PyObject *) op; |
| 9930 |
} |
| 9931 |
static int |
| 9932 |
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) |
| 9933 |
{ |
| 9934 |
Py_CLEAR(m->func_closure); |
| 9935 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9936 |
Py_CLEAR(m->func); |
| 9937 |
#else |
| 9938 |
Py_CLEAR(((PyCFunctionObject*)m)->m_module); |
| 9939 |
#endif |
| 9940 |
Py_CLEAR(m->func_dict); |
| 9941 |
Py_CLEAR(m->func_name); |
| 9942 |
Py_CLEAR(m->func_qualname); |
| 9943 |
Py_CLEAR(m->func_doc); |
| 9944 |
Py_CLEAR(m->func_globals); |
| 9945 |
Py_CLEAR(m->func_code); |
| 9946 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 9947 |
#if PY_VERSION_HEX < 0x030900B1 |
| 9948 |
Py_CLEAR(__Pyx_CyFunction_GetClassObj(m)); |
| 9949 |
#else |
| 9950 |
{ |
| 9951 |
PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class; |
| 9952 |
((PyCMethodObject *) (m))->mm_class = NULL; |
| 9953 |
Py_XDECREF(cls); |
| 9954 |
} |
| 9955 |
#endif |
| 9956 |
#endif |
| 9957 |
Py_CLEAR(m->defaults_tuple); |
| 9958 |
Py_CLEAR(m->defaults_kwdict); |
| 9959 |
Py_CLEAR(m->func_annotations); |
| 9960 |
Py_CLEAR(m->func_is_coroutine); |
| 9961 |
Py_CLEAR(m->defaults); |
| 9962 |
return 0; |
| 9963 |
} |
| 9964 |
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) |
| 9965 |
{ |
| 9966 |
if (__Pyx_CyFunction_weakreflist(m) != NULL) |
| 9967 |
PyObject_ClearWeakRefs((PyObject *) m); |
| 9968 |
__Pyx_CyFunction_clear(m); |
| 9969 |
__Pyx_PyHeapTypeObject_GC_Del(m); |
| 9970 |
} |
| 9971 |
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) |
| 9972 |
{ |
| 9973 |
PyObject_GC_UnTrack(m); |
| 9974 |
__Pyx__CyFunction_dealloc(m); |
| 9975 |
} |
| 9976 |
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) |
| 9977 |
{ |
| 9978 |
{ |
| 9979 |
int e = __Pyx_call_type_traverse((PyObject*)m, 1, visit, arg); |
| 9980 |
if (e) return e; |
| 9981 |
} |
| 9982 |
Py_VISIT(m->func_closure); |
| 9983 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 9984 |
Py_VISIT(m->func); |
| 9985 |
#else |
| 9986 |
Py_VISIT(((PyCFunctionObject*)m)->m_module); |
| 9987 |
#endif |
| 9988 |
Py_VISIT(m->func_dict); |
| 9989 |
__Pyx_VISIT_CONST(m->func_name); |
| 9990 |
__Pyx_VISIT_CONST(m->func_qualname); |
| 9991 |
Py_VISIT(m->func_doc); |
| 9992 |
Py_VISIT(m->func_globals); |
| 9993 |
__Pyx_VISIT_CONST(m->func_code); |
| 9994 |
#if !CYTHON_COMPILING_IN_LIMITED_API |
| 9995 |
Py_VISIT(__Pyx_CyFunction_GetClassObj(m)); |
| 9996 |
#endif |
| 9997 |
Py_VISIT(m->defaults_tuple); |
| 9998 |
Py_VISIT(m->defaults_kwdict); |
| 9999 |
Py_VISIT(m->func_is_coroutine); |
| 10000 |
Py_VISIT(m->defaults); |
| 10001 |
return 0; |
| 10002 |
} |
| 10003 |
static PyObject* |
| 10004 |
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) |
| 10005 |
{ |
| 10006 |
return PyUnicode_FromFormat("<cyfunction %U at %p>", |
| 10007 |
op->func_qualname, (void *)op); |
| 10008 |
} |
| 10009 |
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { |
| 10010 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10011 |
PyObject *f = ((__pyx_CyFunctionObject*)func)->func; |
| 10012 |
PyCFunction meth; |
| 10013 |
int flags; |
| 10014 |
meth = PyCFunction_GetFunction(f); |
| 10015 |
if (unlikely(!meth)) return NULL; |
| 10016 |
flags = PyCFunction_GetFlags(f); |
| 10017 |
if (unlikely(flags < 0)) return NULL; |
| 10018 |
#else |
| 10019 |
PyCFunctionObject* f = (PyCFunctionObject*)func; |
| 10020 |
PyCFunction meth = f->m_ml->ml_meth; |
| 10021 |
int flags = f->m_ml->ml_flags; |
| 10022 |
#endif |
| 10023 |
Py_ssize_t size; |
| 10024 |
switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { |
| 10025 |
case METH_VARARGS: |
| 10026 |
if (likely(kw == NULL || PyDict_Size(kw) == 0)) |
| 10027 |
return (*meth)(self, arg); |
| 10028 |
break; |
| 10029 |
case METH_VARARGS | METH_KEYWORDS: |
| 10030 |
return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); |
| 10031 |
case METH_NOARGS: |
| 10032 |
if (likely(kw == NULL || PyDict_Size(kw) == 0)) { |
| 10033 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 10034 |
size = PyTuple_GET_SIZE(arg); |
| 10035 |
#else |
| 10036 |
size = PyTuple_Size(arg); |
| 10037 |
if (unlikely(size < 0)) return NULL; |
| 10038 |
#endif |
| 10039 |
if (likely(size == 0)) |
| 10040 |
return (*meth)(self, NULL); |
| 10041 |
__Pyx_CyFunction_raise_argument_count_error( |
| 10042 |
(__pyx_CyFunctionObject*)func, |
| 10043 |
"takes no arguments", size); |
| 10044 |
return NULL; |
| 10045 |
} |
| 10046 |
break; |
| 10047 |
case METH_O: |
| 10048 |
if (likely(kw == NULL || PyDict_Size(kw) == 0)) { |
| 10049 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 10050 |
size = PyTuple_GET_SIZE(arg); |
| 10051 |
#else |
| 10052 |
size = PyTuple_Size(arg); |
| 10053 |
if (unlikely(size < 0)) return NULL; |
| 10054 |
#endif |
| 10055 |
if (likely(size == 1)) { |
| 10056 |
PyObject *result, *arg0; |
| 10057 |
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS |
| 10058 |
arg0 = PyTuple_GET_ITEM(arg, 0); |
| 10059 |
#else |
| 10060 |
arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; |
| 10061 |
#endif |
| 10062 |
result = (*meth)(self, arg0); |
| 10063 |
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) |
| 10064 |
Py_DECREF(arg0); |
| 10065 |
#endif |
| 10066 |
return result; |
| 10067 |
} |
| 10068 |
__Pyx_CyFunction_raise_argument_count_error( |
| 10069 |
(__pyx_CyFunctionObject*)func, |
| 10070 |
"takes exactly one argument", size); |
| 10071 |
return NULL; |
| 10072 |
} |
| 10073 |
break; |
| 10074 |
default: |
| 10075 |
PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction"); |
| 10076 |
return NULL; |
| 10077 |
} |
| 10078 |
__Pyx_CyFunction_raise_type_error( |
| 10079 |
(__pyx_CyFunctionObject*)func, "takes no keyword arguments"); |
| 10080 |
return NULL; |
| 10081 |
} |
| 10082 |
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { |
| 10083 |
PyObject *self, *result; |
| 10084 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10085 |
self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func); |
| 10086 |
if (unlikely(!self) && PyErr_Occurred()) return NULL; |
| 10087 |
#else |
| 10088 |
self = ((PyCFunctionObject*)func)->m_self; |
| 10089 |
#endif |
| 10090 |
result = __Pyx_CyFunction_CallMethod(func, self, arg, kw); |
| 10091 |
return result; |
| 10092 |
} |
| 10093 |
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { |
| 10094 |
PyObject *result; |
| 10095 |
__pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; |
| 10096 |
#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) |
| 10097 |
__pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc); |
| 10098 |
if (vc) { |
| 10099 |
#if CYTHON_ASSUME_SAFE_MACROS && CYTHON_ASSUME_SAFE_SIZE |
| 10100 |
return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw); |
| 10101 |
#else |
| 10102 |
(void) &__Pyx_PyVectorcall_FastCallDict; |
| 10103 |
return PyVectorcall_Call(func, args, kw); |
| 10104 |
#endif |
| 10105 |
} |
| 10106 |
#endif |
| 10107 |
if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { |
| 10108 |
Py_ssize_t argc; |
| 10109 |
PyObject *new_args; |
| 10110 |
PyObject *self; |
| 10111 |
#if CYTHON_ASSUME_SAFE_SIZE |
| 10112 |
argc = PyTuple_GET_SIZE(args); |
| 10113 |
#else |
| 10114 |
argc = PyTuple_Size(args); |
| 10115 |
if (unlikely(argc < 0)) return NULL; |
| 10116 |
#endif |
| 10117 |
new_args = PyTuple_GetSlice(args, 1, argc); |
| 10118 |
if (unlikely(!new_args)) |
| 10119 |
return NULL; |
| 10120 |
self = PyTuple_GetItem(args, 0); |
| 10121 |
if (unlikely(!self)) { |
| 10122 |
Py_DECREF(new_args); |
| 10123 |
PyErr_Format(PyExc_TypeError, |
| 10124 |
"unbound method %.200S() needs an argument", |
| 10125 |
cyfunc->func_qualname); |
| 10126 |
return NULL; |
| 10127 |
} |
| 10128 |
result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); |
| 10129 |
Py_DECREF(new_args); |
| 10130 |
} else { |
| 10131 |
result = __Pyx_CyFunction_Call(func, args, kw); |
| 10132 |
} |
| 10133 |
return result; |
| 10134 |
} |
| 10135 |
#if CYTHON_METH_FASTCALL && (CYTHON_VECTORCALL || CYTHON_BACKPORT_VECTORCALL) |
| 10136 |
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames) |
| 10137 |
{ |
| 10138 |
int ret = 0; |
| 10139 |
if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { |
| 10140 |
if (unlikely(nargs < 1)) { |
| 10141 |
__Pyx_CyFunction_raise_type_error( |
| 10142 |
cyfunc, "needs an argument"); |
| 10143 |
return -1; |
| 10144 |
} |
| 10145 |
ret = 1; |
| 10146 |
} |
| 10147 |
if (unlikely(kwnames) && unlikely(__Pyx_PyTuple_GET_SIZE(kwnames))) { |
| 10148 |
__Pyx_CyFunction_raise_type_error( |
| 10149 |
cyfunc, "takes no keyword arguments"); |
| 10150 |
return -1; |
| 10151 |
} |
| 10152 |
return ret; |
| 10153 |
} |
| 10154 |
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) |
| 10155 |
{ |
| 10156 |
__pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; |
| 10157 |
#if CYTHON_BACKPORT_VECTORCALL |
| 10158 |
Py_ssize_t nargs = (Py_ssize_t)nargsf; |
| 10159 |
#else |
| 10160 |
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); |
| 10161 |
#endif |
| 10162 |
PyObject *self; |
| 10163 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10164 |
PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); |
| 10165 |
if (unlikely(!meth)) return NULL; |
| 10166 |
#else |
| 10167 |
PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; |
| 10168 |
#endif |
| 10169 |
switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { |
| 10170 |
case 1: |
| 10171 |
self = args[0]; |
| 10172 |
args += 1; |
| 10173 |
nargs -= 1; |
| 10174 |
break; |
| 10175 |
case 0: |
| 10176 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10177 |
self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); |
| 10178 |
if (unlikely(!self) && PyErr_Occurred()) return NULL; |
| 10179 |
#else |
| 10180 |
self = ((PyCFunctionObject*)cyfunc)->m_self; |
| 10181 |
#endif |
| 10182 |
break; |
| 10183 |
default: |
| 10184 |
return NULL; |
| 10185 |
} |
| 10186 |
if (unlikely(nargs != 0)) { |
| 10187 |
__Pyx_CyFunction_raise_argument_count_error( |
| 10188 |
cyfunc, "takes no arguments", nargs); |
| 10189 |
return NULL; |
| 10190 |
} |
| 10191 |
return meth(self, NULL); |
| 10192 |
} |
| 10193 |
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) |
| 10194 |
{ |
| 10195 |
__pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; |
| 10196 |
#if CYTHON_BACKPORT_VECTORCALL |
| 10197 |
Py_ssize_t nargs = (Py_ssize_t)nargsf; |
| 10198 |
#else |
| 10199 |
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); |
| 10200 |
#endif |
| 10201 |
PyObject *self; |
| 10202 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10203 |
PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); |
| 10204 |
if (unlikely(!meth)) return NULL; |
| 10205 |
#else |
| 10206 |
PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; |
| 10207 |
#endif |
| 10208 |
switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) { |
| 10209 |
case 1: |
| 10210 |
self = args[0]; |
| 10211 |
args += 1; |
| 10212 |
nargs -= 1; |
| 10213 |
break; |
| 10214 |
case 0: |
| 10215 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10216 |
self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); |
| 10217 |
if (unlikely(!self) && PyErr_Occurred()) return NULL; |
| 10218 |
#else |
| 10219 |
self = ((PyCFunctionObject*)cyfunc)->m_self; |
| 10220 |
#endif |
| 10221 |
break; |
| 10222 |
default: |
| 10223 |
return NULL; |
| 10224 |
} |
| 10225 |
if (unlikely(nargs != 1)) { |
| 10226 |
__Pyx_CyFunction_raise_argument_count_error( |
| 10227 |
cyfunc, "takes exactly one argument", nargs); |
| 10228 |
return NULL; |
| 10229 |
} |
| 10230 |
return meth(self, args[0]); |
| 10231 |
} |
| 10232 |
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) |
| 10233 |
{ |
| 10234 |
__pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; |
| 10235 |
#if CYTHON_BACKPORT_VECTORCALL |
| 10236 |
Py_ssize_t nargs = (Py_ssize_t)nargsf; |
| 10237 |
#else |
| 10238 |
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); |
| 10239 |
#endif |
| 10240 |
PyObject *self; |
| 10241 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10242 |
PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); |
| 10243 |
if (unlikely(!meth)) return NULL; |
| 10244 |
#else |
| 10245 |
PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; |
| 10246 |
#endif |
| 10247 |
switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { |
| 10248 |
case 1: |
| 10249 |
self = args[0]; |
| 10250 |
args += 1; |
| 10251 |
nargs -= 1; |
| 10252 |
break; |
| 10253 |
case 0: |
| 10254 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10255 |
self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); |
| 10256 |
if (unlikely(!self) && PyErr_Occurred()) return NULL; |
| 10257 |
#else |
| 10258 |
self = ((PyCFunctionObject*)cyfunc)->m_self; |
| 10259 |
#endif |
| 10260 |
break; |
| 10261 |
default: |
| 10262 |
return NULL; |
| 10263 |
} |
| 10264 |
return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))meth)(self, args, nargs, kwnames); |
| 10265 |
} |
| 10266 |
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames) |
| 10267 |
{ |
| 10268 |
__pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func; |
| 10269 |
PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc); |
| 10270 |
#if CYTHON_BACKPORT_VECTORCALL |
| 10271 |
Py_ssize_t nargs = (Py_ssize_t)nargsf; |
| 10272 |
#else |
| 10273 |
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf); |
| 10274 |
#endif |
| 10275 |
PyObject *self; |
| 10276 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10277 |
PyCFunction meth = PyCFunction_GetFunction(cyfunc->func); |
| 10278 |
if (unlikely(!meth)) return NULL; |
| 10279 |
#else |
| 10280 |
PyCFunction meth = ((PyCFunctionObject*)cyfunc)->m_ml->ml_meth; |
| 10281 |
#endif |
| 10282 |
switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) { |
| 10283 |
case 1: |
| 10284 |
self = args[0]; |
| 10285 |
args += 1; |
| 10286 |
nargs -= 1; |
| 10287 |
break; |
| 10288 |
case 0: |
| 10289 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10290 |
self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)cyfunc)->func); |
| 10291 |
if (unlikely(!self) && PyErr_Occurred()) return NULL; |
| 10292 |
#else |
| 10293 |
self = ((PyCFunctionObject*)cyfunc)->m_self; |
| 10294 |
#endif |
| 10295 |
break; |
| 10296 |
default: |
| 10297 |
return NULL; |
| 10298 |
} |
| 10299 |
return ((__Pyx_PyCMethod)(void(*)(void))meth)(self, cls, args, (size_t)nargs, kwnames); |
| 10300 |
} |
| 10301 |
#endif |
| 10302 |
#if CYTHON_USE_TYPE_SPECS |
| 10303 |
static PyType_Slot __pyx_CyFunctionType_slots[] = { |
| 10304 |
{Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc}, |
| 10305 |
{Py_tp_repr, (void *)__Pyx_CyFunction_repr}, |
| 10306 |
{Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod}, |
| 10307 |
{Py_tp_traverse, (void *)__Pyx_CyFunction_traverse}, |
| 10308 |
{Py_tp_clear, (void *)__Pyx_CyFunction_clear}, |
| 10309 |
{Py_tp_methods, (void *)__pyx_CyFunction_methods}, |
| 10310 |
{Py_tp_members, (void *)__pyx_CyFunction_members}, |
| 10311 |
{Py_tp_getset, (void *)__pyx_CyFunction_getsets}, |
| 10312 |
{Py_tp_descr_get, (void *)__Pyx_PyMethod_New}, |
| 10313 |
{0, 0}, |
| 10314 |
}; |
| 10315 |
static PyType_Spec __pyx_CyFunctionType_spec = { |
| 10316 |
__PYX_TYPE_MODULE_PREFIX "cython_function_or_method", |
| 10317 |
sizeof(__pyx_CyFunctionObject), |
| 10318 |
0, |
| 10319 |
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR |
| 10320 |
Py_TPFLAGS_METHOD_DESCRIPTOR | |
| 10321 |
#endif |
| 10322 |
#if CYTHON_METH_FASTCALL |
| 10323 |
#if defined(Py_TPFLAGS_HAVE_VECTORCALL) |
| 10324 |
Py_TPFLAGS_HAVE_VECTORCALL | |
| 10325 |
#elif defined(_Py_TPFLAGS_HAVE_VECTORCALL) |
| 10326 |
_Py_TPFLAGS_HAVE_VECTORCALL | |
| 10327 |
#endif |
| 10328 |
#endif |
| 10329 |
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, |
| 10330 |
__pyx_CyFunctionType_slots |
| 10331 |
}; |
| 10332 |
#else |
| 10333 |
static PyTypeObject __pyx_CyFunctionType_type = { |
| 10334 |
PyVarObject_HEAD_INIT(0, 0) |
| 10335 |
__PYX_TYPE_MODULE_PREFIX "cython_function_or_method", |
| 10336 |
sizeof(__pyx_CyFunctionObject), |
| 10337 |
0, |
| 10338 |
(destructor) __Pyx_CyFunction_dealloc, |
| 10339 |
#if !CYTHON_METH_FASTCALL |
| 10340 |
0, |
| 10341 |
#elif CYTHON_BACKPORT_VECTORCALL |
| 10342 |
(printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall), |
| 10343 |
#else |
| 10344 |
offsetof(PyCFunctionObject, vectorcall), |
| 10345 |
#endif |
| 10346 |
0, |
| 10347 |
0, |
| 10348 |
0, |
| 10349 |
(reprfunc) __Pyx_CyFunction_repr, |
| 10350 |
0, |
| 10351 |
0, |
| 10352 |
0, |
| 10353 |
0, |
| 10354 |
__Pyx_CyFunction_CallAsMethod, |
| 10355 |
0, |
| 10356 |
0, |
| 10357 |
0, |
| 10358 |
0, |
| 10359 |
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR |
| 10360 |
Py_TPFLAGS_METHOD_DESCRIPTOR | |
| 10361 |
#endif |
| 10362 |
#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL |
| 10363 |
_Py_TPFLAGS_HAVE_VECTORCALL | |
| 10364 |
#endif |
| 10365 |
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, |
| 10366 |
0, |
| 10367 |
(traverseproc) __Pyx_CyFunction_traverse, |
| 10368 |
(inquiry) __Pyx_CyFunction_clear, |
| 10369 |
0, |
| 10370 |
offsetof(PyCFunctionObject, m_weakreflist), |
| 10371 |
0, |
| 10372 |
0, |
| 10373 |
__pyx_CyFunction_methods, |
| 10374 |
__pyx_CyFunction_members, |
| 10375 |
__pyx_CyFunction_getsets, |
| 10376 |
0, |
| 10377 |
0, |
| 10378 |
__Pyx_PyMethod_New, |
| 10379 |
0, |
| 10380 |
offsetof(__pyx_CyFunctionObject, func_dict), |
| 10381 |
0, |
| 10382 |
0, |
| 10383 |
0, |
| 10384 |
0, |
| 10385 |
0, |
| 10386 |
0, |
| 10387 |
0, |
| 10388 |
0, |
| 10389 |
0, |
| 10390 |
0, |
| 10391 |
0, |
| 10392 |
0, |
| 10393 |
0, |
| 10394 |
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) |
| 10395 |
0, |
| 10396 |
#endif |
| 10397 |
#if __PYX_NEED_TP_PRINT_SLOT |
| 10398 |
0, |
| 10399 |
#endif |
| 10400 |
#if PY_VERSION_HEX >= 0x030C0000 |
| 10401 |
0, |
| 10402 |
#endif |
| 10403 |
#if PY_VERSION_HEX >= 0x030d00A4 |
| 10404 |
0, |
| 10405 |
#endif |
| 10406 |
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000 |
| 10407 |
0, |
| 10408 |
#endif |
| 10409 |
}; |
| 10410 |
#endif |
| 10411 |
static int __pyx_CyFunction_init(PyObject *module) { |
| 10412 |
__pyx_mstatetype *mstate = __Pyx_PyModule_GetState(module); |
| 10413 |
#if CYTHON_USE_TYPE_SPECS |
| 10414 |
mstate->__pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL); |
| 10415 |
#else |
| 10416 |
mstate->__pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); |
| 10417 |
#endif |
| 10418 |
if (unlikely(mstate->__pyx_CyFunctionType == NULL)) { |
| 10419 |
return -1; |
| 10420 |
} |
| 10421 |
return 0; |
| 10422 |
} |
| 10423 |
static CYTHON_INLINE PyObject *__Pyx_CyFunction_InitDefaults(PyObject *func, PyTypeObject *defaults_type) { |
| 10424 |
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 10425 |
m->defaults = PyObject_CallObject((PyObject*)defaults_type, NULL); |
| 10426 |
if (unlikely(!m->defaults)) |
| 10427 |
return NULL; |
| 10428 |
return m->defaults; |
| 10429 |
} |
| 10430 |
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { |
| 10431 |
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 10432 |
m->defaults_tuple = tuple; |
| 10433 |
Py_INCREF(tuple); |
| 10434 |
} |
| 10435 |
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { |
| 10436 |
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 10437 |
m->defaults_kwdict = dict; |
| 10438 |
Py_INCREF(dict); |
| 10439 |
} |
| 10440 |
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { |
| 10441 |
__pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; |
| 10442 |
m->func_annotations = dict; |
| 10443 |
Py_INCREF(dict); |
| 10444 |
} |
| 10445 |
|
| 10446 |
|
| 10447 |
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, |
| 10448 |
PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { |
| 10449 |
PyObject *op = __Pyx_CyFunction_Init( |
| 10450 |
PyObject_GC_New(__pyx_CyFunctionObject, __pyx_mstate_global->__pyx_CyFunctionType), |
| 10451 |
ml, flags, qualname, closure, module, globals, code |
| 10452 |
); |
| 10453 |
if (likely(op)) { |
| 10454 |
PyObject_GC_Track(op); |
| 10455 |
} |
| 10456 |
return op; |
| 10457 |
} |
| 10458 |
|
| 10459 |
|
| 10460 |
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { |
| 10461 |
PyObject *args[3] = {NULL, arg1, arg2}; |
| 10462 |
return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET); |
| 10463 |
} |
| 10464 |
|
| 10465 |
|
| 10466 |
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS |
| 10467 |
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) { |
| 10468 |
PyObject *res; |
| 10469 |
PyTypeObject *tp = Py_TYPE(obj); |
| 10470 |
res = _PyType_Lookup(tp, attr_name); |
| 10471 |
if (likely(res)) { |
| 10472 |
descrgetfunc f = Py_TYPE(res)->tp_descr_get; |
| 10473 |
if (!f) { |
| 10474 |
Py_INCREF(res); |
| 10475 |
} else { |
| 10476 |
res = f(res, obj, (PyObject *)tp); |
| 10477 |
} |
| 10478 |
} else if (with_error) { |
| 10479 |
PyErr_SetObject(PyExc_AttributeError, attr_name); |
| 10480 |
} |
| 10481 |
return res; |
| 10482 |
} |
| 10483 |
#endif |
| 10484 |
|
| 10485 |
|
| 10486 |
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, |
| 10487 |
PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { |
| 10488 |
PyObject *ns; |
| 10489 |
if (metaclass) { |
| 10490 |
PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_mstate_global->__pyx_n_u_prepare); |
| 10491 |
if (prep) { |
| 10492 |
PyObject *pargs[3] = {NULL, name, bases}; |
| 10493 |
ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); |
| 10494 |
Py_DECREF(prep); |
| 10495 |
} else { |
| 10496 |
if (unlikely(PyErr_Occurred())) |
| 10497 |
return NULL; |
| 10498 |
ns = PyDict_New(); |
| 10499 |
} |
| 10500 |
} else { |
| 10501 |
ns = PyDict_New(); |
| 10502 |
} |
| 10503 |
if (unlikely(!ns)) |
| 10504 |
return NULL; |
| 10505 |
if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_module, modname) < 0)) goto bad; |
| 10506 |
if (unlikely(PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_qualname, qualname) < 0)) goto bad; |
| 10507 |
if (unlikely(doc && PyObject_SetItem(ns, __pyx_mstate_global->__pyx_n_u_doc, doc) < 0)) goto bad; |
| 10508 |
return ns; |
| 10509 |
bad: |
| 10510 |
Py_DECREF(ns); |
| 10511 |
return NULL; |
| 10512 |
} |
| 10513 |
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, |
| 10514 |
PyObject *dict, PyObject *mkw, |
| 10515 |
int calculate_metaclass, int allow_py2_metaclass) { |
| 10516 |
PyObject *result; |
| 10517 |
PyObject *owned_metaclass = NULL; |
| 10518 |
PyObject *margs[4] = {NULL, name, bases, dict}; |
| 10519 |
if (allow_py2_metaclass) { |
| 10520 |
owned_metaclass = PyObject_GetItem(dict, __pyx_mstate_global->__pyx_n_u_metaclass); |
| 10521 |
if (owned_metaclass) { |
| 10522 |
metaclass = owned_metaclass; |
| 10523 |
} else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { |
| 10524 |
PyErr_Clear(); |
| 10525 |
} else { |
| 10526 |
return NULL; |
| 10527 |
} |
| 10528 |
} |
| 10529 |
if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { |
| 10530 |
metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); |
| 10531 |
Py_XDECREF(owned_metaclass); |
| 10532 |
if (unlikely(!metaclass)) |
| 10533 |
return NULL; |
| 10534 |
owned_metaclass = metaclass; |
| 10535 |
} |
| 10536 |
result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw); |
| 10537 |
Py_XDECREF(owned_metaclass); |
| 10538 |
return result; |
| 10539 |
} |
| 10540 |
|
| 10541 |
|
| 10542 |
#if CYTHON_COMPILING_IN_PYPY |
| 10543 |
static PyObject* __pyx_module_cleanup_atexit(PyObject *module, PyObject *unused) { |
| 10544 |
CYTHON_UNUSED_VAR(unused); |
| 10545 |
__pyx_module_cleanup(module); |
| 10546 |
Py_INCREF(Py_None); return Py_None; |
| 10547 |
} |
| 10548 |
static int __Pyx_RegisterCleanup(void) { |
| 10549 |
static PyMethodDef cleanup_def = { |
| 10550 |
"__cleanup", (PyCFunction)__pyx_module_cleanup_atexit, METH_NOARGS, 0}; |
| 10551 |
PyObject *cleanup_func = 0; |
| 10552 |
PyObject *atexit = 0; |
| 10553 |
PyObject *reg = 0; |
| 10554 |
PyObject *args = 0; |
| 10555 |
PyObject *res = 0; |
| 10556 |
int ret = -1; |
| 10557 |
cleanup_func = PyCFunction_New(&cleanup_def, 0); |
| 10558 |
if (!cleanup_func) |
| 10559 |
goto bad; |
| 10560 |
atexit = PyImport_ImportModule("atexit"); |
| 10561 |
if (!atexit) |
| 10562 |
goto bad; |
| 10563 |
reg = PyObject_GetAttrString(atexit, "_exithandlers"); |
| 10564 |
if (reg && PyList_Check(reg)) { |
| 10565 |
PyObject *a, *kw; |
| 10566 |
a = PyTuple_New(0); |
| 10567 |
kw = PyDict_New(); |
| 10568 |
if (!a || !kw) { |
| 10569 |
Py_XDECREF(a); |
| 10570 |
Py_XDECREF(kw); |
| 10571 |
goto bad; |
| 10572 |
} |
| 10573 |
args = PyTuple_Pack(3, cleanup_func, a, kw); |
| 10574 |
Py_DECREF(a); |
| 10575 |
Py_DECREF(kw); |
| 10576 |
if (!args) |
| 10577 |
goto bad; |
| 10578 |
ret = PyList_Insert(reg, 0, args); |
| 10579 |
} else { |
| 10580 |
if (!reg) |
| 10581 |
PyErr_Clear(); |
| 10582 |
Py_XDECREF(reg); |
| 10583 |
reg = PyObject_GetAttrString(atexit, "register"); |
| 10584 |
if (!reg) |
| 10585 |
goto bad; |
| 10586 |
args = PyTuple_Pack(1, cleanup_func); |
| 10587 |
if (!args) |
| 10588 |
goto bad; |
| 10589 |
res = PyObject_CallObject(reg, args); |
| 10590 |
if (!res) |
| 10591 |
goto bad; |
| 10592 |
ret = 0; |
| 10593 |
} |
| 10594 |
bad: |
| 10595 |
Py_XDECREF(cleanup_func); |
| 10596 |
Py_XDECREF(atexit); |
| 10597 |
Py_XDECREF(reg); |
| 10598 |
Py_XDECREF(args); |
| 10599 |
Py_XDECREF(res); |
| 10600 |
return ret; |
| 10601 |
} |
| 10602 |
#endif |
| 10603 |
|
| 10604 |
|
| 10605 |
#if CYTHON_CLINE_IN_TRACEBACK && CYTHON_CLINE_IN_TRACEBACK_RUNTIME |
| 10606 |
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { |
| 10607 |
PyObject *use_cline; |
| 10608 |
PyObject *ptype, *pvalue, *ptraceback; |
| 10609 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 10610 |
PyObject **cython_runtime_dict; |
| 10611 |
#endif |
| 10612 |
CYTHON_MAYBE_UNUSED_VAR(tstate); |
| 10613 |
if (unlikely(!__pyx_mstate_global->__pyx_cython_runtime)) { |
| 10614 |
return c_line; |
| 10615 |
} |
| 10616 |
__Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); |
| 10617 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 10618 |
cython_runtime_dict = _PyObject_GetDictPtr(__pyx_mstate_global->__pyx_cython_runtime); |
| 10619 |
if (likely(cython_runtime_dict)) { |
| 10620 |
__PYX_PY_DICT_LOOKUP_IF_MODIFIED( |
| 10621 |
use_cline, *cython_runtime_dict, |
| 10622 |
__Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_mstate_global->__pyx_n_u_cline_in_traceback)) |
| 10623 |
} else |
| 10624 |
#endif |
| 10625 |
{ |
| 10626 |
PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback); |
| 10627 |
if (use_cline_obj) { |
| 10628 |
use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; |
| 10629 |
Py_DECREF(use_cline_obj); |
| 10630 |
} else { |
| 10631 |
PyErr_Clear(); |
| 10632 |
use_cline = NULL; |
| 10633 |
} |
| 10634 |
} |
| 10635 |
if (!use_cline) { |
| 10636 |
c_line = 0; |
| 10637 |
(void) PyObject_SetAttr(__pyx_mstate_global->__pyx_cython_runtime, __pyx_mstate_global->__pyx_n_u_cline_in_traceback, Py_False); |
| 10638 |
} |
| 10639 |
else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { |
| 10640 |
c_line = 0; |
| 10641 |
} |
| 10642 |
__Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); |
| 10643 |
return c_line; |
| 10644 |
} |
| 10645 |
#endif |
| 10646 |
|
| 10647 |
|
| 10648 |
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { |
| 10649 |
int start = 0, mid = 0, end = count - 1; |
| 10650 |
if (end >= 0 && code_line > entries[end].code_line) { |
| 10651 |
return count; |
| 10652 |
} |
| 10653 |
while (start < end) { |
| 10654 |
mid = start + (end - start) / 2; |
| 10655 |
if (code_line < entries[mid].code_line) { |
| 10656 |
end = mid; |
| 10657 |
} else if (code_line > entries[mid].code_line) { |
| 10658 |
start = mid + 1; |
| 10659 |
} else { |
| 10660 |
return mid; |
| 10661 |
} |
| 10662 |
} |
| 10663 |
if (code_line <= entries[mid].code_line) { |
| 10664 |
return mid; |
| 10665 |
} else { |
| 10666 |
return mid + 1; |
| 10667 |
} |
| 10668 |
} |
| 10669 |
static __Pyx_CachedCodeObjectType *__pyx_find_code_object(int code_line) { |
| 10670 |
__Pyx_CachedCodeObjectType* code_object; |
| 10671 |
int pos; |
| 10672 |
if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { |
| 10673 |
return NULL; |
| 10674 |
} |
| 10675 |
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); |
| 10676 |
if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { |
| 10677 |
return NULL; |
| 10678 |
} |
| 10679 |
code_object = __pyx_code_cache.entries[pos].code_object; |
| 10680 |
Py_INCREF(code_object); |
| 10681 |
return code_object; |
| 10682 |
} |
| 10683 |
static void __pyx_insert_code_object(int code_line, __Pyx_CachedCodeObjectType* code_object) |
| 10684 |
{ |
| 10685 |
int pos, i; |
| 10686 |
__Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; |
| 10687 |
if (unlikely(!code_line)) { |
| 10688 |
return; |
| 10689 |
} |
| 10690 |
if (unlikely(!entries)) { |
| 10691 |
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); |
| 10692 |
if (likely(entries)) { |
| 10693 |
__pyx_code_cache.entries = entries; |
| 10694 |
__pyx_code_cache.max_count = 64; |
| 10695 |
__pyx_code_cache.count = 1; |
| 10696 |
entries[0].code_line = code_line; |
| 10697 |
entries[0].code_object = code_object; |
| 10698 |
Py_INCREF(code_object); |
| 10699 |
} |
| 10700 |
return; |
| 10701 |
} |
| 10702 |
pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); |
| 10703 |
if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { |
| 10704 |
__Pyx_CachedCodeObjectType* tmp = entries[pos].code_object; |
| 10705 |
entries[pos].code_object = code_object; |
| 10706 |
Py_DECREF(tmp); |
| 10707 |
return; |
| 10708 |
} |
| 10709 |
if (__pyx_code_cache.count == __pyx_code_cache.max_count) { |
| 10710 |
int new_max = __pyx_code_cache.max_count + 64; |
| 10711 |
entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( |
| 10712 |
__pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); |
| 10713 |
if (unlikely(!entries)) { |
| 10714 |
return; |
| 10715 |
} |
| 10716 |
__pyx_code_cache.entries = entries; |
| 10717 |
__pyx_code_cache.max_count = new_max; |
| 10718 |
} |
| 10719 |
for (i=__pyx_code_cache.count; i>pos; i--) { |
| 10720 |
entries[i] = entries[i-1]; |
| 10721 |
} |
| 10722 |
entries[pos].code_line = code_line; |
| 10723 |
entries[pos].code_object = code_object; |
| 10724 |
__pyx_code_cache.count++; |
| 10725 |
Py_INCREF(code_object); |
| 10726 |
} |
| 10727 |
|
| 10728 |
|
| 10729 |
#include "compile.h" |
| 10730 |
#include "frameobject.h" |
| 10731 |
#include "traceback.h" |
| 10732 |
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API && !defined(PYPY_VERSION) |
| 10733 |
#ifndef Py_BUILD_CORE |
| 10734 |
#define Py_BUILD_CORE 1 |
| 10735 |
#endif |
| 10736 |
#include "internal/pycore_frame.h" |
| 10737 |
#endif |
| 10738 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 10739 |
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict, |
| 10740 |
PyObject *firstlineno, PyObject *name) { |
| 10741 |
PyObject *replace = NULL; |
| 10742 |
if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL; |
| 10743 |
if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL; |
| 10744 |
replace = PyObject_GetAttrString(code, "replace"); |
| 10745 |
if (likely(replace)) { |
| 10746 |
PyObject *result = PyObject_Call(replace, __pyx_mstate_global->__pyx_empty_tuple, scratch_dict); |
| 10747 |
Py_DECREF(replace); |
| 10748 |
return result; |
| 10749 |
} |
| 10750 |
PyErr_Clear(); |
| 10751 |
#if __PYX_LIMITED_VERSION_HEX < 0x030780000 |
| 10752 |
{ |
| 10753 |
PyObject *compiled = NULL, *result = NULL; |
| 10754 |
if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL; |
| 10755 |
if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL; |
| 10756 |
compiled = Py_CompileString( |
| 10757 |
"out = type(code)(\n" |
| 10758 |
" code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n" |
| 10759 |
" code.co_flags, code.co_code, code.co_consts, code.co_names,\n" |
| 10760 |
" code.co_varnames, code.co_filename, co_name, co_firstlineno,\n" |
| 10761 |
" code.co_lnotab)\n", "<dummy>", Py_file_input); |
| 10762 |
if (!compiled) return NULL; |
| 10763 |
result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict); |
| 10764 |
Py_DECREF(compiled); |
| 10765 |
if (!result) PyErr_Print(); |
| 10766 |
Py_DECREF(result); |
| 10767 |
result = PyDict_GetItemString(scratch_dict, "out"); |
| 10768 |
if (result) Py_INCREF(result); |
| 10769 |
return result; |
| 10770 |
} |
| 10771 |
#else |
| 10772 |
return NULL; |
| 10773 |
#endif |
| 10774 |
} |
| 10775 |
static void __Pyx_AddTraceback(const char *funcname, int c_line, |
| 10776 |
int py_line, const char *filename) { |
| 10777 |
PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL; |
| 10778 |
PyObject *replace = NULL, *getframe = NULL, *frame = NULL; |
| 10779 |
PyObject *exc_type, *exc_value, *exc_traceback; |
| 10780 |
int success = 0; |
| 10781 |
if (c_line) { |
| 10782 |
(void) __pyx_cfilenm; |
| 10783 |
(void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line); |
| 10784 |
} |
| 10785 |
PyErr_Fetch(&exc_type, &exc_value, &exc_traceback); |
| 10786 |
code_object = __pyx_find_code_object(c_line ? -c_line : py_line); |
| 10787 |
if (!code_object) { |
| 10788 |
code_object = Py_CompileString("_getframe()", filename, Py_eval_input); |
| 10789 |
if (unlikely(!code_object)) goto bad; |
| 10790 |
py_py_line = PyLong_FromLong(py_line); |
| 10791 |
if (unlikely(!py_py_line)) goto bad; |
| 10792 |
py_funcname = PyUnicode_FromString(funcname); |
| 10793 |
if (unlikely(!py_funcname)) goto bad; |
| 10794 |
dict = PyDict_New(); |
| 10795 |
if (unlikely(!dict)) goto bad; |
| 10796 |
{ |
| 10797 |
PyObject *old_code_object = code_object; |
| 10798 |
code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname); |
| 10799 |
Py_DECREF(old_code_object); |
| 10800 |
} |
| 10801 |
if (unlikely(!code_object)) goto bad; |
| 10802 |
__pyx_insert_code_object(c_line ? -c_line : py_line, code_object); |
| 10803 |
} else { |
| 10804 |
dict = PyDict_New(); |
| 10805 |
} |
| 10806 |
getframe = PySys_GetObject("_getframe"); |
| 10807 |
if (unlikely(!getframe)) goto bad; |
| 10808 |
if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad; |
| 10809 |
frame = PyEval_EvalCode(code_object, dict, dict); |
| 10810 |
if (unlikely(!frame) || frame == Py_None) goto bad; |
| 10811 |
success = 1; |
| 10812 |
bad: |
| 10813 |
PyErr_Restore(exc_type, exc_value, exc_traceback); |
| 10814 |
Py_XDECREF(code_object); |
| 10815 |
Py_XDECREF(py_py_line); |
| 10816 |
Py_XDECREF(py_funcname); |
| 10817 |
Py_XDECREF(dict); |
| 10818 |
Py_XDECREF(replace); |
| 10819 |
if (success) { |
| 10820 |
PyTraceBack_Here( |
| 10821 |
(struct _frame*)frame); |
| 10822 |
} |
| 10823 |
Py_XDECREF(frame); |
| 10824 |
} |
| 10825 |
#else |
| 10826 |
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( |
| 10827 |
const char *funcname, int c_line, |
| 10828 |
int py_line, const char *filename) { |
| 10829 |
PyCodeObject *py_code = NULL; |
| 10830 |
PyObject *py_funcname = NULL; |
| 10831 |
if (c_line) { |
| 10832 |
py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); |
| 10833 |
if (!py_funcname) goto bad; |
| 10834 |
funcname = PyUnicode_AsUTF8(py_funcname); |
| 10835 |
if (!funcname) goto bad; |
| 10836 |
} |
| 10837 |
py_code = PyCode_NewEmpty(filename, funcname, py_line); |
| 10838 |
Py_XDECREF(py_funcname); |
| 10839 |
return py_code; |
| 10840 |
bad: |
| 10841 |
Py_XDECREF(py_funcname); |
| 10842 |
return NULL; |
| 10843 |
} |
| 10844 |
static void __Pyx_AddTraceback(const char *funcname, int c_line, |
| 10845 |
int py_line, const char *filename) { |
| 10846 |
PyCodeObject *py_code = 0; |
| 10847 |
PyFrameObject *py_frame = 0; |
| 10848 |
PyThreadState *tstate = __Pyx_PyThreadState_Current; |
| 10849 |
PyObject *ptype, *pvalue, *ptraceback; |
| 10850 |
if (c_line) { |
| 10851 |
c_line = __Pyx_CLineForTraceback(tstate, c_line); |
| 10852 |
} |
| 10853 |
py_code = __pyx_find_code_object(c_line ? -c_line : py_line); |
| 10854 |
if (!py_code) { |
| 10855 |
__Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); |
| 10856 |
py_code = __Pyx_CreateCodeObjectForTraceback( |
| 10857 |
funcname, c_line, py_line, filename); |
| 10858 |
if (!py_code) { |
| 10859 |
|
| 10860 |
|
| 10861 |
Py_XDECREF(ptype); |
| 10862 |
Py_XDECREF(pvalue); |
| 10863 |
Py_XDECREF(ptraceback); |
| 10864 |
goto bad; |
| 10865 |
} |
| 10866 |
__Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); |
| 10867 |
__pyx_insert_code_object(c_line ? -c_line : py_line, py_code); |
| 10868 |
} |
| 10869 |
py_frame = PyFrame_New( |
| 10870 |
tstate, |
| 10871 |
py_code, |
| 10872 |
__pyx_mstate_global->__pyx_d, |
| 10873 |
0 |
| 10874 |
); |
| 10875 |
if (!py_frame) goto bad; |
| 10876 |
__Pyx_PyFrame_SetLineNumber(py_frame, py_line); |
| 10877 |
PyTraceBack_Here(py_frame); |
| 10878 |
bad: |
| 10879 |
Py_XDECREF(py_code); |
| 10880 |
Py_XDECREF(py_frame); |
| 10881 |
} |
| 10882 |
#endif |
| 10883 |
|
| 10884 |
|
| 10885 |
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ |
| 10886 |
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) |
| 10887 |
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ |
| 10888 |
__PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) |
| 10889 |
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ |
| 10890 |
{\ |
| 10891 |
func_type value = func_value;\ |
| 10892 |
if (sizeof(target_type) < sizeof(func_type)) {\ |
| 10893 |
if (unlikely(value != (func_type) (target_type) value)) {\ |
| 10894 |
func_type zero = 0;\ |
| 10895 |
if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ |
| 10896 |
return (target_type) -1;\ |
| 10897 |
if (is_unsigned && unlikely(value < zero))\ |
| 10898 |
goto raise_neg_overflow;\ |
| 10899 |
else\ |
| 10900 |
goto raise_overflow;\ |
| 10901 |
}\ |
| 10902 |
}\ |
| 10903 |
return (target_type) value;\ |
| 10904 |
} |
| 10905 |
|
| 10906 |
|
| 10907 |
static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { |
| 10908 |
PyObject* kwargs = 0; |
| 10909 |
PyObject* result = 0; |
| 10910 |
PyObject* end_string; |
| 10911 |
if (unlikely(!__pyx_mstate_global->__pyx_print)) { |
| 10912 |
__pyx_mstate_global->__pyx_print = PyObject_GetAttr(__pyx_mstate_global->__pyx_b, __pyx_mstate_global->__pyx_n_u_print); |
| 10913 |
if (!__pyx_mstate_global->__pyx_print) |
| 10914 |
return -1; |
| 10915 |
} |
| 10916 |
if (stream) { |
| 10917 |
kwargs = PyDict_New(); |
| 10918 |
if (unlikely(!kwargs)) |
| 10919 |
return -1; |
| 10920 |
if (unlikely(PyDict_SetItem(kwargs, __pyx_mstate_global->__pyx_n_u_file, stream) < 0)) |
| 10921 |
goto bad; |
| 10922 |
if (!newline) { |
| 10923 |
end_string = PyUnicode_FromStringAndSize(" ", 1); |
| 10924 |
if (unlikely(!end_string)) |
| 10925 |
goto bad; |
| 10926 |
if (PyDict_SetItem(kwargs, __pyx_mstate_global->__pyx_n_u_end, end_string) < 0) { |
| 10927 |
Py_DECREF(end_string); |
| 10928 |
goto bad; |
| 10929 |
} |
| 10930 |
Py_DECREF(end_string); |
| 10931 |
} |
| 10932 |
} else if (!newline) { |
| 10933 |
if (unlikely(!__pyx_mstate_global->__pyx_print_kwargs)) { |
| 10934 |
__pyx_mstate_global->__pyx_print_kwargs = PyDict_New(); |
| 10935 |
if (unlikely(!__pyx_mstate_global->__pyx_print_kwargs)) |
| 10936 |
return -1; |
| 10937 |
end_string = PyUnicode_FromStringAndSize(" ", 1); |
| 10938 |
if (unlikely(!end_string)) |
| 10939 |
return -1; |
| 10940 |
if (PyDict_SetItem(__pyx_mstate_global->__pyx_print_kwargs, __pyx_mstate_global->__pyx_n_u_end, end_string) < 0) { |
| 10941 |
Py_DECREF(end_string); |
| 10942 |
return -1; |
| 10943 |
} |
| 10944 |
Py_DECREF(end_string); |
| 10945 |
} |
| 10946 |
kwargs = __pyx_mstate_global->__pyx_print_kwargs; |
| 10947 |
} |
| 10948 |
result = PyObject_Call(__pyx_mstate_global->__pyx_print, arg_tuple, kwargs); |
| 10949 |
if (unlikely(kwargs) && (kwargs != __pyx_mstate_global->__pyx_print_kwargs)) |
| 10950 |
Py_DECREF(kwargs); |
| 10951 |
if (!result) |
| 10952 |
return -1; |
| 10953 |
Py_DECREF(result); |
| 10954 |
return 0; |
| 10955 |
bad: |
| 10956 |
if (kwargs != __pyx_mstate_global->__pyx_print_kwargs) |
| 10957 |
Py_XDECREF(kwargs); |
| 10958 |
return -1; |
| 10959 |
} |
| 10960 |
|
| 10961 |
|
| 10962 |
static CYTHON_INLINE int __Pyx_PyLong_As_int(PyObject *x) { |
| 10963 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 10964 |
#pragma GCC diagnostic push |
| 10965 |
#pragma GCC diagnostic ignored "-Wconversion" |
| 10966 |
#endif |
| 10967 |
const int neg_one = (int) -1, const_zero = (int) 0; |
| 10968 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 10969 |
#pragma GCC diagnostic pop |
| 10970 |
#endif |
| 10971 |
const int is_unsigned = neg_one > const_zero; |
| 10972 |
if (unlikely(!PyLong_Check(x))) { |
| 10973 |
int val; |
| 10974 |
PyObject *tmp = __Pyx_PyNumber_Long(x); |
| 10975 |
if (!tmp) return (int) -1; |
| 10976 |
val = __Pyx_PyLong_As_int(tmp); |
| 10977 |
Py_DECREF(tmp); |
| 10978 |
return val; |
| 10979 |
} |
| 10980 |
if (is_unsigned) { |
| 10981 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 10982 |
if (unlikely(__Pyx_PyLong_IsNeg(x))) { |
| 10983 |
goto raise_neg_overflow; |
| 10984 |
} else if (__Pyx_PyLong_IsCompact(x)) { |
| 10985 |
__PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) |
| 10986 |
} else { |
| 10987 |
const digit* digits = __Pyx_PyLong_Digits(x); |
| 10988 |
assert(__Pyx_PyLong_DigitCount(x) > 1); |
| 10989 |
switch (__Pyx_PyLong_DigitCount(x)) { |
| 10990 |
case 2: |
| 10991 |
if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { |
| 10992 |
if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { |
| 10993 |
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 10994 |
} else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) { |
| 10995 |
return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); |
| 10996 |
} |
| 10997 |
} |
| 10998 |
break; |
| 10999 |
case 3: |
| 11000 |
if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { |
| 11001 |
if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { |
| 11002 |
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11003 |
} else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) { |
| 11004 |
return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); |
| 11005 |
} |
| 11006 |
} |
| 11007 |
break; |
| 11008 |
case 4: |
| 11009 |
if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { |
| 11010 |
if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { |
| 11011 |
__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]))) |
| 11012 |
} else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) { |
| 11013 |
return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); |
| 11014 |
} |
| 11015 |
} |
| 11016 |
break; |
| 11017 |
} |
| 11018 |
} |
| 11019 |
#endif |
| 11020 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 |
| 11021 |
if (unlikely(Py_SIZE(x) < 0)) { |
| 11022 |
goto raise_neg_overflow; |
| 11023 |
} |
| 11024 |
#else |
| 11025 |
{ |
| 11026 |
int result = PyObject_RichCompareBool(x, Py_False, Py_LT); |
| 11027 |
if (unlikely(result < 0)) |
| 11028 |
return (int) -1; |
| 11029 |
if (unlikely(result == 1)) |
| 11030 |
goto raise_neg_overflow; |
| 11031 |
} |
| 11032 |
#endif |
| 11033 |
if ((sizeof(int) <= sizeof(unsigned long))) { |
| 11034 |
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) |
| 11035 |
#ifdef HAVE_LONG_LONG |
| 11036 |
} else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) { |
| 11037 |
__PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) |
| 11038 |
#endif |
| 11039 |
} |
| 11040 |
} else { |
| 11041 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 11042 |
if (__Pyx_PyLong_IsCompact(x)) { |
| 11043 |
__PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) |
| 11044 |
} else { |
| 11045 |
const digit* digits = __Pyx_PyLong_Digits(x); |
| 11046 |
assert(__Pyx_PyLong_DigitCount(x) > 1); |
| 11047 |
switch (__Pyx_PyLong_SignedDigitCount(x)) { |
| 11048 |
case -2: |
| 11049 |
if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) { |
| 11050 |
if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { |
| 11051 |
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11052 |
} else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { |
| 11053 |
return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); |
| 11054 |
} |
| 11055 |
} |
| 11056 |
break; |
| 11057 |
case 2: |
| 11058 |
if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) { |
| 11059 |
if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { |
| 11060 |
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11061 |
} else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { |
| 11062 |
return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); |
| 11063 |
} |
| 11064 |
} |
| 11065 |
break; |
| 11066 |
case -3: |
| 11067 |
if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) { |
| 11068 |
if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { |
| 11069 |
__PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11070 |
} else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { |
| 11071 |
return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); |
| 11072 |
} |
| 11073 |
} |
| 11074 |
break; |
| 11075 |
case 3: |
| 11076 |
if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) { |
| 11077 |
if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { |
| 11078 |
__PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11079 |
} else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { |
| 11080 |
return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); |
| 11081 |
} |
| 11082 |
} |
| 11083 |
break; |
| 11084 |
case -4: |
| 11085 |
if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) { |
| 11086 |
if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { |
| 11087 |
__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]))) |
| 11088 |
} else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { |
| 11089 |
return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); |
| 11090 |
} |
| 11091 |
} |
| 11092 |
break; |
| 11093 |
case 4: |
| 11094 |
if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) { |
| 11095 |
if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { |
| 11096 |
__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]))) |
| 11097 |
} else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) { |
| 11098 |
return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); |
| 11099 |
} |
| 11100 |
} |
| 11101 |
break; |
| 11102 |
} |
| 11103 |
} |
| 11104 |
#endif |
| 11105 |
if ((sizeof(int) <= sizeof(long))) { |
| 11106 |
__PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) |
| 11107 |
#ifdef HAVE_LONG_LONG |
| 11108 |
} else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) { |
| 11109 |
__PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) |
| 11110 |
#endif |
| 11111 |
} |
| 11112 |
} |
| 11113 |
{ |
| 11114 |
int val; |
| 11115 |
int ret = -1; |
| 11116 |
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API |
| 11117 |
Py_ssize_t bytes_copied = PyLong_AsNativeBytes( |
| 11118 |
x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); |
| 11119 |
if (unlikely(bytes_copied == -1)) { |
| 11120 |
} else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { |
| 11121 |
goto raise_overflow; |
| 11122 |
} else { |
| 11123 |
ret = 0; |
| 11124 |
} |
| 11125 |
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) |
| 11126 |
int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 11127 |
unsigned char *bytes = (unsigned char *)&val; |
| 11128 |
ret = _PyLong_AsByteArray((PyLongObject *)x, |
| 11129 |
bytes, sizeof(val), |
| 11130 |
is_little, !is_unsigned); |
| 11131 |
#else |
| 11132 |
PyObject *v; |
| 11133 |
PyObject *stepval = NULL, *mask = NULL, *shift = NULL; |
| 11134 |
int bits, remaining_bits, is_negative = 0; |
| 11135 |
int chunk_size = (sizeof(long) < 8) ? 30 : 62; |
| 11136 |
if (likely(PyLong_CheckExact(x))) { |
| 11137 |
v = __Pyx_NewRef(x); |
| 11138 |
} else { |
| 11139 |
v = PyNumber_Long(x); |
| 11140 |
if (unlikely(!v)) return (int) -1; |
| 11141 |
assert(PyLong_CheckExact(v)); |
| 11142 |
} |
| 11143 |
{ |
| 11144 |
int result = PyObject_RichCompareBool(v, Py_False, Py_LT); |
| 11145 |
if (unlikely(result < 0)) { |
| 11146 |
Py_DECREF(v); |
| 11147 |
return (int) -1; |
| 11148 |
} |
| 11149 |
is_negative = result == 1; |
| 11150 |
} |
| 11151 |
if (is_unsigned && unlikely(is_negative)) { |
| 11152 |
Py_DECREF(v); |
| 11153 |
goto raise_neg_overflow; |
| 11154 |
} else if (is_negative) { |
| 11155 |
stepval = PyNumber_Invert(v); |
| 11156 |
Py_DECREF(v); |
| 11157 |
if (unlikely(!stepval)) |
| 11158 |
return (int) -1; |
| 11159 |
} else { |
| 11160 |
stepval = v; |
| 11161 |
} |
| 11162 |
v = NULL; |
| 11163 |
val = (int) 0; |
| 11164 |
mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; |
| 11165 |
shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; |
| 11166 |
for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) { |
| 11167 |
PyObject *tmp, *digit; |
| 11168 |
long idigit; |
| 11169 |
digit = PyNumber_And(stepval, mask); |
| 11170 |
if (unlikely(!digit)) goto done; |
| 11171 |
idigit = PyLong_AsLong(digit); |
| 11172 |
Py_DECREF(digit); |
| 11173 |
if (unlikely(idigit < 0)) goto done; |
| 11174 |
val |= ((int) idigit) << bits; |
| 11175 |
tmp = PyNumber_Rshift(stepval, shift); |
| 11176 |
if (unlikely(!tmp)) goto done; |
| 11177 |
Py_DECREF(stepval); stepval = tmp; |
| 11178 |
} |
| 11179 |
Py_DECREF(shift); shift = NULL; |
| 11180 |
Py_DECREF(mask); mask = NULL; |
| 11181 |
{ |
| 11182 |
long idigit = PyLong_AsLong(stepval); |
| 11183 |
if (unlikely(idigit < 0)) goto done; |
| 11184 |
remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1); |
| 11185 |
if (unlikely(idigit >= (1L << remaining_bits))) |
| 11186 |
goto raise_overflow; |
| 11187 |
val |= ((int) idigit) << bits; |
| 11188 |
} |
| 11189 |
if (!is_unsigned) { |
| 11190 |
if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1)))) |
| 11191 |
goto raise_overflow; |
| 11192 |
if (is_negative) |
| 11193 |
val = ~val; |
| 11194 |
} |
| 11195 |
ret = 0; |
| 11196 |
done: |
| 11197 |
Py_XDECREF(shift); |
| 11198 |
Py_XDECREF(mask); |
| 11199 |
Py_XDECREF(stepval); |
| 11200 |
#endif |
| 11201 |
if (unlikely(ret)) |
| 11202 |
return (int) -1; |
| 11203 |
return val; |
| 11204 |
} |
| 11205 |
raise_overflow: |
| 11206 |
PyErr_SetString(PyExc_OverflowError, |
| 11207 |
"value too large to convert to int"); |
| 11208 |
return (int) -1; |
| 11209 |
raise_neg_overflow: |
| 11210 |
PyErr_SetString(PyExc_OverflowError, |
| 11211 |
"can't convert negative value to int"); |
| 11212 |
return (int) -1; |
| 11213 |
} |
| 11214 |
|
| 11215 |
|
| 11216 |
static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { |
| 11217 |
int res; |
| 11218 |
PyObject* arg_tuple = PyTuple_Pack(1, o); |
| 11219 |
if (unlikely(!arg_tuple)) |
| 11220 |
return -1; |
| 11221 |
res = __Pyx_Print(stream, arg_tuple, 1); |
| 11222 |
Py_DECREF(arg_tuple); |
| 11223 |
return res; |
| 11224 |
} |
| 11225 |
|
| 11226 |
|
| 11227 |
#if CYTHON_VECTORCALL |
| 11228 |
static int __Pyx_VectorcallBuilder_AddArg(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { |
| 11229 |
(void)__Pyx_PyObject_FastCallDict; |
| 11230 |
if (__Pyx_PyTuple_SET_ITEM(builder, n, key) != (0)) return -1; |
| 11231 |
Py_INCREF(key); |
| 11232 |
args[n] = value; |
| 11233 |
return 0; |
| 11234 |
} |
| 11235 |
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, PyObject **args, int n) { |
| 11236 |
(void)__Pyx_VectorcallBuilder_AddArgStr; |
| 11237 |
if (unlikely(!PyUnicode_Check(key))) { |
| 11238 |
PyErr_SetString(PyExc_TypeError, "keywords must be strings"); |
| 11239 |
return -1; |
| 11240 |
} |
| 11241 |
return __Pyx_VectorcallBuilder_AddArg(key, value, builder, args, n); |
| 11242 |
} |
| 11243 |
static int __Pyx_VectorcallBuilder_AddArgStr(const char *key, PyObject *value, PyObject *builder, PyObject **args, int n) { |
| 11244 |
PyObject *pyKey = PyUnicode_FromString(key); |
| 11245 |
if (!pyKey) return -1; |
| 11246 |
return __Pyx_VectorcallBuilder_AddArg(pyKey, value, builder, args, n); |
| 11247 |
} |
| 11248 |
#else |
| 11249 |
CYTHON_UNUSED static int __Pyx_VectorcallBuilder_AddArg_Check(PyObject *key, PyObject *value, PyObject *builder, CYTHON_UNUSED PyObject **args, CYTHON_UNUSED int n) { |
| 11250 |
if (unlikely(!PyUnicode_Check(key))) { |
| 11251 |
PyErr_SetString(PyExc_TypeError, "keywords must be strings"); |
| 11252 |
return -1; |
| 11253 |
} |
| 11254 |
return PyDict_SetItem(builder, key, value); |
| 11255 |
} |
| 11256 |
#endif |
| 11257 |
|
| 11258 |
|
| 11259 |
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_int(int value) { |
| 11260 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 11261 |
#pragma GCC diagnostic push |
| 11262 |
#pragma GCC diagnostic ignored "-Wconversion" |
| 11263 |
#endif |
| 11264 |
const int neg_one = (int) -1, const_zero = (int) 0; |
| 11265 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 11266 |
#pragma GCC diagnostic pop |
| 11267 |
#endif |
| 11268 |
const int is_unsigned = neg_one > const_zero; |
| 11269 |
if (is_unsigned) { |
| 11270 |
if (sizeof(int) < sizeof(long)) { |
| 11271 |
return PyLong_FromLong((long) value); |
| 11272 |
} else if (sizeof(int) <= sizeof(unsigned long)) { |
| 11273 |
return PyLong_FromUnsignedLong((unsigned long) value); |
| 11274 |
#ifdef HAVE_LONG_LONG |
| 11275 |
} else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { |
| 11276 |
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); |
| 11277 |
#endif |
| 11278 |
} |
| 11279 |
} else { |
| 11280 |
if (sizeof(int) <= sizeof(long)) { |
| 11281 |
return PyLong_FromLong((long) value); |
| 11282 |
#ifdef HAVE_LONG_LONG |
| 11283 |
} else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { |
| 11284 |
return PyLong_FromLongLong((PY_LONG_LONG) value); |
| 11285 |
#endif |
| 11286 |
} |
| 11287 |
} |
| 11288 |
{ |
| 11289 |
unsigned char *bytes = (unsigned char *)&value; |
| 11290 |
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 |
| 11291 |
if (is_unsigned) { |
| 11292 |
return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); |
| 11293 |
} else { |
| 11294 |
return PyLong_FromNativeBytes(bytes, sizeof(value), -1); |
| 11295 |
} |
| 11296 |
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 |
| 11297 |
int one = 1; int little = (int)*(unsigned char *)&one; |
| 11298 |
return _PyLong_FromByteArray(bytes, sizeof(int), |
| 11299 |
little, !is_unsigned); |
| 11300 |
#else |
| 11301 |
int one = 1; int little = (int)*(unsigned char *)&one; |
| 11302 |
PyObject *from_bytes, *result = NULL, *kwds = NULL; |
| 11303 |
PyObject *py_bytes = NULL, *order_str = NULL; |
| 11304 |
from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); |
| 11305 |
if (!from_bytes) return NULL; |
| 11306 |
py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int)); |
| 11307 |
if (!py_bytes) goto limited_bad; |
| 11308 |
order_str = PyUnicode_FromString(little ? "little" : "big"); |
| 11309 |
if (!order_str) goto limited_bad; |
| 11310 |
{ |
| 11311 |
PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; |
| 11312 |
if (!is_unsigned) { |
| 11313 |
kwds = __Pyx_MakeVectorcallBuilderKwds(1); |
| 11314 |
if (!kwds) goto limited_bad; |
| 11315 |
if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; |
| 11316 |
} |
| 11317 |
result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); |
| 11318 |
} |
| 11319 |
limited_bad: |
| 11320 |
Py_XDECREF(kwds); |
| 11321 |
Py_XDECREF(order_str); |
| 11322 |
Py_XDECREF(py_bytes); |
| 11323 |
Py_XDECREF(from_bytes); |
| 11324 |
return result; |
| 11325 |
#endif |
| 11326 |
} |
| 11327 |
} |
| 11328 |
|
| 11329 |
|
| 11330 |
static CYTHON_INLINE PyObject* __Pyx_PyLong_From_long(long value) { |
| 11331 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 11332 |
#pragma GCC diagnostic push |
| 11333 |
#pragma GCC diagnostic ignored "-Wconversion" |
| 11334 |
#endif |
| 11335 |
const long neg_one = (long) -1, const_zero = (long) 0; |
| 11336 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 11337 |
#pragma GCC diagnostic pop |
| 11338 |
#endif |
| 11339 |
const int is_unsigned = neg_one > const_zero; |
| 11340 |
if (is_unsigned) { |
| 11341 |
if (sizeof(long) < sizeof(long)) { |
| 11342 |
return PyLong_FromLong((long) value); |
| 11343 |
} else if (sizeof(long) <= sizeof(unsigned long)) { |
| 11344 |
return PyLong_FromUnsignedLong((unsigned long) value); |
| 11345 |
#ifdef HAVE_LONG_LONG |
| 11346 |
} else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { |
| 11347 |
return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); |
| 11348 |
#endif |
| 11349 |
} |
| 11350 |
} else { |
| 11351 |
if (sizeof(long) <= sizeof(long)) { |
| 11352 |
return PyLong_FromLong((long) value); |
| 11353 |
#ifdef HAVE_LONG_LONG |
| 11354 |
} else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { |
| 11355 |
return PyLong_FromLongLong((PY_LONG_LONG) value); |
| 11356 |
#endif |
| 11357 |
} |
| 11358 |
} |
| 11359 |
{ |
| 11360 |
unsigned char *bytes = (unsigned char *)&value; |
| 11361 |
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4 |
| 11362 |
if (is_unsigned) { |
| 11363 |
return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1); |
| 11364 |
} else { |
| 11365 |
return PyLong_FromNativeBytes(bytes, sizeof(value), -1); |
| 11366 |
} |
| 11367 |
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000 |
| 11368 |
int one = 1; int little = (int)*(unsigned char *)&one; |
| 11369 |
return _PyLong_FromByteArray(bytes, sizeof(long), |
| 11370 |
little, !is_unsigned); |
| 11371 |
#else |
| 11372 |
int one = 1; int little = (int)*(unsigned char *)&one; |
| 11373 |
PyObject *from_bytes, *result = NULL, *kwds = NULL; |
| 11374 |
PyObject *py_bytes = NULL, *order_str = NULL; |
| 11375 |
from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes"); |
| 11376 |
if (!from_bytes) return NULL; |
| 11377 |
py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long)); |
| 11378 |
if (!py_bytes) goto limited_bad; |
| 11379 |
order_str = PyUnicode_FromString(little ? "little" : "big"); |
| 11380 |
if (!order_str) goto limited_bad; |
| 11381 |
{ |
| 11382 |
PyObject *args[3+(CYTHON_VECTORCALL ? 1 : 0)] = { NULL, py_bytes, order_str }; |
| 11383 |
if (!is_unsigned) { |
| 11384 |
kwds = __Pyx_MakeVectorcallBuilderKwds(1); |
| 11385 |
if (!kwds) goto limited_bad; |
| 11386 |
if (__Pyx_VectorcallBuilder_AddArgStr("signed", __Pyx_NewRef(Py_True), kwds, args+3, 0) < 0) goto limited_bad; |
| 11387 |
} |
| 11388 |
result = __Pyx_Object_Vectorcall_CallFromBuilder(from_bytes, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, kwds); |
| 11389 |
} |
| 11390 |
limited_bad: |
| 11391 |
Py_XDECREF(kwds); |
| 11392 |
Py_XDECREF(order_str); |
| 11393 |
Py_XDECREF(py_bytes); |
| 11394 |
Py_XDECREF(from_bytes); |
| 11395 |
return result; |
| 11396 |
#endif |
| 11397 |
} |
| 11398 |
} |
| 11399 |
|
| 11400 |
|
| 11401 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 11402 |
static __Pyx_TypeName |
| 11403 |
__Pyx_PyType_GetName(PyTypeObject* tp) |
| 11404 |
{ |
| 11405 |
PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp, |
| 11406 |
__pyx_mstate_global->__pyx_n_u_name); |
| 11407 |
if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) { |
| 11408 |
PyErr_Clear(); |
| 11409 |
Py_XDECREF(name); |
| 11410 |
name = __Pyx_NewRef(__pyx_mstate_global->__pyx_kp_u_); |
| 11411 |
} |
| 11412 |
return name; |
| 11413 |
} |
| 11414 |
#endif |
| 11415 |
|
| 11416 |
|
| 11417 |
static CYTHON_INLINE long __Pyx_PyLong_As_long(PyObject *x) { |
| 11418 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 11419 |
#pragma GCC diagnostic push |
| 11420 |
#pragma GCC diagnostic ignored "-Wconversion" |
| 11421 |
#endif |
| 11422 |
const long neg_one = (long) -1, const_zero = (long) 0; |
| 11423 |
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC |
| 11424 |
#pragma GCC diagnostic pop |
| 11425 |
#endif |
| 11426 |
const int is_unsigned = neg_one > const_zero; |
| 11427 |
if (unlikely(!PyLong_Check(x))) { |
| 11428 |
long val; |
| 11429 |
PyObject *tmp = __Pyx_PyNumber_Long(x); |
| 11430 |
if (!tmp) return (long) -1; |
| 11431 |
val = __Pyx_PyLong_As_long(tmp); |
| 11432 |
Py_DECREF(tmp); |
| 11433 |
return val; |
| 11434 |
} |
| 11435 |
if (is_unsigned) { |
| 11436 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 11437 |
if (unlikely(__Pyx_PyLong_IsNeg(x))) { |
| 11438 |
goto raise_neg_overflow; |
| 11439 |
} else if (__Pyx_PyLong_IsCompact(x)) { |
| 11440 |
__PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x)) |
| 11441 |
} else { |
| 11442 |
const digit* digits = __Pyx_PyLong_Digits(x); |
| 11443 |
assert(__Pyx_PyLong_DigitCount(x) > 1); |
| 11444 |
switch (__Pyx_PyLong_DigitCount(x)) { |
| 11445 |
case 2: |
| 11446 |
if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { |
| 11447 |
if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { |
| 11448 |
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11449 |
} else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) { |
| 11450 |
return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); |
| 11451 |
} |
| 11452 |
} |
| 11453 |
break; |
| 11454 |
case 3: |
| 11455 |
if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { |
| 11456 |
if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { |
| 11457 |
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11458 |
} else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) { |
| 11459 |
return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); |
| 11460 |
} |
| 11461 |
} |
| 11462 |
break; |
| 11463 |
case 4: |
| 11464 |
if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { |
| 11465 |
if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { |
| 11466 |
__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]))) |
| 11467 |
} else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) { |
| 11468 |
return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); |
| 11469 |
} |
| 11470 |
} |
| 11471 |
break; |
| 11472 |
} |
| 11473 |
} |
| 11474 |
#endif |
| 11475 |
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 |
| 11476 |
if (unlikely(Py_SIZE(x) < 0)) { |
| 11477 |
goto raise_neg_overflow; |
| 11478 |
} |
| 11479 |
#else |
| 11480 |
{ |
| 11481 |
int result = PyObject_RichCompareBool(x, Py_False, Py_LT); |
| 11482 |
if (unlikely(result < 0)) |
| 11483 |
return (long) -1; |
| 11484 |
if (unlikely(result == 1)) |
| 11485 |
goto raise_neg_overflow; |
| 11486 |
} |
| 11487 |
#endif |
| 11488 |
if ((sizeof(long) <= sizeof(unsigned long))) { |
| 11489 |
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) |
| 11490 |
#ifdef HAVE_LONG_LONG |
| 11491 |
} else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) { |
| 11492 |
__PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) |
| 11493 |
#endif |
| 11494 |
} |
| 11495 |
} else { |
| 11496 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 11497 |
if (__Pyx_PyLong_IsCompact(x)) { |
| 11498 |
__PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x)) |
| 11499 |
} else { |
| 11500 |
const digit* digits = __Pyx_PyLong_Digits(x); |
| 11501 |
assert(__Pyx_PyLong_DigitCount(x) > 1); |
| 11502 |
switch (__Pyx_PyLong_SignedDigitCount(x)) { |
| 11503 |
case -2: |
| 11504 |
if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) { |
| 11505 |
if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { |
| 11506 |
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11507 |
} else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { |
| 11508 |
return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); |
| 11509 |
} |
| 11510 |
} |
| 11511 |
break; |
| 11512 |
case 2: |
| 11513 |
if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) { |
| 11514 |
if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) { |
| 11515 |
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11516 |
} else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { |
| 11517 |
return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); |
| 11518 |
} |
| 11519 |
} |
| 11520 |
break; |
| 11521 |
case -3: |
| 11522 |
if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) { |
| 11523 |
if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { |
| 11524 |
__PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11525 |
} else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { |
| 11526 |
return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); |
| 11527 |
} |
| 11528 |
} |
| 11529 |
break; |
| 11530 |
case 3: |
| 11531 |
if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) { |
| 11532 |
if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) { |
| 11533 |
__PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) |
| 11534 |
} else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { |
| 11535 |
return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); |
| 11536 |
} |
| 11537 |
} |
| 11538 |
break; |
| 11539 |
case -4: |
| 11540 |
if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) { |
| 11541 |
if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { |
| 11542 |
__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]))) |
| 11543 |
} else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { |
| 11544 |
return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); |
| 11545 |
} |
| 11546 |
} |
| 11547 |
break; |
| 11548 |
case 4: |
| 11549 |
if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) { |
| 11550 |
if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) { |
| 11551 |
__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]))) |
| 11552 |
} else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) { |
| 11553 |
return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); |
| 11554 |
} |
| 11555 |
} |
| 11556 |
break; |
| 11557 |
} |
| 11558 |
} |
| 11559 |
#endif |
| 11560 |
if ((sizeof(long) <= sizeof(long))) { |
| 11561 |
__PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) |
| 11562 |
#ifdef HAVE_LONG_LONG |
| 11563 |
} else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) { |
| 11564 |
__PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) |
| 11565 |
#endif |
| 11566 |
} |
| 11567 |
} |
| 11568 |
{ |
| 11569 |
long val; |
| 11570 |
int ret = -1; |
| 11571 |
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API |
| 11572 |
Py_ssize_t bytes_copied = PyLong_AsNativeBytes( |
| 11573 |
x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0)); |
| 11574 |
if (unlikely(bytes_copied == -1)) { |
| 11575 |
} else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) { |
| 11576 |
goto raise_overflow; |
| 11577 |
} else { |
| 11578 |
ret = 0; |
| 11579 |
} |
| 11580 |
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray) |
| 11581 |
int one = 1; int is_little = (int)*(unsigned char *)&one; |
| 11582 |
unsigned char *bytes = (unsigned char *)&val; |
| 11583 |
ret = _PyLong_AsByteArray((PyLongObject *)x, |
| 11584 |
bytes, sizeof(val), |
| 11585 |
is_little, !is_unsigned); |
| 11586 |
#else |
| 11587 |
PyObject *v; |
| 11588 |
PyObject *stepval = NULL, *mask = NULL, *shift = NULL; |
| 11589 |
int bits, remaining_bits, is_negative = 0; |
| 11590 |
int chunk_size = (sizeof(long) < 8) ? 30 : 62; |
| 11591 |
if (likely(PyLong_CheckExact(x))) { |
| 11592 |
v = __Pyx_NewRef(x); |
| 11593 |
} else { |
| 11594 |
v = PyNumber_Long(x); |
| 11595 |
if (unlikely(!v)) return (long) -1; |
| 11596 |
assert(PyLong_CheckExact(v)); |
| 11597 |
} |
| 11598 |
{ |
| 11599 |
int result = PyObject_RichCompareBool(v, Py_False, Py_LT); |
| 11600 |
if (unlikely(result < 0)) { |
| 11601 |
Py_DECREF(v); |
| 11602 |
return (long) -1; |
| 11603 |
} |
| 11604 |
is_negative = result == 1; |
| 11605 |
} |
| 11606 |
if (is_unsigned && unlikely(is_negative)) { |
| 11607 |
Py_DECREF(v); |
| 11608 |
goto raise_neg_overflow; |
| 11609 |
} else if (is_negative) { |
| 11610 |
stepval = PyNumber_Invert(v); |
| 11611 |
Py_DECREF(v); |
| 11612 |
if (unlikely(!stepval)) |
| 11613 |
return (long) -1; |
| 11614 |
} else { |
| 11615 |
stepval = v; |
| 11616 |
} |
| 11617 |
v = NULL; |
| 11618 |
val = (long) 0; |
| 11619 |
mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done; |
| 11620 |
shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done; |
| 11621 |
for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) { |
| 11622 |
PyObject *tmp, *digit; |
| 11623 |
long idigit; |
| 11624 |
digit = PyNumber_And(stepval, mask); |
| 11625 |
if (unlikely(!digit)) goto done; |
| 11626 |
idigit = PyLong_AsLong(digit); |
| 11627 |
Py_DECREF(digit); |
| 11628 |
if (unlikely(idigit < 0)) goto done; |
| 11629 |
val |= ((long) idigit) << bits; |
| 11630 |
tmp = PyNumber_Rshift(stepval, shift); |
| 11631 |
if (unlikely(!tmp)) goto done; |
| 11632 |
Py_DECREF(stepval); stepval = tmp; |
| 11633 |
} |
| 11634 |
Py_DECREF(shift); shift = NULL; |
| 11635 |
Py_DECREF(mask); mask = NULL; |
| 11636 |
{ |
| 11637 |
long idigit = PyLong_AsLong(stepval); |
| 11638 |
if (unlikely(idigit < 0)) goto done; |
| 11639 |
remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1); |
| 11640 |
if (unlikely(idigit >= (1L << remaining_bits))) |
| 11641 |
goto raise_overflow; |
| 11642 |
val |= ((long) idigit) << bits; |
| 11643 |
} |
| 11644 |
if (!is_unsigned) { |
| 11645 |
if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1)))) |
| 11646 |
goto raise_overflow; |
| 11647 |
if (is_negative) |
| 11648 |
val = ~val; |
| 11649 |
} |
| 11650 |
ret = 0; |
| 11651 |
done: |
| 11652 |
Py_XDECREF(shift); |
| 11653 |
Py_XDECREF(mask); |
| 11654 |
Py_XDECREF(stepval); |
| 11655 |
#endif |
| 11656 |
if (unlikely(ret)) |
| 11657 |
return (long) -1; |
| 11658 |
return val; |
| 11659 |
} |
| 11660 |
raise_overflow: |
| 11661 |
PyErr_SetString(PyExc_OverflowError, |
| 11662 |
"value too large to convert to long"); |
| 11663 |
return (long) -1; |
| 11664 |
raise_neg_overflow: |
| 11665 |
PyErr_SetString(PyExc_OverflowError, |
| 11666 |
"can't convert negative value to long"); |
| 11667 |
return (long) -1; |
| 11668 |
} |
| 11669 |
|
| 11670 |
|
| 11671 |
#if CYTHON_COMPILING_IN_CPYTHON |
| 11672 |
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { |
| 11673 |
while (a) { |
| 11674 |
a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*); |
| 11675 |
if (a == b) |
| 11676 |
return 1; |
| 11677 |
} |
| 11678 |
return b == &PyBaseObject_Type; |
| 11679 |
} |
| 11680 |
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { |
| 11681 |
PyObject *mro; |
| 11682 |
if (a == b) return 1; |
| 11683 |
mro = a->tp_mro; |
| 11684 |
if (likely(mro)) { |
| 11685 |
Py_ssize_t i, n; |
| 11686 |
n = PyTuple_GET_SIZE(mro); |
| 11687 |
for (i = 0; i < n; i++) { |
| 11688 |
if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) |
| 11689 |
return 1; |
| 11690 |
} |
| 11691 |
return 0; |
| 11692 |
} |
| 11693 |
return __Pyx_InBases(a, b); |
| 11694 |
} |
| 11695 |
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) { |
| 11696 |
PyObject *mro; |
| 11697 |
if (cls == a || cls == b) return 1; |
| 11698 |
mro = cls->tp_mro; |
| 11699 |
if (likely(mro)) { |
| 11700 |
Py_ssize_t i, n; |
| 11701 |
n = PyTuple_GET_SIZE(mro); |
| 11702 |
for (i = 0; i < n; i++) { |
| 11703 |
PyObject *base = PyTuple_GET_ITEM(mro, i); |
| 11704 |
if (base == (PyObject *)a || base == (PyObject *)b) |
| 11705 |
return 1; |
| 11706 |
} |
| 11707 |
return 0; |
| 11708 |
} |
| 11709 |
return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b); |
| 11710 |
} |
| 11711 |
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { |
| 11712 |
if (exc_type1) { |
| 11713 |
return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2); |
| 11714 |
} else { |
| 11715 |
return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); |
| 11716 |
} |
| 11717 |
} |
| 11718 |
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { |
| 11719 |
Py_ssize_t i, n; |
| 11720 |
assert(PyExceptionClass_Check(exc_type)); |
| 11721 |
n = PyTuple_GET_SIZE(tuple); |
| 11722 |
for (i=0; i<n; i++) { |
| 11723 |
if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1; |
| 11724 |
} |
| 11725 |
for (i=0; i<n; i++) { |
| 11726 |
PyObject *t = PyTuple_GET_ITEM(tuple, i); |
| 11727 |
if (likely(PyExceptionClass_Check(t))) { |
| 11728 |
if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1; |
| 11729 |
} else { |
| 11730 |
} |
| 11731 |
} |
| 11732 |
return 0; |
| 11733 |
} |
| 11734 |
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) { |
| 11735 |
if (likely(err == exc_type)) return 1; |
| 11736 |
if (likely(PyExceptionClass_Check(err))) { |
| 11737 |
if (likely(PyExceptionClass_Check(exc_type))) { |
| 11738 |
return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type); |
| 11739 |
} else if (likely(PyTuple_Check(exc_type))) { |
| 11740 |
return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type); |
| 11741 |
} else { |
| 11742 |
} |
| 11743 |
} |
| 11744 |
return PyErr_GivenExceptionMatches(err, exc_type); |
| 11745 |
} |
| 11746 |
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) { |
| 11747 |
assert(PyExceptionClass_Check(exc_type1)); |
| 11748 |
assert(PyExceptionClass_Check(exc_type2)); |
| 11749 |
if (likely(err == exc_type1 || err == exc_type2)) return 1; |
| 11750 |
if (likely(PyExceptionClass_Check(err))) { |
| 11751 |
return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); |
| 11752 |
} |
| 11753 |
return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); |
| 11754 |
} |
| 11755 |
#endif |
| 11756 |
|
| 11757 |
|
| 11758 |
static unsigned long __Pyx_get_runtime_version(void) { |
| 11759 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4 |
| 11760 |
return Py_Version & ~0xFFUL; |
| 11761 |
#else |
| 11762 |
static unsigned long __Pyx_cached_runtime_version = 0; |
| 11763 |
if (__Pyx_cached_runtime_version == 0) { |
| 11764 |
const char* rt_version = Py_GetVersion(); |
| 11765 |
unsigned long version = 0; |
| 11766 |
unsigned long factor = 0x01000000UL; |
| 11767 |
unsigned int digit = 0; |
| 11768 |
int i = 0; |
| 11769 |
while (factor) { |
| 11770 |
while ('0' <= rt_version[i] && rt_version[i] <= '9') { |
| 11771 |
digit = digit * 10 + (unsigned int) (rt_version[i] - '0'); |
| 11772 |
++i; |
| 11773 |
} |
| 11774 |
version += factor * digit; |
| 11775 |
if (rt_version[i] != '.') |
| 11776 |
break; |
| 11777 |
digit = 0; |
| 11778 |
factor >>= 8; |
| 11779 |
++i; |
| 11780 |
} |
| 11781 |
__Pyx_cached_runtime_version = version; |
| 11782 |
} |
| 11783 |
return __Pyx_cached_runtime_version; |
| 11784 |
#endif |
| 11785 |
} |
| 11786 |
|
| 11787 |
|
| 11788 |
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) { |
| 11789 |
const unsigned long MAJOR_MINOR = 0xFFFF0000UL; |
| 11790 |
if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR)) |
| 11791 |
return 0; |
| 11792 |
if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR))) |
| 11793 |
return 1; |
| 11794 |
{ |
| 11795 |
char message[200]; |
| 11796 |
PyOS_snprintf(message, sizeof(message), |
| 11797 |
"compile time Python version %d.%d " |
| 11798 |
"of module '%.100s' " |
| 11799 |
"%s " |
| 11800 |
"runtime version %d.%d", |
| 11801 |
(int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF), |
| 11802 |
__Pyx_MODULE_NAME, |
| 11803 |
(allow_newer) ? "was newer than" : "does not match", |
| 11804 |
(int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF) |
| 11805 |
); |
| 11806 |
return PyErr_WarnEx(NULL, message, 1); |
| 11807 |
} |
| 11808 |
} |
| 11809 |
|
| 11810 |
|
| 11811 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 11812 |
static PyObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, |
| 11813 |
PyObject *code, PyObject *c, PyObject* n, PyObject *v, |
| 11814 |
PyObject *fv, PyObject *cell, PyObject* fn, |
| 11815 |
PyObject *name, int fline, PyObject *lnos) { |
| 11816 |
PyObject *exception_table = NULL; |
| 11817 |
PyObject *types_module=NULL, *code_type=NULL, *result=NULL; |
| 11818 |
#if __PYX_LIMITED_VERSION_HEX < 0x030B0000 |
| 11819 |
PyObject *version_info; |
| 11820 |
PyObject *py_minor_version = NULL; |
| 11821 |
#endif |
| 11822 |
long minor_version = 0; |
| 11823 |
PyObject *type, *value, *traceback; |
| 11824 |
PyErr_Fetch(&type, &value, &traceback); |
| 11825 |
#if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 |
| 11826 |
minor_version = 11; |
| 11827 |
#else |
| 11828 |
if (!(version_info = PySys_GetObject("version_info"))) goto end; |
| 11829 |
if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; |
| 11830 |
minor_version = PyLong_AsLong(py_minor_version); |
| 11831 |
Py_DECREF(py_minor_version); |
| 11832 |
if (minor_version == -1 && PyErr_Occurred()) goto end; |
| 11833 |
#endif |
| 11834 |
if (!(types_module = PyImport_ImportModule("types"))) goto end; |
| 11835 |
if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end; |
| 11836 |
if (minor_version <= 7) { |
| 11837 |
(void)p; |
| 11838 |
result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code, |
| 11839 |
c, n, v, fn, name, fline, lnos, fv, cell); |
| 11840 |
} else if (minor_version <= 10) { |
| 11841 |
result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code, |
| 11842 |
c, n, v, fn, name, fline, lnos, fv, cell); |
| 11843 |
} else { |
| 11844 |
if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end; |
| 11845 |
result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code, |
| 11846 |
c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell); |
| 11847 |
} |
| 11848 |
end: |
| 11849 |
Py_XDECREF(code_type); |
| 11850 |
Py_XDECREF(exception_table); |
| 11851 |
Py_XDECREF(types_module); |
| 11852 |
if (type) { |
| 11853 |
PyErr_Restore(type, value, traceback); |
| 11854 |
} |
| 11855 |
return result; |
| 11856 |
} |
| 11857 |
#elif PY_VERSION_HEX >= 0x030B0000 |
| 11858 |
static PyCodeObject* __Pyx__PyCode_New(int a, int p, int k, int l, int s, int f, |
| 11859 |
PyObject *code, PyObject *c, PyObject* n, PyObject *v, |
| 11860 |
PyObject *fv, PyObject *cell, PyObject* fn, |
| 11861 |
PyObject *name, int fline, PyObject *lnos) { |
| 11862 |
PyCodeObject *result; |
| 11863 |
result = |
| 11864 |
#if PY_VERSION_HEX >= 0x030C0000 |
| 11865 |
PyUnstable_Code_NewWithPosOnlyArgs |
| 11866 |
#else |
| 11867 |
PyCode_NewWithPosOnlyArgs |
| 11868 |
#endif |
| 11869 |
(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes); |
| 11870 |
return result; |
| 11871 |
} |
| 11872 |
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY |
| 11873 |
#define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ |
| 11874 |
PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) |
| 11875 |
#else |
| 11876 |
#define __Pyx__PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ |
| 11877 |
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) |
| 11878 |
#endif |
| 11879 |
static PyObject* __Pyx_PyCode_New( |
| 11880 |
__Pyx_PyCode_New_function_description descr, |
| 11881 |
PyObject **varnames, |
| 11882 |
PyObject* filename, |
| 11883 |
PyObject *funcname, |
| 11884 |
const char *line_table, |
| 11885 |
PyObject *tuple_dedup_map |
| 11886 |
) { |
| 11887 |
PyObject *code_obj = NULL, *varnames_tuple_dedup = NULL, *code_bytes = NULL, *line_table_bytes = NULL; |
| 11888 |
Py_ssize_t var_count = (Py_ssize_t) descr.nlocals; |
| 11889 |
PyObject *varnames_tuple = PyTuple_New(var_count); |
| 11890 |
if (unlikely(!varnames_tuple)) return NULL; |
| 11891 |
for (Py_ssize_t i=0; i < var_count; i++) { |
| 11892 |
Py_INCREF(varnames[i]); |
| 11893 |
if (__Pyx_PyTuple_SET_ITEM(varnames_tuple, i, varnames[i]) != (0)) goto done; |
| 11894 |
} |
| 11895 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 11896 |
varnames_tuple_dedup = PyDict_GetItem(tuple_dedup_map, varnames_tuple); |
| 11897 |
if (!varnames_tuple_dedup) { |
| 11898 |
if (unlikely(PyDict_SetItem(tuple_dedup_map, varnames_tuple, varnames_tuple) < 0)) goto done; |
| 11899 |
varnames_tuple_dedup = varnames_tuple; |
| 11900 |
} |
| 11901 |
#else |
| 11902 |
varnames_tuple_dedup = PyDict_SetDefault(tuple_dedup_map, varnames_tuple, varnames_tuple); |
| 11903 |
if (unlikely(!varnames_tuple_dedup)) goto done; |
| 11904 |
#endif |
| 11905 |
#if CYTHON_AVOID_BORROWED_REFS |
| 11906 |
Py_INCREF(varnames_tuple_dedup); |
| 11907 |
#endif |
| 11908 |
if (__PYX_LIMITED_VERSION_HEX >= (0x030b0000) && line_table != NULL) { |
| 11909 |
line_table_bytes = PyBytes_FromStringAndSize(line_table, descr.line_table_length); |
| 11910 |
if (unlikely(!line_table_bytes)) goto done; |
| 11911 |
Py_ssize_t code_len = (descr.line_table_length * 2 + 4) & ~3; |
| 11912 |
code_bytes = PyBytes_FromStringAndSize(NULL, code_len); |
| 11913 |
if (unlikely(!code_bytes)) goto done; |
| 11914 |
char* c_code_bytes = PyBytes_AsString(code_bytes); |
| 11915 |
if (unlikely(!c_code_bytes)) goto done; |
| 11916 |
memset(c_code_bytes, 0, (size_t) code_len); |
| 11917 |
} |
| 11918 |
code_obj = (PyObject*) __Pyx__PyCode_New( |
| 11919 |
(int) descr.argcount, |
| 11920 |
(int) descr.num_posonly_args, |
| 11921 |
(int) descr.num_kwonly_args, |
| 11922 |
(int) descr.nlocals, |
| 11923 |
0, |
| 11924 |
(int) descr.flags, |
| 11925 |
code_bytes ? code_bytes : __pyx_mstate_global->__pyx_empty_bytes, |
| 11926 |
__pyx_mstate_global->__pyx_empty_tuple, |
| 11927 |
__pyx_mstate_global->__pyx_empty_tuple, |
| 11928 |
varnames_tuple_dedup, |
| 11929 |
__pyx_mstate_global->__pyx_empty_tuple, |
| 11930 |
__pyx_mstate_global->__pyx_empty_tuple, |
| 11931 |
filename, |
| 11932 |
funcname, |
| 11933 |
(int) descr.first_line, |
| 11934 |
(__PYX_LIMITED_VERSION_HEX >= (0x030b0000)) ? line_table_bytes : __pyx_mstate_global->__pyx_empty_bytes |
| 11935 |
); |
| 11936 |
done: |
| 11937 |
Py_XDECREF(code_bytes); |
| 11938 |
Py_XDECREF(line_table_bytes); |
| 11939 |
#if CYTHON_AVOID_BORROWED_REFS |
| 11940 |
Py_XDECREF(varnames_tuple_dedup); |
| 11941 |
#endif |
| 11942 |
Py_DECREF(varnames_tuple); |
| 11943 |
return code_obj; |
| 11944 |
} |
| 11945 |
|
| 11946 |
|
| 11947 |
static int __Pyx_InitStrings(__Pyx_StringTabEntry const *t, PyObject **target, const char* const* encoding_names) { |
| 11948 |
while (t->s) { |
| 11949 |
PyObject *str; |
| 11950 |
if (t->is_unicode) { |
| 11951 |
if (t->intern) { |
| 11952 |
str = PyUnicode_InternFromString(t->s); |
| 11953 |
} else if (t->encoding) { |
| 11954 |
str = PyUnicode_Decode(t->s, t->n - 1, encoding_names[t->encoding], NULL); |
| 11955 |
} else { |
| 11956 |
str = PyUnicode_FromStringAndSize(t->s, t->n - 1); |
| 11957 |
} |
| 11958 |
} else { |
| 11959 |
str = PyBytes_FromStringAndSize(t->s, t->n - 1); |
| 11960 |
} |
| 11961 |
if (!str) |
| 11962 |
return -1; |
| 11963 |
*target = str; |
| 11964 |
if (PyObject_Hash(str) == -1) |
| 11965 |
return -1; |
| 11966 |
++t; |
| 11967 |
++target; |
| 11968 |
} |
| 11969 |
return 0; |
| 11970 |
} |
| 11971 |
|
| 11972 |
#include <string.h> |
| 11973 |
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) { |
| 11974 |
size_t len = strlen(s); |
| 11975 |
if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) { |
| 11976 |
PyErr_SetString(PyExc_OverflowError, "byte string is too long"); |
| 11977 |
return -1; |
| 11978 |
} |
| 11979 |
return (Py_ssize_t) len; |
| 11980 |
} |
| 11981 |
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { |
| 11982 |
Py_ssize_t len = __Pyx_ssize_strlen(c_str); |
| 11983 |
if (unlikely(len < 0)) return NULL; |
| 11984 |
return __Pyx_PyUnicode_FromStringAndSize(c_str, len); |
| 11985 |
} |
| 11986 |
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) { |
| 11987 |
Py_ssize_t len = __Pyx_ssize_strlen(c_str); |
| 11988 |
if (unlikely(len < 0)) return NULL; |
| 11989 |
return PyByteArray_FromStringAndSize(c_str, len); |
| 11990 |
} |
| 11991 |
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { |
| 11992 |
Py_ssize_t ignore; |
| 11993 |
return __Pyx_PyObject_AsStringAndSize(o, &ignore); |
| 11994 |
} |
| 11995 |
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 |
| 11996 |
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { |
| 11997 |
if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; |
| 11998 |
#if CYTHON_COMPILING_IN_LIMITED_API |
| 11999 |
{ |
| 12000 |
const char* result; |
| 12001 |
Py_ssize_t unicode_length; |
| 12002 |
CYTHON_MAYBE_UNUSED_VAR(unicode_length); |
| 12003 |
#if __PYX_LIMITED_VERSION_HEX < 0x030A0000 |
| 12004 |
if (unlikely(PyArg_Parse(o, "s#", &result, length) < 0)) return NULL; |
| 12005 |
#else |
| 12006 |
result = PyUnicode_AsUTF8AndSize(o, length); |
| 12007 |
#endif |
| 12008 |
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII |
| 12009 |
unicode_length = PyUnicode_GetLength(o); |
| 12010 |
if (unlikely(unicode_length < 0)) return NULL; |
| 12011 |
if (unlikely(unicode_length != *length)) { |
| 12012 |
PyUnicode_AsASCIIString(o); |
| 12013 |
return NULL; |
| 12014 |
} |
| 12015 |
#endif |
| 12016 |
return result; |
| 12017 |
} |
| 12018 |
#else |
| 12019 |
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII |
| 12020 |
if (likely(PyUnicode_IS_ASCII(o))) { |
| 12021 |
*length = PyUnicode_GET_LENGTH(o); |
| 12022 |
return PyUnicode_AsUTF8(o); |
| 12023 |
} else { |
| 12024 |
PyUnicode_AsASCIIString(o); |
| 12025 |
return NULL; |
| 12026 |
} |
| 12027 |
#else |
| 12028 |
return PyUnicode_AsUTF8AndSize(o, length); |
| 12029 |
#endif |
| 12030 |
#endif |
| 12031 |
} |
| 12032 |
#endif |
| 12033 |
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { |
| 12034 |
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 |
| 12035 |
if (PyUnicode_Check(o)) { |
| 12036 |
return __Pyx_PyUnicode_AsStringAndSize(o, length); |
| 12037 |
} else |
| 12038 |
#endif |
| 12039 |
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) |
| 12040 |
if (PyByteArray_Check(o)) { |
| 12041 |
*length = PyByteArray_GET_SIZE(o); |
| 12042 |
return PyByteArray_AS_STRING(o); |
| 12043 |
} else |
| 12044 |
#endif |
| 12045 |
{ |
| 12046 |
char* result; |
| 12047 |
int r = PyBytes_AsStringAndSize(o, &result, length); |
| 12048 |
if (unlikely(r < 0)) { |
| 12049 |
return NULL; |
| 12050 |
} else { |
| 12051 |
return result; |
| 12052 |
} |
| 12053 |
} |
| 12054 |
} |
| 12055 |
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { |
| 12056 |
int is_true = x == Py_True; |
| 12057 |
if (is_true | (x == Py_False) | (x == Py_None)) return is_true; |
| 12058 |
else return PyObject_IsTrue(x); |
| 12059 |
} |
| 12060 |
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { |
| 12061 |
int retval; |
| 12062 |
if (unlikely(!x)) return -1; |
| 12063 |
retval = __Pyx_PyObject_IsTrue(x); |
| 12064 |
Py_DECREF(x); |
| 12065 |
return retval; |
| 12066 |
} |
| 12067 |
static PyObject* __Pyx_PyNumber_LongWrongResultType(PyObject* result) { |
| 12068 |
__Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result)); |
| 12069 |
if (PyLong_Check(result)) { |
| 12070 |
if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, |
| 12071 |
"__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). " |
| 12072 |
"The ability to return an instance of a strict subclass of int is deprecated, " |
| 12073 |
"and may be removed in a future version of Python.", |
| 12074 |
result_type_name)) { |
| 12075 |
__Pyx_DECREF_TypeName(result_type_name); |
| 12076 |
Py_DECREF(result); |
| 12077 |
return NULL; |
| 12078 |
} |
| 12079 |
__Pyx_DECREF_TypeName(result_type_name); |
| 12080 |
return result; |
| 12081 |
} |
| 12082 |
PyErr_Format(PyExc_TypeError, |
| 12083 |
"__int__ returned non-int (type " __Pyx_FMT_TYPENAME ")", |
| 12084 |
result_type_name); |
| 12085 |
__Pyx_DECREF_TypeName(result_type_name); |
| 12086 |
Py_DECREF(result); |
| 12087 |
return NULL; |
| 12088 |
} |
| 12089 |
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Long(PyObject* x) { |
| 12090 |
#if CYTHON_USE_TYPE_SLOTS |
| 12091 |
PyNumberMethods *m; |
| 12092 |
#endif |
| 12093 |
PyObject *res = NULL; |
| 12094 |
if (likely(PyLong_Check(x))) |
| 12095 |
return __Pyx_NewRef(x); |
| 12096 |
#if CYTHON_USE_TYPE_SLOTS |
| 12097 |
m = Py_TYPE(x)->tp_as_number; |
| 12098 |
if (likely(m && m->nb_int)) { |
| 12099 |
res = m->nb_int(x); |
| 12100 |
} |
| 12101 |
#else |
| 12102 |
if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { |
| 12103 |
res = PyNumber_Long(x); |
| 12104 |
} |
| 12105 |
#endif |
| 12106 |
if (likely(res)) { |
| 12107 |
if (unlikely(!PyLong_CheckExact(res))) { |
| 12108 |
return __Pyx_PyNumber_LongWrongResultType(res); |
| 12109 |
} |
| 12110 |
} |
| 12111 |
else if (!PyErr_Occurred()) { |
| 12112 |
PyErr_SetString(PyExc_TypeError, |
| 12113 |
"an integer is required"); |
| 12114 |
} |
| 12115 |
return res; |
| 12116 |
} |
| 12117 |
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { |
| 12118 |
Py_ssize_t ival; |
| 12119 |
PyObject *x; |
| 12120 |
if (likely(PyLong_CheckExact(b))) { |
| 12121 |
#if CYTHON_USE_PYLONG_INTERNALS |
| 12122 |
if (likely(__Pyx_PyLong_IsCompact(b))) { |
| 12123 |
return __Pyx_PyLong_CompactValue(b); |
| 12124 |
} else { |
| 12125 |
const digit* digits = __Pyx_PyLong_Digits(b); |
| 12126 |
const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b); |
| 12127 |
switch (size) { |
| 12128 |
case 2: |
| 12129 |
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { |
| 12130 |
return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); |
| 12131 |
} |
| 12132 |
break; |
| 12133 |
case -2: |
| 12134 |
if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { |
| 12135 |
return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); |
| 12136 |
} |
| 12137 |
break; |
| 12138 |
case 3: |
| 12139 |
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { |
| 12140 |
return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); |
| 12141 |
} |
| 12142 |
break; |
| 12143 |
case -3: |
| 12144 |
if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { |
| 12145 |
return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); |
| 12146 |
} |
| 12147 |
break; |
| 12148 |
case 4: |
| 12149 |
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { |
| 12150 |
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])); |
| 12151 |
} |
| 12152 |
break; |
| 12153 |
case -4: |
| 12154 |
if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { |
| 12155 |
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])); |
| 12156 |
} |
| 12157 |
break; |
| 12158 |
} |
| 12159 |
} |
| 12160 |
#endif |
| 12161 |
return PyLong_AsSsize_t(b); |
| 12162 |
} |
| 12163 |
x = PyNumber_Index(b); |
| 12164 |
if (!x) return -1; |
| 12165 |
ival = PyLong_AsSsize_t(x); |
| 12166 |
Py_DECREF(x); |
| 12167 |
return ival; |
| 12168 |
} |
| 12169 |
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { |
| 12170 |
if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { |
| 12171 |
return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); |
| 12172 |
} else { |
| 12173 |
Py_ssize_t ival; |
| 12174 |
PyObject *x; |
| 12175 |
x = PyNumber_Index(o); |
| 12176 |
if (!x) return -1; |
| 12177 |
ival = PyLong_AsLong(x); |
| 12178 |
Py_DECREF(x); |
| 12179 |
return ival; |
| 12180 |
} |
| 12181 |
} |
| 12182 |
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { |
| 12183 |
return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); |
| 12184 |
} |
| 12185 |
static CYTHON_INLINE PyObject * __Pyx_PyLong_FromSize_t(size_t ival) { |
| 12186 |
return PyLong_FromSize_t(ival); |
| 12187 |
} |
| 12188 |
|
| 12189 |
|
| 12190 |
|
| 12191 |
#ifdef _MSC_VER |
| 12192 |
#pragma warning( pop ) |
| 12193 |
#endif |
| 12194 |
|
| 12195 |
|
| 12196 |
|
| 12197 |
|
| 12198 |
#endif |