You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7312 lines
280 KiB

4 years ago
  1. /* Generated by Cython 0.28.5 */
  2. /* BEGIN: Cython Metadata
  3. {
  4. "distutils": {
  5. "name": "aiohttp._frozenlist",
  6. "sources": [
  7. "aiohttp/_frozenlist.pyx"
  8. ]
  9. },
  10. "module_name": "aiohttp._frozenlist"
  11. }
  12. END: Cython Metadata */
  13. #define PY_SSIZE_T_CLEAN
  14. #include "Python.h"
  15. #ifndef Py_PYTHON_H
  16. #error Python headers needed to compile C extensions, please install development version of Python.
  17. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
  18. #error Cython requires Python 2.6+ or Python 3.3+.
  19. #else
  20. #define CYTHON_ABI "0_28_5"
  21. #define CYTHON_FUTURE_DIVISION 0
  22. #include <stddef.h>
  23. #ifndef offsetof
  24. #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  25. #endif
  26. #if !defined(WIN32) && !defined(MS_WINDOWS)
  27. #ifndef __stdcall
  28. #define __stdcall
  29. #endif
  30. #ifndef __cdecl
  31. #define __cdecl
  32. #endif
  33. #ifndef __fastcall
  34. #define __fastcall
  35. #endif
  36. #endif
  37. #ifndef DL_IMPORT
  38. #define DL_IMPORT(t) t
  39. #endif
  40. #ifndef DL_EXPORT
  41. #define DL_EXPORT(t) t
  42. #endif
  43. #define __PYX_COMMA ,
  44. #ifndef HAVE_LONG_LONG
  45. #if PY_VERSION_HEX >= 0x02070000
  46. #define HAVE_LONG_LONG
  47. #endif
  48. #endif
  49. #ifndef PY_LONG_LONG
  50. #define PY_LONG_LONG LONG_LONG
  51. #endif
  52. #ifndef Py_HUGE_VAL
  53. #define Py_HUGE_VAL HUGE_VAL
  54. #endif
  55. #ifdef PYPY_VERSION
  56. #define CYTHON_COMPILING_IN_PYPY 1
  57. #define CYTHON_COMPILING_IN_PYSTON 0
  58. #define CYTHON_COMPILING_IN_CPYTHON 0
  59. #undef CYTHON_USE_TYPE_SLOTS
  60. #define CYTHON_USE_TYPE_SLOTS 0
  61. #undef CYTHON_USE_PYTYPE_LOOKUP
  62. #define CYTHON_USE_PYTYPE_LOOKUP 0
  63. #if PY_VERSION_HEX < 0x03050000
  64. #undef CYTHON_USE_ASYNC_SLOTS
  65. #define CYTHON_USE_ASYNC_SLOTS 0
  66. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  67. #define CYTHON_USE_ASYNC_SLOTS 1
  68. #endif
  69. #undef CYTHON_USE_PYLIST_INTERNALS
  70. #define CYTHON_USE_PYLIST_INTERNALS 0
  71. #undef CYTHON_USE_UNICODE_INTERNALS
  72. #define CYTHON_USE_UNICODE_INTERNALS 0
  73. #undef CYTHON_USE_UNICODE_WRITER
  74. #define CYTHON_USE_UNICODE_WRITER 0
  75. #undef CYTHON_USE_PYLONG_INTERNALS
  76. #define CYTHON_USE_PYLONG_INTERNALS 0
  77. #undef CYTHON_AVOID_BORROWED_REFS
  78. #define CYTHON_AVOID_BORROWED_REFS 1
  79. #undef CYTHON_ASSUME_SAFE_MACROS
  80. #define CYTHON_ASSUME_SAFE_MACROS 0
  81. #undef CYTHON_UNPACK_METHODS
  82. #define CYTHON_UNPACK_METHODS 0
  83. #undef CYTHON_FAST_THREAD_STATE
  84. #define CYTHON_FAST_THREAD_STATE 0
  85. #undef CYTHON_FAST_PYCALL
  86. #define CYTHON_FAST_PYCALL 0
  87. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  88. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  89. #undef CYTHON_USE_TP_FINALIZE
  90. #define CYTHON_USE_TP_FINALIZE 0
  91. #elif defined(PYSTON_VERSION)
  92. #define CYTHON_COMPILING_IN_PYPY 0
  93. #define CYTHON_COMPILING_IN_PYSTON 1
  94. #define CYTHON_COMPILING_IN_CPYTHON 0
  95. #ifndef CYTHON_USE_TYPE_SLOTS
  96. #define CYTHON_USE_TYPE_SLOTS 1
  97. #endif
  98. #undef CYTHON_USE_PYTYPE_LOOKUP
  99. #define CYTHON_USE_PYTYPE_LOOKUP 0
  100. #undef CYTHON_USE_ASYNC_SLOTS
  101. #define CYTHON_USE_ASYNC_SLOTS 0
  102. #undef CYTHON_USE_PYLIST_INTERNALS
  103. #define CYTHON_USE_PYLIST_INTERNALS 0
  104. #ifndef CYTHON_USE_UNICODE_INTERNALS
  105. #define CYTHON_USE_UNICODE_INTERNALS 1
  106. #endif
  107. #undef CYTHON_USE_UNICODE_WRITER
  108. #define CYTHON_USE_UNICODE_WRITER 0
  109. #undef CYTHON_USE_PYLONG_INTERNALS
  110. #define CYTHON_USE_PYLONG_INTERNALS 0
  111. #ifndef CYTHON_AVOID_BORROWED_REFS
  112. #define CYTHON_AVOID_BORROWED_REFS 0
  113. #endif
  114. #ifndef CYTHON_ASSUME_SAFE_MACROS
  115. #define CYTHON_ASSUME_SAFE_MACROS 1
  116. #endif
  117. #ifndef CYTHON_UNPACK_METHODS
  118. #define CYTHON_UNPACK_METHODS 1
  119. #endif
  120. #undef CYTHON_FAST_THREAD_STATE
  121. #define CYTHON_FAST_THREAD_STATE 0
  122. #undef CYTHON_FAST_PYCALL
  123. #define CYTHON_FAST_PYCALL 0
  124. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  125. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  126. #undef CYTHON_USE_TP_FINALIZE
  127. #define CYTHON_USE_TP_FINALIZE 0
  128. #else
  129. #define CYTHON_COMPILING_IN_PYPY 0
  130. #define CYTHON_COMPILING_IN_PYSTON 0
  131. #define CYTHON_COMPILING_IN_CPYTHON 1
  132. #ifndef CYTHON_USE_TYPE_SLOTS
  133. #define CYTHON_USE_TYPE_SLOTS 1
  134. #endif
  135. #if PY_VERSION_HEX < 0x02070000
  136. #undef CYTHON_USE_PYTYPE_LOOKUP
  137. #define CYTHON_USE_PYTYPE_LOOKUP 0
  138. #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
  139. #define CYTHON_USE_PYTYPE_LOOKUP 1
  140. #endif
  141. #if PY_MAJOR_VERSION < 3
  142. #undef CYTHON_USE_ASYNC_SLOTS
  143. #define CYTHON_USE_ASYNC_SLOTS 0
  144. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  145. #define CYTHON_USE_ASYNC_SLOTS 1
  146. #endif
  147. #if PY_VERSION_HEX < 0x02070000
  148. #undef CYTHON_USE_PYLONG_INTERNALS
  149. #define CYTHON_USE_PYLONG_INTERNALS 0
  150. #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
  151. #define CYTHON_USE_PYLONG_INTERNALS 1
  152. #endif
  153. #ifndef CYTHON_USE_PYLIST_INTERNALS
  154. #define CYTHON_USE_PYLIST_INTERNALS 1
  155. #endif
  156. #ifndef CYTHON_USE_UNICODE_INTERNALS
  157. #define CYTHON_USE_UNICODE_INTERNALS 1
  158. #endif
  159. #if PY_VERSION_HEX < 0x030300F0
  160. #undef CYTHON_USE_UNICODE_WRITER
  161. #define CYTHON_USE_UNICODE_WRITER 0
  162. #elif !defined(CYTHON_USE_UNICODE_WRITER)
  163. #define CYTHON_USE_UNICODE_WRITER 1
  164. #endif
  165. #ifndef CYTHON_AVOID_BORROWED_REFS
  166. #define CYTHON_AVOID_BORROWED_REFS 0
  167. #endif
  168. #ifndef CYTHON_ASSUME_SAFE_MACROS
  169. #define CYTHON_ASSUME_SAFE_MACROS 1
  170. #endif
  171. #ifndef CYTHON_UNPACK_METHODS
  172. #define CYTHON_UNPACK_METHODS 1
  173. #endif
  174. #ifndef CYTHON_FAST_THREAD_STATE
  175. #define CYTHON_FAST_THREAD_STATE 1
  176. #endif
  177. #ifndef CYTHON_FAST_PYCALL
  178. #define CYTHON_FAST_PYCALL 1
  179. #endif
  180. #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  181. #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  182. #endif
  183. #ifndef CYTHON_USE_TP_FINALIZE
  184. #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  185. #endif
  186. #endif
  187. #if !defined(CYTHON_FAST_PYCCALL)
  188. #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
  189. #endif
  190. #if CYTHON_USE_PYLONG_INTERNALS
  191. #include "longintrepr.h"
  192. #undef SHIFT
  193. #undef BASE
  194. #undef MASK
  195. #endif
  196. #ifndef __has_attribute
  197. #define __has_attribute(x) 0
  198. #endif
  199. #ifndef __has_cpp_attribute
  200. #define __has_cpp_attribute(x) 0
  201. #endif
  202. #ifndef CYTHON_RESTRICT
  203. #if defined(__GNUC__)
  204. #define CYTHON_RESTRICT __restrict__
  205. #elif defined(_MSC_VER) && _MSC_VER >= 1400
  206. #define CYTHON_RESTRICT __restrict
  207. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  208. #define CYTHON_RESTRICT restrict
  209. #else
  210. #define CYTHON_RESTRICT
  211. #endif
  212. #endif
  213. #ifndef CYTHON_UNUSED
  214. # if defined(__GNUC__)
  215. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  216. # define CYTHON_UNUSED __attribute__ ((__unused__))
  217. # else
  218. # define CYTHON_UNUSED
  219. # endif
  220. # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  221. # define CYTHON_UNUSED __attribute__ ((__unused__))
  222. # else
  223. # define CYTHON_UNUSED
  224. # endif
  225. #endif
  226. #ifndef CYTHON_MAYBE_UNUSED_VAR
  227. # if defined(__cplusplus)
  228. template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
  229. # else
  230. # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
  231. # endif
  232. #endif
  233. #ifndef CYTHON_NCP_UNUSED
  234. # if CYTHON_COMPILING_IN_CPYTHON
  235. # define CYTHON_NCP_UNUSED
  236. # else
  237. # define CYTHON_NCP_UNUSED CYTHON_UNUSED
  238. # endif
  239. #endif
  240. #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  241. #ifdef _MSC_VER
  242. #ifndef _MSC_STDINT_H_
  243. #if _MSC_VER < 1300
  244. typedef unsigned char uint8_t;
  245. typedef unsigned int uint32_t;
  246. #else
  247. typedef unsigned __int8 uint8_t;
  248. typedef unsigned __int32 uint32_t;
  249. #endif
  250. #endif
  251. #else
  252. #include <stdint.h>
  253. #endif
  254. #ifndef CYTHON_FALLTHROUGH
  255. #if defined(__cplusplus) && __cplusplus >= 201103L
  256. #if __has_cpp_attribute(fallthrough)
  257. #define CYTHON_FALLTHROUGH [[fallthrough]]
  258. #elif __has_cpp_attribute(clang::fallthrough)
  259. #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
  260. #elif __has_cpp_attribute(gnu::fallthrough)
  261. #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
  262. #endif
  263. #endif
  264. #ifndef CYTHON_FALLTHROUGH
  265. #if __has_attribute(fallthrough)
  266. #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
  267. #else
  268. #define CYTHON_FALLTHROUGH
  269. #endif
  270. #endif
  271. #if defined(__clang__ ) && defined(__apple_build_version__)
  272. #if __apple_build_version__ < 7000000
  273. #undef CYTHON_FALLTHROUGH
  274. #define CYTHON_FALLTHROUGH
  275. #endif
  276. #endif
  277. #endif
  278. #ifndef CYTHON_INLINE
  279. #if defined(__clang__)
  280. #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  281. #elif defined(__GNUC__)
  282. #define CYTHON_INLINE __inline__
  283. #elif defined(_MSC_VER)
  284. #define CYTHON_INLINE __inline
  285. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  286. #define CYTHON_INLINE inline
  287. #else
  288. #define CYTHON_INLINE
  289. #endif
  290. #endif
  291. #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  292. #define Py_OptimizeFlag 0
  293. #endif
  294. #define __PYX_BUILD_PY_SSIZE_T "n"
  295. #define CYTHON_FORMAT_SSIZE_T "z"
  296. #if PY_MAJOR_VERSION < 3
  297. #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  298. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  299. PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  300. #define __Pyx_DefaultClassType PyClass_Type
  301. #else
  302. #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  303. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  304. PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  305. #define __Pyx_DefaultClassType PyType_Type
  306. #endif
  307. #ifndef Py_TPFLAGS_CHECKTYPES
  308. #define Py_TPFLAGS_CHECKTYPES 0
  309. #endif
  310. #ifndef Py_TPFLAGS_HAVE_INDEX
  311. #define Py_TPFLAGS_HAVE_INDEX 0
  312. #endif
  313. #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  314. #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  315. #endif
  316. #ifndef Py_TPFLAGS_HAVE_FINALIZE
  317. #define Py_TPFLAGS_HAVE_FINALIZE 0
  318. #endif
  319. #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  320. #ifndef METH_FASTCALL
  321. #define METH_FASTCALL 0x80
  322. #endif
  323. typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  324. typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
  325. Py_ssize_t nargs, PyObject *kwnames);
  326. #else
  327. #define __Pyx_PyCFunctionFast _PyCFunctionFast
  328. #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  329. #endif
  330. #if CYTHON_FAST_PYCCALL
  331. #define __Pyx_PyFastCFunction_Check(func)\
  332. ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
  333. #else
  334. #define __Pyx_PyFastCFunction_Check(func) 0
  335. #endif
  336. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  337. #define PyObject_Malloc(s) PyMem_Malloc(s)
  338. #define PyObject_Free(p) PyMem_Free(p)
  339. #define PyObject_Realloc(p) PyMem_Realloc(p)
  340. #endif
  341. #if CYTHON_COMPILING_IN_PYSTON
  342. #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
  343. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
  344. #else
  345. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  346. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
  347. #endif
  348. #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  349. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  350. #elif PY_VERSION_HEX >= 0x03060000
  351. #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
  352. #elif PY_VERSION_HEX >= 0x03000000
  353. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  354. #else
  355. #define __Pyx_PyThreadState_Current _PyThreadState_Current
  356. #endif
  357. #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
  358. #include "pythread.h"
  359. #define Py_tss_NEEDS_INIT 0
  360. typedef int Py_tss_t;
  361. static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  362. *key = PyThread_create_key();
  363. return 0; // PyThread_create_key reports success always
  364. }
  365. static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  366. Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  367. *key = Py_tss_NEEDS_INIT;
  368. return key;
  369. }
  370. static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  371. PyObject_Free(key);
  372. }
  373. static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  374. return *key != Py_tss_NEEDS_INIT;
  375. }
  376. static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  377. PyThread_delete_key(*key);
  378. *key = Py_tss_NEEDS_INIT;
  379. }
  380. static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  381. return PyThread_set_key_value(*key, value);
  382. }
  383. static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  384. return PyThread_get_key_value(*key);
  385. }
  386. #endif // TSS (Thread Specific Storage) API
  387. #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
  388. #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
  389. #else
  390. #define __Pyx_PyDict_NewPresized(n) PyDict_New()
  391. #endif
  392. #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  393. #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
  394. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
  395. #else
  396. #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
  397. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
  398. #endif
  399. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
  400. #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
  401. #else
  402. #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
  403. #endif
  404. #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  405. #define CYTHON_PEP393_ENABLED 1
  406. #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
  407. 0 : _PyUnicode_Ready((PyObject *)(op)))
  408. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
  409. #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  410. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
  411. #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
  412. #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
  413. #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
  414. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
  415. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  416. #else
  417. #define CYTHON_PEP393_ENABLED 0
  418. #define PyUnicode_1BYTE_KIND 1
  419. #define PyUnicode_2BYTE_KIND 2
  420. #define PyUnicode_4BYTE_KIND 4
  421. #define __Pyx_PyUnicode_READY(op) (0)
  422. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
  423. #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  424. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  425. #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
  426. #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
  427. #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  428. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  429. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
  430. #endif
  431. #if CYTHON_COMPILING_IN_PYPY
  432. #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
  433. #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
  434. #else
  435. #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
  436. #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  437. PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  438. #endif
  439. #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  440. #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
  441. #endif
  442. #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  443. #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
  444. #endif
  445. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  446. #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
  447. #endif
  448. #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
  449. #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  450. #if PY_MAJOR_VERSION >= 3
  451. #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
  452. #else
  453. #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
  454. #endif
  455. #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  456. #define PyObject_ASCII(o) PyObject_Repr(o)
  457. #endif
  458. #if PY_MAJOR_VERSION >= 3
  459. #define PyBaseString_Type PyUnicode_Type
  460. #define PyStringObject PyUnicodeObject
  461. #define PyString_Type PyUnicode_Type
  462. #define PyString_Check PyUnicode_Check
  463. #define PyString_CheckExact PyUnicode_CheckExact
  464. #define PyObject_Unicode PyObject_Str
  465. #endif
  466. #if PY_MAJOR_VERSION >= 3
  467. #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  468. #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
  469. #else
  470. #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  471. #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
  472. #endif
  473. #ifndef PySet_CheckExact
  474. #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
  475. #endif
  476. #if CYTHON_ASSUME_SAFE_MACROS
  477. #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
  478. #else
  479. #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
  480. #endif
  481. #if PY_MAJOR_VERSION >= 3
  482. #define PyIntObject PyLongObject
  483. #define PyInt_Type PyLong_Type
  484. #define PyInt_Check(op) PyLong_Check(op)
  485. #define PyInt_CheckExact(op) PyLong_CheckExact(op)
  486. #define PyInt_FromString PyLong_FromString
  487. #define PyInt_FromUnicode PyLong_FromUnicode
  488. #define PyInt_FromLong PyLong_FromLong
  489. #define PyInt_FromSize_t PyLong_FromSize_t
  490. #define PyInt_FromSsize_t PyLong_FromSsize_t
  491. #define PyInt_AsLong PyLong_AsLong
  492. #define PyInt_AS_LONG PyLong_AS_LONG
  493. #define PyInt_AsSsize_t PyLong_AsSsize_t
  494. #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
  495. #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  496. #define PyNumber_Int PyNumber_Long
  497. #endif
  498. #if PY_MAJOR_VERSION >= 3
  499. #define PyBoolObject PyLongObject
  500. #endif
  501. #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  502. #ifndef PyUnicode_InternFromString
  503. #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  504. #endif
  505. #endif
  506. #if PY_VERSION_HEX < 0x030200A4
  507. typedef long Py_hash_t;
  508. #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  509. #define __Pyx_PyInt_AsHash_t PyInt_AsLong
  510. #else
  511. #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  512. #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
  513. #endif
  514. #if PY_MAJOR_VERSION >= 3
  515. #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
  516. #else
  517. #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
  518. #endif
  519. #if CYTHON_USE_ASYNC_SLOTS
  520. #if PY_VERSION_HEX >= 0x030500B1
  521. #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  522. #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  523. #else
  524. #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  525. #endif
  526. #else
  527. #define __Pyx_PyType_AsAsync(obj) NULL
  528. #endif
  529. #ifndef __Pyx_PyAsyncMethodsStruct
  530. typedef struct {
  531. unaryfunc am_await;
  532. unaryfunc am_aiter;
  533. unaryfunc am_anext;
  534. } __Pyx_PyAsyncMethodsStruct;
  535. #endif
  536. #if defined(WIN32) || defined(MS_WINDOWS)
  537. #define _USE_MATH_DEFINES
  538. #endif
  539. #include <math.h>
  540. #ifdef NAN
  541. #define __PYX_NAN() ((float) NAN)
  542. #else
  543. static CYTHON_INLINE float __PYX_NAN() {
  544. float value;
  545. memset(&value, 0xFF, sizeof(value));
  546. return value;
  547. }
  548. #endif
  549. #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  550. #define __Pyx_truncl trunc
  551. #else
  552. #define __Pyx_truncl truncl
  553. #endif
  554. #define __PYX_ERR(f_index, lineno, Ln_error) \
  555. { \
  556. __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
  557. }
  558. #ifndef __PYX_EXTERN_C
  559. #ifdef __cplusplus
  560. #define __PYX_EXTERN_C extern "C"
  561. #else
  562. #define __PYX_EXTERN_C extern
  563. #endif
  564. #endif
  565. #define __PYX_HAVE__aiohttp___frozenlist
  566. #define __PYX_HAVE_API__aiohttp___frozenlist
  567. /* Early includes */
  568. #ifdef _OPENMP
  569. #include <omp.h>
  570. #endif /* _OPENMP */
  571. #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
  572. #define CYTHON_WITHOUT_ASSERTIONS
  573. #endif
  574. typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
  575. const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
  576. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  577. #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
  578. #define __PYX_DEFAULT_STRING_ENCODING ""
  579. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  580. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  581. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  582. #define __Pyx_long_cast(x) ((long)x)
  583. #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
  584. (sizeof(type) < sizeof(Py_ssize_t)) ||\
  585. (sizeof(type) > sizeof(Py_ssize_t) &&\
  586. likely(v < (type)PY_SSIZE_T_MAX ||\
  587. v == (type)PY_SSIZE_T_MAX) &&\
  588. (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  589. v == (type)PY_SSIZE_T_MIN))) ||\
  590. (sizeof(type) == sizeof(Py_ssize_t) &&\
  591. (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  592. v == (type)PY_SSIZE_T_MAX))) )
  593. #if defined (__cplusplus) && __cplusplus >= 201103L
  594. #include <cstdlib>
  595. #define __Pyx_sst_abs(value) std::abs(value)
  596. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  597. #define __Pyx_sst_abs(value) abs(value)
  598. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  599. #define __Pyx_sst_abs(value) labs(value)
  600. #elif defined (_MSC_VER)
  601. #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  602. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  603. #define __Pyx_sst_abs(value) llabs(value)
  604. #elif defined (__GNUC__)
  605. #define __Pyx_sst_abs(value) __builtin_llabs(value)
  606. #else
  607. #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  608. #endif
  609. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  610. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  611. #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
  612. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  613. #define __Pyx_PyBytes_FromString PyBytes_FromString
  614. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  615. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  616. #if PY_MAJOR_VERSION < 3
  617. #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
  618. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  619. #else
  620. #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
  621. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
  622. #endif
  623. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
  624. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
  625. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
  626. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
  627. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
  628. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
  629. #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
  630. #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
  631. #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
  632. #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
  633. #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
  634. #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
  635. #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
  636. #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
  637. #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
  638. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  639. static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
  640. const Py_UNICODE *u_end = u;
  641. while (*u_end++) ;
  642. return (size_t)(u_end - u - 1);
  643. }
  644. #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
  645. #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
  646. #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
  647. #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
  648. #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
  649. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  650. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  651. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
  652. #define __Pyx_PySequence_Tuple(obj)\
  653. (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  654. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  655. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
  656. #if CYTHON_ASSUME_SAFE_MACROS
  657. #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  658. #else
  659. #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  660. #endif
  661. #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
  662. #if PY_MAJOR_VERSION >= 3
  663. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  664. #else
  665. #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
  666. #endif
  667. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
  668. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  669. static int __Pyx_sys_getdefaultencoding_not_ascii;
  670. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  671. PyObject* sys;
  672. PyObject* default_encoding = NULL;
  673. PyObject* ascii_chars_u = NULL;
  674. PyObject* ascii_chars_b = NULL;
  675. const char* default_encoding_c;
  676. sys = PyImport_ImportModule("sys");
  677. if (!sys) goto bad;
  678. default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
  679. Py_DECREF(sys);
  680. if (!default_encoding) goto bad;
  681. default_encoding_c = PyBytes_AsString(default_encoding);
  682. if (!default_encoding_c) goto bad;
  683. if (strcmp(default_encoding_c, "ascii") == 0) {
  684. __Pyx_sys_getdefaultencoding_not_ascii = 0;
  685. } else {
  686. char ascii_chars[128];
  687. int c;
  688. for (c = 0; c < 128; c++) {
  689. ascii_chars[c] = c;
  690. }
  691. __Pyx_sys_getdefaultencoding_not_ascii = 1;
  692. ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
  693. if (!ascii_chars_u) goto bad;
  694. ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
  695. if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
  696. PyErr_Format(
  697. PyExc_ValueError,
  698. "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
  699. default_encoding_c);
  700. goto bad;
  701. }
  702. Py_DECREF(ascii_chars_u);
  703. Py_DECREF(ascii_chars_b);
  704. }
  705. Py_DECREF(default_encoding);
  706. return 0;
  707. bad:
  708. Py_XDECREF(default_encoding);
  709. Py_XDECREF(ascii_chars_u);
  710. Py_XDECREF(ascii_chars_b);
  711. return -1;
  712. }
  713. #endif
  714. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
  715. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  716. #else
  717. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  718. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  719. static char* __PYX_DEFAULT_STRING_ENCODING;
  720. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  721. PyObject* sys;
  722. PyObject* default_encoding = NULL;
  723. char* default_encoding_c;
  724. sys = PyImport_ImportModule("sys");
  725. if (!sys) goto bad;
  726. default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
  727. Py_DECREF(sys);
  728. if (!default_encoding) goto bad;
  729. default_encoding_c = PyBytes_AsString(default_encoding);
  730. if (!default_encoding_c) goto bad;
  731. __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
  732. if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
  733. strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
  734. Py_DECREF(default_encoding);
  735. return 0;
  736. bad:
  737. Py_XDECREF(default_encoding);
  738. return -1;
  739. }
  740. #endif
  741. #endif
  742. /* Test for GCC > 2.95 */
  743. #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  744. #define likely(x) __builtin_expect(!!(x), 1)
  745. #define unlikely(x) __builtin_expect(!!(x), 0)
  746. #else /* !__GNUC__ or GCC < 2.95 */
  747. #define likely(x) (x)
  748. #define unlikely(x) (x)
  749. #endif /* __GNUC__ */
  750. static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  751. static PyObject *__pyx_m = NULL;
  752. static PyObject *__pyx_d;
  753. static PyObject *__pyx_b;
  754. static PyObject *__pyx_cython_runtime = NULL;
  755. static PyObject *__pyx_empty_tuple;
  756. static PyObject *__pyx_empty_bytes;
  757. static PyObject *__pyx_empty_unicode;
  758. static int __pyx_lineno;
  759. static int __pyx_clineno = 0;
  760. static const char * __pyx_cfilenm= __FILE__;
  761. static const char *__pyx_filename;
  762. static const char *__pyx_f[] = {
  763. "aiohttp/_frozenlist.pyx",
  764. "stringsource",
  765. };
  766. /*--- Type declarations ---*/
  767. struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList;
  768. /* "aiohttp/_frozenlist.pyx":4
  769. *
  770. *
  771. * cdef class FrozenList: # <<<<<<<<<<<<<<
  772. *
  773. * cdef readonly bint frozen
  774. */
  775. struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList {
  776. PyObject_HEAD
  777. struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *__pyx_vtab;
  778. int frozen;
  779. PyObject *_items;
  780. };
  781. struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList {
  782. PyObject *(*_check_frozen)(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *);
  783. PyObject *(*_fast_len)(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *);
  784. };
  785. static struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *__pyx_vtabptr_7aiohttp_11_frozenlist_FrozenList;
  786. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_11_frozenlist_10FrozenList__fast_len(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *);
  787. /* --- Runtime support code (head) --- */
  788. /* Refnanny.proto */
  789. #ifndef CYTHON_REFNANNY
  790. #define CYTHON_REFNANNY 0
  791. #endif
  792. #if CYTHON_REFNANNY
  793. typedef struct {
  794. void (*INCREF)(void*, PyObject*, int);
  795. void (*DECREF)(void*, PyObject*, int);
  796. void (*GOTREF)(void*, PyObject*, int);
  797. void (*GIVEREF)(void*, PyObject*, int);
  798. void* (*SetupContext)(const char*, int, const char*);
  799. void (*FinishContext)(void**);
  800. } __Pyx_RefNannyAPIStruct;
  801. static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  802. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  803. #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  804. #ifdef WITH_THREAD
  805. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  806. if (acquire_gil) {\
  807. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  808. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  809. PyGILState_Release(__pyx_gilstate_save);\
  810. } else {\
  811. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  812. }
  813. #else
  814. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  815. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  816. #endif
  817. #define __Pyx_RefNannyFinishContext()\
  818. __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  819. #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  820. #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  821. #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  822. #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  823. #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  824. #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  825. #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  826. #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
  827. #else
  828. #define __Pyx_RefNannyDeclarations
  829. #define __Pyx_RefNannySetupContext(name, acquire_gil)
  830. #define __Pyx_RefNannyFinishContext()
  831. #define __Pyx_INCREF(r) Py_INCREF(r)
  832. #define __Pyx_DECREF(r) Py_DECREF(r)
  833. #define __Pyx_GOTREF(r)
  834. #define __Pyx_GIVEREF(r)
  835. #define __Pyx_XINCREF(r) Py_XINCREF(r)
  836. #define __Pyx_XDECREF(r) Py_XDECREF(r)
  837. #define __Pyx_XGOTREF(r)
  838. #define __Pyx_XGIVEREF(r)
  839. #endif
  840. #define __Pyx_XDECREF_SET(r, v) do {\
  841. PyObject *tmp = (PyObject *) r;\
  842. r = v; __Pyx_XDECREF(tmp);\
  843. } while (0)
  844. #define __Pyx_DECREF_SET(r, v) do {\
  845. PyObject *tmp = (PyObject *) r;\
  846. r = v; __Pyx_DECREF(tmp);\
  847. } while (0)
  848. #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  849. #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  850. /* PyObjectGetAttrStr.proto */
  851. #if CYTHON_USE_TYPE_SLOTS
  852. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
  853. #else
  854. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  855. #endif
  856. /* GetBuiltinName.proto */
  857. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  858. /* RaiseDoubleKeywords.proto */
  859. static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
  860. /* ParseKeywords.proto */
  861. static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
  862. PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
  863. const char* function_name);
  864. /* RaiseArgTupleInvalid.proto */
  865. static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
  866. Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
  867. /* PyObjectCall.proto */
  868. #if CYTHON_COMPILING_IN_CPYTHON
  869. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  870. #else
  871. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  872. #endif
  873. /* PyThreadStateGet.proto */
  874. #if CYTHON_FAST_THREAD_STATE
  875. #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
  876. #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
  877. #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
  878. #else
  879. #define __Pyx_PyThreadState_declare
  880. #define __Pyx_PyThreadState_assign
  881. #define __Pyx_PyErr_Occurred() PyErr_Occurred()
  882. #endif
  883. /* PyErrFetchRestore.proto */
  884. #if CYTHON_FAST_THREAD_STATE
  885. #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
  886. #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  887. #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  888. #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  889. #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  890. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  891. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  892. #if CYTHON_COMPILING_IN_CPYTHON
  893. #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
  894. #else
  895. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  896. #endif
  897. #else
  898. #define __Pyx_PyErr_Clear() PyErr_Clear()
  899. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  900. #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
  901. #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
  902. #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
  903. #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
  904. #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
  905. #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
  906. #endif
  907. /* RaiseException.proto */
  908. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
  909. /* GetItemInt.proto */
  910. #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  911. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  912. __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
  913. (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
  914. __Pyx_GetItemInt_Generic(o, to_py_func(i))))
  915. #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  916. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  917. __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  918. (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  919. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  920. int wraparound, int boundscheck);
  921. #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  922. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  923. __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  924. (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
  925. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  926. int wraparound, int boundscheck);
  927. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
  928. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
  929. int is_list, int wraparound, int boundscheck);
  930. /* ObjectGetItem.proto */
  931. #if CYTHON_USE_TYPE_SLOTS
  932. static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
  933. #else
  934. #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
  935. #endif
  936. /* PyCFunctionFastCall.proto */
  937. #if CYTHON_FAST_PYCCALL
  938. static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
  939. #else
  940. #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
  941. #endif
  942. /* PyFunctionFastCall.proto */
  943. #if CYTHON_FAST_PYCALL
  944. #define __Pyx_PyFunction_FastCall(func, args, nargs)\
  945. __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
  946. #if 1 || PY_VERSION_HEX < 0x030600B1
  947. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
  948. #else
  949. #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
  950. #endif
  951. #endif
  952. /* PyObjectCallMethO.proto */
  953. #if CYTHON_COMPILING_IN_CPYTHON
  954. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  955. #endif
  956. /* PyObjectCallOneArg.proto */
  957. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  958. /* PyObjectCallNoArg.proto */
  959. #if CYTHON_COMPILING_IN_CPYTHON
  960. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  961. #else
  962. #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
  963. #endif
  964. /* PyIntBinop.proto */
  965. #if !CYTHON_COMPILING_IN_PYPY
  966. static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
  967. #else
  968. #define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
  969. PyObject_RichCompare(op1, op2, Py_EQ)
  970. #endif
  971. /* PySequenceContains.proto */
  972. static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
  973. int result = PySequence_Contains(seq, item);
  974. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  975. }
  976. /* PyObjectCallMethod1.proto */
  977. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
  978. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
  979. /* pop_index.proto */
  980. static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix);
  981. static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix);
  982. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  983. static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix);
  984. #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
  985. (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\
  986. __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
  987. (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
  988. __Pyx__PyObject_PopIndex(L, py_ix)))
  989. #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
  990. __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\
  991. __Pyx__PyList_PopIndex(L, py_ix, ix) : (\
  992. (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
  993. __Pyx__PyObject_PopIndex(L, py_ix)))
  994. #else
  995. #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\
  996. __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)
  997. #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\
  998. (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\
  999. __Pyx__PyObject_PopIndex(L, py_ix))
  1000. #endif
  1001. /* ListAppend.proto */
  1002. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  1003. static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  1004. PyListObject* L = (PyListObject*) list;
  1005. Py_ssize_t len = Py_SIZE(list);
  1006. if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
  1007. Py_INCREF(x);
  1008. PyList_SET_ITEM(list, len, x);
  1009. Py_SIZE(list) = len+1;
  1010. return 0;
  1011. }
  1012. return PyList_Append(list, x);
  1013. }
  1014. #else
  1015. #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
  1016. #endif
  1017. /* PyErrExceptionMatches.proto */
  1018. #if CYTHON_FAST_THREAD_STATE
  1019. #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
  1020. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
  1021. #else
  1022. #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
  1023. #endif
  1024. /* GetAttr.proto */
  1025. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
  1026. /* GetAttr3.proto */
  1027. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
  1028. /* GetModuleGlobalName.proto */
  1029. static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
  1030. /* Import.proto */
  1031. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
  1032. /* ImportFrom.proto */
  1033. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
  1034. /* HasAttr.proto */
  1035. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
  1036. /* PyObject_GenericGetAttrNoDict.proto */
  1037. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  1038. static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
  1039. #else
  1040. #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
  1041. #endif
  1042. /* PyObject_GenericGetAttr.proto */
  1043. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  1044. static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
  1045. #else
  1046. #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
  1047. #endif
  1048. /* SetVTable.proto */
  1049. static int __Pyx_SetVtable(PyObject *dict, void *vtable);
  1050. /* SetupReduce.proto */
  1051. static int __Pyx_setup_reduce(PyObject* type_obj);
  1052. /* CLineInTraceback.proto */
  1053. #ifdef CYTHON_CLINE_IN_TRACEBACK
  1054. #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
  1055. #else
  1056. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
  1057. #endif
  1058. /* CodeObjectCache.proto */
  1059. typedef struct {
  1060. PyCodeObject* code_object;
  1061. int code_line;
  1062. } __Pyx_CodeObjectCacheEntry;
  1063. struct __Pyx_CodeObjectCache {
  1064. int count;
  1065. int max_count;
  1066. __Pyx_CodeObjectCacheEntry* entries;
  1067. };
  1068. static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
  1069. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  1070. static PyCodeObject *__pyx_find_code_object(int code_line);
  1071. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
  1072. /* AddTraceback.proto */
  1073. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  1074. int py_line, const char *filename);
  1075. /* CIntToPy.proto */
  1076. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
  1077. /* CIntToPy.proto */
  1078. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
  1079. /* CIntFromPy.proto */
  1080. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
  1081. /* CIntFromPy.proto */
  1082. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
  1083. /* FastTypeChecks.proto */
  1084. #if CYTHON_COMPILING_IN_CPYTHON
  1085. #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
  1086. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
  1087. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
  1088. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
  1089. #else
  1090. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  1091. #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
  1092. #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
  1093. #endif
  1094. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  1095. /* CheckBinaryVersion.proto */
  1096. static int __Pyx_check_binary_version(void);
  1097. /* InitStrings.proto */
  1098. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
  1099. static PyObject *__pyx_f_7aiohttp_11_frozenlist_10FrozenList__check_frozen(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto*/
  1100. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_11_frozenlist_10FrozenList__fast_len(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto*/
  1101. /* Module declarations from 'aiohttp._frozenlist' */
  1102. static PyTypeObject *__pyx_ptype_7aiohttp_11_frozenlist_FrozenList = 0;
  1103. static PyObject *__pyx_f_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList__set_state(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *, PyObject *); /*proto*/
  1104. #define __Pyx_MODULE_NAME "aiohttp._frozenlist"
  1105. extern int __pyx_module_is_main_aiohttp___frozenlist;
  1106. int __pyx_module_is_main_aiohttp___frozenlist = 0;
  1107. /* Implementation of 'aiohttp._frozenlist' */
  1108. static PyObject *__pyx_builtin_RuntimeError;
  1109. static const char __pyx_k_new[] = "__new__";
  1110. static const char __pyx_k_pop[] = "pop";
  1111. static const char __pyx_k_pos[] = "pos";
  1112. static const char __pyx_k_dict[] = "__dict__";
  1113. static const char __pyx_k_item[] = "item";
  1114. static const char __pyx_k_iter[] = "__iter__";
  1115. static const char __pyx_k_main[] = "__main__";
  1116. static const char __pyx_k_name[] = "__name__";
  1117. static const char __pyx_k_test[] = "__test__";
  1118. static const char __pyx_k_clear[] = "clear";
  1119. static const char __pyx_k_count[] = "count";
  1120. static const char __pyx_k_index[] = "index";
  1121. static const char __pyx_k_items[] = "items";
  1122. static const char __pyx_k_format[] = "format";
  1123. static const char __pyx_k_import[] = "__import__";
  1124. static const char __pyx_k_pickle[] = "pickle";
  1125. static const char __pyx_k_reduce[] = "__reduce__";
  1126. static const char __pyx_k_remove[] = "remove";
  1127. static const char __pyx_k_update[] = "update";
  1128. static const char __pyx_k_getstate[] = "__getstate__";
  1129. static const char __pyx_k_pyx_type[] = "__pyx_type";
  1130. static const char __pyx_k_register[] = "register";
  1131. static const char __pyx_k_reversed[] = "__reversed__";
  1132. static const char __pyx_k_setstate[] = "__setstate__";
  1133. static const char __pyx_k_pyx_state[] = "__pyx_state";
  1134. static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
  1135. static const char __pyx_k_pyx_result[] = "__pyx_result";
  1136. static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
  1137. static const char __pyx_k_PickleError[] = "PickleError";
  1138. static const char __pyx_k_RuntimeError[] = "RuntimeError";
  1139. static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
  1140. static const char __pyx_k_stringsource[] = "stringsource";
  1141. static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
  1142. static const char __pyx_k_MutableSequence[] = "MutableSequence";
  1143. static const char __pyx_k_collections_abc[] = "collections.abc";
  1144. static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
  1145. static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
  1146. static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
  1147. static const char __pyx_k_FrozenList_frozen_r[] = "<FrozenList(frozen={}, {!r})>";
  1148. static const char __pyx_k_aiohttp__frozenlist[] = "aiohttp._frozenlist";
  1149. static const char __pyx_k_pyx_unpickle_FrozenList[] = "__pyx_unpickle_FrozenList";
  1150. static const char __pyx_k_Cannot_modify_frozen_list[] = "Cannot modify frozen list.";
  1151. static const char __pyx_k_Incompatible_checksums_s_vs_0x94[] = "Incompatible checksums (%s vs 0x949a143 = (_items, frozen))";
  1152. static PyObject *__pyx_kp_s_Cannot_modify_frozen_list;
  1153. static PyObject *__pyx_kp_s_FrozenList_frozen_r;
  1154. static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x94;
  1155. static PyObject *__pyx_n_s_MutableSequence;
  1156. static PyObject *__pyx_n_s_PickleError;
  1157. static PyObject *__pyx_n_s_RuntimeError;
  1158. static PyObject *__pyx_n_s_aiohttp__frozenlist;
  1159. static PyObject *__pyx_n_s_clear;
  1160. static PyObject *__pyx_n_s_cline_in_traceback;
  1161. static PyObject *__pyx_n_s_collections_abc;
  1162. static PyObject *__pyx_n_s_count;
  1163. static PyObject *__pyx_n_s_dict;
  1164. static PyObject *__pyx_n_s_format;
  1165. static PyObject *__pyx_n_s_getstate;
  1166. static PyObject *__pyx_n_s_import;
  1167. static PyObject *__pyx_n_s_index;
  1168. static PyObject *__pyx_n_s_item;
  1169. static PyObject *__pyx_n_s_items;
  1170. static PyObject *__pyx_n_s_iter;
  1171. static PyObject *__pyx_n_s_main;
  1172. static PyObject *__pyx_n_s_name;
  1173. static PyObject *__pyx_n_s_new;
  1174. static PyObject *__pyx_n_s_pickle;
  1175. static PyObject *__pyx_n_s_pop;
  1176. static PyObject *__pyx_n_s_pos;
  1177. static PyObject *__pyx_n_s_pyx_PickleError;
  1178. static PyObject *__pyx_n_s_pyx_checksum;
  1179. static PyObject *__pyx_n_s_pyx_result;
  1180. static PyObject *__pyx_n_s_pyx_state;
  1181. static PyObject *__pyx_n_s_pyx_type;
  1182. static PyObject *__pyx_n_s_pyx_unpickle_FrozenList;
  1183. static PyObject *__pyx_n_s_pyx_vtable;
  1184. static PyObject *__pyx_n_s_reduce;
  1185. static PyObject *__pyx_n_s_reduce_cython;
  1186. static PyObject *__pyx_n_s_reduce_ex;
  1187. static PyObject *__pyx_n_s_register;
  1188. static PyObject *__pyx_n_s_remove;
  1189. static PyObject *__pyx_n_s_reversed;
  1190. static PyObject *__pyx_n_s_setstate;
  1191. static PyObject *__pyx_n_s_setstate_cython;
  1192. static PyObject *__pyx_kp_s_stringsource;
  1193. static PyObject *__pyx_n_s_test;
  1194. static PyObject *__pyx_n_s_update;
  1195. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList___init__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_items); /* proto */
  1196. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_2freeze(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1197. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_4__getitem__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
  1198. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_6__setitem__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
  1199. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_8__delitem__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
  1200. static Py_ssize_t __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_10__len__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1201. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_12__iter__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1202. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_14__reversed__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1203. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_16__richcmp__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op); /* proto */
  1204. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_18insert(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_item); /* proto */
  1205. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_20__contains__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
  1206. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_22__iadd__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_items); /* proto */
  1207. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_24index(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
  1208. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_26remove(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
  1209. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_28clear(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1210. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_30extend(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_items); /* proto */
  1211. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_32reverse(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1212. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_34pop(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
  1213. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_36append(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
  1214. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_38count(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
  1215. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_40__repr__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1216. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_6frozen___get__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1217. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_42__reduce_cython__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self); /* proto */
  1218. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_44__setstate_cython__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
  1219. static PyObject *__pyx_pf_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
  1220. static PyObject *__pyx_tp_new_7aiohttp_11_frozenlist_FrozenList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  1221. static PyObject *__pyx_int_0;
  1222. static PyObject *__pyx_int_1;
  1223. static PyObject *__pyx_int_2;
  1224. static PyObject *__pyx_int_3;
  1225. static PyObject *__pyx_int_4;
  1226. static PyObject *__pyx_int_5;
  1227. static PyObject *__pyx_int_155820355;
  1228. static PyObject *__pyx_int_neg_1;
  1229. static PyObject *__pyx_tuple_;
  1230. static PyObject *__pyx_tuple__2;
  1231. static PyObject *__pyx_codeobj__3;
  1232. /* Late includes */
  1233. /* "aiohttp/_frozenlist.pyx":9
  1234. * cdef list _items
  1235. *
  1236. * def __init__(self, items=None): # <<<<<<<<<<<<<<
  1237. * self.frozen = False
  1238. * if items is not None:
  1239. */
  1240. /* Python wrapper */
  1241. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  1242. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  1243. PyObject *__pyx_v_items = 0;
  1244. int __pyx_r;
  1245. __Pyx_RefNannyDeclarations
  1246. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  1247. {
  1248. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_items,0};
  1249. PyObject* values[1] = {0};
  1250. values[0] = ((PyObject *)Py_None);
  1251. if (unlikely(__pyx_kwds)) {
  1252. Py_ssize_t kw_args;
  1253. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  1254. switch (pos_args) {
  1255. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  1256. CYTHON_FALLTHROUGH;
  1257. case 0: break;
  1258. default: goto __pyx_L5_argtuple_error;
  1259. }
  1260. kw_args = PyDict_Size(__pyx_kwds);
  1261. switch (pos_args) {
  1262. case 0:
  1263. if (kw_args > 0) {
  1264. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_items);
  1265. if (value) { values[0] = value; kw_args--; }
  1266. }
  1267. }
  1268. if (unlikely(kw_args > 0)) {
  1269. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 9, __pyx_L3_error)
  1270. }
  1271. } else {
  1272. switch (PyTuple_GET_SIZE(__pyx_args)) {
  1273. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  1274. CYTHON_FALLTHROUGH;
  1275. case 0: break;
  1276. default: goto __pyx_L5_argtuple_error;
  1277. }
  1278. }
  1279. __pyx_v_items = values[0];
  1280. }
  1281. goto __pyx_L4_argument_unpacking_done;
  1282. __pyx_L5_argtuple_error:;
  1283. __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 9, __pyx_L3_error)
  1284. __pyx_L3_error:;
  1285. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1286. __Pyx_RefNannyFinishContext();
  1287. return -1;
  1288. __pyx_L4_argument_unpacking_done:;
  1289. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList___init__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), __pyx_v_items);
  1290. /* function exit code */
  1291. __Pyx_RefNannyFinishContext();
  1292. return __pyx_r;
  1293. }
  1294. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList___init__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_items) {
  1295. int __pyx_r;
  1296. __Pyx_RefNannyDeclarations
  1297. int __pyx_t_1;
  1298. int __pyx_t_2;
  1299. PyObject *__pyx_t_3 = NULL;
  1300. __Pyx_RefNannySetupContext("__init__", 0);
  1301. __Pyx_INCREF(__pyx_v_items);
  1302. /* "aiohttp/_frozenlist.pyx":10
  1303. *
  1304. * def __init__(self, items=None):
  1305. * self.frozen = False # <<<<<<<<<<<<<<
  1306. * if items is not None:
  1307. * items = list(items)
  1308. */
  1309. __pyx_v_self->frozen = 0;
  1310. /* "aiohttp/_frozenlist.pyx":11
  1311. * def __init__(self, items=None):
  1312. * self.frozen = False
  1313. * if items is not None: # <<<<<<<<<<<<<<
  1314. * items = list(items)
  1315. * else:
  1316. */
  1317. __pyx_t_1 = (__pyx_v_items != Py_None);
  1318. __pyx_t_2 = (__pyx_t_1 != 0);
  1319. if (__pyx_t_2) {
  1320. /* "aiohttp/_frozenlist.pyx":12
  1321. * self.frozen = False
  1322. * if items is not None:
  1323. * items = list(items) # <<<<<<<<<<<<<<
  1324. * else:
  1325. * items = []
  1326. */
  1327. __pyx_t_3 = PySequence_List(__pyx_v_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  1328. __Pyx_GOTREF(__pyx_t_3);
  1329. __Pyx_DECREF_SET(__pyx_v_items, __pyx_t_3);
  1330. __pyx_t_3 = 0;
  1331. /* "aiohttp/_frozenlist.pyx":11
  1332. * def __init__(self, items=None):
  1333. * self.frozen = False
  1334. * if items is not None: # <<<<<<<<<<<<<<
  1335. * items = list(items)
  1336. * else:
  1337. */
  1338. goto __pyx_L3;
  1339. }
  1340. /* "aiohttp/_frozenlist.pyx":14
  1341. * items = list(items)
  1342. * else:
  1343. * items = [] # <<<<<<<<<<<<<<
  1344. * self._items = items
  1345. *
  1346. */
  1347. /*else*/ {
  1348. __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
  1349. __Pyx_GOTREF(__pyx_t_3);
  1350. __Pyx_DECREF_SET(__pyx_v_items, __pyx_t_3);
  1351. __pyx_t_3 = 0;
  1352. }
  1353. __pyx_L3:;
  1354. /* "aiohttp/_frozenlist.pyx":15
  1355. * else:
  1356. * items = []
  1357. * self._items = items # <<<<<<<<<<<<<<
  1358. *
  1359. * cdef object _check_frozen(self):
  1360. */
  1361. if (!(likely(PyList_CheckExact(__pyx_v_items))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_items)->tp_name), 0))) __PYX_ERR(0, 15, __pyx_L1_error)
  1362. __pyx_t_3 = __pyx_v_items;
  1363. __Pyx_INCREF(__pyx_t_3);
  1364. __Pyx_GIVEREF(__pyx_t_3);
  1365. __Pyx_GOTREF(__pyx_v_self->_items);
  1366. __Pyx_DECREF(__pyx_v_self->_items);
  1367. __pyx_v_self->_items = ((PyObject*)__pyx_t_3);
  1368. __pyx_t_3 = 0;
  1369. /* "aiohttp/_frozenlist.pyx":9
  1370. * cdef list _items
  1371. *
  1372. * def __init__(self, items=None): # <<<<<<<<<<<<<<
  1373. * self.frozen = False
  1374. * if items is not None:
  1375. */
  1376. /* function exit code */
  1377. __pyx_r = 0;
  1378. goto __pyx_L0;
  1379. __pyx_L1_error:;
  1380. __Pyx_XDECREF(__pyx_t_3);
  1381. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1382. __pyx_r = -1;
  1383. __pyx_L0:;
  1384. __Pyx_XDECREF(__pyx_v_items);
  1385. __Pyx_RefNannyFinishContext();
  1386. return __pyx_r;
  1387. }
  1388. /* "aiohttp/_frozenlist.pyx":17
  1389. * self._items = items
  1390. *
  1391. * cdef object _check_frozen(self): # <<<<<<<<<<<<<<
  1392. * if self.frozen:
  1393. * raise RuntimeError("Cannot modify frozen list.")
  1394. */
  1395. static PyObject *__pyx_f_7aiohttp_11_frozenlist_10FrozenList__check_frozen(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  1396. PyObject *__pyx_r = NULL;
  1397. __Pyx_RefNannyDeclarations
  1398. int __pyx_t_1;
  1399. PyObject *__pyx_t_2 = NULL;
  1400. __Pyx_RefNannySetupContext("_check_frozen", 0);
  1401. /* "aiohttp/_frozenlist.pyx":18
  1402. *
  1403. * cdef object _check_frozen(self):
  1404. * if self.frozen: # <<<<<<<<<<<<<<
  1405. * raise RuntimeError("Cannot modify frozen list.")
  1406. *
  1407. */
  1408. __pyx_t_1 = (__pyx_v_self->frozen != 0);
  1409. if (unlikely(__pyx_t_1)) {
  1410. /* "aiohttp/_frozenlist.pyx":19
  1411. * cdef object _check_frozen(self):
  1412. * if self.frozen:
  1413. * raise RuntimeError("Cannot modify frozen list.") # <<<<<<<<<<<<<<
  1414. *
  1415. * cdef inline object _fast_len(self):
  1416. */
  1417. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  1418. __Pyx_GOTREF(__pyx_t_2);
  1419. __Pyx_Raise(__pyx_t_2, 0, 0, 0);
  1420. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1421. __PYX_ERR(0, 19, __pyx_L1_error)
  1422. /* "aiohttp/_frozenlist.pyx":18
  1423. *
  1424. * cdef object _check_frozen(self):
  1425. * if self.frozen: # <<<<<<<<<<<<<<
  1426. * raise RuntimeError("Cannot modify frozen list.")
  1427. *
  1428. */
  1429. }
  1430. /* "aiohttp/_frozenlist.pyx":17
  1431. * self._items = items
  1432. *
  1433. * cdef object _check_frozen(self): # <<<<<<<<<<<<<<
  1434. * if self.frozen:
  1435. * raise RuntimeError("Cannot modify frozen list.")
  1436. */
  1437. /* function exit code */
  1438. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  1439. goto __pyx_L0;
  1440. __pyx_L1_error:;
  1441. __Pyx_XDECREF(__pyx_t_2);
  1442. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList._check_frozen", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1443. __pyx_r = 0;
  1444. __pyx_L0:;
  1445. __Pyx_XGIVEREF(__pyx_r);
  1446. __Pyx_RefNannyFinishContext();
  1447. return __pyx_r;
  1448. }
  1449. /* "aiohttp/_frozenlist.pyx":21
  1450. * raise RuntimeError("Cannot modify frozen list.")
  1451. *
  1452. * cdef inline object _fast_len(self): # <<<<<<<<<<<<<<
  1453. * return len(self._items)
  1454. *
  1455. */
  1456. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_11_frozenlist_10FrozenList__fast_len(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  1457. PyObject *__pyx_r = NULL;
  1458. __Pyx_RefNannyDeclarations
  1459. PyObject *__pyx_t_1 = NULL;
  1460. Py_ssize_t __pyx_t_2;
  1461. __Pyx_RefNannySetupContext("_fast_len", 0);
  1462. /* "aiohttp/_frozenlist.pyx":22
  1463. *
  1464. * cdef inline object _fast_len(self):
  1465. * return len(self._items) # <<<<<<<<<<<<<<
  1466. *
  1467. * def freeze(self):
  1468. */
  1469. __Pyx_XDECREF(__pyx_r);
  1470. __pyx_t_1 = __pyx_v_self->_items;
  1471. __Pyx_INCREF(__pyx_t_1);
  1472. if (unlikely(__pyx_t_1 == Py_None)) {
  1473. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  1474. __PYX_ERR(0, 22, __pyx_L1_error)
  1475. }
  1476. __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 22, __pyx_L1_error)
  1477. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1478. __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  1479. __Pyx_GOTREF(__pyx_t_1);
  1480. __pyx_r = __pyx_t_1;
  1481. __pyx_t_1 = 0;
  1482. goto __pyx_L0;
  1483. /* "aiohttp/_frozenlist.pyx":21
  1484. * raise RuntimeError("Cannot modify frozen list.")
  1485. *
  1486. * cdef inline object _fast_len(self): # <<<<<<<<<<<<<<
  1487. * return len(self._items)
  1488. *
  1489. */
  1490. /* function exit code */
  1491. __pyx_L1_error:;
  1492. __Pyx_XDECREF(__pyx_t_1);
  1493. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList._fast_len", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1494. __pyx_r = 0;
  1495. __pyx_L0:;
  1496. __Pyx_XGIVEREF(__pyx_r);
  1497. __Pyx_RefNannyFinishContext();
  1498. return __pyx_r;
  1499. }
  1500. /* "aiohttp/_frozenlist.pyx":24
  1501. * return len(self._items)
  1502. *
  1503. * def freeze(self): # <<<<<<<<<<<<<<
  1504. * self.frozen = True
  1505. *
  1506. */
  1507. /* Python wrapper */
  1508. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_3freeze(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  1509. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_3freeze(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  1510. PyObject *__pyx_r = 0;
  1511. __Pyx_RefNannyDeclarations
  1512. __Pyx_RefNannySetupContext("freeze (wrapper)", 0);
  1513. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_2freeze(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  1514. /* function exit code */
  1515. __Pyx_RefNannyFinishContext();
  1516. return __pyx_r;
  1517. }
  1518. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_2freeze(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  1519. PyObject *__pyx_r = NULL;
  1520. __Pyx_RefNannyDeclarations
  1521. __Pyx_RefNannySetupContext("freeze", 0);
  1522. /* "aiohttp/_frozenlist.pyx":25
  1523. *
  1524. * def freeze(self):
  1525. * self.frozen = True # <<<<<<<<<<<<<<
  1526. *
  1527. * def __getitem__(self, index):
  1528. */
  1529. __pyx_v_self->frozen = 1;
  1530. /* "aiohttp/_frozenlist.pyx":24
  1531. * return len(self._items)
  1532. *
  1533. * def freeze(self): # <<<<<<<<<<<<<<
  1534. * self.frozen = True
  1535. *
  1536. */
  1537. /* function exit code */
  1538. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  1539. __Pyx_XGIVEREF(__pyx_r);
  1540. __Pyx_RefNannyFinishContext();
  1541. return __pyx_r;
  1542. }
  1543. /* "aiohttp/_frozenlist.pyx":27
  1544. * self.frozen = True
  1545. *
  1546. * def __getitem__(self, index): # <<<<<<<<<<<<<<
  1547. * return self._items[index]
  1548. *
  1549. */
  1550. /* Python wrapper */
  1551. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
  1552. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  1553. PyObject *__pyx_r = 0;
  1554. __Pyx_RefNannyDeclarations
  1555. __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  1556. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_4__getitem__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_index));
  1557. /* function exit code */
  1558. __Pyx_RefNannyFinishContext();
  1559. return __pyx_r;
  1560. }
  1561. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_4__getitem__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index) {
  1562. PyObject *__pyx_r = NULL;
  1563. __Pyx_RefNannyDeclarations
  1564. PyObject *__pyx_t_1 = NULL;
  1565. __Pyx_RefNannySetupContext("__getitem__", 0);
  1566. /* "aiohttp/_frozenlist.pyx":28
  1567. *
  1568. * def __getitem__(self, index):
  1569. * return self._items[index] # <<<<<<<<<<<<<<
  1570. *
  1571. * def __setitem__(self, index, value):
  1572. */
  1573. __Pyx_XDECREF(__pyx_r);
  1574. if (unlikely(__pyx_v_self->_items == Py_None)) {
  1575. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  1576. __PYX_ERR(0, 28, __pyx_L1_error)
  1577. }
  1578. __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->_items, __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  1579. __Pyx_GOTREF(__pyx_t_1);
  1580. __pyx_r = __pyx_t_1;
  1581. __pyx_t_1 = 0;
  1582. goto __pyx_L0;
  1583. /* "aiohttp/_frozenlist.pyx":27
  1584. * self.frozen = True
  1585. *
  1586. * def __getitem__(self, index): # <<<<<<<<<<<<<<
  1587. * return self._items[index]
  1588. *
  1589. */
  1590. /* function exit code */
  1591. __pyx_L1_error:;
  1592. __Pyx_XDECREF(__pyx_t_1);
  1593. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1594. __pyx_r = NULL;
  1595. __pyx_L0:;
  1596. __Pyx_XGIVEREF(__pyx_r);
  1597. __Pyx_RefNannyFinishContext();
  1598. return __pyx_r;
  1599. }
  1600. /* "aiohttp/_frozenlist.pyx":30
  1601. * return self._items[index]
  1602. *
  1603. * def __setitem__(self, index, value): # <<<<<<<<<<<<<<
  1604. * self._check_frozen()
  1605. * self._items[index] = value
  1606. */
  1607. /* Python wrapper */
  1608. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
  1609. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_7__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  1610. int __pyx_r;
  1611. __Pyx_RefNannyDeclarations
  1612. __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  1613. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_6__setitem__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
  1614. /* function exit code */
  1615. __Pyx_RefNannyFinishContext();
  1616. return __pyx_r;
  1617. }
  1618. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_6__setitem__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  1619. int __pyx_r;
  1620. __Pyx_RefNannyDeclarations
  1621. PyObject *__pyx_t_1 = NULL;
  1622. __Pyx_RefNannySetupContext("__setitem__", 0);
  1623. /* "aiohttp/_frozenlist.pyx":31
  1624. *
  1625. * def __setitem__(self, index, value):
  1626. * self._check_frozen() # <<<<<<<<<<<<<<
  1627. * self._items[index] = value
  1628. *
  1629. */
  1630. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  1631. __Pyx_GOTREF(__pyx_t_1);
  1632. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1633. /* "aiohttp/_frozenlist.pyx":32
  1634. * def __setitem__(self, index, value):
  1635. * self._check_frozen()
  1636. * self._items[index] = value # <<<<<<<<<<<<<<
  1637. *
  1638. * def __delitem__(self, index):
  1639. */
  1640. if (unlikely(__pyx_v_self->_items == Py_None)) {
  1641. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  1642. __PYX_ERR(0, 32, __pyx_L1_error)
  1643. }
  1644. if (unlikely(PyObject_SetItem(__pyx_v_self->_items, __pyx_v_index, __pyx_v_value) < 0)) __PYX_ERR(0, 32, __pyx_L1_error)
  1645. /* "aiohttp/_frozenlist.pyx":30
  1646. * return self._items[index]
  1647. *
  1648. * def __setitem__(self, index, value): # <<<<<<<<<<<<<<
  1649. * self._check_frozen()
  1650. * self._items[index] = value
  1651. */
  1652. /* function exit code */
  1653. __pyx_r = 0;
  1654. goto __pyx_L0;
  1655. __pyx_L1_error:;
  1656. __Pyx_XDECREF(__pyx_t_1);
  1657. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1658. __pyx_r = -1;
  1659. __pyx_L0:;
  1660. __Pyx_RefNannyFinishContext();
  1661. return __pyx_r;
  1662. }
  1663. /* "aiohttp/_frozenlist.pyx":34
  1664. * self._items[index] = value
  1665. *
  1666. * def __delitem__(self, index): # <<<<<<<<<<<<<<
  1667. * self._check_frozen()
  1668. * del self._items[index]
  1669. */
  1670. /* Python wrapper */
  1671. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_9__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
  1672. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_9__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  1673. int __pyx_r;
  1674. __Pyx_RefNannyDeclarations
  1675. __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  1676. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_8__delitem__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_index));
  1677. /* function exit code */
  1678. __Pyx_RefNannyFinishContext();
  1679. return __pyx_r;
  1680. }
  1681. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_8__delitem__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index) {
  1682. int __pyx_r;
  1683. __Pyx_RefNannyDeclarations
  1684. PyObject *__pyx_t_1 = NULL;
  1685. __Pyx_RefNannySetupContext("__delitem__", 0);
  1686. /* "aiohttp/_frozenlist.pyx":35
  1687. *
  1688. * def __delitem__(self, index):
  1689. * self._check_frozen() # <<<<<<<<<<<<<<
  1690. * del self._items[index]
  1691. *
  1692. */
  1693. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
  1694. __Pyx_GOTREF(__pyx_t_1);
  1695. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1696. /* "aiohttp/_frozenlist.pyx":36
  1697. * def __delitem__(self, index):
  1698. * self._check_frozen()
  1699. * del self._items[index] # <<<<<<<<<<<<<<
  1700. *
  1701. * def __len__(self):
  1702. */
  1703. if (unlikely(__pyx_v_self->_items == Py_None)) {
  1704. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  1705. __PYX_ERR(0, 36, __pyx_L1_error)
  1706. }
  1707. if (unlikely(PyObject_DelItem(__pyx_v_self->_items, __pyx_v_index) < 0)) __PYX_ERR(0, 36, __pyx_L1_error)
  1708. /* "aiohttp/_frozenlist.pyx":34
  1709. * self._items[index] = value
  1710. *
  1711. * def __delitem__(self, index): # <<<<<<<<<<<<<<
  1712. * self._check_frozen()
  1713. * del self._items[index]
  1714. */
  1715. /* function exit code */
  1716. __pyx_r = 0;
  1717. goto __pyx_L0;
  1718. __pyx_L1_error:;
  1719. __Pyx_XDECREF(__pyx_t_1);
  1720. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1721. __pyx_r = -1;
  1722. __pyx_L0:;
  1723. __Pyx_RefNannyFinishContext();
  1724. return __pyx_r;
  1725. }
  1726. /* "aiohttp/_frozenlist.pyx":38
  1727. * del self._items[index]
  1728. *
  1729. * def __len__(self): # <<<<<<<<<<<<<<
  1730. * return self._fast_len()
  1731. *
  1732. */
  1733. /* Python wrapper */
  1734. static Py_ssize_t __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_11__len__(PyObject *__pyx_v_self); /*proto*/
  1735. static Py_ssize_t __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_11__len__(PyObject *__pyx_v_self) {
  1736. Py_ssize_t __pyx_r;
  1737. __Pyx_RefNannyDeclarations
  1738. __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  1739. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_10__len__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  1740. /* function exit code */
  1741. __Pyx_RefNannyFinishContext();
  1742. return __pyx_r;
  1743. }
  1744. static Py_ssize_t __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_10__len__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  1745. Py_ssize_t __pyx_r;
  1746. __Pyx_RefNannyDeclarations
  1747. PyObject *__pyx_t_1 = NULL;
  1748. Py_ssize_t __pyx_t_2;
  1749. __Pyx_RefNannySetupContext("__len__", 0);
  1750. /* "aiohttp/_frozenlist.pyx":39
  1751. *
  1752. * def __len__(self):
  1753. * return self._fast_len() # <<<<<<<<<<<<<<
  1754. *
  1755. * def __iter__(self):
  1756. */
  1757. __pyx_t_1 = __pyx_f_7aiohttp_11_frozenlist_10FrozenList__fast_len(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
  1758. __Pyx_GOTREF(__pyx_t_1);
  1759. __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 39, __pyx_L1_error)
  1760. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1761. __pyx_r = __pyx_t_2;
  1762. goto __pyx_L0;
  1763. /* "aiohttp/_frozenlist.pyx":38
  1764. * del self._items[index]
  1765. *
  1766. * def __len__(self): # <<<<<<<<<<<<<<
  1767. * return self._fast_len()
  1768. *
  1769. */
  1770. /* function exit code */
  1771. __pyx_L1_error:;
  1772. __Pyx_XDECREF(__pyx_t_1);
  1773. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1774. __pyx_r = -1;
  1775. __pyx_L0:;
  1776. __Pyx_RefNannyFinishContext();
  1777. return __pyx_r;
  1778. }
  1779. /* "aiohttp/_frozenlist.pyx":41
  1780. * return self._fast_len()
  1781. *
  1782. * def __iter__(self): # <<<<<<<<<<<<<<
  1783. * return self._items.__iter__()
  1784. *
  1785. */
  1786. /* Python wrapper */
  1787. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_13__iter__(PyObject *__pyx_v_self); /*proto*/
  1788. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_13__iter__(PyObject *__pyx_v_self) {
  1789. PyObject *__pyx_r = 0;
  1790. __Pyx_RefNannyDeclarations
  1791. __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  1792. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_12__iter__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  1793. /* function exit code */
  1794. __Pyx_RefNannyFinishContext();
  1795. return __pyx_r;
  1796. }
  1797. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_12__iter__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  1798. PyObject *__pyx_r = NULL;
  1799. __Pyx_RefNannyDeclarations
  1800. PyObject *__pyx_t_1 = NULL;
  1801. PyObject *__pyx_t_2 = NULL;
  1802. PyObject *__pyx_t_3 = NULL;
  1803. __Pyx_RefNannySetupContext("__iter__", 0);
  1804. /* "aiohttp/_frozenlist.pyx":42
  1805. *
  1806. * def __iter__(self):
  1807. * return self._items.__iter__() # <<<<<<<<<<<<<<
  1808. *
  1809. * def __reversed__(self):
  1810. */
  1811. __Pyx_XDECREF(__pyx_r);
  1812. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_items, __pyx_n_s_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  1813. __Pyx_GOTREF(__pyx_t_2);
  1814. __pyx_t_3 = NULL;
  1815. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  1816. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  1817. if (likely(__pyx_t_3)) {
  1818. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  1819. __Pyx_INCREF(__pyx_t_3);
  1820. __Pyx_INCREF(function);
  1821. __Pyx_DECREF_SET(__pyx_t_2, function);
  1822. }
  1823. }
  1824. if (__pyx_t_3) {
  1825. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  1826. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1827. } else {
  1828. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  1829. }
  1830. __Pyx_GOTREF(__pyx_t_1);
  1831. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1832. __pyx_r = __pyx_t_1;
  1833. __pyx_t_1 = 0;
  1834. goto __pyx_L0;
  1835. /* "aiohttp/_frozenlist.pyx":41
  1836. * return self._fast_len()
  1837. *
  1838. * def __iter__(self): # <<<<<<<<<<<<<<
  1839. * return self._items.__iter__()
  1840. *
  1841. */
  1842. /* function exit code */
  1843. __pyx_L1_error:;
  1844. __Pyx_XDECREF(__pyx_t_1);
  1845. __Pyx_XDECREF(__pyx_t_2);
  1846. __Pyx_XDECREF(__pyx_t_3);
  1847. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1848. __pyx_r = NULL;
  1849. __pyx_L0:;
  1850. __Pyx_XGIVEREF(__pyx_r);
  1851. __Pyx_RefNannyFinishContext();
  1852. return __pyx_r;
  1853. }
  1854. /* "aiohttp/_frozenlist.pyx":44
  1855. * return self._items.__iter__()
  1856. *
  1857. * def __reversed__(self): # <<<<<<<<<<<<<<
  1858. * return self._items.__reversed__()
  1859. *
  1860. */
  1861. /* Python wrapper */
  1862. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_15__reversed__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  1863. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_15__reversed__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  1864. PyObject *__pyx_r = 0;
  1865. __Pyx_RefNannyDeclarations
  1866. __Pyx_RefNannySetupContext("__reversed__ (wrapper)", 0);
  1867. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_14__reversed__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  1868. /* function exit code */
  1869. __Pyx_RefNannyFinishContext();
  1870. return __pyx_r;
  1871. }
  1872. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_14__reversed__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  1873. PyObject *__pyx_r = NULL;
  1874. __Pyx_RefNannyDeclarations
  1875. PyObject *__pyx_t_1 = NULL;
  1876. PyObject *__pyx_t_2 = NULL;
  1877. PyObject *__pyx_t_3 = NULL;
  1878. __Pyx_RefNannySetupContext("__reversed__", 0);
  1879. /* "aiohttp/_frozenlist.pyx":45
  1880. *
  1881. * def __reversed__(self):
  1882. * return self._items.__reversed__() # <<<<<<<<<<<<<<
  1883. *
  1884. * def __richcmp__(self, other, op):
  1885. */
  1886. __Pyx_XDECREF(__pyx_r);
  1887. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_items, __pyx_n_s_reversed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  1888. __Pyx_GOTREF(__pyx_t_2);
  1889. __pyx_t_3 = NULL;
  1890. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  1891. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  1892. if (likely(__pyx_t_3)) {
  1893. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  1894. __Pyx_INCREF(__pyx_t_3);
  1895. __Pyx_INCREF(function);
  1896. __Pyx_DECREF_SET(__pyx_t_2, function);
  1897. }
  1898. }
  1899. if (__pyx_t_3) {
  1900. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  1901. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  1902. } else {
  1903. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  1904. }
  1905. __Pyx_GOTREF(__pyx_t_1);
  1906. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  1907. __pyx_r = __pyx_t_1;
  1908. __pyx_t_1 = 0;
  1909. goto __pyx_L0;
  1910. /* "aiohttp/_frozenlist.pyx":44
  1911. * return self._items.__iter__()
  1912. *
  1913. * def __reversed__(self): # <<<<<<<<<<<<<<
  1914. * return self._items.__reversed__()
  1915. *
  1916. */
  1917. /* function exit code */
  1918. __pyx_L1_error:;
  1919. __Pyx_XDECREF(__pyx_t_1);
  1920. __Pyx_XDECREF(__pyx_t_2);
  1921. __Pyx_XDECREF(__pyx_t_3);
  1922. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__reversed__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1923. __pyx_r = NULL;
  1924. __pyx_L0:;
  1925. __Pyx_XGIVEREF(__pyx_r);
  1926. __Pyx_RefNannyFinishContext();
  1927. return __pyx_r;
  1928. }
  1929. /* "aiohttp/_frozenlist.pyx":47
  1930. * return self._items.__reversed__()
  1931. *
  1932. * def __richcmp__(self, other, op): # <<<<<<<<<<<<<<
  1933. * if op == 0: # <
  1934. * return list(self) < other
  1935. */
  1936. /* Python wrapper */
  1937. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_17__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/
  1938. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_17__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) {
  1939. PyObject *__pyx_v_op = 0;
  1940. PyObject *__pyx_r = 0;
  1941. __Pyx_RefNannyDeclarations
  1942. __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0);
  1943. __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) __PYX_ERR(0, 47, __pyx_L3_error)
  1944. __Pyx_GOTREF(__pyx_v_op);
  1945. goto __pyx_L4_argument_unpacking_done;
  1946. __pyx_L3_error:;
  1947. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  1948. __Pyx_RefNannyFinishContext();
  1949. return NULL;
  1950. __pyx_L4_argument_unpacking_done:;
  1951. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_16__richcmp__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_op));
  1952. /* function exit code */
  1953. __Pyx_XDECREF(__pyx_v_op);
  1954. __Pyx_RefNannyFinishContext();
  1955. return __pyx_r;
  1956. }
  1957. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_16__richcmp__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op) {
  1958. PyObject *__pyx_r = NULL;
  1959. __Pyx_RefNannyDeclarations
  1960. PyObject *__pyx_t_1 = NULL;
  1961. int __pyx_t_2;
  1962. PyObject *__pyx_t_3 = NULL;
  1963. __Pyx_RefNannySetupContext("__richcmp__", 0);
  1964. /* "aiohttp/_frozenlist.pyx":48
  1965. *
  1966. * def __richcmp__(self, other, op):
  1967. * if op == 0: # < # <<<<<<<<<<<<<<
  1968. * return list(self) < other
  1969. * if op == 1: # <=
  1970. */
  1971. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
  1972. __Pyx_GOTREF(__pyx_t_1);
  1973. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 48, __pyx_L1_error)
  1974. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1975. if (__pyx_t_2) {
  1976. /* "aiohttp/_frozenlist.pyx":49
  1977. * def __richcmp__(self, other, op):
  1978. * if op == 0: # <
  1979. * return list(self) < other # <<<<<<<<<<<<<<
  1980. * if op == 1: # <=
  1981. * return list(self) <= other
  1982. */
  1983. __Pyx_XDECREF(__pyx_r);
  1984. __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
  1985. __Pyx_GOTREF(__pyx_t_1);
  1986. __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_other, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error)
  1987. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  1988. __pyx_r = __pyx_t_3;
  1989. __pyx_t_3 = 0;
  1990. goto __pyx_L0;
  1991. /* "aiohttp/_frozenlist.pyx":48
  1992. *
  1993. * def __richcmp__(self, other, op):
  1994. * if op == 0: # < # <<<<<<<<<<<<<<
  1995. * return list(self) < other
  1996. * if op == 1: # <=
  1997. */
  1998. }
  1999. /* "aiohttp/_frozenlist.pyx":50
  2000. * if op == 0: # <
  2001. * return list(self) < other
  2002. * if op == 1: # <= # <<<<<<<<<<<<<<
  2003. * return list(self) <= other
  2004. * if op == 2: # ==
  2005. */
  2006. __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error)
  2007. __Pyx_GOTREF(__pyx_t_3);
  2008. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 50, __pyx_L1_error)
  2009. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2010. if (__pyx_t_2) {
  2011. /* "aiohttp/_frozenlist.pyx":51
  2012. * return list(self) < other
  2013. * if op == 1: # <=
  2014. * return list(self) <= other # <<<<<<<<<<<<<<
  2015. * if op == 2: # ==
  2016. * return list(self) == other
  2017. */
  2018. __Pyx_XDECREF(__pyx_r);
  2019. __pyx_t_3 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)
  2020. __Pyx_GOTREF(__pyx_t_3);
  2021. __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_other, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
  2022. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2023. __pyx_r = __pyx_t_1;
  2024. __pyx_t_1 = 0;
  2025. goto __pyx_L0;
  2026. /* "aiohttp/_frozenlist.pyx":50
  2027. * if op == 0: # <
  2028. * return list(self) < other
  2029. * if op == 1: # <= # <<<<<<<<<<<<<<
  2030. * return list(self) <= other
  2031. * if op == 2: # ==
  2032. */
  2033. }
  2034. /* "aiohttp/_frozenlist.pyx":52
  2035. * if op == 1: # <=
  2036. * return list(self) <= other
  2037. * if op == 2: # == # <<<<<<<<<<<<<<
  2038. * return list(self) == other
  2039. * if op == 3: # !=
  2040. */
  2041. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  2042. __Pyx_GOTREF(__pyx_t_1);
  2043. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 52, __pyx_L1_error)
  2044. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2045. if (__pyx_t_2) {
  2046. /* "aiohttp/_frozenlist.pyx":53
  2047. * return list(self) <= other
  2048. * if op == 2: # ==
  2049. * return list(self) == other # <<<<<<<<<<<<<<
  2050. * if op == 3: # !=
  2051. * return list(self) != other
  2052. */
  2053. __Pyx_XDECREF(__pyx_r);
  2054. __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
  2055. __Pyx_GOTREF(__pyx_t_1);
  2056. __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_other, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
  2057. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2058. __pyx_r = __pyx_t_3;
  2059. __pyx_t_3 = 0;
  2060. goto __pyx_L0;
  2061. /* "aiohttp/_frozenlist.pyx":52
  2062. * if op == 1: # <=
  2063. * return list(self) <= other
  2064. * if op == 2: # == # <<<<<<<<<<<<<<
  2065. * return list(self) == other
  2066. * if op == 3: # !=
  2067. */
  2068. }
  2069. /* "aiohttp/_frozenlist.pyx":54
  2070. * if op == 2: # ==
  2071. * return list(self) == other
  2072. * if op == 3: # != # <<<<<<<<<<<<<<
  2073. * return list(self) != other
  2074. * if op == 4: # >
  2075. */
  2076. __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
  2077. __Pyx_GOTREF(__pyx_t_3);
  2078. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 54, __pyx_L1_error)
  2079. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2080. if (__pyx_t_2) {
  2081. /* "aiohttp/_frozenlist.pyx":55
  2082. * return list(self) == other
  2083. * if op == 3: # !=
  2084. * return list(self) != other # <<<<<<<<<<<<<<
  2085. * if op == 4: # >
  2086. * return list(self) > other
  2087. */
  2088. __Pyx_XDECREF(__pyx_r);
  2089. __pyx_t_3 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
  2090. __Pyx_GOTREF(__pyx_t_3);
  2091. __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_other, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
  2092. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2093. __pyx_r = __pyx_t_1;
  2094. __pyx_t_1 = 0;
  2095. goto __pyx_L0;
  2096. /* "aiohttp/_frozenlist.pyx":54
  2097. * if op == 2: # ==
  2098. * return list(self) == other
  2099. * if op == 3: # != # <<<<<<<<<<<<<<
  2100. * return list(self) != other
  2101. * if op == 4: # >
  2102. */
  2103. }
  2104. /* "aiohttp/_frozenlist.pyx":56
  2105. * if op == 3: # !=
  2106. * return list(self) != other
  2107. * if op == 4: # > # <<<<<<<<<<<<<<
  2108. * return list(self) > other
  2109. * if op == 5: # =>
  2110. */
  2111. __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_4, 4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
  2112. __Pyx_GOTREF(__pyx_t_1);
  2113. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 56, __pyx_L1_error)
  2114. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2115. if (__pyx_t_2) {
  2116. /* "aiohttp/_frozenlist.pyx":57
  2117. * return list(self) != other
  2118. * if op == 4: # >
  2119. * return list(self) > other # <<<<<<<<<<<<<<
  2120. * if op == 5: # =>
  2121. * return list(self) >= other
  2122. */
  2123. __Pyx_XDECREF(__pyx_r);
  2124. __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
  2125. __Pyx_GOTREF(__pyx_t_1);
  2126. __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_v_other, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 57, __pyx_L1_error)
  2127. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2128. __pyx_r = __pyx_t_3;
  2129. __pyx_t_3 = 0;
  2130. goto __pyx_L0;
  2131. /* "aiohttp/_frozenlist.pyx":56
  2132. * if op == 3: # !=
  2133. * return list(self) != other
  2134. * if op == 4: # > # <<<<<<<<<<<<<<
  2135. * return list(self) > other
  2136. * if op == 5: # =>
  2137. */
  2138. }
  2139. /* "aiohttp/_frozenlist.pyx":58
  2140. * if op == 4: # >
  2141. * return list(self) > other
  2142. * if op == 5: # => # <<<<<<<<<<<<<<
  2143. * return list(self) >= other
  2144. *
  2145. */
  2146. __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_op, __pyx_int_5, 5, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error)
  2147. __Pyx_GOTREF(__pyx_t_3);
  2148. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 58, __pyx_L1_error)
  2149. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2150. if (__pyx_t_2) {
  2151. /* "aiohttp/_frozenlist.pyx":59
  2152. * return list(self) > other
  2153. * if op == 5: # =>
  2154. * return list(self) >= other # <<<<<<<<<<<<<<
  2155. *
  2156. * def insert(self, pos, item):
  2157. */
  2158. __Pyx_XDECREF(__pyx_r);
  2159. __pyx_t_3 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
  2160. __Pyx_GOTREF(__pyx_t_3);
  2161. __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_other, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
  2162. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2163. __pyx_r = __pyx_t_1;
  2164. __pyx_t_1 = 0;
  2165. goto __pyx_L0;
  2166. /* "aiohttp/_frozenlist.pyx":58
  2167. * if op == 4: # >
  2168. * return list(self) > other
  2169. * if op == 5: # => # <<<<<<<<<<<<<<
  2170. * return list(self) >= other
  2171. *
  2172. */
  2173. }
  2174. /* "aiohttp/_frozenlist.pyx":47
  2175. * return self._items.__reversed__()
  2176. *
  2177. * def __richcmp__(self, other, op): # <<<<<<<<<<<<<<
  2178. * if op == 0: # <
  2179. * return list(self) < other
  2180. */
  2181. /* function exit code */
  2182. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2183. goto __pyx_L0;
  2184. __pyx_L1_error:;
  2185. __Pyx_XDECREF(__pyx_t_1);
  2186. __Pyx_XDECREF(__pyx_t_3);
  2187. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2188. __pyx_r = NULL;
  2189. __pyx_L0:;
  2190. __Pyx_XGIVEREF(__pyx_r);
  2191. __Pyx_RefNannyFinishContext();
  2192. return __pyx_r;
  2193. }
  2194. /* "aiohttp/_frozenlist.pyx":61
  2195. * return list(self) >= other
  2196. *
  2197. * def insert(self, pos, item): # <<<<<<<<<<<<<<
  2198. * self._check_frozen()
  2199. * self._items.insert(pos, item)
  2200. */
  2201. /* Python wrapper */
  2202. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_19insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  2203. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_19insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  2204. PyObject *__pyx_v_pos = 0;
  2205. PyObject *__pyx_v_item = 0;
  2206. PyObject *__pyx_r = 0;
  2207. __Pyx_RefNannyDeclarations
  2208. __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  2209. {
  2210. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pos,&__pyx_n_s_item,0};
  2211. PyObject* values[2] = {0,0};
  2212. if (unlikely(__pyx_kwds)) {
  2213. Py_ssize_t kw_args;
  2214. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  2215. switch (pos_args) {
  2216. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  2217. CYTHON_FALLTHROUGH;
  2218. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  2219. CYTHON_FALLTHROUGH;
  2220. case 0: break;
  2221. default: goto __pyx_L5_argtuple_error;
  2222. }
  2223. kw_args = PyDict_Size(__pyx_kwds);
  2224. switch (pos_args) {
  2225. case 0:
  2226. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--;
  2227. else goto __pyx_L5_argtuple_error;
  2228. CYTHON_FALLTHROUGH;
  2229. case 1:
  2230. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_item)) != 0)) kw_args--;
  2231. else {
  2232. __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(0, 61, __pyx_L3_error)
  2233. }
  2234. }
  2235. if (unlikely(kw_args > 0)) {
  2236. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) __PYX_ERR(0, 61, __pyx_L3_error)
  2237. }
  2238. } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
  2239. goto __pyx_L5_argtuple_error;
  2240. } else {
  2241. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  2242. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  2243. }
  2244. __pyx_v_pos = values[0];
  2245. __pyx_v_item = values[1];
  2246. }
  2247. goto __pyx_L4_argument_unpacking_done;
  2248. __pyx_L5_argtuple_error:;
  2249. __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 61, __pyx_L3_error)
  2250. __pyx_L3_error:;
  2251. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2252. __Pyx_RefNannyFinishContext();
  2253. return NULL;
  2254. __pyx_L4_argument_unpacking_done:;
  2255. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_18insert(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), __pyx_v_pos, __pyx_v_item);
  2256. /* function exit code */
  2257. __Pyx_RefNannyFinishContext();
  2258. return __pyx_r;
  2259. }
  2260. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_18insert(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_pos, PyObject *__pyx_v_item) {
  2261. PyObject *__pyx_r = NULL;
  2262. __Pyx_RefNannyDeclarations
  2263. PyObject *__pyx_t_1 = NULL;
  2264. Py_ssize_t __pyx_t_2;
  2265. int __pyx_t_3;
  2266. __Pyx_RefNannySetupContext("insert", 0);
  2267. /* "aiohttp/_frozenlist.pyx":62
  2268. *
  2269. * def insert(self, pos, item):
  2270. * self._check_frozen() # <<<<<<<<<<<<<<
  2271. * self._items.insert(pos, item)
  2272. *
  2273. */
  2274. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
  2275. __Pyx_GOTREF(__pyx_t_1);
  2276. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2277. /* "aiohttp/_frozenlist.pyx":63
  2278. * def insert(self, pos, item):
  2279. * self._check_frozen()
  2280. * self._items.insert(pos, item) # <<<<<<<<<<<<<<
  2281. *
  2282. * def __contains__(self, item):
  2283. */
  2284. if (unlikely(__pyx_v_self->_items == Py_None)) {
  2285. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert");
  2286. __PYX_ERR(0, 63, __pyx_L1_error)
  2287. }
  2288. __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_pos); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 63, __pyx_L1_error)
  2289. __pyx_t_3 = PyList_Insert(__pyx_v_self->_items, __pyx_t_2, __pyx_v_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 63, __pyx_L1_error)
  2290. /* "aiohttp/_frozenlist.pyx":61
  2291. * return list(self) >= other
  2292. *
  2293. * def insert(self, pos, item): # <<<<<<<<<<<<<<
  2294. * self._check_frozen()
  2295. * self._items.insert(pos, item)
  2296. */
  2297. /* function exit code */
  2298. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2299. goto __pyx_L0;
  2300. __pyx_L1_error:;
  2301. __Pyx_XDECREF(__pyx_t_1);
  2302. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2303. __pyx_r = NULL;
  2304. __pyx_L0:;
  2305. __Pyx_XGIVEREF(__pyx_r);
  2306. __Pyx_RefNannyFinishContext();
  2307. return __pyx_r;
  2308. }
  2309. /* "aiohttp/_frozenlist.pyx":65
  2310. * self._items.insert(pos, item)
  2311. *
  2312. * def __contains__(self, item): # <<<<<<<<<<<<<<
  2313. * return item in self._items
  2314. *
  2315. */
  2316. /* Python wrapper */
  2317. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_21__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  2318. static int __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_21__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  2319. int __pyx_r;
  2320. __Pyx_RefNannyDeclarations
  2321. __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  2322. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_20__contains__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_item));
  2323. /* function exit code */
  2324. __Pyx_RefNannyFinishContext();
  2325. return __pyx_r;
  2326. }
  2327. static int __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_20__contains__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item) {
  2328. int __pyx_r;
  2329. __Pyx_RefNannyDeclarations
  2330. int __pyx_t_1;
  2331. __Pyx_RefNannySetupContext("__contains__", 0);
  2332. /* "aiohttp/_frozenlist.pyx":66
  2333. *
  2334. * def __contains__(self, item):
  2335. * return item in self._items # <<<<<<<<<<<<<<
  2336. *
  2337. * def __iadd__(self, items):
  2338. */
  2339. __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_item, __pyx_v_self->_items, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 66, __pyx_L1_error)
  2340. __pyx_r = __pyx_t_1;
  2341. goto __pyx_L0;
  2342. /* "aiohttp/_frozenlist.pyx":65
  2343. * self._items.insert(pos, item)
  2344. *
  2345. * def __contains__(self, item): # <<<<<<<<<<<<<<
  2346. * return item in self._items
  2347. *
  2348. */
  2349. /* function exit code */
  2350. __pyx_L1_error:;
  2351. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2352. __pyx_r = -1;
  2353. __pyx_L0:;
  2354. __Pyx_RefNannyFinishContext();
  2355. return __pyx_r;
  2356. }
  2357. /* "aiohttp/_frozenlist.pyx":68
  2358. * return item in self._items
  2359. *
  2360. * def __iadd__(self, items): # <<<<<<<<<<<<<<
  2361. * self._check_frozen()
  2362. * self._items += list(items)
  2363. */
  2364. /* Python wrapper */
  2365. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_items); /*proto*/
  2366. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_23__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_items) {
  2367. PyObject *__pyx_r = 0;
  2368. __Pyx_RefNannyDeclarations
  2369. __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
  2370. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_22__iadd__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_items));
  2371. /* function exit code */
  2372. __Pyx_RefNannyFinishContext();
  2373. return __pyx_r;
  2374. }
  2375. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_22__iadd__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_items) {
  2376. PyObject *__pyx_r = NULL;
  2377. __Pyx_RefNannyDeclarations
  2378. PyObject *__pyx_t_1 = NULL;
  2379. PyObject *__pyx_t_2 = NULL;
  2380. __Pyx_RefNannySetupContext("__iadd__", 0);
  2381. /* "aiohttp/_frozenlist.pyx":69
  2382. *
  2383. * def __iadd__(self, items):
  2384. * self._check_frozen() # <<<<<<<<<<<<<<
  2385. * self._items += list(items)
  2386. * return self
  2387. */
  2388. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  2389. __Pyx_GOTREF(__pyx_t_1);
  2390. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2391. /* "aiohttp/_frozenlist.pyx":70
  2392. * def __iadd__(self, items):
  2393. * self._check_frozen()
  2394. * self._items += list(items) # <<<<<<<<<<<<<<
  2395. * return self
  2396. *
  2397. */
  2398. __pyx_t_1 = PySequence_List(__pyx_v_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
  2399. __Pyx_GOTREF(__pyx_t_1);
  2400. __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->_items, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  2401. __Pyx_GOTREF(__pyx_t_2);
  2402. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2403. __Pyx_GIVEREF(__pyx_t_2);
  2404. __Pyx_GOTREF(__pyx_v_self->_items);
  2405. __Pyx_DECREF(__pyx_v_self->_items);
  2406. __pyx_v_self->_items = ((PyObject*)__pyx_t_2);
  2407. __pyx_t_2 = 0;
  2408. /* "aiohttp/_frozenlist.pyx":71
  2409. * self._check_frozen()
  2410. * self._items += list(items)
  2411. * return self # <<<<<<<<<<<<<<
  2412. *
  2413. * def index(self, item):
  2414. */
  2415. __Pyx_XDECREF(__pyx_r);
  2416. __Pyx_INCREF(((PyObject *)__pyx_v_self));
  2417. __pyx_r = ((PyObject *)__pyx_v_self);
  2418. goto __pyx_L0;
  2419. /* "aiohttp/_frozenlist.pyx":68
  2420. * return item in self._items
  2421. *
  2422. * def __iadd__(self, items): # <<<<<<<<<<<<<<
  2423. * self._check_frozen()
  2424. * self._items += list(items)
  2425. */
  2426. /* function exit code */
  2427. __pyx_L1_error:;
  2428. __Pyx_XDECREF(__pyx_t_1);
  2429. __Pyx_XDECREF(__pyx_t_2);
  2430. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2431. __pyx_r = NULL;
  2432. __pyx_L0:;
  2433. __Pyx_XGIVEREF(__pyx_r);
  2434. __Pyx_RefNannyFinishContext();
  2435. return __pyx_r;
  2436. }
  2437. /* "aiohttp/_frozenlist.pyx":73
  2438. * return self
  2439. *
  2440. * def index(self, item): # <<<<<<<<<<<<<<
  2441. * return self._items.index(item)
  2442. *
  2443. */
  2444. /* Python wrapper */
  2445. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_25index(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  2446. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_25index(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  2447. PyObject *__pyx_r = 0;
  2448. __Pyx_RefNannyDeclarations
  2449. __Pyx_RefNannySetupContext("index (wrapper)", 0);
  2450. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_24index(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_item));
  2451. /* function exit code */
  2452. __Pyx_RefNannyFinishContext();
  2453. return __pyx_r;
  2454. }
  2455. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_24index(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item) {
  2456. PyObject *__pyx_r = NULL;
  2457. __Pyx_RefNannyDeclarations
  2458. PyObject *__pyx_t_1 = NULL;
  2459. PyObject *__pyx_t_2 = NULL;
  2460. PyObject *__pyx_t_3 = NULL;
  2461. PyObject *__pyx_t_4 = NULL;
  2462. __Pyx_RefNannySetupContext("index", 0);
  2463. /* "aiohttp/_frozenlist.pyx":74
  2464. *
  2465. * def index(self, item):
  2466. * return self._items.index(item) # <<<<<<<<<<<<<<
  2467. *
  2468. * def remove(self, item):
  2469. */
  2470. __Pyx_XDECREF(__pyx_r);
  2471. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_items, __pyx_n_s_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 74, __pyx_L1_error)
  2472. __Pyx_GOTREF(__pyx_t_2);
  2473. __pyx_t_3 = NULL;
  2474. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  2475. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  2476. if (likely(__pyx_t_3)) {
  2477. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  2478. __Pyx_INCREF(__pyx_t_3);
  2479. __Pyx_INCREF(function);
  2480. __Pyx_DECREF_SET(__pyx_t_2, function);
  2481. }
  2482. }
  2483. if (!__pyx_t_3) {
  2484. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  2485. __Pyx_GOTREF(__pyx_t_1);
  2486. } else {
  2487. #if CYTHON_FAST_PYCALL
  2488. if (PyFunction_Check(__pyx_t_2)) {
  2489. PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_item};
  2490. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  2491. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  2492. __Pyx_GOTREF(__pyx_t_1);
  2493. } else
  2494. #endif
  2495. #if CYTHON_FAST_PYCCALL
  2496. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  2497. PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_item};
  2498. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  2499. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  2500. __Pyx_GOTREF(__pyx_t_1);
  2501. } else
  2502. #endif
  2503. {
  2504. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 74, __pyx_L1_error)
  2505. __Pyx_GOTREF(__pyx_t_4);
  2506. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
  2507. __Pyx_INCREF(__pyx_v_item);
  2508. __Pyx_GIVEREF(__pyx_v_item);
  2509. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_item);
  2510. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 74, __pyx_L1_error)
  2511. __Pyx_GOTREF(__pyx_t_1);
  2512. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2513. }
  2514. }
  2515. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2516. __pyx_r = __pyx_t_1;
  2517. __pyx_t_1 = 0;
  2518. goto __pyx_L0;
  2519. /* "aiohttp/_frozenlist.pyx":73
  2520. * return self
  2521. *
  2522. * def index(self, item): # <<<<<<<<<<<<<<
  2523. * return self._items.index(item)
  2524. *
  2525. */
  2526. /* function exit code */
  2527. __pyx_L1_error:;
  2528. __Pyx_XDECREF(__pyx_t_1);
  2529. __Pyx_XDECREF(__pyx_t_2);
  2530. __Pyx_XDECREF(__pyx_t_3);
  2531. __Pyx_XDECREF(__pyx_t_4);
  2532. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.index", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2533. __pyx_r = NULL;
  2534. __pyx_L0:;
  2535. __Pyx_XGIVEREF(__pyx_r);
  2536. __Pyx_RefNannyFinishContext();
  2537. return __pyx_r;
  2538. }
  2539. /* "aiohttp/_frozenlist.pyx":76
  2540. * return self._items.index(item)
  2541. *
  2542. * def remove(self, item): # <<<<<<<<<<<<<<
  2543. * self._check_frozen()
  2544. * self._items.remove(item)
  2545. */
  2546. /* Python wrapper */
  2547. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_27remove(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  2548. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_27remove(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  2549. PyObject *__pyx_r = 0;
  2550. __Pyx_RefNannyDeclarations
  2551. __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  2552. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_26remove(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_item));
  2553. /* function exit code */
  2554. __Pyx_RefNannyFinishContext();
  2555. return __pyx_r;
  2556. }
  2557. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_26remove(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item) {
  2558. PyObject *__pyx_r = NULL;
  2559. __Pyx_RefNannyDeclarations
  2560. PyObject *__pyx_t_1 = NULL;
  2561. PyObject *__pyx_t_2 = NULL;
  2562. PyObject *__pyx_t_3 = NULL;
  2563. PyObject *__pyx_t_4 = NULL;
  2564. __Pyx_RefNannySetupContext("remove", 0);
  2565. /* "aiohttp/_frozenlist.pyx":77
  2566. *
  2567. * def remove(self, item):
  2568. * self._check_frozen() # <<<<<<<<<<<<<<
  2569. * self._items.remove(item)
  2570. *
  2571. */
  2572. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
  2573. __Pyx_GOTREF(__pyx_t_1);
  2574. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2575. /* "aiohttp/_frozenlist.pyx":78
  2576. * def remove(self, item):
  2577. * self._check_frozen()
  2578. * self._items.remove(item) # <<<<<<<<<<<<<<
  2579. *
  2580. * def clear(self):
  2581. */
  2582. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_items, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  2583. __Pyx_GOTREF(__pyx_t_2);
  2584. __pyx_t_3 = NULL;
  2585. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  2586. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  2587. if (likely(__pyx_t_3)) {
  2588. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  2589. __Pyx_INCREF(__pyx_t_3);
  2590. __Pyx_INCREF(function);
  2591. __Pyx_DECREF_SET(__pyx_t_2, function);
  2592. }
  2593. }
  2594. if (!__pyx_t_3) {
  2595. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  2596. __Pyx_GOTREF(__pyx_t_1);
  2597. } else {
  2598. #if CYTHON_FAST_PYCALL
  2599. if (PyFunction_Check(__pyx_t_2)) {
  2600. PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_item};
  2601. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  2602. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  2603. __Pyx_GOTREF(__pyx_t_1);
  2604. } else
  2605. #endif
  2606. #if CYTHON_FAST_PYCCALL
  2607. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  2608. PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_item};
  2609. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  2610. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  2611. __Pyx_GOTREF(__pyx_t_1);
  2612. } else
  2613. #endif
  2614. {
  2615. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 78, __pyx_L1_error)
  2616. __Pyx_GOTREF(__pyx_t_4);
  2617. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
  2618. __Pyx_INCREF(__pyx_v_item);
  2619. __Pyx_GIVEREF(__pyx_v_item);
  2620. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_item);
  2621. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  2622. __Pyx_GOTREF(__pyx_t_1);
  2623. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2624. }
  2625. }
  2626. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2627. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2628. /* "aiohttp/_frozenlist.pyx":76
  2629. * return self._items.index(item)
  2630. *
  2631. * def remove(self, item): # <<<<<<<<<<<<<<
  2632. * self._check_frozen()
  2633. * self._items.remove(item)
  2634. */
  2635. /* function exit code */
  2636. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2637. goto __pyx_L0;
  2638. __pyx_L1_error:;
  2639. __Pyx_XDECREF(__pyx_t_1);
  2640. __Pyx_XDECREF(__pyx_t_2);
  2641. __Pyx_XDECREF(__pyx_t_3);
  2642. __Pyx_XDECREF(__pyx_t_4);
  2643. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2644. __pyx_r = NULL;
  2645. __pyx_L0:;
  2646. __Pyx_XGIVEREF(__pyx_r);
  2647. __Pyx_RefNannyFinishContext();
  2648. return __pyx_r;
  2649. }
  2650. /* "aiohttp/_frozenlist.pyx":80
  2651. * self._items.remove(item)
  2652. *
  2653. * def clear(self): # <<<<<<<<<<<<<<
  2654. * self._check_frozen()
  2655. * self._items.clear()
  2656. */
  2657. /* Python wrapper */
  2658. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_29clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  2659. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_29clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  2660. PyObject *__pyx_r = 0;
  2661. __Pyx_RefNannyDeclarations
  2662. __Pyx_RefNannySetupContext("clear (wrapper)", 0);
  2663. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_28clear(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  2664. /* function exit code */
  2665. __Pyx_RefNannyFinishContext();
  2666. return __pyx_r;
  2667. }
  2668. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_28clear(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  2669. PyObject *__pyx_r = NULL;
  2670. __Pyx_RefNannyDeclarations
  2671. PyObject *__pyx_t_1 = NULL;
  2672. PyObject *__pyx_t_2 = NULL;
  2673. PyObject *__pyx_t_3 = NULL;
  2674. __Pyx_RefNannySetupContext("clear", 0);
  2675. /* "aiohttp/_frozenlist.pyx":81
  2676. *
  2677. * def clear(self):
  2678. * self._check_frozen() # <<<<<<<<<<<<<<
  2679. * self._items.clear()
  2680. *
  2681. */
  2682. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
  2683. __Pyx_GOTREF(__pyx_t_1);
  2684. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2685. /* "aiohttp/_frozenlist.pyx":82
  2686. * def clear(self):
  2687. * self._check_frozen()
  2688. * self._items.clear() # <<<<<<<<<<<<<<
  2689. *
  2690. * def extend(self, items):
  2691. */
  2692. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_items, __pyx_n_s_clear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
  2693. __Pyx_GOTREF(__pyx_t_2);
  2694. __pyx_t_3 = NULL;
  2695. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  2696. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  2697. if (likely(__pyx_t_3)) {
  2698. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  2699. __Pyx_INCREF(__pyx_t_3);
  2700. __Pyx_INCREF(function);
  2701. __Pyx_DECREF_SET(__pyx_t_2, function);
  2702. }
  2703. }
  2704. if (__pyx_t_3) {
  2705. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  2706. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2707. } else {
  2708. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
  2709. }
  2710. __Pyx_GOTREF(__pyx_t_1);
  2711. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2712. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2713. /* "aiohttp/_frozenlist.pyx":80
  2714. * self._items.remove(item)
  2715. *
  2716. * def clear(self): # <<<<<<<<<<<<<<
  2717. * self._check_frozen()
  2718. * self._items.clear()
  2719. */
  2720. /* function exit code */
  2721. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2722. goto __pyx_L0;
  2723. __pyx_L1_error:;
  2724. __Pyx_XDECREF(__pyx_t_1);
  2725. __Pyx_XDECREF(__pyx_t_2);
  2726. __Pyx_XDECREF(__pyx_t_3);
  2727. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2728. __pyx_r = NULL;
  2729. __pyx_L0:;
  2730. __Pyx_XGIVEREF(__pyx_r);
  2731. __Pyx_RefNannyFinishContext();
  2732. return __pyx_r;
  2733. }
  2734. /* "aiohttp/_frozenlist.pyx":84
  2735. * self._items.clear()
  2736. *
  2737. * def extend(self, items): # <<<<<<<<<<<<<<
  2738. * self._check_frozen()
  2739. * self._items += list(items)
  2740. */
  2741. /* Python wrapper */
  2742. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_31extend(PyObject *__pyx_v_self, PyObject *__pyx_v_items); /*proto*/
  2743. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_31extend(PyObject *__pyx_v_self, PyObject *__pyx_v_items) {
  2744. PyObject *__pyx_r = 0;
  2745. __Pyx_RefNannyDeclarations
  2746. __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  2747. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_30extend(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_items));
  2748. /* function exit code */
  2749. __Pyx_RefNannyFinishContext();
  2750. return __pyx_r;
  2751. }
  2752. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_30extend(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_items) {
  2753. PyObject *__pyx_r = NULL;
  2754. __Pyx_RefNannyDeclarations
  2755. PyObject *__pyx_t_1 = NULL;
  2756. PyObject *__pyx_t_2 = NULL;
  2757. __Pyx_RefNannySetupContext("extend", 0);
  2758. /* "aiohttp/_frozenlist.pyx":85
  2759. *
  2760. * def extend(self, items):
  2761. * self._check_frozen() # <<<<<<<<<<<<<<
  2762. * self._items += list(items)
  2763. *
  2764. */
  2765. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
  2766. __Pyx_GOTREF(__pyx_t_1);
  2767. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2768. /* "aiohttp/_frozenlist.pyx":86
  2769. * def extend(self, items):
  2770. * self._check_frozen()
  2771. * self._items += list(items) # <<<<<<<<<<<<<<
  2772. *
  2773. * def reverse(self):
  2774. */
  2775. __pyx_t_1 = PySequence_List(__pyx_v_items); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
  2776. __Pyx_GOTREF(__pyx_t_1);
  2777. __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->_items, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
  2778. __Pyx_GOTREF(__pyx_t_2);
  2779. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2780. __Pyx_GIVEREF(__pyx_t_2);
  2781. __Pyx_GOTREF(__pyx_v_self->_items);
  2782. __Pyx_DECREF(__pyx_v_self->_items);
  2783. __pyx_v_self->_items = ((PyObject*)__pyx_t_2);
  2784. __pyx_t_2 = 0;
  2785. /* "aiohttp/_frozenlist.pyx":84
  2786. * self._items.clear()
  2787. *
  2788. * def extend(self, items): # <<<<<<<<<<<<<<
  2789. * self._check_frozen()
  2790. * self._items += list(items)
  2791. */
  2792. /* function exit code */
  2793. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2794. goto __pyx_L0;
  2795. __pyx_L1_error:;
  2796. __Pyx_XDECREF(__pyx_t_1);
  2797. __Pyx_XDECREF(__pyx_t_2);
  2798. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2799. __pyx_r = NULL;
  2800. __pyx_L0:;
  2801. __Pyx_XGIVEREF(__pyx_r);
  2802. __Pyx_RefNannyFinishContext();
  2803. return __pyx_r;
  2804. }
  2805. /* "aiohttp/_frozenlist.pyx":88
  2806. * self._items += list(items)
  2807. *
  2808. * def reverse(self): # <<<<<<<<<<<<<<
  2809. * self._check_frozen()
  2810. * self._items.reverse()
  2811. */
  2812. /* Python wrapper */
  2813. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_33reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  2814. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_33reverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  2815. PyObject *__pyx_r = 0;
  2816. __Pyx_RefNannyDeclarations
  2817. __Pyx_RefNannySetupContext("reverse (wrapper)", 0);
  2818. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_32reverse(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  2819. /* function exit code */
  2820. __Pyx_RefNannyFinishContext();
  2821. return __pyx_r;
  2822. }
  2823. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_32reverse(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  2824. PyObject *__pyx_r = NULL;
  2825. __Pyx_RefNannyDeclarations
  2826. PyObject *__pyx_t_1 = NULL;
  2827. int __pyx_t_2;
  2828. __Pyx_RefNannySetupContext("reverse", 0);
  2829. /* "aiohttp/_frozenlist.pyx":89
  2830. *
  2831. * def reverse(self):
  2832. * self._check_frozen() # <<<<<<<<<<<<<<
  2833. * self._items.reverse()
  2834. *
  2835. */
  2836. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
  2837. __Pyx_GOTREF(__pyx_t_1);
  2838. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2839. /* "aiohttp/_frozenlist.pyx":90
  2840. * def reverse(self):
  2841. * self._check_frozen()
  2842. * self._items.reverse() # <<<<<<<<<<<<<<
  2843. *
  2844. * def pop(self, index=-1):
  2845. */
  2846. if (unlikely(__pyx_v_self->_items == Py_None)) {
  2847. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "reverse");
  2848. __PYX_ERR(0, 90, __pyx_L1_error)
  2849. }
  2850. __pyx_t_2 = PyList_Reverse(__pyx_v_self->_items); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 90, __pyx_L1_error)
  2851. /* "aiohttp/_frozenlist.pyx":88
  2852. * self._items += list(items)
  2853. *
  2854. * def reverse(self): # <<<<<<<<<<<<<<
  2855. * self._check_frozen()
  2856. * self._items.reverse()
  2857. */
  2858. /* function exit code */
  2859. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2860. goto __pyx_L0;
  2861. __pyx_L1_error:;
  2862. __Pyx_XDECREF(__pyx_t_1);
  2863. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.reverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2864. __pyx_r = NULL;
  2865. __pyx_L0:;
  2866. __Pyx_XGIVEREF(__pyx_r);
  2867. __Pyx_RefNannyFinishContext();
  2868. return __pyx_r;
  2869. }
  2870. /* "aiohttp/_frozenlist.pyx":92
  2871. * self._items.reverse()
  2872. *
  2873. * def pop(self, index=-1): # <<<<<<<<<<<<<<
  2874. * self._check_frozen()
  2875. * return self._items.pop(index)
  2876. */
  2877. /* Python wrapper */
  2878. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_35pop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  2879. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_35pop(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  2880. PyObject *__pyx_v_index = 0;
  2881. PyObject *__pyx_r = 0;
  2882. __Pyx_RefNannyDeclarations
  2883. __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  2884. {
  2885. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index,0};
  2886. PyObject* values[1] = {0};
  2887. values[0] = ((PyObject *)__pyx_int_neg_1);
  2888. if (unlikely(__pyx_kwds)) {
  2889. Py_ssize_t kw_args;
  2890. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  2891. switch (pos_args) {
  2892. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  2893. CYTHON_FALLTHROUGH;
  2894. case 0: break;
  2895. default: goto __pyx_L5_argtuple_error;
  2896. }
  2897. kw_args = PyDict_Size(__pyx_kwds);
  2898. switch (pos_args) {
  2899. case 0:
  2900. if (kw_args > 0) {
  2901. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index);
  2902. if (value) { values[0] = value; kw_args--; }
  2903. }
  2904. }
  2905. if (unlikely(kw_args > 0)) {
  2906. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pop") < 0)) __PYX_ERR(0, 92, __pyx_L3_error)
  2907. }
  2908. } else {
  2909. switch (PyTuple_GET_SIZE(__pyx_args)) {
  2910. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  2911. CYTHON_FALLTHROUGH;
  2912. case 0: break;
  2913. default: goto __pyx_L5_argtuple_error;
  2914. }
  2915. }
  2916. __pyx_v_index = values[0];
  2917. }
  2918. goto __pyx_L4_argument_unpacking_done;
  2919. __pyx_L5_argtuple_error:;
  2920. __Pyx_RaiseArgtupleInvalid("pop", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 92, __pyx_L3_error)
  2921. __pyx_L3_error:;
  2922. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2923. __Pyx_RefNannyFinishContext();
  2924. return NULL;
  2925. __pyx_L4_argument_unpacking_done:;
  2926. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_34pop(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), __pyx_v_index);
  2927. /* function exit code */
  2928. __Pyx_RefNannyFinishContext();
  2929. return __pyx_r;
  2930. }
  2931. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_34pop(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_index) {
  2932. PyObject *__pyx_r = NULL;
  2933. __Pyx_RefNannyDeclarations
  2934. PyObject *__pyx_t_1 = NULL;
  2935. Py_ssize_t __pyx_t_2;
  2936. __Pyx_RefNannySetupContext("pop", 0);
  2937. /* "aiohttp/_frozenlist.pyx":93
  2938. *
  2939. * def pop(self, index=-1):
  2940. * self._check_frozen() # <<<<<<<<<<<<<<
  2941. * return self._items.pop(index)
  2942. *
  2943. */
  2944. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
  2945. __Pyx_GOTREF(__pyx_t_1);
  2946. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2947. /* "aiohttp/_frozenlist.pyx":94
  2948. * def pop(self, index=-1):
  2949. * self._check_frozen()
  2950. * return self._items.pop(index) # <<<<<<<<<<<<<<
  2951. *
  2952. * def append(self, item):
  2953. */
  2954. __Pyx_XDECREF(__pyx_r);
  2955. if (unlikely(__pyx_v_self->_items == Py_None)) {
  2956. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop");
  2957. __PYX_ERR(0, 94, __pyx_L1_error)
  2958. }
  2959. __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L1_error)
  2960. __pyx_t_1 = __Pyx_PyList_PopIndex(__pyx_v_self->_items, __pyx_v_index, __pyx_t_2, 1, Py_ssize_t, PyInt_FromSsize_t); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
  2961. __Pyx_GOTREF(__pyx_t_1);
  2962. __pyx_r = __pyx_t_1;
  2963. __pyx_t_1 = 0;
  2964. goto __pyx_L0;
  2965. /* "aiohttp/_frozenlist.pyx":92
  2966. * self._items.reverse()
  2967. *
  2968. * def pop(self, index=-1): # <<<<<<<<<<<<<<
  2969. * self._check_frozen()
  2970. * return self._items.pop(index)
  2971. */
  2972. /* function exit code */
  2973. __pyx_L1_error:;
  2974. __Pyx_XDECREF(__pyx_t_1);
  2975. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2976. __pyx_r = NULL;
  2977. __pyx_L0:;
  2978. __Pyx_XGIVEREF(__pyx_r);
  2979. __Pyx_RefNannyFinishContext();
  2980. return __pyx_r;
  2981. }
  2982. /* "aiohttp/_frozenlist.pyx":96
  2983. * return self._items.pop(index)
  2984. *
  2985. * def append(self, item): # <<<<<<<<<<<<<<
  2986. * self._check_frozen()
  2987. * return self._items.append(item)
  2988. */
  2989. /* Python wrapper */
  2990. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_37append(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  2991. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_37append(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  2992. PyObject *__pyx_r = 0;
  2993. __Pyx_RefNannyDeclarations
  2994. __Pyx_RefNannySetupContext("append (wrapper)", 0);
  2995. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_36append(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_item));
  2996. /* function exit code */
  2997. __Pyx_RefNannyFinishContext();
  2998. return __pyx_r;
  2999. }
  3000. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_36append(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item) {
  3001. PyObject *__pyx_r = NULL;
  3002. __Pyx_RefNannyDeclarations
  3003. PyObject *__pyx_t_1 = NULL;
  3004. int __pyx_t_2;
  3005. __Pyx_RefNannySetupContext("append", 0);
  3006. /* "aiohttp/_frozenlist.pyx":97
  3007. *
  3008. * def append(self, item):
  3009. * self._check_frozen() # <<<<<<<<<<<<<<
  3010. * return self._items.append(item)
  3011. *
  3012. */
  3013. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self->__pyx_vtab)->_check_frozen(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
  3014. __Pyx_GOTREF(__pyx_t_1);
  3015. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3016. /* "aiohttp/_frozenlist.pyx":98
  3017. * def append(self, item):
  3018. * self._check_frozen()
  3019. * return self._items.append(item) # <<<<<<<<<<<<<<
  3020. *
  3021. * def count(self, item):
  3022. */
  3023. __Pyx_XDECREF(__pyx_r);
  3024. if (unlikely(__pyx_v_self->_items == Py_None)) {
  3025. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  3026. __PYX_ERR(0, 98, __pyx_L1_error)
  3027. }
  3028. __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->_items, __pyx_v_item); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 98, __pyx_L1_error)
  3029. __pyx_t_1 = __Pyx_Owned_Py_None(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
  3030. __Pyx_GOTREF(__pyx_t_1);
  3031. __pyx_r = __pyx_t_1;
  3032. __pyx_t_1 = 0;
  3033. goto __pyx_L0;
  3034. /* "aiohttp/_frozenlist.pyx":96
  3035. * return self._items.pop(index)
  3036. *
  3037. * def append(self, item): # <<<<<<<<<<<<<<
  3038. * self._check_frozen()
  3039. * return self._items.append(item)
  3040. */
  3041. /* function exit code */
  3042. __pyx_L1_error:;
  3043. __Pyx_XDECREF(__pyx_t_1);
  3044. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3045. __pyx_r = NULL;
  3046. __pyx_L0:;
  3047. __Pyx_XGIVEREF(__pyx_r);
  3048. __Pyx_RefNannyFinishContext();
  3049. return __pyx_r;
  3050. }
  3051. /* "aiohttp/_frozenlist.pyx":100
  3052. * return self._items.append(item)
  3053. *
  3054. * def count(self, item): # <<<<<<<<<<<<<<
  3055. * return self._items.count(item)
  3056. *
  3057. */
  3058. /* Python wrapper */
  3059. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_39count(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
  3060. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_39count(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
  3061. PyObject *__pyx_r = 0;
  3062. __Pyx_RefNannyDeclarations
  3063. __Pyx_RefNannySetupContext("count (wrapper)", 0);
  3064. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_38count(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v_item));
  3065. /* function exit code */
  3066. __Pyx_RefNannyFinishContext();
  3067. return __pyx_r;
  3068. }
  3069. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_38count(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v_item) {
  3070. PyObject *__pyx_r = NULL;
  3071. __Pyx_RefNannyDeclarations
  3072. PyObject *__pyx_t_1 = NULL;
  3073. PyObject *__pyx_t_2 = NULL;
  3074. PyObject *__pyx_t_3 = NULL;
  3075. PyObject *__pyx_t_4 = NULL;
  3076. __Pyx_RefNannySetupContext("count", 0);
  3077. /* "aiohttp/_frozenlist.pyx":101
  3078. *
  3079. * def count(self, item):
  3080. * return self._items.count(item) # <<<<<<<<<<<<<<
  3081. *
  3082. * def __repr__(self):
  3083. */
  3084. __Pyx_XDECREF(__pyx_r);
  3085. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_items, __pyx_n_s_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 101, __pyx_L1_error)
  3086. __Pyx_GOTREF(__pyx_t_2);
  3087. __pyx_t_3 = NULL;
  3088. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  3089. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  3090. if (likely(__pyx_t_3)) {
  3091. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  3092. __Pyx_INCREF(__pyx_t_3);
  3093. __Pyx_INCREF(function);
  3094. __Pyx_DECREF_SET(__pyx_t_2, function);
  3095. }
  3096. }
  3097. if (!__pyx_t_3) {
  3098. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  3099. __Pyx_GOTREF(__pyx_t_1);
  3100. } else {
  3101. #if CYTHON_FAST_PYCALL
  3102. if (PyFunction_Check(__pyx_t_2)) {
  3103. PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_item};
  3104. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  3105. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  3106. __Pyx_GOTREF(__pyx_t_1);
  3107. } else
  3108. #endif
  3109. #if CYTHON_FAST_PYCCALL
  3110. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  3111. PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_item};
  3112. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  3113. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  3114. __Pyx_GOTREF(__pyx_t_1);
  3115. } else
  3116. #endif
  3117. {
  3118. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 101, __pyx_L1_error)
  3119. __Pyx_GOTREF(__pyx_t_4);
  3120. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
  3121. __Pyx_INCREF(__pyx_v_item);
  3122. __Pyx_GIVEREF(__pyx_v_item);
  3123. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_item);
  3124. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  3125. __Pyx_GOTREF(__pyx_t_1);
  3126. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3127. }
  3128. }
  3129. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3130. __pyx_r = __pyx_t_1;
  3131. __pyx_t_1 = 0;
  3132. goto __pyx_L0;
  3133. /* "aiohttp/_frozenlist.pyx":100
  3134. * return self._items.append(item)
  3135. *
  3136. * def count(self, item): # <<<<<<<<<<<<<<
  3137. * return self._items.count(item)
  3138. *
  3139. */
  3140. /* function exit code */
  3141. __pyx_L1_error:;
  3142. __Pyx_XDECREF(__pyx_t_1);
  3143. __Pyx_XDECREF(__pyx_t_2);
  3144. __Pyx_XDECREF(__pyx_t_3);
  3145. __Pyx_XDECREF(__pyx_t_4);
  3146. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3147. __pyx_r = NULL;
  3148. __pyx_L0:;
  3149. __Pyx_XGIVEREF(__pyx_r);
  3150. __Pyx_RefNannyFinishContext();
  3151. return __pyx_r;
  3152. }
  3153. /* "aiohttp/_frozenlist.pyx":103
  3154. * return self._items.count(item)
  3155. *
  3156. * def __repr__(self): # <<<<<<<<<<<<<<
  3157. * return '<FrozenList(frozen={}, {!r})>'.format(self.frozen,
  3158. * self._items)
  3159. */
  3160. /* Python wrapper */
  3161. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_41__repr__(PyObject *__pyx_v_self); /*proto*/
  3162. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_41__repr__(PyObject *__pyx_v_self) {
  3163. PyObject *__pyx_r = 0;
  3164. __Pyx_RefNannyDeclarations
  3165. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  3166. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_40__repr__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  3167. /* function exit code */
  3168. __Pyx_RefNannyFinishContext();
  3169. return __pyx_r;
  3170. }
  3171. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_40__repr__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  3172. PyObject *__pyx_r = NULL;
  3173. __Pyx_RefNannyDeclarations
  3174. PyObject *__pyx_t_1 = NULL;
  3175. PyObject *__pyx_t_2 = NULL;
  3176. PyObject *__pyx_t_3 = NULL;
  3177. PyObject *__pyx_t_4 = NULL;
  3178. int __pyx_t_5;
  3179. PyObject *__pyx_t_6 = NULL;
  3180. __Pyx_RefNannySetupContext("__repr__", 0);
  3181. /* "aiohttp/_frozenlist.pyx":104
  3182. *
  3183. * def __repr__(self):
  3184. * return '<FrozenList(frozen={}, {!r})>'.format(self.frozen, # <<<<<<<<<<<<<<
  3185. * self._items)
  3186. *
  3187. */
  3188. __Pyx_XDECREF(__pyx_r);
  3189. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_FrozenList_frozen_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
  3190. __Pyx_GOTREF(__pyx_t_2);
  3191. __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->frozen); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error)
  3192. __Pyx_GOTREF(__pyx_t_3);
  3193. /* "aiohttp/_frozenlist.pyx":105
  3194. * def __repr__(self):
  3195. * return '<FrozenList(frozen={}, {!r})>'.format(self.frozen,
  3196. * self._items) # <<<<<<<<<<<<<<
  3197. *
  3198. *
  3199. */
  3200. __pyx_t_4 = NULL;
  3201. __pyx_t_5 = 0;
  3202. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  3203. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
  3204. if (likely(__pyx_t_4)) {
  3205. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  3206. __Pyx_INCREF(__pyx_t_4);
  3207. __Pyx_INCREF(function);
  3208. __Pyx_DECREF_SET(__pyx_t_2, function);
  3209. __pyx_t_5 = 1;
  3210. }
  3211. }
  3212. #if CYTHON_FAST_PYCALL
  3213. if (PyFunction_Check(__pyx_t_2)) {
  3214. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->_items};
  3215. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  3216. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  3217. __Pyx_GOTREF(__pyx_t_1);
  3218. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3219. } else
  3220. #endif
  3221. #if CYTHON_FAST_PYCCALL
  3222. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  3223. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_v_self->_items};
  3224. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  3225. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  3226. __Pyx_GOTREF(__pyx_t_1);
  3227. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3228. } else
  3229. #endif
  3230. {
  3231. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
  3232. __Pyx_GOTREF(__pyx_t_6);
  3233. if (__pyx_t_4) {
  3234. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  3235. }
  3236. __Pyx_GIVEREF(__pyx_t_3);
  3237. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
  3238. __Pyx_INCREF(__pyx_v_self->_items);
  3239. __Pyx_GIVEREF(__pyx_v_self->_items);
  3240. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self->_items);
  3241. __pyx_t_3 = 0;
  3242. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
  3243. __Pyx_GOTREF(__pyx_t_1);
  3244. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3245. }
  3246. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3247. __pyx_r = __pyx_t_1;
  3248. __pyx_t_1 = 0;
  3249. goto __pyx_L0;
  3250. /* "aiohttp/_frozenlist.pyx":103
  3251. * return self._items.count(item)
  3252. *
  3253. * def __repr__(self): # <<<<<<<<<<<<<<
  3254. * return '<FrozenList(frozen={}, {!r})>'.format(self.frozen,
  3255. * self._items)
  3256. */
  3257. /* function exit code */
  3258. __pyx_L1_error:;
  3259. __Pyx_XDECREF(__pyx_t_1);
  3260. __Pyx_XDECREF(__pyx_t_2);
  3261. __Pyx_XDECREF(__pyx_t_3);
  3262. __Pyx_XDECREF(__pyx_t_4);
  3263. __Pyx_XDECREF(__pyx_t_6);
  3264. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3265. __pyx_r = NULL;
  3266. __pyx_L0:;
  3267. __Pyx_XGIVEREF(__pyx_r);
  3268. __Pyx_RefNannyFinishContext();
  3269. return __pyx_r;
  3270. }
  3271. /* "aiohttp/_frozenlist.pyx":6
  3272. * cdef class FrozenList:
  3273. *
  3274. * cdef readonly bint frozen # <<<<<<<<<<<<<<
  3275. * cdef list _items
  3276. *
  3277. */
  3278. /* Python wrapper */
  3279. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_6frozen_1__get__(PyObject *__pyx_v_self); /*proto*/
  3280. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_6frozen_1__get__(PyObject *__pyx_v_self) {
  3281. PyObject *__pyx_r = 0;
  3282. __Pyx_RefNannyDeclarations
  3283. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3284. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_6frozen___get__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  3285. /* function exit code */
  3286. __Pyx_RefNannyFinishContext();
  3287. return __pyx_r;
  3288. }
  3289. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_6frozen___get__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  3290. PyObject *__pyx_r = NULL;
  3291. __Pyx_RefNannyDeclarations
  3292. PyObject *__pyx_t_1 = NULL;
  3293. __Pyx_RefNannySetupContext("__get__", 0);
  3294. __Pyx_XDECREF(__pyx_r);
  3295. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->frozen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  3296. __Pyx_GOTREF(__pyx_t_1);
  3297. __pyx_r = __pyx_t_1;
  3298. __pyx_t_1 = 0;
  3299. goto __pyx_L0;
  3300. /* function exit code */
  3301. __pyx_L1_error:;
  3302. __Pyx_XDECREF(__pyx_t_1);
  3303. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.frozen.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3304. __pyx_r = NULL;
  3305. __pyx_L0:;
  3306. __Pyx_XGIVEREF(__pyx_r);
  3307. __Pyx_RefNannyFinishContext();
  3308. return __pyx_r;
  3309. }
  3310. /* "(tree fragment)":1
  3311. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  3312. * cdef bint use_setstate
  3313. * state = (self._items, self.frozen)
  3314. */
  3315. /* Python wrapper */
  3316. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  3317. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_43__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  3318. PyObject *__pyx_r = 0;
  3319. __Pyx_RefNannyDeclarations
  3320. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  3321. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_42__reduce_cython__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self));
  3322. /* function exit code */
  3323. __Pyx_RefNannyFinishContext();
  3324. return __pyx_r;
  3325. }
  3326. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_42__reduce_cython__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self) {
  3327. int __pyx_v_use_setstate;
  3328. PyObject *__pyx_v_state = NULL;
  3329. PyObject *__pyx_v__dict = NULL;
  3330. PyObject *__pyx_r = NULL;
  3331. __Pyx_RefNannyDeclarations
  3332. PyObject *__pyx_t_1 = NULL;
  3333. PyObject *__pyx_t_2 = NULL;
  3334. int __pyx_t_3;
  3335. int __pyx_t_4;
  3336. PyObject *__pyx_t_5 = NULL;
  3337. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  3338. /* "(tree fragment)":3
  3339. * def __reduce_cython__(self):
  3340. * cdef bint use_setstate
  3341. * state = (self._items, self.frozen) # <<<<<<<<<<<<<<
  3342. * _dict = getattr(self, '__dict__', None)
  3343. * if _dict is not None:
  3344. */
  3345. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->frozen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  3346. __Pyx_GOTREF(__pyx_t_1);
  3347. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  3348. __Pyx_GOTREF(__pyx_t_2);
  3349. __Pyx_INCREF(__pyx_v_self->_items);
  3350. __Pyx_GIVEREF(__pyx_v_self->_items);
  3351. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->_items);
  3352. __Pyx_GIVEREF(__pyx_t_1);
  3353. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  3354. __pyx_t_1 = 0;
  3355. __pyx_v_state = ((PyObject*)__pyx_t_2);
  3356. __pyx_t_2 = 0;
  3357. /* "(tree fragment)":4
  3358. * cdef bint use_setstate
  3359. * state = (self._items, self.frozen)
  3360. * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
  3361. * if _dict is not None:
  3362. * state += (_dict,)
  3363. */
  3364. __pyx_t_2 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
  3365. __Pyx_GOTREF(__pyx_t_2);
  3366. __pyx_v__dict = __pyx_t_2;
  3367. __pyx_t_2 = 0;
  3368. /* "(tree fragment)":5
  3369. * state = (self._items, self.frozen)
  3370. * _dict = getattr(self, '__dict__', None)
  3371. * if _dict is not None: # <<<<<<<<<<<<<<
  3372. * state += (_dict,)
  3373. * use_setstate = True
  3374. */
  3375. __pyx_t_3 = (__pyx_v__dict != Py_None);
  3376. __pyx_t_4 = (__pyx_t_3 != 0);
  3377. if (__pyx_t_4) {
  3378. /* "(tree fragment)":6
  3379. * _dict = getattr(self, '__dict__', None)
  3380. * if _dict is not None:
  3381. * state += (_dict,) # <<<<<<<<<<<<<<
  3382. * use_setstate = True
  3383. * else:
  3384. */
  3385. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  3386. __Pyx_GOTREF(__pyx_t_2);
  3387. __Pyx_INCREF(__pyx_v__dict);
  3388. __Pyx_GIVEREF(__pyx_v__dict);
  3389. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
  3390. __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  3391. __Pyx_GOTREF(__pyx_t_1);
  3392. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3393. __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
  3394. __pyx_t_1 = 0;
  3395. /* "(tree fragment)":7
  3396. * if _dict is not None:
  3397. * state += (_dict,)
  3398. * use_setstate = True # <<<<<<<<<<<<<<
  3399. * else:
  3400. * use_setstate = self._items is not None
  3401. */
  3402. __pyx_v_use_setstate = 1;
  3403. /* "(tree fragment)":5
  3404. * state = (self._items, self.frozen)
  3405. * _dict = getattr(self, '__dict__', None)
  3406. * if _dict is not None: # <<<<<<<<<<<<<<
  3407. * state += (_dict,)
  3408. * use_setstate = True
  3409. */
  3410. goto __pyx_L3;
  3411. }
  3412. /* "(tree fragment)":9
  3413. * use_setstate = True
  3414. * else:
  3415. * use_setstate = self._items is not None # <<<<<<<<<<<<<<
  3416. * if use_setstate:
  3417. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, None), state
  3418. */
  3419. /*else*/ {
  3420. __pyx_t_4 = (__pyx_v_self->_items != ((PyObject*)Py_None));
  3421. __pyx_v_use_setstate = __pyx_t_4;
  3422. }
  3423. __pyx_L3:;
  3424. /* "(tree fragment)":10
  3425. * else:
  3426. * use_setstate = self._items is not None
  3427. * if use_setstate: # <<<<<<<<<<<<<<
  3428. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, None), state
  3429. * else:
  3430. */
  3431. __pyx_t_4 = (__pyx_v_use_setstate != 0);
  3432. if (__pyx_t_4) {
  3433. /* "(tree fragment)":11
  3434. * use_setstate = self._items is not None
  3435. * if use_setstate:
  3436. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, None), state # <<<<<<<<<<<<<<
  3437. * else:
  3438. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, state)
  3439. */
  3440. __Pyx_XDECREF(__pyx_r);
  3441. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FrozenList); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
  3442. __Pyx_GOTREF(__pyx_t_1);
  3443. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 11, __pyx_L1_error)
  3444. __Pyx_GOTREF(__pyx_t_2);
  3445. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  3446. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  3447. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  3448. __Pyx_INCREF(__pyx_int_155820355);
  3449. __Pyx_GIVEREF(__pyx_int_155820355);
  3450. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_155820355);
  3451. __Pyx_INCREF(Py_None);
  3452. __Pyx_GIVEREF(Py_None);
  3453. PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
  3454. __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 11, __pyx_L1_error)
  3455. __Pyx_GOTREF(__pyx_t_5);
  3456. __Pyx_GIVEREF(__pyx_t_1);
  3457. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  3458. __Pyx_GIVEREF(__pyx_t_2);
  3459. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  3460. __Pyx_INCREF(__pyx_v_state);
  3461. __Pyx_GIVEREF(__pyx_v_state);
  3462. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
  3463. __pyx_t_1 = 0;
  3464. __pyx_t_2 = 0;
  3465. __pyx_r = __pyx_t_5;
  3466. __pyx_t_5 = 0;
  3467. goto __pyx_L0;
  3468. /* "(tree fragment)":10
  3469. * else:
  3470. * use_setstate = self._items is not None
  3471. * if use_setstate: # <<<<<<<<<<<<<<
  3472. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, None), state
  3473. * else:
  3474. */
  3475. }
  3476. /* "(tree fragment)":13
  3477. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, None), state
  3478. * else:
  3479. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, state) # <<<<<<<<<<<<<<
  3480. * def __setstate_cython__(self, __pyx_state):
  3481. * __pyx_unpickle_FrozenList__set_state(self, __pyx_state)
  3482. */
  3483. /*else*/ {
  3484. __Pyx_XDECREF(__pyx_r);
  3485. __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_FrozenList); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
  3486. __Pyx_GOTREF(__pyx_t_5);
  3487. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
  3488. __Pyx_GOTREF(__pyx_t_2);
  3489. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  3490. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  3491. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  3492. __Pyx_INCREF(__pyx_int_155820355);
  3493. __Pyx_GIVEREF(__pyx_int_155820355);
  3494. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_155820355);
  3495. __Pyx_INCREF(__pyx_v_state);
  3496. __Pyx_GIVEREF(__pyx_v_state);
  3497. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
  3498. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
  3499. __Pyx_GOTREF(__pyx_t_1);
  3500. __Pyx_GIVEREF(__pyx_t_5);
  3501. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5);
  3502. __Pyx_GIVEREF(__pyx_t_2);
  3503. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  3504. __pyx_t_5 = 0;
  3505. __pyx_t_2 = 0;
  3506. __pyx_r = __pyx_t_1;
  3507. __pyx_t_1 = 0;
  3508. goto __pyx_L0;
  3509. }
  3510. /* "(tree fragment)":1
  3511. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  3512. * cdef bint use_setstate
  3513. * state = (self._items, self.frozen)
  3514. */
  3515. /* function exit code */
  3516. __pyx_L1_error:;
  3517. __Pyx_XDECREF(__pyx_t_1);
  3518. __Pyx_XDECREF(__pyx_t_2);
  3519. __Pyx_XDECREF(__pyx_t_5);
  3520. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3521. __pyx_r = NULL;
  3522. __pyx_L0:;
  3523. __Pyx_XDECREF(__pyx_v_state);
  3524. __Pyx_XDECREF(__pyx_v__dict);
  3525. __Pyx_XGIVEREF(__pyx_r);
  3526. __Pyx_RefNannyFinishContext();
  3527. return __pyx_r;
  3528. }
  3529. /* "(tree fragment)":14
  3530. * else:
  3531. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, state)
  3532. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  3533. * __pyx_unpickle_FrozenList__set_state(self, __pyx_state)
  3534. */
  3535. /* Python wrapper */
  3536. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  3537. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_45__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  3538. PyObject *__pyx_r = 0;
  3539. __Pyx_RefNannyDeclarations
  3540. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  3541. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist_10FrozenList_44__setstate_cython__(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  3542. /* function exit code */
  3543. __Pyx_RefNannyFinishContext();
  3544. return __pyx_r;
  3545. }
  3546. static PyObject *__pyx_pf_7aiohttp_11_frozenlist_10FrozenList_44__setstate_cython__(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  3547. PyObject *__pyx_r = NULL;
  3548. __Pyx_RefNannyDeclarations
  3549. PyObject *__pyx_t_1 = NULL;
  3550. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  3551. /* "(tree fragment)":15
  3552. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, state)
  3553. * def __setstate_cython__(self, __pyx_state):
  3554. * __pyx_unpickle_FrozenList__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
  3555. */
  3556. if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 15, __pyx_L1_error)
  3557. __pyx_t_1 = __pyx_f_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
  3558. __Pyx_GOTREF(__pyx_t_1);
  3559. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3560. /* "(tree fragment)":14
  3561. * else:
  3562. * return __pyx_unpickle_FrozenList, (type(self), 0x949a143, state)
  3563. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  3564. * __pyx_unpickle_FrozenList__set_state(self, __pyx_state)
  3565. */
  3566. /* function exit code */
  3567. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  3568. goto __pyx_L0;
  3569. __pyx_L1_error:;
  3570. __Pyx_XDECREF(__pyx_t_1);
  3571. __Pyx_AddTraceback("aiohttp._frozenlist.FrozenList.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3572. __pyx_r = NULL;
  3573. __pyx_L0:;
  3574. __Pyx_XGIVEREF(__pyx_r);
  3575. __Pyx_RefNannyFinishContext();
  3576. return __pyx_r;
  3577. }
  3578. /* "(tree fragment)":1
  3579. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  3580. * if __pyx_checksum != 0x949a143:
  3581. * from pickle import PickleError as __pyx_PickleError
  3582. */
  3583. /* Python wrapper */
  3584. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_1__pyx_unpickle_FrozenList(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  3585. static PyMethodDef __pyx_mdef_7aiohttp_11_frozenlist_1__pyx_unpickle_FrozenList = {"__pyx_unpickle_FrozenList", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_1__pyx_unpickle_FrozenList, METH_VARARGS|METH_KEYWORDS, 0};
  3586. static PyObject *__pyx_pw_7aiohttp_11_frozenlist_1__pyx_unpickle_FrozenList(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  3587. PyObject *__pyx_v___pyx_type = 0;
  3588. long __pyx_v___pyx_checksum;
  3589. PyObject *__pyx_v___pyx_state = 0;
  3590. PyObject *__pyx_r = 0;
  3591. __Pyx_RefNannyDeclarations
  3592. __Pyx_RefNannySetupContext("__pyx_unpickle_FrozenList (wrapper)", 0);
  3593. {
  3594. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
  3595. PyObject* values[3] = {0,0,0};
  3596. if (unlikely(__pyx_kwds)) {
  3597. Py_ssize_t kw_args;
  3598. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  3599. switch (pos_args) {
  3600. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  3601. CYTHON_FALLTHROUGH;
  3602. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  3603. CYTHON_FALLTHROUGH;
  3604. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  3605. CYTHON_FALLTHROUGH;
  3606. case 0: break;
  3607. default: goto __pyx_L5_argtuple_error;
  3608. }
  3609. kw_args = PyDict_Size(__pyx_kwds);
  3610. switch (pos_args) {
  3611. case 0:
  3612. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
  3613. else goto __pyx_L5_argtuple_error;
  3614. CYTHON_FALLTHROUGH;
  3615. case 1:
  3616. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
  3617. else {
  3618. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrozenList", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
  3619. }
  3620. CYTHON_FALLTHROUGH;
  3621. case 2:
  3622. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
  3623. else {
  3624. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrozenList", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
  3625. }
  3626. }
  3627. if (unlikely(kw_args > 0)) {
  3628. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_FrozenList") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
  3629. }
  3630. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  3631. goto __pyx_L5_argtuple_error;
  3632. } else {
  3633. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  3634. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  3635. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  3636. }
  3637. __pyx_v___pyx_type = values[0];
  3638. __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
  3639. __pyx_v___pyx_state = values[2];
  3640. }
  3641. goto __pyx_L4_argument_unpacking_done;
  3642. __pyx_L5_argtuple_error:;
  3643. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FrozenList", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  3644. __pyx_L3_error:;
  3645. __Pyx_AddTraceback("aiohttp._frozenlist.__pyx_unpickle_FrozenList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3646. __Pyx_RefNannyFinishContext();
  3647. return NULL;
  3648. __pyx_L4_argument_unpacking_done:;
  3649. __pyx_r = __pyx_pf_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
  3650. /* function exit code */
  3651. __Pyx_RefNannyFinishContext();
  3652. return __pyx_r;
  3653. }
  3654. static PyObject *__pyx_pf_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  3655. PyObject *__pyx_v___pyx_PickleError = NULL;
  3656. PyObject *__pyx_v___pyx_result = NULL;
  3657. PyObject *__pyx_r = NULL;
  3658. __Pyx_RefNannyDeclarations
  3659. int __pyx_t_1;
  3660. PyObject *__pyx_t_2 = NULL;
  3661. PyObject *__pyx_t_3 = NULL;
  3662. PyObject *__pyx_t_4 = NULL;
  3663. PyObject *__pyx_t_5 = NULL;
  3664. PyObject *__pyx_t_6 = NULL;
  3665. int __pyx_t_7;
  3666. __Pyx_RefNannySetupContext("__pyx_unpickle_FrozenList", 0);
  3667. /* "(tree fragment)":2
  3668. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state):
  3669. * if __pyx_checksum != 0x949a143: # <<<<<<<<<<<<<<
  3670. * from pickle import PickleError as __pyx_PickleError
  3671. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum)
  3672. */
  3673. __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x949a143) != 0);
  3674. if (__pyx_t_1) {
  3675. /* "(tree fragment)":3
  3676. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state):
  3677. * if __pyx_checksum != 0x949a143:
  3678. * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
  3679. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum)
  3680. * __pyx_result = FrozenList.__new__(__pyx_type)
  3681. */
  3682. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  3683. __Pyx_GOTREF(__pyx_t_2);
  3684. __Pyx_INCREF(__pyx_n_s_PickleError);
  3685. __Pyx_GIVEREF(__pyx_n_s_PickleError);
  3686. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
  3687. __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
  3688. __Pyx_GOTREF(__pyx_t_3);
  3689. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3690. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  3691. __Pyx_GOTREF(__pyx_t_2);
  3692. __Pyx_INCREF(__pyx_t_2);
  3693. __pyx_v___pyx_PickleError = __pyx_t_2;
  3694. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3695. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3696. /* "(tree fragment)":4
  3697. * if __pyx_checksum != 0x949a143:
  3698. * from pickle import PickleError as __pyx_PickleError
  3699. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum) # <<<<<<<<<<<<<<
  3700. * __pyx_result = FrozenList.__new__(__pyx_type)
  3701. * if __pyx_state is not None:
  3702. */
  3703. __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
  3704. __Pyx_GOTREF(__pyx_t_2);
  3705. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x94, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  3706. __Pyx_GOTREF(__pyx_t_4);
  3707. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3708. __Pyx_INCREF(__pyx_v___pyx_PickleError);
  3709. __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
  3710. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  3711. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  3712. if (likely(__pyx_t_5)) {
  3713. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  3714. __Pyx_INCREF(__pyx_t_5);
  3715. __Pyx_INCREF(function);
  3716. __Pyx_DECREF_SET(__pyx_t_2, function);
  3717. }
  3718. }
  3719. if (!__pyx_t_5) {
  3720. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
  3721. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3722. __Pyx_GOTREF(__pyx_t_3);
  3723. } else {
  3724. #if CYTHON_FAST_PYCALL
  3725. if (PyFunction_Check(__pyx_t_2)) {
  3726. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
  3727. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
  3728. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  3729. __Pyx_GOTREF(__pyx_t_3);
  3730. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3731. } else
  3732. #endif
  3733. #if CYTHON_FAST_PYCCALL
  3734. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  3735. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
  3736. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
  3737. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  3738. __Pyx_GOTREF(__pyx_t_3);
  3739. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3740. } else
  3741. #endif
  3742. {
  3743. __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
  3744. __Pyx_GOTREF(__pyx_t_6);
  3745. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
  3746. __Pyx_GIVEREF(__pyx_t_4);
  3747. PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
  3748. __pyx_t_4 = 0;
  3749. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
  3750. __Pyx_GOTREF(__pyx_t_3);
  3751. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3752. }
  3753. }
  3754. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3755. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  3756. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3757. __PYX_ERR(1, 4, __pyx_L1_error)
  3758. /* "(tree fragment)":2
  3759. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state):
  3760. * if __pyx_checksum != 0x949a143: # <<<<<<<<<<<<<<
  3761. * from pickle import PickleError as __pyx_PickleError
  3762. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum)
  3763. */
  3764. }
  3765. /* "(tree fragment)":5
  3766. * from pickle import PickleError as __pyx_PickleError
  3767. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum)
  3768. * __pyx_result = FrozenList.__new__(__pyx_type) # <<<<<<<<<<<<<<
  3769. * if __pyx_state is not None:
  3770. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state)
  3771. */
  3772. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7aiohttp_11_frozenlist_FrozenList), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  3773. __Pyx_GOTREF(__pyx_t_2);
  3774. __pyx_t_6 = NULL;
  3775. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  3776. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  3777. if (likely(__pyx_t_6)) {
  3778. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  3779. __Pyx_INCREF(__pyx_t_6);
  3780. __Pyx_INCREF(function);
  3781. __Pyx_DECREF_SET(__pyx_t_2, function);
  3782. }
  3783. }
  3784. if (!__pyx_t_6) {
  3785. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  3786. __Pyx_GOTREF(__pyx_t_3);
  3787. } else {
  3788. #if CYTHON_FAST_PYCALL
  3789. if (PyFunction_Check(__pyx_t_2)) {
  3790. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
  3791. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  3792. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  3793. __Pyx_GOTREF(__pyx_t_3);
  3794. } else
  3795. #endif
  3796. #if CYTHON_FAST_PYCCALL
  3797. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  3798. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
  3799. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  3800. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  3801. __Pyx_GOTREF(__pyx_t_3);
  3802. } else
  3803. #endif
  3804. {
  3805. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  3806. __Pyx_GOTREF(__pyx_t_4);
  3807. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
  3808. __Pyx_INCREF(__pyx_v___pyx_type);
  3809. __Pyx_GIVEREF(__pyx_v___pyx_type);
  3810. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
  3811. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
  3812. __Pyx_GOTREF(__pyx_t_3);
  3813. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3814. }
  3815. }
  3816. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3817. __pyx_v___pyx_result = __pyx_t_3;
  3818. __pyx_t_3 = 0;
  3819. /* "(tree fragment)":6
  3820. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum)
  3821. * __pyx_result = FrozenList.__new__(__pyx_type)
  3822. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  3823. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state)
  3824. * return __pyx_result
  3825. */
  3826. __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  3827. __pyx_t_7 = (__pyx_t_1 != 0);
  3828. if (__pyx_t_7) {
  3829. /* "(tree fragment)":7
  3830. * __pyx_result = FrozenList.__new__(__pyx_type)
  3831. * if __pyx_state is not None:
  3832. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
  3833. * return __pyx_result
  3834. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state):
  3835. */
  3836. if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 7, __pyx_L1_error)
  3837. __pyx_t_3 = __pyx_f_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList__set_state(((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  3838. __Pyx_GOTREF(__pyx_t_3);
  3839. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3840. /* "(tree fragment)":6
  3841. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x949a143 = (_items, frozen))" % __pyx_checksum)
  3842. * __pyx_result = FrozenList.__new__(__pyx_type)
  3843. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  3844. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state)
  3845. * return __pyx_result
  3846. */
  3847. }
  3848. /* "(tree fragment)":8
  3849. * if __pyx_state is not None:
  3850. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state)
  3851. * return __pyx_result # <<<<<<<<<<<<<<
  3852. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state):
  3853. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1]
  3854. */
  3855. __Pyx_XDECREF(__pyx_r);
  3856. __Pyx_INCREF(__pyx_v___pyx_result);
  3857. __pyx_r = __pyx_v___pyx_result;
  3858. goto __pyx_L0;
  3859. /* "(tree fragment)":1
  3860. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  3861. * if __pyx_checksum != 0x949a143:
  3862. * from pickle import PickleError as __pyx_PickleError
  3863. */
  3864. /* function exit code */
  3865. __pyx_L1_error:;
  3866. __Pyx_XDECREF(__pyx_t_2);
  3867. __Pyx_XDECREF(__pyx_t_3);
  3868. __Pyx_XDECREF(__pyx_t_4);
  3869. __Pyx_XDECREF(__pyx_t_5);
  3870. __Pyx_XDECREF(__pyx_t_6);
  3871. __Pyx_AddTraceback("aiohttp._frozenlist.__pyx_unpickle_FrozenList", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3872. __pyx_r = NULL;
  3873. __pyx_L0:;
  3874. __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  3875. __Pyx_XDECREF(__pyx_v___pyx_result);
  3876. __Pyx_XGIVEREF(__pyx_r);
  3877. __Pyx_RefNannyFinishContext();
  3878. return __pyx_r;
  3879. }
  3880. /* "(tree fragment)":9
  3881. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state)
  3882. * return __pyx_result
  3883. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  3884. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1]
  3885. * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
  3886. */
  3887. static PyObject *__pyx_f_7aiohttp_11_frozenlist___pyx_unpickle_FrozenList__set_state(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  3888. PyObject *__pyx_r = NULL;
  3889. __Pyx_RefNannyDeclarations
  3890. PyObject *__pyx_t_1 = NULL;
  3891. int __pyx_t_2;
  3892. Py_ssize_t __pyx_t_3;
  3893. int __pyx_t_4;
  3894. int __pyx_t_5;
  3895. PyObject *__pyx_t_6 = NULL;
  3896. PyObject *__pyx_t_7 = NULL;
  3897. PyObject *__pyx_t_8 = NULL;
  3898. PyObject *__pyx_t_9 = NULL;
  3899. __Pyx_RefNannySetupContext("__pyx_unpickle_FrozenList__set_state", 0);
  3900. /* "(tree fragment)":10
  3901. * return __pyx_result
  3902. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state):
  3903. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1] # <<<<<<<<<<<<<<
  3904. * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
  3905. * __pyx_result.__dict__.update(__pyx_state[2])
  3906. */
  3907. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  3908. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  3909. __PYX_ERR(1, 10, __pyx_L1_error)
  3910. }
  3911. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  3912. __Pyx_GOTREF(__pyx_t_1);
  3913. if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 10, __pyx_L1_error)
  3914. __Pyx_GIVEREF(__pyx_t_1);
  3915. __Pyx_GOTREF(__pyx_v___pyx_result->_items);
  3916. __Pyx_DECREF(__pyx_v___pyx_result->_items);
  3917. __pyx_v___pyx_result->_items = ((PyObject*)__pyx_t_1);
  3918. __pyx_t_1 = 0;
  3919. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  3920. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  3921. __PYX_ERR(1, 10, __pyx_L1_error)
  3922. }
  3923. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  3924. __Pyx_GOTREF(__pyx_t_1);
  3925. __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error)
  3926. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3927. __pyx_v___pyx_result->frozen = __pyx_t_2;
  3928. /* "(tree fragment)":11
  3929. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state):
  3930. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1]
  3931. * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  3932. * __pyx_result.__dict__.update(__pyx_state[2])
  3933. */
  3934. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  3935. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  3936. __PYX_ERR(1, 11, __pyx_L1_error)
  3937. }
  3938. __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __pyx_L1_error)
  3939. __pyx_t_4 = ((__pyx_t_3 > 2) != 0);
  3940. if (__pyx_t_4) {
  3941. } else {
  3942. __pyx_t_2 = __pyx_t_4;
  3943. goto __pyx_L4_bool_binop_done;
  3944. }
  3945. __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 11, __pyx_L1_error)
  3946. __pyx_t_5 = (__pyx_t_4 != 0);
  3947. __pyx_t_2 = __pyx_t_5;
  3948. __pyx_L4_bool_binop_done:;
  3949. if (__pyx_t_2) {
  3950. /* "(tree fragment)":12
  3951. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1]
  3952. * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
  3953. * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<<
  3954. */
  3955. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 12, __pyx_L1_error)
  3956. __Pyx_GOTREF(__pyx_t_6);
  3957. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
  3958. __Pyx_GOTREF(__pyx_t_7);
  3959. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3960. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  3961. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  3962. __PYX_ERR(1, 12, __pyx_L1_error)
  3963. }
  3964. __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 12, __pyx_L1_error)
  3965. __Pyx_GOTREF(__pyx_t_6);
  3966. __pyx_t_8 = NULL;
  3967. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  3968. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  3969. if (likely(__pyx_t_8)) {
  3970. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  3971. __Pyx_INCREF(__pyx_t_8);
  3972. __Pyx_INCREF(function);
  3973. __Pyx_DECREF_SET(__pyx_t_7, function);
  3974. }
  3975. }
  3976. if (!__pyx_t_8) {
  3977. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  3978. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3979. __Pyx_GOTREF(__pyx_t_1);
  3980. } else {
  3981. #if CYTHON_FAST_PYCALL
  3982. if (PyFunction_Check(__pyx_t_7)) {
  3983. PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
  3984. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  3985. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  3986. __Pyx_GOTREF(__pyx_t_1);
  3987. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3988. } else
  3989. #endif
  3990. #if CYTHON_FAST_PYCCALL
  3991. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  3992. PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
  3993. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  3994. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  3995. __Pyx_GOTREF(__pyx_t_1);
  3996. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  3997. } else
  3998. #endif
  3999. {
  4000. __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
  4001. __Pyx_GOTREF(__pyx_t_9);
  4002. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
  4003. __Pyx_GIVEREF(__pyx_t_6);
  4004. PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
  4005. __pyx_t_6 = 0;
  4006. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  4007. __Pyx_GOTREF(__pyx_t_1);
  4008. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  4009. }
  4010. }
  4011. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  4012. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4013. /* "(tree fragment)":11
  4014. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state):
  4015. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1]
  4016. * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  4017. * __pyx_result.__dict__.update(__pyx_state[2])
  4018. */
  4019. }
  4020. /* "(tree fragment)":9
  4021. * __pyx_unpickle_FrozenList__set_state(<FrozenList> __pyx_result, __pyx_state)
  4022. * return __pyx_result
  4023. * cdef __pyx_unpickle_FrozenList__set_state(FrozenList __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  4024. * __pyx_result._items = __pyx_state[0]; __pyx_result.frozen = __pyx_state[1]
  4025. * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'):
  4026. */
  4027. /* function exit code */
  4028. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4029. goto __pyx_L0;
  4030. __pyx_L1_error:;
  4031. __Pyx_XDECREF(__pyx_t_1);
  4032. __Pyx_XDECREF(__pyx_t_6);
  4033. __Pyx_XDECREF(__pyx_t_7);
  4034. __Pyx_XDECREF(__pyx_t_8);
  4035. __Pyx_XDECREF(__pyx_t_9);
  4036. __Pyx_AddTraceback("aiohttp._frozenlist.__pyx_unpickle_FrozenList__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4037. __pyx_r = 0;
  4038. __pyx_L0:;
  4039. __Pyx_XGIVEREF(__pyx_r);
  4040. __Pyx_RefNannyFinishContext();
  4041. return __pyx_r;
  4042. }
  4043. static struct __pyx_vtabstruct_7aiohttp_11_frozenlist_FrozenList __pyx_vtable_7aiohttp_11_frozenlist_FrozenList;
  4044. static PyObject *__pyx_tp_new_7aiohttp_11_frozenlist_FrozenList(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  4045. struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *p;
  4046. PyObject *o;
  4047. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  4048. o = (*t->tp_alloc)(t, 0);
  4049. } else {
  4050. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  4051. }
  4052. if (unlikely(!o)) return 0;
  4053. p = ((struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)o);
  4054. p->__pyx_vtab = __pyx_vtabptr_7aiohttp_11_frozenlist_FrozenList;
  4055. p->_items = ((PyObject*)Py_None); Py_INCREF(Py_None);
  4056. return o;
  4057. }
  4058. static void __pyx_tp_dealloc_7aiohttp_11_frozenlist_FrozenList(PyObject *o) {
  4059. struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *p = (struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)o;
  4060. #if CYTHON_USE_TP_FINALIZE
  4061. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  4062. if (PyObject_CallFinalizerFromDealloc(o)) return;
  4063. }
  4064. #endif
  4065. PyObject_GC_UnTrack(o);
  4066. Py_CLEAR(p->_items);
  4067. (*Py_TYPE(o)->tp_free)(o);
  4068. }
  4069. static int __pyx_tp_traverse_7aiohttp_11_frozenlist_FrozenList(PyObject *o, visitproc v, void *a) {
  4070. int e;
  4071. struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *p = (struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)o;
  4072. if (p->_items) {
  4073. e = (*v)(p->_items, a); if (e) return e;
  4074. }
  4075. return 0;
  4076. }
  4077. static int __pyx_tp_clear_7aiohttp_11_frozenlist_FrozenList(PyObject *o) {
  4078. PyObject* tmp;
  4079. struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *p = (struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *)o;
  4080. tmp = ((PyObject*)p->_items);
  4081. p->_items = ((PyObject*)Py_None); Py_INCREF(Py_None);
  4082. Py_XDECREF(tmp);
  4083. return 0;
  4084. }
  4085. static PyObject *__pyx_sq_item_7aiohttp_11_frozenlist_FrozenList(PyObject *o, Py_ssize_t i) {
  4086. PyObject *r;
  4087. PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  4088. r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  4089. Py_DECREF(x);
  4090. return r;
  4091. }
  4092. static int __pyx_mp_ass_subscript_7aiohttp_11_frozenlist_FrozenList(PyObject *o, PyObject *i, PyObject *v) {
  4093. if (v) {
  4094. return __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_7__setitem__(o, i, v);
  4095. }
  4096. else {
  4097. return __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_9__delitem__(o, i);
  4098. }
  4099. }
  4100. static PyObject *__pyx_getprop_7aiohttp_11_frozenlist_10FrozenList_frozen(PyObject *o, CYTHON_UNUSED void *x) {
  4101. return __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_6frozen_1__get__(o);
  4102. }
  4103. static PyMethodDef __pyx_methods_7aiohttp_11_frozenlist_FrozenList[] = {
  4104. {"freeze", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_3freeze, METH_NOARGS, 0},
  4105. {"__reversed__", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_15__reversed__, METH_NOARGS, 0},
  4106. {"insert", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_19insert, METH_VARARGS|METH_KEYWORDS, 0},
  4107. {"index", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_25index, METH_O, 0},
  4108. {"remove", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_27remove, METH_O, 0},
  4109. {"clear", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_29clear, METH_NOARGS, 0},
  4110. {"extend", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_31extend, METH_O, 0},
  4111. {"reverse", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_33reverse, METH_NOARGS, 0},
  4112. {"pop", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_35pop, METH_VARARGS|METH_KEYWORDS, 0},
  4113. {"append", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_37append, METH_O, 0},
  4114. {"count", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_39count, METH_O, 0},
  4115. {"__reduce_cython__", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_43__reduce_cython__, METH_NOARGS, 0},
  4116. {"__setstate_cython__", (PyCFunction)__pyx_pw_7aiohttp_11_frozenlist_10FrozenList_45__setstate_cython__, METH_O, 0},
  4117. {0, 0, 0, 0}
  4118. };
  4119. static struct PyGetSetDef __pyx_getsets_7aiohttp_11_frozenlist_FrozenList[] = {
  4120. {(char *)"frozen", __pyx_getprop_7aiohttp_11_frozenlist_10FrozenList_frozen, 0, (char *)0, 0},
  4121. {0, 0, 0, 0, 0}
  4122. };
  4123. static PyNumberMethods __pyx_tp_as_number_FrozenList = {
  4124. 0, /*nb_add*/
  4125. 0, /*nb_subtract*/
  4126. 0, /*nb_multiply*/
  4127. #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  4128. 0, /*nb_divide*/
  4129. #endif
  4130. 0, /*nb_remainder*/
  4131. 0, /*nb_divmod*/
  4132. 0, /*nb_power*/
  4133. 0, /*nb_negative*/
  4134. 0, /*nb_positive*/
  4135. 0, /*nb_absolute*/
  4136. 0, /*nb_nonzero*/
  4137. 0, /*nb_invert*/
  4138. 0, /*nb_lshift*/
  4139. 0, /*nb_rshift*/
  4140. 0, /*nb_and*/
  4141. 0, /*nb_xor*/
  4142. 0, /*nb_or*/
  4143. #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  4144. 0, /*nb_coerce*/
  4145. #endif
  4146. 0, /*nb_int*/
  4147. #if PY_MAJOR_VERSION < 3
  4148. 0, /*nb_long*/
  4149. #else
  4150. 0, /*reserved*/
  4151. #endif
  4152. 0, /*nb_float*/
  4153. #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  4154. 0, /*nb_oct*/
  4155. #endif
  4156. #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  4157. 0, /*nb_hex*/
  4158. #endif
  4159. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_23__iadd__, /*nb_inplace_add*/
  4160. 0, /*nb_inplace_subtract*/
  4161. 0, /*nb_inplace_multiply*/
  4162. #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  4163. 0, /*nb_inplace_divide*/
  4164. #endif
  4165. 0, /*nb_inplace_remainder*/
  4166. 0, /*nb_inplace_power*/
  4167. 0, /*nb_inplace_lshift*/
  4168. 0, /*nb_inplace_rshift*/
  4169. 0, /*nb_inplace_and*/
  4170. 0, /*nb_inplace_xor*/
  4171. 0, /*nb_inplace_or*/
  4172. 0, /*nb_floor_divide*/
  4173. 0, /*nb_true_divide*/
  4174. 0, /*nb_inplace_floor_divide*/
  4175. 0, /*nb_inplace_true_divide*/
  4176. 0, /*nb_index*/
  4177. #if PY_VERSION_HEX >= 0x03050000
  4178. 0, /*nb_matrix_multiply*/
  4179. #endif
  4180. #if PY_VERSION_HEX >= 0x03050000
  4181. 0, /*nb_inplace_matrix_multiply*/
  4182. #endif
  4183. };
  4184. static PySequenceMethods __pyx_tp_as_sequence_FrozenList = {
  4185. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_11__len__, /*sq_length*/
  4186. 0, /*sq_concat*/
  4187. 0, /*sq_repeat*/
  4188. __pyx_sq_item_7aiohttp_11_frozenlist_FrozenList, /*sq_item*/
  4189. 0, /*sq_slice*/
  4190. 0, /*sq_ass_item*/
  4191. 0, /*sq_ass_slice*/
  4192. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_21__contains__, /*sq_contains*/
  4193. 0, /*sq_inplace_concat*/
  4194. 0, /*sq_inplace_repeat*/
  4195. };
  4196. static PyMappingMethods __pyx_tp_as_mapping_FrozenList = {
  4197. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_11__len__, /*mp_length*/
  4198. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_5__getitem__, /*mp_subscript*/
  4199. __pyx_mp_ass_subscript_7aiohttp_11_frozenlist_FrozenList, /*mp_ass_subscript*/
  4200. };
  4201. static PyTypeObject __pyx_type_7aiohttp_11_frozenlist_FrozenList = {
  4202. PyVarObject_HEAD_INIT(0, 0)
  4203. "aiohttp._frozenlist.FrozenList", /*tp_name*/
  4204. sizeof(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList), /*tp_basicsize*/
  4205. 0, /*tp_itemsize*/
  4206. __pyx_tp_dealloc_7aiohttp_11_frozenlist_FrozenList, /*tp_dealloc*/
  4207. 0, /*tp_print*/
  4208. 0, /*tp_getattr*/
  4209. 0, /*tp_setattr*/
  4210. #if PY_MAJOR_VERSION < 3
  4211. 0, /*tp_compare*/
  4212. #endif
  4213. #if PY_MAJOR_VERSION >= 3
  4214. 0, /*tp_as_async*/
  4215. #endif
  4216. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_41__repr__, /*tp_repr*/
  4217. &__pyx_tp_as_number_FrozenList, /*tp_as_number*/
  4218. &__pyx_tp_as_sequence_FrozenList, /*tp_as_sequence*/
  4219. &__pyx_tp_as_mapping_FrozenList, /*tp_as_mapping*/
  4220. 0, /*tp_hash*/
  4221. 0, /*tp_call*/
  4222. 0, /*tp_str*/
  4223. 0, /*tp_getattro*/
  4224. 0, /*tp_setattro*/
  4225. 0, /*tp_as_buffer*/
  4226. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  4227. 0, /*tp_doc*/
  4228. __pyx_tp_traverse_7aiohttp_11_frozenlist_FrozenList, /*tp_traverse*/
  4229. __pyx_tp_clear_7aiohttp_11_frozenlist_FrozenList, /*tp_clear*/
  4230. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_17__richcmp__, /*tp_richcompare*/
  4231. 0, /*tp_weaklistoffset*/
  4232. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_13__iter__, /*tp_iter*/
  4233. 0, /*tp_iternext*/
  4234. __pyx_methods_7aiohttp_11_frozenlist_FrozenList, /*tp_methods*/
  4235. 0, /*tp_members*/
  4236. __pyx_getsets_7aiohttp_11_frozenlist_FrozenList, /*tp_getset*/
  4237. 0, /*tp_base*/
  4238. 0, /*tp_dict*/
  4239. 0, /*tp_descr_get*/
  4240. 0, /*tp_descr_set*/
  4241. 0, /*tp_dictoffset*/
  4242. __pyx_pw_7aiohttp_11_frozenlist_10FrozenList_1__init__, /*tp_init*/
  4243. 0, /*tp_alloc*/
  4244. __pyx_tp_new_7aiohttp_11_frozenlist_FrozenList, /*tp_new*/
  4245. 0, /*tp_free*/
  4246. 0, /*tp_is_gc*/
  4247. 0, /*tp_bases*/
  4248. 0, /*tp_mro*/
  4249. 0, /*tp_cache*/
  4250. 0, /*tp_subclasses*/
  4251. 0, /*tp_weaklist*/
  4252. 0, /*tp_del*/
  4253. 0, /*tp_version_tag*/
  4254. #if PY_VERSION_HEX >= 0x030400a1
  4255. 0, /*tp_finalize*/
  4256. #endif
  4257. };
  4258. static PyMethodDef __pyx_methods[] = {
  4259. {0, 0, 0, 0}
  4260. };
  4261. #if PY_MAJOR_VERSION >= 3
  4262. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4263. static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
  4264. static int __pyx_pymod_exec__frozenlist(PyObject* module); /*proto*/
  4265. static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  4266. {Py_mod_create, (void*)__pyx_pymod_create},
  4267. {Py_mod_exec, (void*)__pyx_pymod_exec__frozenlist},
  4268. {0, NULL}
  4269. };
  4270. #endif
  4271. static struct PyModuleDef __pyx_moduledef = {
  4272. PyModuleDef_HEAD_INIT,
  4273. "_frozenlist",
  4274. 0, /* m_doc */
  4275. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4276. 0, /* m_size */
  4277. #else
  4278. -1, /* m_size */
  4279. #endif
  4280. __pyx_methods /* m_methods */,
  4281. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4282. __pyx_moduledef_slots, /* m_slots */
  4283. #else
  4284. NULL, /* m_reload */
  4285. #endif
  4286. NULL, /* m_traverse */
  4287. NULL, /* m_clear */
  4288. NULL /* m_free */
  4289. };
  4290. #endif
  4291. static __Pyx_StringTabEntry __pyx_string_tab[] = {
  4292. {&__pyx_kp_s_Cannot_modify_frozen_list, __pyx_k_Cannot_modify_frozen_list, sizeof(__pyx_k_Cannot_modify_frozen_list), 0, 0, 1, 0},
  4293. {&__pyx_kp_s_FrozenList_frozen_r, __pyx_k_FrozenList_frozen_r, sizeof(__pyx_k_FrozenList_frozen_r), 0, 0, 1, 0},
  4294. {&__pyx_kp_s_Incompatible_checksums_s_vs_0x94, __pyx_k_Incompatible_checksums_s_vs_0x94, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x94), 0, 0, 1, 0},
  4295. {&__pyx_n_s_MutableSequence, __pyx_k_MutableSequence, sizeof(__pyx_k_MutableSequence), 0, 0, 1, 1},
  4296. {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  4297. {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  4298. {&__pyx_n_s_aiohttp__frozenlist, __pyx_k_aiohttp__frozenlist, sizeof(__pyx_k_aiohttp__frozenlist), 0, 0, 1, 1},
  4299. {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  4300. {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  4301. {&__pyx_n_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 1},
  4302. {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
  4303. {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  4304. {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  4305. {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  4306. {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  4307. {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  4308. {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
  4309. {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
  4310. {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  4311. {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  4312. {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  4313. {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  4314. {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  4315. {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  4316. {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
  4317. {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  4318. {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  4319. {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  4320. {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  4321. {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  4322. {&__pyx_n_s_pyx_unpickle_FrozenList, __pyx_k_pyx_unpickle_FrozenList, sizeof(__pyx_k_pyx_unpickle_FrozenList), 0, 0, 1, 1},
  4323. {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  4324. {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  4325. {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  4326. {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  4327. {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
  4328. {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  4329. {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
  4330. {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  4331. {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  4332. {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  4333. {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  4334. {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  4335. {0, 0, 0, 0, 0, 0, 0}
  4336. };
  4337. static int __Pyx_InitCachedBuiltins(void) {
  4338. __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 19, __pyx_L1_error)
  4339. return 0;
  4340. __pyx_L1_error:;
  4341. return -1;
  4342. }
  4343. static int __Pyx_InitCachedConstants(void) {
  4344. __Pyx_RefNannyDeclarations
  4345. __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  4346. /* "aiohttp/_frozenlist.pyx":19
  4347. * cdef object _check_frozen(self):
  4348. * if self.frozen:
  4349. * raise RuntimeError("Cannot modify frozen list.") # <<<<<<<<<<<<<<
  4350. *
  4351. * cdef inline object _fast_len(self):
  4352. */
  4353. __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_Cannot_modify_frozen_list); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 19, __pyx_L1_error)
  4354. __Pyx_GOTREF(__pyx_tuple_);
  4355. __Pyx_GIVEREF(__pyx_tuple_);
  4356. /* "(tree fragment)":1
  4357. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  4358. * if __pyx_checksum != 0x949a143:
  4359. * from pickle import PickleError as __pyx_PickleError
  4360. */
  4361. __pyx_tuple__2 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 1, __pyx_L1_error)
  4362. __Pyx_GOTREF(__pyx_tuple__2);
  4363. __Pyx_GIVEREF(__pyx_tuple__2);
  4364. __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__2, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FrozenList, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(1, 1, __pyx_L1_error)
  4365. __Pyx_RefNannyFinishContext();
  4366. return 0;
  4367. __pyx_L1_error:;
  4368. __Pyx_RefNannyFinishContext();
  4369. return -1;
  4370. }
  4371. static int __Pyx_InitGlobals(void) {
  4372. if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  4373. __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  4374. __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  4375. __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  4376. __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  4377. __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  4378. __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  4379. __pyx_int_155820355 = PyInt_FromLong(155820355L); if (unlikely(!__pyx_int_155820355)) __PYX_ERR(0, 1, __pyx_L1_error)
  4380. __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  4381. return 0;
  4382. __pyx_L1_error:;
  4383. return -1;
  4384. }
  4385. static int __Pyx_modinit_global_init_code(void); /*proto*/
  4386. static int __Pyx_modinit_variable_export_code(void); /*proto*/
  4387. static int __Pyx_modinit_function_export_code(void); /*proto*/
  4388. static int __Pyx_modinit_type_init_code(void); /*proto*/
  4389. static int __Pyx_modinit_type_import_code(void); /*proto*/
  4390. static int __Pyx_modinit_variable_import_code(void); /*proto*/
  4391. static int __Pyx_modinit_function_import_code(void); /*proto*/
  4392. static int __Pyx_modinit_global_init_code(void) {
  4393. __Pyx_RefNannyDeclarations
  4394. __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  4395. /*--- Global init code ---*/
  4396. __Pyx_RefNannyFinishContext();
  4397. return 0;
  4398. }
  4399. static int __Pyx_modinit_variable_export_code(void) {
  4400. __Pyx_RefNannyDeclarations
  4401. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  4402. /*--- Variable export code ---*/
  4403. __Pyx_RefNannyFinishContext();
  4404. return 0;
  4405. }
  4406. static int __Pyx_modinit_function_export_code(void) {
  4407. __Pyx_RefNannyDeclarations
  4408. __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  4409. /*--- Function export code ---*/
  4410. __Pyx_RefNannyFinishContext();
  4411. return 0;
  4412. }
  4413. static int __Pyx_modinit_type_init_code(void) {
  4414. __Pyx_RefNannyDeclarations
  4415. __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  4416. /*--- Type init code ---*/
  4417. __pyx_vtabptr_7aiohttp_11_frozenlist_FrozenList = &__pyx_vtable_7aiohttp_11_frozenlist_FrozenList;
  4418. __pyx_vtable_7aiohttp_11_frozenlist_FrozenList._check_frozen = (PyObject *(*)(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *))__pyx_f_7aiohttp_11_frozenlist_10FrozenList__check_frozen;
  4419. __pyx_vtable_7aiohttp_11_frozenlist_FrozenList._fast_len = (PyObject *(*)(struct __pyx_obj_7aiohttp_11_frozenlist_FrozenList *))__pyx_f_7aiohttp_11_frozenlist_10FrozenList__fast_len;
  4420. if (PyType_Ready(&__pyx_type_7aiohttp_11_frozenlist_FrozenList) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  4421. __pyx_type_7aiohttp_11_frozenlist_FrozenList.tp_print = 0;
  4422. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_11_frozenlist_FrozenList.tp_dictoffset && __pyx_type_7aiohttp_11_frozenlist_FrozenList.tp_getattro == PyObject_GenericGetAttr)) {
  4423. __pyx_type_7aiohttp_11_frozenlist_FrozenList.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  4424. }
  4425. if (__Pyx_SetVtable(__pyx_type_7aiohttp_11_frozenlist_FrozenList.tp_dict, __pyx_vtabptr_7aiohttp_11_frozenlist_FrozenList) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  4426. if (PyObject_SetAttrString(__pyx_m, "FrozenList", (PyObject *)&__pyx_type_7aiohttp_11_frozenlist_FrozenList) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  4427. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7aiohttp_11_frozenlist_FrozenList) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  4428. __pyx_ptype_7aiohttp_11_frozenlist_FrozenList = &__pyx_type_7aiohttp_11_frozenlist_FrozenList;
  4429. __Pyx_RefNannyFinishContext();
  4430. return 0;
  4431. __pyx_L1_error:;
  4432. __Pyx_RefNannyFinishContext();
  4433. return -1;
  4434. }
  4435. static int __Pyx_modinit_type_import_code(void) {
  4436. __Pyx_RefNannyDeclarations
  4437. __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  4438. /*--- Type import code ---*/
  4439. __Pyx_RefNannyFinishContext();
  4440. return 0;
  4441. }
  4442. static int __Pyx_modinit_variable_import_code(void) {
  4443. __Pyx_RefNannyDeclarations
  4444. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  4445. /*--- Variable import code ---*/
  4446. __Pyx_RefNannyFinishContext();
  4447. return 0;
  4448. }
  4449. static int __Pyx_modinit_function_import_code(void) {
  4450. __Pyx_RefNannyDeclarations
  4451. __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  4452. /*--- Function import code ---*/
  4453. __Pyx_RefNannyFinishContext();
  4454. return 0;
  4455. }
  4456. #if PY_MAJOR_VERSION < 3
  4457. #ifdef CYTHON_NO_PYINIT_EXPORT
  4458. #define __Pyx_PyMODINIT_FUNC void
  4459. #else
  4460. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  4461. #endif
  4462. #else
  4463. #ifdef CYTHON_NO_PYINIT_EXPORT
  4464. #define __Pyx_PyMODINIT_FUNC PyObject *
  4465. #else
  4466. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  4467. #endif
  4468. #endif
  4469. #ifndef CYTHON_SMALL_CODE
  4470. #if defined(__clang__)
  4471. #define CYTHON_SMALL_CODE
  4472. #elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
  4473. #define CYTHON_SMALL_CODE __attribute__((cold))
  4474. #else
  4475. #define CYTHON_SMALL_CODE
  4476. #endif
  4477. #endif
  4478. #if PY_MAJOR_VERSION < 3
  4479. __Pyx_PyMODINIT_FUNC init_frozenlist(void) CYTHON_SMALL_CODE; /*proto*/
  4480. __Pyx_PyMODINIT_FUNC init_frozenlist(void)
  4481. #else
  4482. __Pyx_PyMODINIT_FUNC PyInit__frozenlist(void) CYTHON_SMALL_CODE; /*proto*/
  4483. __Pyx_PyMODINIT_FUNC PyInit__frozenlist(void)
  4484. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4485. {
  4486. return PyModuleDef_Init(&__pyx_moduledef);
  4487. }
  4488. static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
  4489. PyObject *value = PyObject_GetAttrString(spec, from_name);
  4490. int result = 0;
  4491. if (likely(value)) {
  4492. result = PyDict_SetItemString(moddict, to_name, value);
  4493. Py_DECREF(value);
  4494. } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
  4495. PyErr_Clear();
  4496. } else {
  4497. result = -1;
  4498. }
  4499. return result;
  4500. }
  4501. static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
  4502. PyObject *module = NULL, *moddict, *modname;
  4503. if (__pyx_m)
  4504. return __Pyx_NewRef(__pyx_m);
  4505. modname = PyObject_GetAttrString(spec, "name");
  4506. if (unlikely(!modname)) goto bad;
  4507. module = PyModule_NewObject(modname);
  4508. Py_DECREF(modname);
  4509. if (unlikely(!module)) goto bad;
  4510. moddict = PyModule_GetDict(module);
  4511. if (unlikely(!moddict)) goto bad;
  4512. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
  4513. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
  4514. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
  4515. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
  4516. return module;
  4517. bad:
  4518. Py_XDECREF(module);
  4519. return NULL;
  4520. }
  4521. static int __pyx_pymod_exec__frozenlist(PyObject *__pyx_pyinit_module)
  4522. #endif
  4523. #endif
  4524. {
  4525. PyObject *__pyx_t_1 = NULL;
  4526. PyObject *__pyx_t_2 = NULL;
  4527. __Pyx_RefNannyDeclarations
  4528. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4529. if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  4530. #elif PY_MAJOR_VERSION >= 3
  4531. if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  4532. #endif
  4533. #if CYTHON_REFNANNY
  4534. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  4535. if (!__Pyx_RefNanny) {
  4536. PyErr_Clear();
  4537. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  4538. if (!__Pyx_RefNanny)
  4539. Py_FatalError("failed to import 'refnanny' module");
  4540. }
  4541. #endif
  4542. __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__frozenlist(void)", 0);
  4543. if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4544. __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  4545. __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  4546. __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  4547. #ifdef __Pyx_CyFunction_USED
  4548. if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4549. #endif
  4550. #ifdef __Pyx_FusedFunction_USED
  4551. if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4552. #endif
  4553. #ifdef __Pyx_Coroutine_USED
  4554. if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4555. #endif
  4556. #ifdef __Pyx_Generator_USED
  4557. if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4558. #endif
  4559. #ifdef __Pyx_AsyncGen_USED
  4560. if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4561. #endif
  4562. #ifdef __Pyx_StopAsyncIteration_USED
  4563. if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4564. #endif
  4565. /*--- Library function declarations ---*/
  4566. /*--- Threads initialization code ---*/
  4567. #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  4568. #ifdef WITH_THREAD /* Python build with threading support? */
  4569. PyEval_InitThreads();
  4570. #endif
  4571. #endif
  4572. /*--- Module creation code ---*/
  4573. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4574. __pyx_m = __pyx_pyinit_module;
  4575. Py_INCREF(__pyx_m);
  4576. #else
  4577. #if PY_MAJOR_VERSION < 3
  4578. __pyx_m = Py_InitModule4("_frozenlist", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  4579. #else
  4580. __pyx_m = PyModule_Create(&__pyx_moduledef);
  4581. #endif
  4582. if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  4583. #endif
  4584. __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  4585. Py_INCREF(__pyx_d);
  4586. __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  4587. __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  4588. #if CYTHON_COMPILING_IN_PYPY
  4589. Py_INCREF(__pyx_b);
  4590. #endif
  4591. if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  4592. /*--- Initialize various global constants etc. ---*/
  4593. if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4594. #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  4595. if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4596. #endif
  4597. if (__pyx_module_is_main_aiohttp___frozenlist) {
  4598. if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4599. }
  4600. #if PY_MAJOR_VERSION >= 3
  4601. {
  4602. PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
  4603. if (!PyDict_GetItemString(modules, "aiohttp._frozenlist")) {
  4604. if (unlikely(PyDict_SetItemString(modules, "aiohttp._frozenlist", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  4605. }
  4606. }
  4607. #endif
  4608. /*--- Builtin init code ---*/
  4609. if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4610. /*--- Constants init code ---*/
  4611. if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4612. /*--- Global type/function init code ---*/
  4613. (void)__Pyx_modinit_global_init_code();
  4614. (void)__Pyx_modinit_variable_export_code();
  4615. (void)__Pyx_modinit_function_export_code();
  4616. if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  4617. (void)__Pyx_modinit_type_import_code();
  4618. (void)__Pyx_modinit_variable_import_code();
  4619. (void)__Pyx_modinit_function_import_code();
  4620. /*--- Execution code ---*/
  4621. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  4622. if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4623. #endif
  4624. /* "aiohttp/_frozenlist.pyx":1
  4625. * from collections.abc import MutableSequence # <<<<<<<<<<<<<<
  4626. *
  4627. *
  4628. */
  4629. __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  4630. __Pyx_GOTREF(__pyx_t_1);
  4631. __Pyx_INCREF(__pyx_n_s_MutableSequence);
  4632. __Pyx_GIVEREF(__pyx_n_s_MutableSequence);
  4633. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MutableSequence);
  4634. __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections_abc, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  4635. __Pyx_GOTREF(__pyx_t_2);
  4636. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4637. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MutableSequence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  4638. __Pyx_GOTREF(__pyx_t_1);
  4639. if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableSequence, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4640. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4641. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4642. /* "aiohttp/_frozenlist.pyx":108
  4643. *
  4644. *
  4645. * MutableSequence.register(FrozenList) # <<<<<<<<<<<<<<
  4646. */
  4647. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableSequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
  4648. __Pyx_GOTREF(__pyx_t_2);
  4649. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_register); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
  4650. __Pyx_GOTREF(__pyx_t_1);
  4651. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4652. __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_ptype_7aiohttp_11_frozenlist_FrozenList)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error)
  4653. __Pyx_GOTREF(__pyx_t_2);
  4654. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4655. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4656. /* "(tree fragment)":1
  4657. * def __pyx_unpickle_FrozenList(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  4658. * if __pyx_checksum != 0x949a143:
  4659. * from pickle import PickleError as __pyx_PickleError
  4660. */
  4661. __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7aiohttp_11_frozenlist_1__pyx_unpickle_FrozenList, NULL, __pyx_n_s_aiohttp__frozenlist); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  4662. __Pyx_GOTREF(__pyx_t_2);
  4663. if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FrozenList, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  4664. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4665. /* "aiohttp/_frozenlist.pyx":1
  4666. * from collections.abc import MutableSequence # <<<<<<<<<<<<<<
  4667. *
  4668. *
  4669. */
  4670. __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  4671. __Pyx_GOTREF(__pyx_t_2);
  4672. if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  4673. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  4674. /*--- Wrapped vars code ---*/
  4675. goto __pyx_L0;
  4676. __pyx_L1_error:;
  4677. __Pyx_XDECREF(__pyx_t_1);
  4678. __Pyx_XDECREF(__pyx_t_2);
  4679. if (__pyx_m) {
  4680. if (__pyx_d) {
  4681. __Pyx_AddTraceback("init aiohttp._frozenlist", 0, __pyx_lineno, __pyx_filename);
  4682. }
  4683. Py_DECREF(__pyx_m); __pyx_m = 0;
  4684. } else if (!PyErr_Occurred()) {
  4685. PyErr_SetString(PyExc_ImportError, "init aiohttp._frozenlist");
  4686. }
  4687. __pyx_L0:;
  4688. __Pyx_RefNannyFinishContext();
  4689. #if CYTHON_PEP489_MULTI_PHASE_INIT
  4690. return (__pyx_m != NULL) ? 0 : -1;
  4691. #elif PY_MAJOR_VERSION >= 3
  4692. return __pyx_m;
  4693. #else
  4694. return;
  4695. #endif
  4696. }
  4697. /* --- Runtime support code --- */
  4698. /* Refnanny */
  4699. #if CYTHON_REFNANNY
  4700. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  4701. PyObject *m = NULL, *p = NULL;
  4702. void *r = NULL;
  4703. m = PyImport_ImportModule((char *)modname);
  4704. if (!m) goto end;
  4705. p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
  4706. if (!p) goto end;
  4707. r = PyLong_AsVoidPtr(p);
  4708. end:
  4709. Py_XDECREF(p);
  4710. Py_XDECREF(m);
  4711. return (__Pyx_RefNannyAPIStruct *)r;
  4712. }
  4713. #endif
  4714. /* PyObjectGetAttrStr */
  4715. #if CYTHON_USE_TYPE_SLOTS
  4716. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  4717. PyTypeObject* tp = Py_TYPE(obj);
  4718. if (likely(tp->tp_getattro))
  4719. return tp->tp_getattro(obj, attr_name);
  4720. #if PY_MAJOR_VERSION < 3
  4721. if (likely(tp->tp_getattr))
  4722. return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
  4723. #endif
  4724. return PyObject_GetAttr(obj, attr_name);
  4725. }
  4726. #endif
  4727. /* GetBuiltinName */
  4728. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  4729. PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
  4730. if (unlikely(!result)) {
  4731. PyErr_Format(PyExc_NameError,
  4732. #if PY_MAJOR_VERSION >= 3
  4733. "name '%U' is not defined", name);
  4734. #else
  4735. "name '%.200s' is not defined", PyString_AS_STRING(name));
  4736. #endif
  4737. }
  4738. return result;
  4739. }
  4740. /* RaiseDoubleKeywords */
  4741. static void __Pyx_RaiseDoubleKeywordsError(
  4742. const char* func_name,
  4743. PyObject* kw_name)
  4744. {
  4745. PyErr_Format(PyExc_TypeError,
  4746. #if PY_MAJOR_VERSION >= 3
  4747. "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
  4748. #else
  4749. "%s() got multiple values for keyword argument '%s'", func_name,
  4750. PyString_AsString(kw_name));
  4751. #endif
  4752. }
  4753. /* ParseKeywords */
  4754. static int __Pyx_ParseOptionalKeywords(
  4755. PyObject *kwds,
  4756. PyObject **argnames[],
  4757. PyObject *kwds2,
  4758. PyObject *values[],
  4759. Py_ssize_t num_pos_args,
  4760. const char* function_name)
  4761. {
  4762. PyObject *key = 0, *value = 0;
  4763. Py_ssize_t pos = 0;
  4764. PyObject*** name;
  4765. PyObject*** first_kw_arg = argnames + num_pos_args;
  4766. while (PyDict_Next(kwds, &pos, &key, &value)) {
  4767. name = first_kw_arg;
  4768. while (*name && (**name != key)) name++;
  4769. if (*name) {
  4770. values[name-argnames] = value;
  4771. continue;
  4772. }
  4773. name = first_kw_arg;
  4774. #if PY_MAJOR_VERSION < 3
  4775. if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
  4776. while (*name) {
  4777. if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
  4778. && _PyString_Eq(**name, key)) {
  4779. values[name-argnames] = value;
  4780. break;
  4781. }
  4782. name++;
  4783. }
  4784. if (*name) continue;
  4785. else {
  4786. PyObject*** argname = argnames;
  4787. while (argname != first_kw_arg) {
  4788. if ((**argname == key) || (
  4789. (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
  4790. && _PyString_Eq(**argname, key))) {
  4791. goto arg_passed_twice;
  4792. }
  4793. argname++;
  4794. }
  4795. }
  4796. } else
  4797. #endif
  4798. if (likely(PyUnicode_Check(key))) {
  4799. while (*name) {
  4800. int cmp = (**name == key) ? 0 :
  4801. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  4802. (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
  4803. #endif
  4804. PyUnicode_Compare(**name, key);
  4805. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  4806. if (cmp == 0) {
  4807. values[name-argnames] = value;
  4808. break;
  4809. }
  4810. name++;
  4811. }
  4812. if (*name) continue;
  4813. else {
  4814. PyObject*** argname = argnames;
  4815. while (argname != first_kw_arg) {
  4816. int cmp = (**argname == key) ? 0 :
  4817. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  4818. (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
  4819. #endif
  4820. PyUnicode_Compare(**argname, key);
  4821. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  4822. if (cmp == 0) goto arg_passed_twice;
  4823. argname++;
  4824. }
  4825. }
  4826. } else
  4827. goto invalid_keyword_type;
  4828. if (kwds2) {
  4829. if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
  4830. } else {
  4831. goto invalid_keyword;
  4832. }
  4833. }
  4834. return 0;
  4835. arg_passed_twice:
  4836. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  4837. goto bad;
  4838. invalid_keyword_type:
  4839. PyErr_Format(PyExc_TypeError,
  4840. "%.200s() keywords must be strings", function_name);
  4841. goto bad;
  4842. invalid_keyword:
  4843. PyErr_Format(PyExc_TypeError,
  4844. #if PY_MAJOR_VERSION < 3
  4845. "%.200s() got an unexpected keyword argument '%.200s'",
  4846. function_name, PyString_AsString(key));
  4847. #else
  4848. "%s() got an unexpected keyword argument '%U'",
  4849. function_name, key);
  4850. #endif
  4851. bad:
  4852. return -1;
  4853. }
  4854. /* RaiseArgTupleInvalid */
  4855. static void __Pyx_RaiseArgtupleInvalid(
  4856. const char* func_name,
  4857. int exact,
  4858. Py_ssize_t num_min,
  4859. Py_ssize_t num_max,
  4860. Py_ssize_t num_found)
  4861. {
  4862. Py_ssize_t num_expected;
  4863. const char *more_or_less;
  4864. if (num_found < num_min) {
  4865. num_expected = num_min;
  4866. more_or_less = "at least";
  4867. } else {
  4868. num_expected = num_max;
  4869. more_or_less = "at most";
  4870. }
  4871. if (exact) {
  4872. more_or_less = "exactly";
  4873. }
  4874. PyErr_Format(PyExc_TypeError,
  4875. "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  4876. func_name, more_or_less, num_expected,
  4877. (num_expected == 1) ? "" : "s", num_found);
  4878. }
  4879. /* PyObjectCall */
  4880. #if CYTHON_COMPILING_IN_CPYTHON
  4881. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  4882. PyObject *result;
  4883. ternaryfunc call = func->ob_type->tp_call;
  4884. if (unlikely(!call))
  4885. return PyObject_Call(func, arg, kw);
  4886. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  4887. return NULL;
  4888. result = (*call)(func, arg, kw);
  4889. Py_LeaveRecursiveCall();
  4890. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  4891. PyErr_SetString(
  4892. PyExc_SystemError,
  4893. "NULL result without error in PyObject_Call");
  4894. }
  4895. return result;
  4896. }
  4897. #endif
  4898. /* PyErrFetchRestore */
  4899. #if CYTHON_FAST_THREAD_STATE
  4900. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  4901. PyObject *tmp_type, *tmp_value, *tmp_tb;
  4902. tmp_type = tstate->curexc_type;
  4903. tmp_value = tstate->curexc_value;
  4904. tmp_tb = tstate->curexc_traceback;
  4905. tstate->curexc_type = type;
  4906. tstate->curexc_value = value;
  4907. tstate->curexc_traceback = tb;
  4908. Py_XDECREF(tmp_type);
  4909. Py_XDECREF(tmp_value);
  4910. Py_XDECREF(tmp_tb);
  4911. }
  4912. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  4913. *type = tstate->curexc_type;
  4914. *value = tstate->curexc_value;
  4915. *tb = tstate->curexc_traceback;
  4916. tstate->curexc_type = 0;
  4917. tstate->curexc_value = 0;
  4918. tstate->curexc_traceback = 0;
  4919. }
  4920. #endif
  4921. /* RaiseException */
  4922. #if PY_MAJOR_VERSION < 3
  4923. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
  4924. CYTHON_UNUSED PyObject *cause) {
  4925. __Pyx_PyThreadState_declare
  4926. Py_XINCREF(type);
  4927. if (!value || value == Py_None)
  4928. value = NULL;
  4929. else
  4930. Py_INCREF(value);
  4931. if (!tb || tb == Py_None)
  4932. tb = NULL;
  4933. else {
  4934. Py_INCREF(tb);
  4935. if (!PyTraceBack_Check(tb)) {
  4936. PyErr_SetString(PyExc_TypeError,
  4937. "raise: arg 3 must be a traceback or None");
  4938. goto raise_error;
  4939. }
  4940. }
  4941. if (PyType_Check(type)) {
  4942. #if CYTHON_COMPILING_IN_PYPY
  4943. if (!value) {
  4944. Py_INCREF(Py_None);
  4945. value = Py_None;
  4946. }
  4947. #endif
  4948. PyErr_NormalizeException(&type, &value, &tb);
  4949. } else {
  4950. if (value) {
  4951. PyErr_SetString(PyExc_TypeError,
  4952. "instance exception may not have a separate value");
  4953. goto raise_error;
  4954. }
  4955. value = type;
  4956. type = (PyObject*) Py_TYPE(type);
  4957. Py_INCREF(type);
  4958. if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
  4959. PyErr_SetString(PyExc_TypeError,
  4960. "raise: exception class must be a subclass of BaseException");
  4961. goto raise_error;
  4962. }
  4963. }
  4964. __Pyx_PyThreadState_assign
  4965. __Pyx_ErrRestore(type, value, tb);
  4966. return;
  4967. raise_error:
  4968. Py_XDECREF(value);
  4969. Py_XDECREF(type);
  4970. Py_XDECREF(tb);
  4971. return;
  4972. }
  4973. #else
  4974. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
  4975. PyObject* owned_instance = NULL;
  4976. if (tb == Py_None) {
  4977. tb = 0;
  4978. } else if (tb && !PyTraceBack_Check(tb)) {
  4979. PyErr_SetString(PyExc_TypeError,
  4980. "raise: arg 3 must be a traceback or None");
  4981. goto bad;
  4982. }
  4983. if (value == Py_None)
  4984. value = 0;
  4985. if (PyExceptionInstance_Check(type)) {
  4986. if (value) {
  4987. PyErr_SetString(PyExc_TypeError,
  4988. "instance exception may not have a separate value");
  4989. goto bad;
  4990. }
  4991. value = type;
  4992. type = (PyObject*) Py_TYPE(value);
  4993. } else if (PyExceptionClass_Check(type)) {
  4994. PyObject *instance_class = NULL;
  4995. if (value && PyExceptionInstance_Check(value)) {
  4996. instance_class = (PyObject*) Py_TYPE(value);
  4997. if (instance_class != type) {
  4998. int is_subclass = PyObject_IsSubclass(instance_class, type);
  4999. if (!is_subclass) {
  5000. instance_class = NULL;
  5001. } else if (unlikely(is_subclass == -1)) {
  5002. goto bad;
  5003. } else {
  5004. type = instance_class;
  5005. }
  5006. }
  5007. }
  5008. if (!instance_class) {
  5009. PyObject *args;
  5010. if (!value)
  5011. args = PyTuple_New(0);
  5012. else if (PyTuple_Check(value)) {
  5013. Py_INCREF(value);
  5014. args = value;
  5015. } else
  5016. args = PyTuple_Pack(1, value);
  5017. if (!args)
  5018. goto bad;
  5019. owned_instance = PyObject_Call(type, args, NULL);
  5020. Py_DECREF(args);
  5021. if (!owned_instance)
  5022. goto bad;
  5023. value = owned_instance;
  5024. if (!PyExceptionInstance_Check(value)) {
  5025. PyErr_Format(PyExc_TypeError,
  5026. "calling %R should have returned an instance of "
  5027. "BaseException, not %R",
  5028. type, Py_TYPE(value));
  5029. goto bad;
  5030. }
  5031. }
  5032. } else {
  5033. PyErr_SetString(PyExc_TypeError,
  5034. "raise: exception class must be a subclass of BaseException");
  5035. goto bad;
  5036. }
  5037. if (cause) {
  5038. PyObject *fixed_cause;
  5039. if (cause == Py_None) {
  5040. fixed_cause = NULL;
  5041. } else if (PyExceptionClass_Check(cause)) {
  5042. fixed_cause = PyObject_CallObject(cause, NULL);
  5043. if (fixed_cause == NULL)
  5044. goto bad;
  5045. } else if (PyExceptionInstance_Check(cause)) {
  5046. fixed_cause = cause;
  5047. Py_INCREF(fixed_cause);
  5048. } else {
  5049. PyErr_SetString(PyExc_TypeError,
  5050. "exception causes must derive from "
  5051. "BaseException");
  5052. goto bad;
  5053. }
  5054. PyException_SetCause(value, fixed_cause);
  5055. }
  5056. PyErr_SetObject(type, value);
  5057. if (tb) {
  5058. #if CYTHON_COMPILING_IN_PYPY
  5059. PyObject *tmp_type, *tmp_value, *tmp_tb;
  5060. PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
  5061. Py_INCREF(tb);
  5062. PyErr_Restore(tmp_type, tmp_value, tb);
  5063. Py_XDECREF(tmp_tb);
  5064. #else
  5065. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  5066. PyObject* tmp_tb = tstate->curexc_traceback;
  5067. if (tb != tmp_tb) {
  5068. Py_INCREF(tb);
  5069. tstate->curexc_traceback = tb;
  5070. Py_XDECREF(tmp_tb);
  5071. }
  5072. #endif
  5073. }
  5074. bad:
  5075. Py_XDECREF(owned_instance);
  5076. return;
  5077. }
  5078. #endif
  5079. /* GetItemInt */
  5080. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  5081. PyObject *r;
  5082. if (!j) return NULL;
  5083. r = PyObject_GetItem(o, j);
  5084. Py_DECREF(j);
  5085. return r;
  5086. }
  5087. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  5088. CYTHON_NCP_UNUSED int wraparound,
  5089. CYTHON_NCP_UNUSED int boundscheck) {
  5090. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  5091. Py_ssize_t wrapped_i = i;
  5092. if (wraparound & unlikely(i < 0)) {
  5093. wrapped_i += PyList_GET_SIZE(o);
  5094. }
  5095. if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
  5096. PyObject *r = PyList_GET_ITEM(o, wrapped_i);
  5097. Py_INCREF(r);
  5098. return r;
  5099. }
  5100. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  5101. #else
  5102. return PySequence_GetItem(o, i);
  5103. #endif
  5104. }
  5105. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  5106. CYTHON_NCP_UNUSED int wraparound,
  5107. CYTHON_NCP_UNUSED int boundscheck) {
  5108. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  5109. Py_ssize_t wrapped_i = i;
  5110. if (wraparound & unlikely(i < 0)) {
  5111. wrapped_i += PyTuple_GET_SIZE(o);
  5112. }
  5113. if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
  5114. PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
  5115. Py_INCREF(r);
  5116. return r;
  5117. }
  5118. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  5119. #else
  5120. return PySequence_GetItem(o, i);
  5121. #endif
  5122. }
  5123. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
  5124. CYTHON_NCP_UNUSED int wraparound,
  5125. CYTHON_NCP_UNUSED int boundscheck) {
  5126. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
  5127. if (is_list || PyList_CheckExact(o)) {
  5128. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
  5129. if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
  5130. PyObject *r = PyList_GET_ITEM(o, n);
  5131. Py_INCREF(r);
  5132. return r;
  5133. }
  5134. }
  5135. else if (PyTuple_CheckExact(o)) {
  5136. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
  5137. if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
  5138. PyObject *r = PyTuple_GET_ITEM(o, n);
  5139. Py_INCREF(r);
  5140. return r;
  5141. }
  5142. } else {
  5143. PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
  5144. if (likely(m && m->sq_item)) {
  5145. if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
  5146. Py_ssize_t l = m->sq_length(o);
  5147. if (likely(l >= 0)) {
  5148. i += l;
  5149. } else {
  5150. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  5151. return NULL;
  5152. PyErr_Clear();
  5153. }
  5154. }
  5155. return m->sq_item(o, i);
  5156. }
  5157. }
  5158. #else
  5159. if (is_list || PySequence_Check(o)) {
  5160. return PySequence_GetItem(o, i);
  5161. }
  5162. #endif
  5163. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  5164. }
  5165. /* ObjectGetItem */
  5166. #if CYTHON_USE_TYPE_SLOTS
  5167. static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
  5168. PyObject *runerr;
  5169. Py_ssize_t key_value;
  5170. PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
  5171. if (unlikely(!(m && m->sq_item))) {
  5172. PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
  5173. return NULL;
  5174. }
  5175. key_value = __Pyx_PyIndex_AsSsize_t(index);
  5176. if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
  5177. return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
  5178. }
  5179. if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
  5180. PyErr_Clear();
  5181. PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
  5182. }
  5183. return NULL;
  5184. }
  5185. static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
  5186. PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
  5187. if (likely(m && m->mp_subscript)) {
  5188. return m->mp_subscript(obj, key);
  5189. }
  5190. return __Pyx_PyObject_GetIndex(obj, key);
  5191. }
  5192. #endif
  5193. /* PyCFunctionFastCall */
  5194. #if CYTHON_FAST_PYCCALL
  5195. static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
  5196. PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
  5197. PyCFunction meth = PyCFunction_GET_FUNCTION(func);
  5198. PyObject *self = PyCFunction_GET_SELF(func);
  5199. int flags = PyCFunction_GET_FLAGS(func);
  5200. assert(PyCFunction_Check(func));
  5201. assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
  5202. assert(nargs >= 0);
  5203. assert(nargs == 0 || args != NULL);
  5204. /* _PyCFunction_FastCallDict() must not be called with an exception set,
  5205. because it may clear it (directly or indirectly) and so the
  5206. caller loses its exception */
  5207. assert(!PyErr_Occurred());
  5208. if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
  5209. return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
  5210. } else {
  5211. return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
  5212. }
  5213. }
  5214. #endif
  5215. /* PyFunctionFastCall */
  5216. #if CYTHON_FAST_PYCALL
  5217. #include "frameobject.h"
  5218. static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
  5219. PyObject *globals) {
  5220. PyFrameObject *f;
  5221. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  5222. PyObject **fastlocals;
  5223. Py_ssize_t i;
  5224. PyObject *result;
  5225. assert(globals != NULL);
  5226. /* XXX Perhaps we should create a specialized
  5227. PyFrame_New() that doesn't take locals, but does
  5228. take builtins without sanity checking them.
  5229. */
  5230. assert(tstate != NULL);
  5231. f = PyFrame_New(tstate, co, globals, NULL);
  5232. if (f == NULL) {
  5233. return NULL;
  5234. }
  5235. fastlocals = f->f_localsplus;
  5236. for (i = 0; i < na; i++) {
  5237. Py_INCREF(*args);
  5238. fastlocals[i] = *args++;
  5239. }
  5240. result = PyEval_EvalFrameEx(f,0);
  5241. ++tstate->recursion_depth;
  5242. Py_DECREF(f);
  5243. --tstate->recursion_depth;
  5244. return result;
  5245. }
  5246. #if 1 || PY_VERSION_HEX < 0x030600B1
  5247. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
  5248. PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
  5249. PyObject *globals = PyFunction_GET_GLOBALS(func);
  5250. PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
  5251. PyObject *closure;
  5252. #if PY_MAJOR_VERSION >= 3
  5253. PyObject *kwdefs;
  5254. #endif
  5255. PyObject *kwtuple, **k;
  5256. PyObject **d;
  5257. Py_ssize_t nd;
  5258. Py_ssize_t nk;
  5259. PyObject *result;
  5260. assert(kwargs == NULL || PyDict_Check(kwargs));
  5261. nk = kwargs ? PyDict_Size(kwargs) : 0;
  5262. if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
  5263. return NULL;
  5264. }
  5265. if (
  5266. #if PY_MAJOR_VERSION >= 3
  5267. co->co_kwonlyargcount == 0 &&
  5268. #endif
  5269. likely(kwargs == NULL || nk == 0) &&
  5270. co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
  5271. if (argdefs == NULL && co->co_argcount == nargs) {
  5272. result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
  5273. goto done;
  5274. }
  5275. else if (nargs == 0 && argdefs != NULL
  5276. && co->co_argcount == Py_SIZE(argdefs)) {
  5277. /* function called with no arguments, but all parameters have
  5278. a default value: use default values as arguments .*/
  5279. args = &PyTuple_GET_ITEM(argdefs, 0);
  5280. result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
  5281. goto done;
  5282. }
  5283. }
  5284. if (kwargs != NULL) {
  5285. Py_ssize_t pos, i;
  5286. kwtuple = PyTuple_New(2 * nk);
  5287. if (kwtuple == NULL) {
  5288. result = NULL;
  5289. goto done;
  5290. }
  5291. k = &PyTuple_GET_ITEM(kwtuple, 0);
  5292. pos = i = 0;
  5293. while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
  5294. Py_INCREF(k[i]);
  5295. Py_INCREF(k[i+1]);
  5296. i += 2;
  5297. }
  5298. nk = i / 2;
  5299. }
  5300. else {
  5301. kwtuple = NULL;
  5302. k = NULL;
  5303. }
  5304. closure = PyFunction_GET_CLOSURE(func);
  5305. #if PY_MAJOR_VERSION >= 3
  5306. kwdefs = PyFunction_GET_KW_DEFAULTS(func);
  5307. #endif
  5308. if (argdefs != NULL) {
  5309. d = &PyTuple_GET_ITEM(argdefs, 0);
  5310. nd = Py_SIZE(argdefs);
  5311. }
  5312. else {
  5313. d = NULL;
  5314. nd = 0;
  5315. }
  5316. #if PY_MAJOR_VERSION >= 3
  5317. result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
  5318. args, nargs,
  5319. k, (int)nk,
  5320. d, (int)nd, kwdefs, closure);
  5321. #else
  5322. result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
  5323. args, nargs,
  5324. k, (int)nk,
  5325. d, (int)nd, closure);
  5326. #endif
  5327. Py_XDECREF(kwtuple);
  5328. done:
  5329. Py_LeaveRecursiveCall();
  5330. return result;
  5331. }
  5332. #endif
  5333. #endif
  5334. /* PyObjectCallMethO */
  5335. #if CYTHON_COMPILING_IN_CPYTHON
  5336. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  5337. PyObject *self, *result;
  5338. PyCFunction cfunc;
  5339. cfunc = PyCFunction_GET_FUNCTION(func);
  5340. self = PyCFunction_GET_SELF(func);
  5341. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  5342. return NULL;
  5343. result = cfunc(self, arg);
  5344. Py_LeaveRecursiveCall();
  5345. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  5346. PyErr_SetString(
  5347. PyExc_SystemError,
  5348. "NULL result without error in PyObject_Call");
  5349. }
  5350. return result;
  5351. }
  5352. #endif
  5353. /* PyObjectCallOneArg */
  5354. #if CYTHON_COMPILING_IN_CPYTHON
  5355. static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  5356. PyObject *result;
  5357. PyObject *args = PyTuple_New(1);
  5358. if (unlikely(!args)) return NULL;
  5359. Py_INCREF(arg);
  5360. PyTuple_SET_ITEM(args, 0, arg);
  5361. result = __Pyx_PyObject_Call(func, args, NULL);
  5362. Py_DECREF(args);
  5363. return result;
  5364. }
  5365. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  5366. #if CYTHON_FAST_PYCALL
  5367. if (PyFunction_Check(func)) {
  5368. return __Pyx_PyFunction_FastCall(func, &arg, 1);
  5369. }
  5370. #endif
  5371. if (likely(PyCFunction_Check(func))) {
  5372. if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
  5373. return __Pyx_PyObject_CallMethO(func, arg);
  5374. #if CYTHON_FAST_PYCCALL
  5375. } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
  5376. return __Pyx_PyCFunction_FastCall(func, &arg, 1);
  5377. #endif
  5378. }
  5379. }
  5380. return __Pyx__PyObject_CallOneArg(func, arg);
  5381. }
  5382. #else
  5383. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  5384. PyObject *result;
  5385. PyObject *args = PyTuple_Pack(1, arg);
  5386. if (unlikely(!args)) return NULL;
  5387. result = __Pyx_PyObject_Call(func, args, NULL);
  5388. Py_DECREF(args);
  5389. return result;
  5390. }
  5391. #endif
  5392. /* PyObjectCallNoArg */
  5393. #if CYTHON_COMPILING_IN_CPYTHON
  5394. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  5395. #if CYTHON_FAST_PYCALL
  5396. if (PyFunction_Check(func)) {
  5397. return __Pyx_PyFunction_FastCall(func, NULL, 0);
  5398. }
  5399. #endif
  5400. #ifdef __Pyx_CyFunction_USED
  5401. if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
  5402. #else
  5403. if (likely(PyCFunction_Check(func))) {
  5404. #endif
  5405. if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
  5406. return __Pyx_PyObject_CallMethO(func, NULL);
  5407. }
  5408. }
  5409. return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
  5410. }
  5411. #endif
  5412. /* PyIntBinop */
  5413. #if !CYTHON_COMPILING_IN_PYPY
  5414. static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
  5415. if (op1 == op2) {
  5416. Py_RETURN_TRUE;
  5417. }
  5418. #if PY_MAJOR_VERSION < 3
  5419. if (likely(PyInt_CheckExact(op1))) {
  5420. const long b = intval;
  5421. long a = PyInt_AS_LONG(op1);
  5422. if (a == b) {
  5423. Py_RETURN_TRUE;
  5424. } else {
  5425. Py_RETURN_FALSE;
  5426. }
  5427. }
  5428. #endif
  5429. #if CYTHON_USE_PYLONG_INTERNALS
  5430. if (likely(PyLong_CheckExact(op1))) {
  5431. const long b = intval;
  5432. long a;
  5433. const digit* digits = ((PyLongObject*)op1)->ob_digit;
  5434. const Py_ssize_t size = Py_SIZE(op1);
  5435. if (likely(__Pyx_sst_abs(size) <= 1)) {
  5436. a = likely(size) ? digits[0] : 0;
  5437. if (size == -1) a = -a;
  5438. } else {
  5439. switch (size) {
  5440. case -2:
  5441. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  5442. a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  5443. break;
  5444. }
  5445. CYTHON_FALLTHROUGH;
  5446. case 2:
  5447. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  5448. a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  5449. break;
  5450. }
  5451. CYTHON_FALLTHROUGH;
  5452. case -3:
  5453. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  5454. a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  5455. break;
  5456. }
  5457. CYTHON_FALLTHROUGH;
  5458. case 3:
  5459. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  5460. a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  5461. break;
  5462. }
  5463. CYTHON_FALLTHROUGH;
  5464. case -4:
  5465. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  5466. a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  5467. break;
  5468. }
  5469. CYTHON_FALLTHROUGH;
  5470. case 4:
  5471. if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  5472. a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
  5473. break;
  5474. }
  5475. CYTHON_FALLTHROUGH;
  5476. #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
  5477. default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
  5478. #else
  5479. default: Py_RETURN_FALSE;
  5480. #endif
  5481. }
  5482. }
  5483. if (a == b) {
  5484. Py_RETURN_TRUE;
  5485. } else {
  5486. Py_RETURN_FALSE;
  5487. }
  5488. }
  5489. #endif
  5490. if (PyFloat_CheckExact(op1)) {
  5491. const long b = intval;
  5492. double a = PyFloat_AS_DOUBLE(op1);
  5493. if ((double)a == (double)b) {
  5494. Py_RETURN_TRUE;
  5495. } else {
  5496. Py_RETURN_FALSE;
  5497. }
  5498. }
  5499. return PyObject_RichCompare(op1, op2, Py_EQ);
  5500. }
  5501. #endif
  5502. /* PyObjectCallMethod1 */
  5503. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
  5504. PyObject *result = NULL;
  5505. #if CYTHON_UNPACK_METHODS
  5506. if (likely(PyMethod_Check(method))) {
  5507. PyObject *self = PyMethod_GET_SELF(method);
  5508. if (likely(self)) {
  5509. PyObject *args;
  5510. PyObject *function = PyMethod_GET_FUNCTION(method);
  5511. #if CYTHON_FAST_PYCALL
  5512. if (PyFunction_Check(function)) {
  5513. PyObject *args[2] = {self, arg};
  5514. result = __Pyx_PyFunction_FastCall(function, args, 2);
  5515. goto done;
  5516. }
  5517. #endif
  5518. #if CYTHON_FAST_PYCCALL
  5519. if (__Pyx_PyFastCFunction_Check(function)) {
  5520. PyObject *args[2] = {self, arg};
  5521. result = __Pyx_PyCFunction_FastCall(function, args, 2);
  5522. goto done;
  5523. }
  5524. #endif
  5525. args = PyTuple_New(2);
  5526. if (unlikely(!args)) goto done;
  5527. Py_INCREF(self);
  5528. PyTuple_SET_ITEM(args, 0, self);
  5529. Py_INCREF(arg);
  5530. PyTuple_SET_ITEM(args, 1, arg);
  5531. Py_INCREF(function);
  5532. result = __Pyx_PyObject_Call(function, args, NULL);
  5533. Py_DECREF(args);
  5534. Py_DECREF(function);
  5535. return result;
  5536. }
  5537. }
  5538. #endif
  5539. result = __Pyx_PyObject_CallOneArg(method, arg);
  5540. goto done;
  5541. done:
  5542. return result;
  5543. }
  5544. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  5545. PyObject *method, *result;
  5546. method = __Pyx_PyObject_GetAttrStr(obj, method_name);
  5547. if (unlikely(!method)) return NULL;
  5548. result = __Pyx__PyObject_CallMethod1(method, arg);
  5549. Py_DECREF(method);
  5550. return result;
  5551. }
  5552. /* pop_index */
  5553. static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) {
  5554. PyObject *r;
  5555. if (unlikely(!py_ix)) return NULL;
  5556. r = __Pyx__PyObject_PopIndex(L, py_ix);
  5557. Py_DECREF(py_ix);
  5558. return r;
  5559. }
  5560. static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) {
  5561. return __Pyx_PyObject_CallMethod1(L, __pyx_n_s_pop, py_ix);
  5562. }
  5563. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  5564. static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) {
  5565. Py_ssize_t size = PyList_GET_SIZE(L);
  5566. if (likely(size > (((PyListObject*)L)->allocated >> 1))) {
  5567. Py_ssize_t cix = ix;
  5568. if (cix < 0) {
  5569. cix += size;
  5570. }
  5571. if (likely(0 <= cix && cix < size)) {
  5572. PyObject* v = PyList_GET_ITEM(L, cix);
  5573. Py_SIZE(L) -= 1;
  5574. size -= 1;
  5575. memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*));
  5576. return v;
  5577. }
  5578. }
  5579. if (py_ix == Py_None) {
  5580. return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix));
  5581. } else {
  5582. return __Pyx__PyObject_PopIndex(L, py_ix);
  5583. }
  5584. }
  5585. #endif
  5586. /* PyErrExceptionMatches */
  5587. #if CYTHON_FAST_THREAD_STATE
  5588. static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  5589. Py_ssize_t i, n;
  5590. n = PyTuple_GET_SIZE(tuple);
  5591. #if PY_MAJOR_VERSION >= 3
  5592. for (i=0; i<n; i++) {
  5593. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  5594. }
  5595. #endif
  5596. for (i=0; i<n; i++) {
  5597. if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
  5598. }
  5599. return 0;
  5600. }
  5601. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
  5602. PyObject *exc_type = tstate->curexc_type;
  5603. if (exc_type == err) return 1;
  5604. if (unlikely(!exc_type)) return 0;
  5605. if (unlikely(PyTuple_Check(err)))
  5606. return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
  5607. return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
  5608. }
  5609. #endif
  5610. /* GetAttr */
  5611. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
  5612. #if CYTHON_USE_TYPE_SLOTS
  5613. #if PY_MAJOR_VERSION >= 3
  5614. if (likely(PyUnicode_Check(n)))
  5615. #else
  5616. if (likely(PyString_Check(n)))
  5617. #endif
  5618. return __Pyx_PyObject_GetAttrStr(o, n);
  5619. #endif
  5620. return PyObject_GetAttr(o, n);
  5621. }
  5622. /* GetAttr3 */
  5623. static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
  5624. __Pyx_PyThreadState_declare
  5625. __Pyx_PyThreadState_assign
  5626. if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  5627. return NULL;
  5628. __Pyx_PyErr_Clear();
  5629. Py_INCREF(d);
  5630. return d;
  5631. }
  5632. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
  5633. PyObject *r = __Pyx_GetAttr(o, n);
  5634. return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
  5635. }
  5636. /* GetModuleGlobalName */
  5637. static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
  5638. PyObject *result;
  5639. #if !CYTHON_AVOID_BORROWED_REFS
  5640. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
  5641. result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
  5642. if (likely(result)) {
  5643. Py_INCREF(result);
  5644. } else if (unlikely(PyErr_Occurred())) {
  5645. result = NULL;
  5646. } else {
  5647. #else
  5648. result = PyDict_GetItem(__pyx_d, name);
  5649. if (likely(result)) {
  5650. Py_INCREF(result);
  5651. } else {
  5652. #endif
  5653. #else
  5654. result = PyObject_GetItem(__pyx_d, name);
  5655. if (!result) {
  5656. PyErr_Clear();
  5657. #endif
  5658. result = __Pyx_GetBuiltinName(name);
  5659. }
  5660. return result;
  5661. }
  5662. /* Import */
  5663. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
  5664. PyObject *empty_list = 0;
  5665. PyObject *module = 0;
  5666. PyObject *global_dict = 0;
  5667. PyObject *empty_dict = 0;
  5668. PyObject *list;
  5669. #if PY_MAJOR_VERSION < 3
  5670. PyObject *py_import;
  5671. py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
  5672. if (!py_import)
  5673. goto bad;
  5674. #endif
  5675. if (from_list)
  5676. list = from_list;
  5677. else {
  5678. empty_list = PyList_New(0);
  5679. if (!empty_list)
  5680. goto bad;
  5681. list = empty_list;
  5682. }
  5683. global_dict = PyModule_GetDict(__pyx_m);
  5684. if (!global_dict)
  5685. goto bad;
  5686. empty_dict = PyDict_New();
  5687. if (!empty_dict)
  5688. goto bad;
  5689. {
  5690. #if PY_MAJOR_VERSION >= 3
  5691. if (level == -1) {
  5692. if (strchr(__Pyx_MODULE_NAME, '.')) {
  5693. module = PyImport_ImportModuleLevelObject(
  5694. name, global_dict, empty_dict, list, 1);
  5695. if (!module) {
  5696. if (!PyErr_ExceptionMatches(PyExc_ImportError))
  5697. goto bad;
  5698. PyErr_Clear();
  5699. }
  5700. }
  5701. level = 0;
  5702. }
  5703. #endif
  5704. if (!module) {
  5705. #if PY_MAJOR_VERSION < 3
  5706. PyObject *py_level = PyInt_FromLong(level);
  5707. if (!py_level)
  5708. goto bad;
  5709. module = PyObject_CallFunctionObjArgs(py_import,
  5710. name, global_dict, empty_dict, list, py_level, NULL);
  5711. Py_DECREF(py_level);
  5712. #else
  5713. module = PyImport_ImportModuleLevelObject(
  5714. name, global_dict, empty_dict, list, level);
  5715. #endif
  5716. }
  5717. }
  5718. bad:
  5719. #if PY_MAJOR_VERSION < 3
  5720. Py_XDECREF(py_import);
  5721. #endif
  5722. Py_XDECREF(empty_list);
  5723. Py_XDECREF(empty_dict);
  5724. return module;
  5725. }
  5726. /* ImportFrom */
  5727. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
  5728. PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
  5729. if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
  5730. PyErr_Format(PyExc_ImportError,
  5731. #if PY_MAJOR_VERSION < 3
  5732. "cannot import name %.230s", PyString_AS_STRING(name));
  5733. #else
  5734. "cannot import name %S", name);
  5735. #endif
  5736. }
  5737. return value;
  5738. }
  5739. /* HasAttr */
  5740. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
  5741. PyObject *r;
  5742. if (unlikely(!__Pyx_PyBaseString_Check(n))) {
  5743. PyErr_SetString(PyExc_TypeError,
  5744. "hasattr(): attribute name must be string");
  5745. return -1;
  5746. }
  5747. r = __Pyx_GetAttr(o, n);
  5748. if (unlikely(!r)) {
  5749. PyErr_Clear();
  5750. return 0;
  5751. } else {
  5752. Py_DECREF(r);
  5753. return 1;
  5754. }
  5755. }
  5756. /* PyObject_GenericGetAttrNoDict */
  5757. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  5758. static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
  5759. PyErr_Format(PyExc_AttributeError,
  5760. #if PY_MAJOR_VERSION >= 3
  5761. "'%.50s' object has no attribute '%U'",
  5762. tp->tp_name, attr_name);
  5763. #else
  5764. "'%.50s' object has no attribute '%.400s'",
  5765. tp->tp_name, PyString_AS_STRING(attr_name));
  5766. #endif
  5767. return NULL;
  5768. }
  5769. static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
  5770. PyObject *descr;
  5771. PyTypeObject *tp = Py_TYPE(obj);
  5772. if (unlikely(!PyString_Check(attr_name))) {
  5773. return PyObject_GenericGetAttr(obj, attr_name);
  5774. }
  5775. assert(!tp->tp_dictoffset);
  5776. descr = _PyType_Lookup(tp, attr_name);
  5777. if (unlikely(!descr)) {
  5778. return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
  5779. }
  5780. Py_INCREF(descr);
  5781. #if PY_MAJOR_VERSION < 3
  5782. if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
  5783. #endif
  5784. {
  5785. descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
  5786. if (unlikely(f)) {
  5787. PyObject *res = f(descr, obj, (PyObject *)tp);
  5788. Py_DECREF(descr);
  5789. return res;
  5790. }
  5791. }
  5792. return descr;
  5793. }
  5794. #endif
  5795. /* PyObject_GenericGetAttr */
  5796. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  5797. static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
  5798. if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
  5799. return PyObject_GenericGetAttr(obj, attr_name);
  5800. }
  5801. return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
  5802. }
  5803. #endif
  5804. /* SetVTable */
  5805. static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
  5806. #if PY_VERSION_HEX >= 0x02070000
  5807. PyObject *ob = PyCapsule_New(vtable, 0, 0);
  5808. #else
  5809. PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
  5810. #endif
  5811. if (!ob)
  5812. goto bad;
  5813. if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
  5814. goto bad;
  5815. Py_DECREF(ob);
  5816. return 0;
  5817. bad:
  5818. Py_XDECREF(ob);
  5819. return -1;
  5820. }
  5821. /* SetupReduce */
  5822. static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  5823. int ret;
  5824. PyObject *name_attr;
  5825. name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  5826. if (likely(name_attr)) {
  5827. ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  5828. } else {
  5829. ret = -1;
  5830. }
  5831. if (unlikely(ret < 0)) {
  5832. PyErr_Clear();
  5833. ret = 0;
  5834. }
  5835. Py_XDECREF(name_attr);
  5836. return ret;
  5837. }
  5838. static int __Pyx_setup_reduce(PyObject* type_obj) {
  5839. int ret = 0;
  5840. PyObject *object_reduce = NULL;
  5841. PyObject *object_reduce_ex = NULL;
  5842. PyObject *reduce = NULL;
  5843. PyObject *reduce_ex = NULL;
  5844. PyObject *reduce_cython = NULL;
  5845. PyObject *setstate = NULL;
  5846. PyObject *setstate_cython = NULL;
  5847. #if CYTHON_USE_PYTYPE_LOOKUP
  5848. if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
  5849. #else
  5850. if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
  5851. #endif
  5852. #if CYTHON_USE_PYTYPE_LOOKUP
  5853. object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
  5854. #else
  5855. object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
  5856. #endif
  5857. reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
  5858. if (reduce_ex == object_reduce_ex) {
  5859. #if CYTHON_USE_PYTYPE_LOOKUP
  5860. object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
  5861. #else
  5862. object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
  5863. #endif
  5864. reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
  5865. if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
  5866. reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
  5867. ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
  5868. ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
  5869. setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
  5870. if (!setstate) PyErr_Clear();
  5871. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
  5872. setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
  5873. ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
  5874. ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
  5875. }
  5876. PyType_Modified((PyTypeObject*)type_obj);
  5877. }
  5878. }
  5879. goto GOOD;
  5880. BAD:
  5881. if (!PyErr_Occurred())
  5882. PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
  5883. ret = -1;
  5884. GOOD:
  5885. #if !CYTHON_USE_PYTYPE_LOOKUP
  5886. Py_XDECREF(object_reduce);
  5887. Py_XDECREF(object_reduce_ex);
  5888. #endif
  5889. Py_XDECREF(reduce);
  5890. Py_XDECREF(reduce_ex);
  5891. Py_XDECREF(reduce_cython);
  5892. Py_XDECREF(setstate);
  5893. Py_XDECREF(setstate_cython);
  5894. return ret;
  5895. }
  5896. /* CLineInTraceback */
  5897. #ifndef CYTHON_CLINE_IN_TRACEBACK
  5898. static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
  5899. PyObject *use_cline;
  5900. PyObject *ptype, *pvalue, *ptraceback;
  5901. #if CYTHON_COMPILING_IN_CPYTHON
  5902. PyObject **cython_runtime_dict;
  5903. #endif
  5904. if (unlikely(!__pyx_cython_runtime)) {
  5905. return c_line;
  5906. }
  5907. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  5908. #if CYTHON_COMPILING_IN_CPYTHON
  5909. cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
  5910. if (likely(cython_runtime_dict)) {
  5911. use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
  5912. } else
  5913. #endif
  5914. {
  5915. PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
  5916. if (use_cline_obj) {
  5917. use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
  5918. Py_DECREF(use_cline_obj);
  5919. } else {
  5920. PyErr_Clear();
  5921. use_cline = NULL;
  5922. }
  5923. }
  5924. if (!use_cline) {
  5925. c_line = 0;
  5926. PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
  5927. }
  5928. else if (PyObject_Not(use_cline) != 0) {
  5929. c_line = 0;
  5930. }
  5931. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  5932. return c_line;
  5933. }
  5934. #endif
  5935. /* CodeObjectCache */
  5936. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  5937. int start = 0, mid = 0, end = count - 1;
  5938. if (end >= 0 && code_line > entries[end].code_line) {
  5939. return count;
  5940. }
  5941. while (start < end) {
  5942. mid = start + (end - start) / 2;
  5943. if (code_line < entries[mid].code_line) {
  5944. end = mid;
  5945. } else if (code_line > entries[mid].code_line) {
  5946. start = mid + 1;
  5947. } else {
  5948. return mid;
  5949. }
  5950. }
  5951. if (code_line <= entries[mid].code_line) {
  5952. return mid;
  5953. } else {
  5954. return mid + 1;
  5955. }
  5956. }
  5957. static PyCodeObject *__pyx_find_code_object(int code_line) {
  5958. PyCodeObject* code_object;
  5959. int pos;
  5960. if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
  5961. return NULL;
  5962. }
  5963. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  5964. if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
  5965. return NULL;
  5966. }
  5967. code_object = __pyx_code_cache.entries[pos].code_object;
  5968. Py_INCREF(code_object);
  5969. return code_object;
  5970. }
  5971. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
  5972. int pos, i;
  5973. __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
  5974. if (unlikely(!code_line)) {
  5975. return;
  5976. }
  5977. if (unlikely(!entries)) {
  5978. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  5979. if (likely(entries)) {
  5980. __pyx_code_cache.entries = entries;
  5981. __pyx_code_cache.max_count = 64;
  5982. __pyx_code_cache.count = 1;
  5983. entries[0].code_line = code_line;
  5984. entries[0].code_object = code_object;
  5985. Py_INCREF(code_object);
  5986. }
  5987. return;
  5988. }
  5989. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  5990. if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
  5991. PyCodeObject* tmp = entries[pos].code_object;
  5992. entries[pos].code_object = code_object;
  5993. Py_DECREF(tmp);
  5994. return;
  5995. }
  5996. if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
  5997. int new_max = __pyx_code_cache.max_count + 64;
  5998. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  5999. __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
  6000. if (unlikely(!entries)) {
  6001. return;
  6002. }
  6003. __pyx_code_cache.entries = entries;
  6004. __pyx_code_cache.max_count = new_max;
  6005. }
  6006. for (i=__pyx_code_cache.count; i>pos; i--) {
  6007. entries[i] = entries[i-1];
  6008. }
  6009. entries[pos].code_line = code_line;
  6010. entries[pos].code_object = code_object;
  6011. __pyx_code_cache.count++;
  6012. Py_INCREF(code_object);
  6013. }
  6014. /* AddTraceback */
  6015. #include "compile.h"
  6016. #include "frameobject.h"
  6017. #include "traceback.h"
  6018. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  6019. const char *funcname, int c_line,
  6020. int py_line, const char *filename) {
  6021. PyCodeObject *py_code = 0;
  6022. PyObject *py_srcfile = 0;
  6023. PyObject *py_funcname = 0;
  6024. #if PY_MAJOR_VERSION < 3
  6025. py_srcfile = PyString_FromString(filename);
  6026. #else
  6027. py_srcfile = PyUnicode_FromString(filename);
  6028. #endif
  6029. if (!py_srcfile) goto bad;
  6030. if (c_line) {
  6031. #if PY_MAJOR_VERSION < 3
  6032. py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  6033. #else
  6034. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  6035. #endif
  6036. }
  6037. else {
  6038. #if PY_MAJOR_VERSION < 3
  6039. py_funcname = PyString_FromString(funcname);
  6040. #else
  6041. py_funcname = PyUnicode_FromString(funcname);
  6042. #endif
  6043. }
  6044. if (!py_funcname) goto bad;
  6045. py_code = __Pyx_PyCode_New(
  6046. 0,
  6047. 0,
  6048. 0,
  6049. 0,
  6050. 0,
  6051. __pyx_empty_bytes, /*PyObject *code,*/
  6052. __pyx_empty_tuple, /*PyObject *consts,*/
  6053. __pyx_empty_tuple, /*PyObject *names,*/
  6054. __pyx_empty_tuple, /*PyObject *varnames,*/
  6055. __pyx_empty_tuple, /*PyObject *freevars,*/
  6056. __pyx_empty_tuple, /*PyObject *cellvars,*/
  6057. py_srcfile, /*PyObject *filename,*/
  6058. py_funcname, /*PyObject *name,*/
  6059. py_line,
  6060. __pyx_empty_bytes /*PyObject *lnotab*/
  6061. );
  6062. Py_DECREF(py_srcfile);
  6063. Py_DECREF(py_funcname);
  6064. return py_code;
  6065. bad:
  6066. Py_XDECREF(py_srcfile);
  6067. Py_XDECREF(py_funcname);
  6068. return NULL;
  6069. }
  6070. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  6071. int py_line, const char *filename) {
  6072. PyCodeObject *py_code = 0;
  6073. PyFrameObject *py_frame = 0;
  6074. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  6075. if (c_line) {
  6076. c_line = __Pyx_CLineForTraceback(tstate, c_line);
  6077. }
  6078. py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
  6079. if (!py_code) {
  6080. py_code = __Pyx_CreateCodeObjectForTraceback(
  6081. funcname, c_line, py_line, filename);
  6082. if (!py_code) goto bad;
  6083. __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
  6084. }
  6085. py_frame = PyFrame_New(
  6086. tstate, /*PyThreadState *tstate,*/
  6087. py_code, /*PyCodeObject *code,*/
  6088. __pyx_d, /*PyObject *globals,*/
  6089. 0 /*PyObject *locals*/
  6090. );
  6091. if (!py_frame) goto bad;
  6092. __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  6093. PyTraceBack_Here(py_frame);
  6094. bad:
  6095. Py_XDECREF(py_code);
  6096. Py_XDECREF(py_frame);
  6097. }
  6098. /* CIntToPy */
  6099. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
  6100. const int neg_one = (int) -1, const_zero = (int) 0;
  6101. const int is_unsigned = neg_one > const_zero;
  6102. if (is_unsigned) {
  6103. if (sizeof(int) < sizeof(long)) {
  6104. return PyInt_FromLong((long) value);
  6105. } else if (sizeof(int) <= sizeof(unsigned long)) {
  6106. return PyLong_FromUnsignedLong((unsigned long) value);
  6107. #ifdef HAVE_LONG_LONG
  6108. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  6109. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  6110. #endif
  6111. }
  6112. } else {
  6113. if (sizeof(int) <= sizeof(long)) {
  6114. return PyInt_FromLong((long) value);
  6115. #ifdef HAVE_LONG_LONG
  6116. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  6117. return PyLong_FromLongLong((PY_LONG_LONG) value);
  6118. #endif
  6119. }
  6120. }
  6121. {
  6122. int one = 1; int little = (int)*(unsigned char *)&one;
  6123. unsigned char *bytes = (unsigned char *)&value;
  6124. return _PyLong_FromByteArray(bytes, sizeof(int),
  6125. little, !is_unsigned);
  6126. }
  6127. }
  6128. /* CIntFromPyVerify */
  6129. #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  6130. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  6131. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  6132. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  6133. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  6134. {\
  6135. func_type value = func_value;\
  6136. if (sizeof(target_type) < sizeof(func_type)) {\
  6137. if (unlikely(value != (func_type) (target_type) value)) {\
  6138. func_type zero = 0;\
  6139. if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  6140. return (target_type) -1;\
  6141. if (is_unsigned && unlikely(value < zero))\
  6142. goto raise_neg_overflow;\
  6143. else\
  6144. goto raise_overflow;\
  6145. }\
  6146. }\
  6147. return (target_type) value;\
  6148. }
  6149. /* CIntToPy */
  6150. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
  6151. const long neg_one = (long) -1, const_zero = (long) 0;
  6152. const int is_unsigned = neg_one > const_zero;
  6153. if (is_unsigned) {
  6154. if (sizeof(long) < sizeof(long)) {
  6155. return PyInt_FromLong((long) value);
  6156. } else if (sizeof(long) <= sizeof(unsigned long)) {
  6157. return PyLong_FromUnsignedLong((unsigned long) value);
  6158. #ifdef HAVE_LONG_LONG
  6159. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  6160. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  6161. #endif
  6162. }
  6163. } else {
  6164. if (sizeof(long) <= sizeof(long)) {
  6165. return PyInt_FromLong((long) value);
  6166. #ifdef HAVE_LONG_LONG
  6167. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  6168. return PyLong_FromLongLong((PY_LONG_LONG) value);
  6169. #endif
  6170. }
  6171. }
  6172. {
  6173. int one = 1; int little = (int)*(unsigned char *)&one;
  6174. unsigned char *bytes = (unsigned char *)&value;
  6175. return _PyLong_FromByteArray(bytes, sizeof(long),
  6176. little, !is_unsigned);
  6177. }
  6178. }
  6179. /* CIntFromPy */
  6180. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
  6181. const long neg_one = (long) -1, const_zero = (long) 0;
  6182. const int is_unsigned = neg_one > const_zero;
  6183. #if PY_MAJOR_VERSION < 3
  6184. if (likely(PyInt_Check(x))) {
  6185. if (sizeof(long) < sizeof(long)) {
  6186. __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
  6187. } else {
  6188. long val = PyInt_AS_LONG(x);
  6189. if (is_unsigned && unlikely(val < 0)) {
  6190. goto raise_neg_overflow;
  6191. }
  6192. return (long) val;
  6193. }
  6194. } else
  6195. #endif
  6196. if (likely(PyLong_Check(x))) {
  6197. if (is_unsigned) {
  6198. #if CYTHON_USE_PYLONG_INTERNALS
  6199. const digit* digits = ((PyLongObject*)x)->ob_digit;
  6200. switch (Py_SIZE(x)) {
  6201. case 0: return (long) 0;
  6202. case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
  6203. case 2:
  6204. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  6205. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  6206. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6207. } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
  6208. return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  6209. }
  6210. }
  6211. break;
  6212. case 3:
  6213. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  6214. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  6215. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6216. } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
  6217. return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  6218. }
  6219. }
  6220. break;
  6221. case 4:
  6222. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  6223. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  6224. __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])))
  6225. } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
  6226. return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  6227. }
  6228. }
  6229. break;
  6230. }
  6231. #endif
  6232. #if CYTHON_COMPILING_IN_CPYTHON
  6233. if (unlikely(Py_SIZE(x) < 0)) {
  6234. goto raise_neg_overflow;
  6235. }
  6236. #else
  6237. {
  6238. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  6239. if (unlikely(result < 0))
  6240. return (long) -1;
  6241. if (unlikely(result == 1))
  6242. goto raise_neg_overflow;
  6243. }
  6244. #endif
  6245. if (sizeof(long) <= sizeof(unsigned long)) {
  6246. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  6247. #ifdef HAVE_LONG_LONG
  6248. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  6249. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  6250. #endif
  6251. }
  6252. } else {
  6253. #if CYTHON_USE_PYLONG_INTERNALS
  6254. const digit* digits = ((PyLongObject*)x)->ob_digit;
  6255. switch (Py_SIZE(x)) {
  6256. case 0: return (long) 0;
  6257. case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
  6258. case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
  6259. case -2:
  6260. if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
  6261. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  6262. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6263. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  6264. return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  6265. }
  6266. }
  6267. break;
  6268. case 2:
  6269. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  6270. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  6271. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6272. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  6273. return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  6274. }
  6275. }
  6276. break;
  6277. case -3:
  6278. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  6279. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  6280. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6281. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  6282. return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  6283. }
  6284. }
  6285. break;
  6286. case 3:
  6287. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  6288. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  6289. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6290. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  6291. return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  6292. }
  6293. }
  6294. break;
  6295. case -4:
  6296. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  6297. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  6298. __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])))
  6299. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  6300. return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  6301. }
  6302. }
  6303. break;
  6304. case 4:
  6305. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  6306. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  6307. __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])))
  6308. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  6309. return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  6310. }
  6311. }
  6312. break;
  6313. }
  6314. #endif
  6315. if (sizeof(long) <= sizeof(long)) {
  6316. __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  6317. #ifdef HAVE_LONG_LONG
  6318. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  6319. __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  6320. #endif
  6321. }
  6322. }
  6323. {
  6324. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  6325. PyErr_SetString(PyExc_RuntimeError,
  6326. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  6327. #else
  6328. long val;
  6329. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  6330. #if PY_MAJOR_VERSION < 3
  6331. if (likely(v) && !PyLong_Check(v)) {
  6332. PyObject *tmp = v;
  6333. v = PyNumber_Long(tmp);
  6334. Py_DECREF(tmp);
  6335. }
  6336. #endif
  6337. if (likely(v)) {
  6338. int one = 1; int is_little = (int)*(unsigned char *)&one;
  6339. unsigned char *bytes = (unsigned char *)&val;
  6340. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  6341. bytes, sizeof(val),
  6342. is_little, !is_unsigned);
  6343. Py_DECREF(v);
  6344. if (likely(!ret))
  6345. return val;
  6346. }
  6347. #endif
  6348. return (long) -1;
  6349. }
  6350. } else {
  6351. long val;
  6352. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  6353. if (!tmp) return (long) -1;
  6354. val = __Pyx_PyInt_As_long(tmp);
  6355. Py_DECREF(tmp);
  6356. return val;
  6357. }
  6358. raise_overflow:
  6359. PyErr_SetString(PyExc_OverflowError,
  6360. "value too large to convert to long");
  6361. return (long) -1;
  6362. raise_neg_overflow:
  6363. PyErr_SetString(PyExc_OverflowError,
  6364. "can't convert negative value to long");
  6365. return (long) -1;
  6366. }
  6367. /* CIntFromPy */
  6368. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
  6369. const int neg_one = (int) -1, const_zero = (int) 0;
  6370. const int is_unsigned = neg_one > const_zero;
  6371. #if PY_MAJOR_VERSION < 3
  6372. if (likely(PyInt_Check(x))) {
  6373. if (sizeof(int) < sizeof(long)) {
  6374. __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
  6375. } else {
  6376. long val = PyInt_AS_LONG(x);
  6377. if (is_unsigned && unlikely(val < 0)) {
  6378. goto raise_neg_overflow;
  6379. }
  6380. return (int) val;
  6381. }
  6382. } else
  6383. #endif
  6384. if (likely(PyLong_Check(x))) {
  6385. if (is_unsigned) {
  6386. #if CYTHON_USE_PYLONG_INTERNALS
  6387. const digit* digits = ((PyLongObject*)x)->ob_digit;
  6388. switch (Py_SIZE(x)) {
  6389. case 0: return (int) 0;
  6390. case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
  6391. case 2:
  6392. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  6393. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  6394. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6395. } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
  6396. return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  6397. }
  6398. }
  6399. break;
  6400. case 3:
  6401. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  6402. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  6403. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6404. } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
  6405. return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  6406. }
  6407. }
  6408. break;
  6409. case 4:
  6410. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  6411. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  6412. __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])))
  6413. } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
  6414. return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  6415. }
  6416. }
  6417. break;
  6418. }
  6419. #endif
  6420. #if CYTHON_COMPILING_IN_CPYTHON
  6421. if (unlikely(Py_SIZE(x) < 0)) {
  6422. goto raise_neg_overflow;
  6423. }
  6424. #else
  6425. {
  6426. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  6427. if (unlikely(result < 0))
  6428. return (int) -1;
  6429. if (unlikely(result == 1))
  6430. goto raise_neg_overflow;
  6431. }
  6432. #endif
  6433. if (sizeof(int) <= sizeof(unsigned long)) {
  6434. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  6435. #ifdef HAVE_LONG_LONG
  6436. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  6437. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  6438. #endif
  6439. }
  6440. } else {
  6441. #if CYTHON_USE_PYLONG_INTERNALS
  6442. const digit* digits = ((PyLongObject*)x)->ob_digit;
  6443. switch (Py_SIZE(x)) {
  6444. case 0: return (int) 0;
  6445. case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
  6446. case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
  6447. case -2:
  6448. if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
  6449. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  6450. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6451. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  6452. return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  6453. }
  6454. }
  6455. break;
  6456. case 2:
  6457. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  6458. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  6459. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6460. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  6461. return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  6462. }
  6463. }
  6464. break;
  6465. case -3:
  6466. if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  6467. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  6468. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6469. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  6470. return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  6471. }
  6472. }
  6473. break;
  6474. case 3:
  6475. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  6476. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  6477. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  6478. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  6479. return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  6480. }
  6481. }
  6482. break;
  6483. case -4:
  6484. if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  6485. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  6486. __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])))
  6487. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  6488. return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  6489. }
  6490. }
  6491. break;
  6492. case 4:
  6493. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  6494. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  6495. __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])))
  6496. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  6497. return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  6498. }
  6499. }
  6500. break;
  6501. }
  6502. #endif
  6503. if (sizeof(int) <= sizeof(long)) {
  6504. __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  6505. #ifdef HAVE_LONG_LONG
  6506. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  6507. __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  6508. #endif
  6509. }
  6510. }
  6511. {
  6512. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  6513. PyErr_SetString(PyExc_RuntimeError,
  6514. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  6515. #else
  6516. int val;
  6517. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  6518. #if PY_MAJOR_VERSION < 3
  6519. if (likely(v) && !PyLong_Check(v)) {
  6520. PyObject *tmp = v;
  6521. v = PyNumber_Long(tmp);
  6522. Py_DECREF(tmp);
  6523. }
  6524. #endif
  6525. if (likely(v)) {
  6526. int one = 1; int is_little = (int)*(unsigned char *)&one;
  6527. unsigned char *bytes = (unsigned char *)&val;
  6528. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  6529. bytes, sizeof(val),
  6530. is_little, !is_unsigned);
  6531. Py_DECREF(v);
  6532. if (likely(!ret))
  6533. return val;
  6534. }
  6535. #endif
  6536. return (int) -1;
  6537. }
  6538. } else {
  6539. int val;
  6540. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  6541. if (!tmp) return (int) -1;
  6542. val = __Pyx_PyInt_As_int(tmp);
  6543. Py_DECREF(tmp);
  6544. return val;
  6545. }
  6546. raise_overflow:
  6547. PyErr_SetString(PyExc_OverflowError,
  6548. "value too large to convert to int");
  6549. return (int) -1;
  6550. raise_neg_overflow:
  6551. PyErr_SetString(PyExc_OverflowError,
  6552. "can't convert negative value to int");
  6553. return (int) -1;
  6554. }
  6555. /* FastTypeChecks */
  6556. #if CYTHON_COMPILING_IN_CPYTHON
  6557. static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  6558. while (a) {
  6559. a = a->tp_base;
  6560. if (a == b)
  6561. return 1;
  6562. }
  6563. return b == &PyBaseObject_Type;
  6564. }
  6565. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
  6566. PyObject *mro;
  6567. if (a == b) return 1;
  6568. mro = a->tp_mro;
  6569. if (likely(mro)) {
  6570. Py_ssize_t i, n;
  6571. n = PyTuple_GET_SIZE(mro);
  6572. for (i = 0; i < n; i++) {
  6573. if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
  6574. return 1;
  6575. }
  6576. return 0;
  6577. }
  6578. return __Pyx_InBases(a, b);
  6579. }
  6580. #if PY_MAJOR_VERSION == 2
  6581. static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
  6582. PyObject *exception, *value, *tb;
  6583. int res;
  6584. __Pyx_PyThreadState_declare
  6585. __Pyx_PyThreadState_assign
  6586. __Pyx_ErrFetch(&exception, &value, &tb);
  6587. res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
  6588. if (unlikely(res == -1)) {
  6589. PyErr_WriteUnraisable(err);
  6590. res = 0;
  6591. }
  6592. if (!res) {
  6593. res = PyObject_IsSubclass(err, exc_type2);
  6594. if (unlikely(res == -1)) {
  6595. PyErr_WriteUnraisable(err);
  6596. res = 0;
  6597. }
  6598. }
  6599. __Pyx_ErrRestore(exception, value, tb);
  6600. return res;
  6601. }
  6602. #else
  6603. static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
  6604. int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
  6605. if (!res) {
  6606. res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
  6607. }
  6608. return res;
  6609. }
  6610. #endif
  6611. static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  6612. Py_ssize_t i, n;
  6613. assert(PyExceptionClass_Check(exc_type));
  6614. n = PyTuple_GET_SIZE(tuple);
  6615. #if PY_MAJOR_VERSION >= 3
  6616. for (i=0; i<n; i++) {
  6617. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  6618. }
  6619. #endif
  6620. for (i=0; i<n; i++) {
  6621. PyObject *t = PyTuple_GET_ITEM(tuple, i);
  6622. #if PY_MAJOR_VERSION < 3
  6623. if (likely(exc_type == t)) return 1;
  6624. #endif
  6625. if (likely(PyExceptionClass_Check(t))) {
  6626. if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
  6627. } else {
  6628. }
  6629. }
  6630. return 0;
  6631. }
  6632. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
  6633. if (likely(err == exc_type)) return 1;
  6634. if (likely(PyExceptionClass_Check(err))) {
  6635. if (likely(PyExceptionClass_Check(exc_type))) {
  6636. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
  6637. } else if (likely(PyTuple_Check(exc_type))) {
  6638. return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
  6639. } else {
  6640. }
  6641. }
  6642. return PyErr_GivenExceptionMatches(err, exc_type);
  6643. }
  6644. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
  6645. assert(PyExceptionClass_Check(exc_type1));
  6646. assert(PyExceptionClass_Check(exc_type2));
  6647. if (likely(err == exc_type1 || err == exc_type2)) return 1;
  6648. if (likely(PyExceptionClass_Check(err))) {
  6649. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
  6650. }
  6651. return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
  6652. }
  6653. #endif
  6654. /* CheckBinaryVersion */
  6655. static int __Pyx_check_binary_version(void) {
  6656. char ctversion[4], rtversion[4];
  6657. PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
  6658. PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
  6659. if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
  6660. char message[200];
  6661. PyOS_snprintf(message, sizeof(message),
  6662. "compiletime version %s of module '%.100s' "
  6663. "does not match runtime version %s",
  6664. ctversion, __Pyx_MODULE_NAME, rtversion);
  6665. return PyErr_WarnEx(NULL, message, 1);
  6666. }
  6667. return 0;
  6668. }
  6669. /* InitStrings */
  6670. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
  6671. while (t->p) {
  6672. #if PY_MAJOR_VERSION < 3
  6673. if (t->is_unicode) {
  6674. *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
  6675. } else if (t->intern) {
  6676. *t->p = PyString_InternFromString(t->s);
  6677. } else {
  6678. *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
  6679. }
  6680. #else
  6681. if (t->is_unicode | t->is_str) {
  6682. if (t->intern) {
  6683. *t->p = PyUnicode_InternFromString(t->s);
  6684. } else if (t->encoding) {
  6685. *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
  6686. } else {
  6687. *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
  6688. }
  6689. } else {
  6690. *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
  6691. }
  6692. #endif
  6693. if (!*t->p)
  6694. return -1;
  6695. if (PyObject_Hash(*t->p) == -1)
  6696. return -1;
  6697. ++t;
  6698. }
  6699. return 0;
  6700. }
  6701. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  6702. return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
  6703. }
  6704. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  6705. Py_ssize_t ignore;
  6706. return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  6707. }
  6708. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  6709. #if !CYTHON_PEP393_ENABLED
  6710. static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  6711. char* defenc_c;
  6712. PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
  6713. if (!defenc) return NULL;
  6714. defenc_c = PyBytes_AS_STRING(defenc);
  6715. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  6716. {
  6717. char* end = defenc_c + PyBytes_GET_SIZE(defenc);
  6718. char* c;
  6719. for (c = defenc_c; c < end; c++) {
  6720. if ((unsigned char) (*c) >= 128) {
  6721. PyUnicode_AsASCIIString(o);
  6722. return NULL;
  6723. }
  6724. }
  6725. }
  6726. #endif
  6727. *length = PyBytes_GET_SIZE(defenc);
  6728. return defenc_c;
  6729. }
  6730. #else
  6731. static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  6732. if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
  6733. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  6734. if (likely(PyUnicode_IS_ASCII(o))) {
  6735. *length = PyUnicode_GET_LENGTH(o);
  6736. return PyUnicode_AsUTF8(o);
  6737. } else {
  6738. PyUnicode_AsASCIIString(o);
  6739. return NULL;
  6740. }
  6741. #else
  6742. return PyUnicode_AsUTF8AndSize(o, length);
  6743. #endif
  6744. }
  6745. #endif
  6746. #endif
  6747. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  6748. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  6749. if (
  6750. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  6751. __Pyx_sys_getdefaultencoding_not_ascii &&
  6752. #endif
  6753. PyUnicode_Check(o)) {
  6754. return __Pyx_PyUnicode_AsStringAndSize(o, length);
  6755. } else
  6756. #endif
  6757. #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
  6758. if (PyByteArray_Check(o)) {
  6759. *length = PyByteArray_GET_SIZE(o);
  6760. return PyByteArray_AS_STRING(o);
  6761. } else
  6762. #endif
  6763. {
  6764. char* result;
  6765. int r = PyBytes_AsStringAndSize(o, &result, length);
  6766. if (unlikely(r < 0)) {
  6767. return NULL;
  6768. } else {
  6769. return result;
  6770. }
  6771. }
  6772. }
  6773. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  6774. int is_true = x == Py_True;
  6775. if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  6776. else return PyObject_IsTrue(x);
  6777. }
  6778. static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
  6779. #if PY_MAJOR_VERSION >= 3
  6780. if (PyLong_Check(result)) {
  6781. if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
  6782. "__int__ returned non-int (type %.200s). "
  6783. "The ability to return an instance of a strict subclass of int "
  6784. "is deprecated, and may be removed in a future version of Python.",
  6785. Py_TYPE(result)->tp_name)) {
  6786. Py_DECREF(result);
  6787. return NULL;
  6788. }
  6789. return result;
  6790. }
  6791. #endif
  6792. PyErr_Format(PyExc_TypeError,
  6793. "__%.4s__ returned non-%.4s (type %.200s)",
  6794. type_name, type_name, Py_TYPE(result)->tp_name);
  6795. Py_DECREF(result);
  6796. return NULL;
  6797. }
  6798. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  6799. #if CYTHON_USE_TYPE_SLOTS
  6800. PyNumberMethods *m;
  6801. #endif
  6802. const char *name = NULL;
  6803. PyObject *res = NULL;
  6804. #if PY_MAJOR_VERSION < 3
  6805. if (likely(PyInt_Check(x) || PyLong_Check(x)))
  6806. #else
  6807. if (likely(PyLong_Check(x)))
  6808. #endif
  6809. return __Pyx_NewRef(x);
  6810. #if CYTHON_USE_TYPE_SLOTS
  6811. m = Py_TYPE(x)->tp_as_number;
  6812. #if PY_MAJOR_VERSION < 3
  6813. if (m && m->nb_int) {
  6814. name = "int";
  6815. res = m->nb_int(x);
  6816. }
  6817. else if (m && m->nb_long) {
  6818. name = "long";
  6819. res = m->nb_long(x);
  6820. }
  6821. #else
  6822. if (likely(m && m->nb_int)) {
  6823. name = "int";
  6824. res = m->nb_int(x);
  6825. }
  6826. #endif
  6827. #else
  6828. if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
  6829. res = PyNumber_Int(x);
  6830. }
  6831. #endif
  6832. if (likely(res)) {
  6833. #if PY_MAJOR_VERSION < 3
  6834. if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
  6835. #else
  6836. if (unlikely(!PyLong_CheckExact(res))) {
  6837. #endif
  6838. return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
  6839. }
  6840. }
  6841. else if (!PyErr_Occurred()) {
  6842. PyErr_SetString(PyExc_TypeError,
  6843. "an integer is required");
  6844. }
  6845. return res;
  6846. }
  6847. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  6848. Py_ssize_t ival;
  6849. PyObject *x;
  6850. #if PY_MAJOR_VERSION < 3
  6851. if (likely(PyInt_CheckExact(b))) {
  6852. if (sizeof(Py_ssize_t) >= sizeof(long))
  6853. return PyInt_AS_LONG(b);
  6854. else
  6855. return PyInt_AsSsize_t(x);
  6856. }
  6857. #endif
  6858. if (likely(PyLong_CheckExact(b))) {
  6859. #if CYTHON_USE_PYLONG_INTERNALS
  6860. const digit* digits = ((PyLongObject*)b)->ob_digit;
  6861. const Py_ssize_t size = Py_SIZE(b);
  6862. if (likely(__Pyx_sst_abs(size) <= 1)) {
  6863. ival = likely(size) ? digits[0] : 0;
  6864. if (size == -1) ival = -ival;
  6865. return ival;
  6866. } else {
  6867. switch (size) {
  6868. case 2:
  6869. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  6870. return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  6871. }
  6872. break;
  6873. case -2:
  6874. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  6875. return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  6876. }
  6877. break;
  6878. case 3:
  6879. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  6880. return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  6881. }
  6882. break;
  6883. case -3:
  6884. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  6885. return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  6886. }
  6887. break;
  6888. case 4:
  6889. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  6890. 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]));
  6891. }
  6892. break;
  6893. case -4:
  6894. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  6895. 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]));
  6896. }
  6897. break;
  6898. }
  6899. }
  6900. #endif
  6901. return PyLong_AsSsize_t(b);
  6902. }
  6903. x = PyNumber_Index(b);
  6904. if (!x) return -1;
  6905. ival = PyInt_AsSsize_t(x);
  6906. Py_DECREF(x);
  6907. return ival;
  6908. }
  6909. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  6910. return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
  6911. }
  6912. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
  6913. return PyInt_FromSize_t(ival);
  6914. }
  6915. #endif /* Py_PYTHON_H */