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.

24279 lines
982 KiB

4 years ago
  1. /* Generated by Cython 0.28.5 */
  2. /* BEGIN: Cython Metadata
  3. {
  4. "distutils": {
  5. "define_macros": [
  6. [
  7. "HTTP_PARSER_STRICT",
  8. 0
  9. ]
  10. ],
  11. "depends": [],
  12. "name": "aiohttp._http_parser",
  13. "sources": [
  14. "aiohttp/_http_parser.pyx",
  15. "vendor/http-parser/http_parser.c",
  16. "aiohttp/_find_header.c"
  17. ]
  18. },
  19. "module_name": "aiohttp._http_parser"
  20. }
  21. END: Cython Metadata */
  22. #define PY_SSIZE_T_CLEAN
  23. #include "Python.h"
  24. #ifndef Py_PYTHON_H
  25. #error Python headers needed to compile C extensions, please install development version of Python.
  26. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
  27. #error Cython requires Python 2.6+ or Python 3.3+.
  28. #else
  29. #define CYTHON_ABI "0_28_5"
  30. #define CYTHON_FUTURE_DIVISION 1
  31. #include <stddef.h>
  32. #ifndef offsetof
  33. #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
  34. #endif
  35. #if !defined(WIN32) && !defined(MS_WINDOWS)
  36. #ifndef __stdcall
  37. #define __stdcall
  38. #endif
  39. #ifndef __cdecl
  40. #define __cdecl
  41. #endif
  42. #ifndef __fastcall
  43. #define __fastcall
  44. #endif
  45. #endif
  46. #ifndef DL_IMPORT
  47. #define DL_IMPORT(t) t
  48. #endif
  49. #ifndef DL_EXPORT
  50. #define DL_EXPORT(t) t
  51. #endif
  52. #define __PYX_COMMA ,
  53. #ifndef HAVE_LONG_LONG
  54. #if PY_VERSION_HEX >= 0x02070000
  55. #define HAVE_LONG_LONG
  56. #endif
  57. #endif
  58. #ifndef PY_LONG_LONG
  59. #define PY_LONG_LONG LONG_LONG
  60. #endif
  61. #ifndef Py_HUGE_VAL
  62. #define Py_HUGE_VAL HUGE_VAL
  63. #endif
  64. #ifdef PYPY_VERSION
  65. #define CYTHON_COMPILING_IN_PYPY 1
  66. #define CYTHON_COMPILING_IN_PYSTON 0
  67. #define CYTHON_COMPILING_IN_CPYTHON 0
  68. #undef CYTHON_USE_TYPE_SLOTS
  69. #define CYTHON_USE_TYPE_SLOTS 0
  70. #undef CYTHON_USE_PYTYPE_LOOKUP
  71. #define CYTHON_USE_PYTYPE_LOOKUP 0
  72. #if PY_VERSION_HEX < 0x03050000
  73. #undef CYTHON_USE_ASYNC_SLOTS
  74. #define CYTHON_USE_ASYNC_SLOTS 0
  75. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  76. #define CYTHON_USE_ASYNC_SLOTS 1
  77. #endif
  78. #undef CYTHON_USE_PYLIST_INTERNALS
  79. #define CYTHON_USE_PYLIST_INTERNALS 0
  80. #undef CYTHON_USE_UNICODE_INTERNALS
  81. #define CYTHON_USE_UNICODE_INTERNALS 0
  82. #undef CYTHON_USE_UNICODE_WRITER
  83. #define CYTHON_USE_UNICODE_WRITER 0
  84. #undef CYTHON_USE_PYLONG_INTERNALS
  85. #define CYTHON_USE_PYLONG_INTERNALS 0
  86. #undef CYTHON_AVOID_BORROWED_REFS
  87. #define CYTHON_AVOID_BORROWED_REFS 1
  88. #undef CYTHON_ASSUME_SAFE_MACROS
  89. #define CYTHON_ASSUME_SAFE_MACROS 0
  90. #undef CYTHON_UNPACK_METHODS
  91. #define CYTHON_UNPACK_METHODS 0
  92. #undef CYTHON_FAST_THREAD_STATE
  93. #define CYTHON_FAST_THREAD_STATE 0
  94. #undef CYTHON_FAST_PYCALL
  95. #define CYTHON_FAST_PYCALL 0
  96. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  97. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  98. #undef CYTHON_USE_TP_FINALIZE
  99. #define CYTHON_USE_TP_FINALIZE 0
  100. #elif defined(PYSTON_VERSION)
  101. #define CYTHON_COMPILING_IN_PYPY 0
  102. #define CYTHON_COMPILING_IN_PYSTON 1
  103. #define CYTHON_COMPILING_IN_CPYTHON 0
  104. #ifndef CYTHON_USE_TYPE_SLOTS
  105. #define CYTHON_USE_TYPE_SLOTS 1
  106. #endif
  107. #undef CYTHON_USE_PYTYPE_LOOKUP
  108. #define CYTHON_USE_PYTYPE_LOOKUP 0
  109. #undef CYTHON_USE_ASYNC_SLOTS
  110. #define CYTHON_USE_ASYNC_SLOTS 0
  111. #undef CYTHON_USE_PYLIST_INTERNALS
  112. #define CYTHON_USE_PYLIST_INTERNALS 0
  113. #ifndef CYTHON_USE_UNICODE_INTERNALS
  114. #define CYTHON_USE_UNICODE_INTERNALS 1
  115. #endif
  116. #undef CYTHON_USE_UNICODE_WRITER
  117. #define CYTHON_USE_UNICODE_WRITER 0
  118. #undef CYTHON_USE_PYLONG_INTERNALS
  119. #define CYTHON_USE_PYLONG_INTERNALS 0
  120. #ifndef CYTHON_AVOID_BORROWED_REFS
  121. #define CYTHON_AVOID_BORROWED_REFS 0
  122. #endif
  123. #ifndef CYTHON_ASSUME_SAFE_MACROS
  124. #define CYTHON_ASSUME_SAFE_MACROS 1
  125. #endif
  126. #ifndef CYTHON_UNPACK_METHODS
  127. #define CYTHON_UNPACK_METHODS 1
  128. #endif
  129. #undef CYTHON_FAST_THREAD_STATE
  130. #define CYTHON_FAST_THREAD_STATE 0
  131. #undef CYTHON_FAST_PYCALL
  132. #define CYTHON_FAST_PYCALL 0
  133. #undef CYTHON_PEP489_MULTI_PHASE_INIT
  134. #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  135. #undef CYTHON_USE_TP_FINALIZE
  136. #define CYTHON_USE_TP_FINALIZE 0
  137. #else
  138. #define CYTHON_COMPILING_IN_PYPY 0
  139. #define CYTHON_COMPILING_IN_PYSTON 0
  140. #define CYTHON_COMPILING_IN_CPYTHON 1
  141. #ifndef CYTHON_USE_TYPE_SLOTS
  142. #define CYTHON_USE_TYPE_SLOTS 1
  143. #endif
  144. #if PY_VERSION_HEX < 0x02070000
  145. #undef CYTHON_USE_PYTYPE_LOOKUP
  146. #define CYTHON_USE_PYTYPE_LOOKUP 0
  147. #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
  148. #define CYTHON_USE_PYTYPE_LOOKUP 1
  149. #endif
  150. #if PY_MAJOR_VERSION < 3
  151. #undef CYTHON_USE_ASYNC_SLOTS
  152. #define CYTHON_USE_ASYNC_SLOTS 0
  153. #elif !defined(CYTHON_USE_ASYNC_SLOTS)
  154. #define CYTHON_USE_ASYNC_SLOTS 1
  155. #endif
  156. #if PY_VERSION_HEX < 0x02070000
  157. #undef CYTHON_USE_PYLONG_INTERNALS
  158. #define CYTHON_USE_PYLONG_INTERNALS 0
  159. #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
  160. #define CYTHON_USE_PYLONG_INTERNALS 1
  161. #endif
  162. #ifndef CYTHON_USE_PYLIST_INTERNALS
  163. #define CYTHON_USE_PYLIST_INTERNALS 1
  164. #endif
  165. #ifndef CYTHON_USE_UNICODE_INTERNALS
  166. #define CYTHON_USE_UNICODE_INTERNALS 1
  167. #endif
  168. #if PY_VERSION_HEX < 0x030300F0
  169. #undef CYTHON_USE_UNICODE_WRITER
  170. #define CYTHON_USE_UNICODE_WRITER 0
  171. #elif !defined(CYTHON_USE_UNICODE_WRITER)
  172. #define CYTHON_USE_UNICODE_WRITER 1
  173. #endif
  174. #ifndef CYTHON_AVOID_BORROWED_REFS
  175. #define CYTHON_AVOID_BORROWED_REFS 0
  176. #endif
  177. #ifndef CYTHON_ASSUME_SAFE_MACROS
  178. #define CYTHON_ASSUME_SAFE_MACROS 1
  179. #endif
  180. #ifndef CYTHON_UNPACK_METHODS
  181. #define CYTHON_UNPACK_METHODS 1
  182. #endif
  183. #ifndef CYTHON_FAST_THREAD_STATE
  184. #define CYTHON_FAST_THREAD_STATE 1
  185. #endif
  186. #ifndef CYTHON_FAST_PYCALL
  187. #define CYTHON_FAST_PYCALL 1
  188. #endif
  189. #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
  190. #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  191. #endif
  192. #ifndef CYTHON_USE_TP_FINALIZE
  193. #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  194. #endif
  195. #endif
  196. #if !defined(CYTHON_FAST_PYCCALL)
  197. #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
  198. #endif
  199. #if CYTHON_USE_PYLONG_INTERNALS
  200. #include "longintrepr.h"
  201. #undef SHIFT
  202. #undef BASE
  203. #undef MASK
  204. #endif
  205. #ifndef __has_attribute
  206. #define __has_attribute(x) 0
  207. #endif
  208. #ifndef __has_cpp_attribute
  209. #define __has_cpp_attribute(x) 0
  210. #endif
  211. #ifndef CYTHON_RESTRICT
  212. #if defined(__GNUC__)
  213. #define CYTHON_RESTRICT __restrict__
  214. #elif defined(_MSC_VER) && _MSC_VER >= 1400
  215. #define CYTHON_RESTRICT __restrict
  216. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  217. #define CYTHON_RESTRICT restrict
  218. #else
  219. #define CYTHON_RESTRICT
  220. #endif
  221. #endif
  222. #ifndef CYTHON_UNUSED
  223. # if defined(__GNUC__)
  224. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  225. # define CYTHON_UNUSED __attribute__ ((__unused__))
  226. # else
  227. # define CYTHON_UNUSED
  228. # endif
  229. # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
  230. # define CYTHON_UNUSED __attribute__ ((__unused__))
  231. # else
  232. # define CYTHON_UNUSED
  233. # endif
  234. #endif
  235. #ifndef CYTHON_MAYBE_UNUSED_VAR
  236. # if defined(__cplusplus)
  237. template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
  238. # else
  239. # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
  240. # endif
  241. #endif
  242. #ifndef CYTHON_NCP_UNUSED
  243. # if CYTHON_COMPILING_IN_CPYTHON
  244. # define CYTHON_NCP_UNUSED
  245. # else
  246. # define CYTHON_NCP_UNUSED CYTHON_UNUSED
  247. # endif
  248. #endif
  249. #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
  250. #ifdef _MSC_VER
  251. #ifndef _MSC_STDINT_H_
  252. #if _MSC_VER < 1300
  253. typedef unsigned char uint8_t;
  254. typedef unsigned int uint32_t;
  255. #else
  256. typedef unsigned __int8 uint8_t;
  257. typedef unsigned __int32 uint32_t;
  258. #endif
  259. #endif
  260. #else
  261. #include <stdint.h>
  262. #endif
  263. #ifndef CYTHON_FALLTHROUGH
  264. #if defined(__cplusplus) && __cplusplus >= 201103L
  265. #if __has_cpp_attribute(fallthrough)
  266. #define CYTHON_FALLTHROUGH [[fallthrough]]
  267. #elif __has_cpp_attribute(clang::fallthrough)
  268. #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
  269. #elif __has_cpp_attribute(gnu::fallthrough)
  270. #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
  271. #endif
  272. #endif
  273. #ifndef CYTHON_FALLTHROUGH
  274. #if __has_attribute(fallthrough)
  275. #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
  276. #else
  277. #define CYTHON_FALLTHROUGH
  278. #endif
  279. #endif
  280. #if defined(__clang__ ) && defined(__apple_build_version__)
  281. #if __apple_build_version__ < 7000000
  282. #undef CYTHON_FALLTHROUGH
  283. #define CYTHON_FALLTHROUGH
  284. #endif
  285. #endif
  286. #endif
  287. #ifndef CYTHON_INLINE
  288. #if defined(__clang__)
  289. #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  290. #elif defined(__GNUC__)
  291. #define CYTHON_INLINE __inline__
  292. #elif defined(_MSC_VER)
  293. #define CYTHON_INLINE __inline
  294. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  295. #define CYTHON_INLINE inline
  296. #else
  297. #define CYTHON_INLINE
  298. #endif
  299. #endif
  300. #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  301. #define Py_OptimizeFlag 0
  302. #endif
  303. #define __PYX_BUILD_PY_SSIZE_T "n"
  304. #define CYTHON_FORMAT_SSIZE_T "z"
  305. #if PY_MAJOR_VERSION < 3
  306. #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  307. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  308. PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  309. #define __Pyx_DefaultClassType PyClass_Type
  310. #else
  311. #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  312. #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
  313. PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  314. #define __Pyx_DefaultClassType PyType_Type
  315. #endif
  316. #ifndef Py_TPFLAGS_CHECKTYPES
  317. #define Py_TPFLAGS_CHECKTYPES 0
  318. #endif
  319. #ifndef Py_TPFLAGS_HAVE_INDEX
  320. #define Py_TPFLAGS_HAVE_INDEX 0
  321. #endif
  322. #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  323. #define Py_TPFLAGS_HAVE_NEWBUFFER 0
  324. #endif
  325. #ifndef Py_TPFLAGS_HAVE_FINALIZE
  326. #define Py_TPFLAGS_HAVE_FINALIZE 0
  327. #endif
  328. #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  329. #ifndef METH_FASTCALL
  330. #define METH_FASTCALL 0x80
  331. #endif
  332. typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  333. typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
  334. Py_ssize_t nargs, PyObject *kwnames);
  335. #else
  336. #define __Pyx_PyCFunctionFast _PyCFunctionFast
  337. #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  338. #endif
  339. #if CYTHON_FAST_PYCCALL
  340. #define __Pyx_PyFastCFunction_Check(func)\
  341. ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
  342. #else
  343. #define __Pyx_PyFastCFunction_Check(func) 0
  344. #endif
  345. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  346. #define PyObject_Malloc(s) PyMem_Malloc(s)
  347. #define PyObject_Free(p) PyMem_Free(p)
  348. #define PyObject_Realloc(p) PyMem_Realloc(p)
  349. #endif
  350. #if CYTHON_COMPILING_IN_PYSTON
  351. #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
  352. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
  353. #else
  354. #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
  355. #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
  356. #endif
  357. #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  358. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  359. #elif PY_VERSION_HEX >= 0x03060000
  360. #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
  361. #elif PY_VERSION_HEX >= 0x03000000
  362. #define __Pyx_PyThreadState_Current PyThreadState_GET()
  363. #else
  364. #define __Pyx_PyThreadState_Current _PyThreadState_Current
  365. #endif
  366. #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
  367. #include "pythread.h"
  368. #define Py_tss_NEEDS_INIT 0
  369. typedef int Py_tss_t;
  370. static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  371. *key = PyThread_create_key();
  372. return 0; // PyThread_create_key reports success always
  373. }
  374. static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  375. Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  376. *key = Py_tss_NEEDS_INIT;
  377. return key;
  378. }
  379. static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  380. PyObject_Free(key);
  381. }
  382. static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  383. return *key != Py_tss_NEEDS_INIT;
  384. }
  385. static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  386. PyThread_delete_key(*key);
  387. *key = Py_tss_NEEDS_INIT;
  388. }
  389. static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  390. return PyThread_set_key_value(*key, value);
  391. }
  392. static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  393. return PyThread_get_key_value(*key);
  394. }
  395. #endif // TSS (Thread Specific Storage) API
  396. #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
  397. #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
  398. #else
  399. #define __Pyx_PyDict_NewPresized(n) PyDict_New()
  400. #endif
  401. #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  402. #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
  403. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
  404. #else
  405. #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
  406. #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
  407. #endif
  408. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
  409. #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
  410. #else
  411. #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
  412. #endif
  413. #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  414. #define CYTHON_PEP393_ENABLED 1
  415. #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
  416. 0 : _PyUnicode_Ready((PyObject *)(op)))
  417. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
  418. #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  419. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
  420. #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
  421. #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
  422. #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
  423. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
  424. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  425. #else
  426. #define CYTHON_PEP393_ENABLED 0
  427. #define PyUnicode_1BYTE_KIND 1
  428. #define PyUnicode_2BYTE_KIND 2
  429. #define PyUnicode_4BYTE_KIND 4
  430. #define __Pyx_PyUnicode_READY(op) (0)
  431. #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
  432. #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  433. #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  434. #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
  435. #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
  436. #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  437. #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  438. #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
  439. #endif
  440. #if CYTHON_COMPILING_IN_PYPY
  441. #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
  442. #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
  443. #else
  444. #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
  445. #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
  446. PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
  447. #endif
  448. #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  449. #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
  450. #endif
  451. #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  452. #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
  453. #endif
  454. #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  455. #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
  456. #endif
  457. #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
  458. #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
  459. #if PY_MAJOR_VERSION >= 3
  460. #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
  461. #else
  462. #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
  463. #endif
  464. #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  465. #define PyObject_ASCII(o) PyObject_Repr(o)
  466. #endif
  467. #if PY_MAJOR_VERSION >= 3
  468. #define PyBaseString_Type PyUnicode_Type
  469. #define PyStringObject PyUnicodeObject
  470. #define PyString_Type PyUnicode_Type
  471. #define PyString_Check PyUnicode_Check
  472. #define PyString_CheckExact PyUnicode_CheckExact
  473. #define PyObject_Unicode PyObject_Str
  474. #endif
  475. #if PY_MAJOR_VERSION >= 3
  476. #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  477. #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
  478. #else
  479. #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  480. #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
  481. #endif
  482. #ifndef PySet_CheckExact
  483. #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
  484. #endif
  485. #if CYTHON_ASSUME_SAFE_MACROS
  486. #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
  487. #else
  488. #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
  489. #endif
  490. #if PY_MAJOR_VERSION >= 3
  491. #define PyIntObject PyLongObject
  492. #define PyInt_Type PyLong_Type
  493. #define PyInt_Check(op) PyLong_Check(op)
  494. #define PyInt_CheckExact(op) PyLong_CheckExact(op)
  495. #define PyInt_FromString PyLong_FromString
  496. #define PyInt_FromUnicode PyLong_FromUnicode
  497. #define PyInt_FromLong PyLong_FromLong
  498. #define PyInt_FromSize_t PyLong_FromSize_t
  499. #define PyInt_FromSsize_t PyLong_FromSsize_t
  500. #define PyInt_AsLong PyLong_AsLong
  501. #define PyInt_AS_LONG PyLong_AS_LONG
  502. #define PyInt_AsSsize_t PyLong_AsSsize_t
  503. #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
  504. #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  505. #define PyNumber_Int PyNumber_Long
  506. #endif
  507. #if PY_MAJOR_VERSION >= 3
  508. #define PyBoolObject PyLongObject
  509. #endif
  510. #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  511. #ifndef PyUnicode_InternFromString
  512. #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  513. #endif
  514. #endif
  515. #if PY_VERSION_HEX < 0x030200A4
  516. typedef long Py_hash_t;
  517. #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  518. #define __Pyx_PyInt_AsHash_t PyInt_AsLong
  519. #else
  520. #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  521. #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
  522. #endif
  523. #if PY_MAJOR_VERSION >= 3
  524. #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
  525. #else
  526. #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
  527. #endif
  528. #if CYTHON_USE_ASYNC_SLOTS
  529. #if PY_VERSION_HEX >= 0x030500B1
  530. #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
  531. #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  532. #else
  533. #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  534. #endif
  535. #else
  536. #define __Pyx_PyType_AsAsync(obj) NULL
  537. #endif
  538. #ifndef __Pyx_PyAsyncMethodsStruct
  539. typedef struct {
  540. unaryfunc am_await;
  541. unaryfunc am_aiter;
  542. unaryfunc am_anext;
  543. } __Pyx_PyAsyncMethodsStruct;
  544. #endif
  545. #if defined(WIN32) || defined(MS_WINDOWS)
  546. #define _USE_MATH_DEFINES
  547. #endif
  548. #include <math.h>
  549. #ifdef NAN
  550. #define __PYX_NAN() ((float) NAN)
  551. #else
  552. static CYTHON_INLINE float __PYX_NAN() {
  553. float value;
  554. memset(&value, 0xFF, sizeof(value));
  555. return value;
  556. }
  557. #endif
  558. #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
  559. #define __Pyx_truncl trunc
  560. #else
  561. #define __Pyx_truncl truncl
  562. #endif
  563. #define __PYX_ERR(f_index, lineno, Ln_error) \
  564. { \
  565. __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
  566. }
  567. #ifndef __PYX_EXTERN_C
  568. #ifdef __cplusplus
  569. #define __PYX_EXTERN_C extern "C"
  570. #else
  571. #define __PYX_EXTERN_C extern
  572. #endif
  573. #endif
  574. #define __PYX_HAVE__aiohttp___http_parser
  575. #define __PYX_HAVE_API__aiohttp___http_parser
  576. /* Early includes */
  577. #include <string.h>
  578. #include <stdio.h>
  579. #include "pythread.h"
  580. #include <stdint.h>
  581. #include "../vendor/http-parser/http_parser.h"
  582. #include "_find_header.h"
  583. #ifdef _OPENMP
  584. #include <omp.h>
  585. #endif /* _OPENMP */
  586. #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
  587. #define CYTHON_WITHOUT_ASSERTIONS
  588. #endif
  589. typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
  590. const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
  591. #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
  592. #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
  593. #define __PYX_DEFAULT_STRING_ENCODING ""
  594. #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
  595. #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  596. #define __Pyx_uchar_cast(c) ((unsigned char)c)
  597. #define __Pyx_long_cast(x) ((long)x)
  598. #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
  599. (sizeof(type) < sizeof(Py_ssize_t)) ||\
  600. (sizeof(type) > sizeof(Py_ssize_t) &&\
  601. likely(v < (type)PY_SSIZE_T_MAX ||\
  602. v == (type)PY_SSIZE_T_MAX) &&\
  603. (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
  604. v == (type)PY_SSIZE_T_MIN))) ||\
  605. (sizeof(type) == sizeof(Py_ssize_t) &&\
  606. (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
  607. v == (type)PY_SSIZE_T_MAX))) )
  608. #if defined (__cplusplus) && __cplusplus >= 201103L
  609. #include <cstdlib>
  610. #define __Pyx_sst_abs(value) std::abs(value)
  611. #elif SIZEOF_INT >= SIZEOF_SIZE_T
  612. #define __Pyx_sst_abs(value) abs(value)
  613. #elif SIZEOF_LONG >= SIZEOF_SIZE_T
  614. #define __Pyx_sst_abs(value) labs(value)
  615. #elif defined (_MSC_VER)
  616. #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
  617. #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  618. #define __Pyx_sst_abs(value) llabs(value)
  619. #elif defined (__GNUC__)
  620. #define __Pyx_sst_abs(value) __builtin_llabs(value)
  621. #else
  622. #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
  623. #endif
  624. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
  625. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
  626. #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
  627. #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
  628. #define __Pyx_PyBytes_FromString PyBytes_FromString
  629. #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
  630. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
  631. #if PY_MAJOR_VERSION < 3
  632. #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
  633. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
  634. #else
  635. #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
  636. #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
  637. #endif
  638. #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
  639. #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
  640. #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
  641. #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
  642. #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
  643. #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
  644. #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
  645. #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
  646. #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
  647. #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
  648. #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
  649. #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
  650. #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
  651. #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
  652. #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
  653. #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
  654. static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
  655. const Py_UNICODE *u_end = u;
  656. while (*u_end++) ;
  657. return (size_t)(u_end - u - 1);
  658. }
  659. #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
  660. #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
  661. #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
  662. #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
  663. #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
  664. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
  665. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
  666. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
  667. #define __Pyx_PySequence_Tuple(obj)\
  668. (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
  669. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
  670. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
  671. #if CYTHON_ASSUME_SAFE_MACROS
  672. #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
  673. #else
  674. #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
  675. #endif
  676. #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
  677. #if PY_MAJOR_VERSION >= 3
  678. #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
  679. #else
  680. #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
  681. #endif
  682. #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
  683. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  684. static int __Pyx_sys_getdefaultencoding_not_ascii;
  685. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  686. PyObject* sys;
  687. PyObject* default_encoding = NULL;
  688. PyObject* ascii_chars_u = NULL;
  689. PyObject* ascii_chars_b = NULL;
  690. const char* default_encoding_c;
  691. sys = PyImport_ImportModule("sys");
  692. if (!sys) goto bad;
  693. default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
  694. Py_DECREF(sys);
  695. if (!default_encoding) goto bad;
  696. default_encoding_c = PyBytes_AsString(default_encoding);
  697. if (!default_encoding_c) goto bad;
  698. if (strcmp(default_encoding_c, "ascii") == 0) {
  699. __Pyx_sys_getdefaultencoding_not_ascii = 0;
  700. } else {
  701. char ascii_chars[128];
  702. int c;
  703. for (c = 0; c < 128; c++) {
  704. ascii_chars[c] = c;
  705. }
  706. __Pyx_sys_getdefaultencoding_not_ascii = 1;
  707. ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
  708. if (!ascii_chars_u) goto bad;
  709. ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
  710. if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
  711. PyErr_Format(
  712. PyExc_ValueError,
  713. "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
  714. default_encoding_c);
  715. goto bad;
  716. }
  717. Py_DECREF(ascii_chars_u);
  718. Py_DECREF(ascii_chars_b);
  719. }
  720. Py_DECREF(default_encoding);
  721. return 0;
  722. bad:
  723. Py_XDECREF(default_encoding);
  724. Py_XDECREF(ascii_chars_u);
  725. Py_XDECREF(ascii_chars_b);
  726. return -1;
  727. }
  728. #endif
  729. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
  730. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
  731. #else
  732. #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
  733. #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  734. static char* __PYX_DEFAULT_STRING_ENCODING;
  735. static int __Pyx_init_sys_getdefaultencoding_params(void) {
  736. PyObject* sys;
  737. PyObject* default_encoding = NULL;
  738. char* default_encoding_c;
  739. sys = PyImport_ImportModule("sys");
  740. if (!sys) goto bad;
  741. default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
  742. Py_DECREF(sys);
  743. if (!default_encoding) goto bad;
  744. default_encoding_c = PyBytes_AsString(default_encoding);
  745. if (!default_encoding_c) goto bad;
  746. __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
  747. if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
  748. strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
  749. Py_DECREF(default_encoding);
  750. return 0;
  751. bad:
  752. Py_XDECREF(default_encoding);
  753. return -1;
  754. }
  755. #endif
  756. #endif
  757. /* Test for GCC > 2.95 */
  758. #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  759. #define likely(x) __builtin_expect(!!(x), 1)
  760. #define unlikely(x) __builtin_expect(!!(x), 0)
  761. #else /* !__GNUC__ or GCC < 2.95 */
  762. #define likely(x) (x)
  763. #define unlikely(x) (x)
  764. #endif /* __GNUC__ */
  765. static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
  766. static PyObject *__pyx_m = NULL;
  767. static PyObject *__pyx_d;
  768. static PyObject *__pyx_b;
  769. static PyObject *__pyx_cython_runtime = NULL;
  770. static PyObject *__pyx_empty_tuple;
  771. static PyObject *__pyx_empty_bytes;
  772. static PyObject *__pyx_empty_unicode;
  773. static int __pyx_lineno;
  774. static int __pyx_clineno = 0;
  775. static const char * __pyx_cfilenm= __FILE__;
  776. static const char *__pyx_filename;
  777. static const char *__pyx_f[] = {
  778. "aiohttp/_http_parser.pyx",
  779. "stringsource",
  780. "type.pxd",
  781. "bool.pxd",
  782. "complex.pxd",
  783. "aiohttp/_headers.pxi",
  784. };
  785. /*--- Type declarations ---*/
  786. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage;
  787. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage;
  788. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser;
  789. struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser;
  790. struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser;
  791. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__;
  792. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr;
  793. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__;
  794. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr;
  795. struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init;
  796. /* "aiohttp/_http_parser.pyx":308
  797. * PyMem_Free(self._csettings)
  798. *
  799. * cdef _init(self, cparser.http_parser_type mode, # <<<<<<<<<<<<<<
  800. * object protocol, object loop, object timer=None,
  801. * size_t max_line_size=8190, size_t max_headers=32768,
  802. */
  803. struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init {
  804. int __pyx_n;
  805. PyObject *timer;
  806. size_t max_line_size;
  807. size_t max_headers;
  808. size_t max_field_size;
  809. PyObject *payload_exception;
  810. int response_with_body;
  811. int auto_decompress;
  812. };
  813. /* "aiohttp/_http_parser.pyx":93
  814. *
  815. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  816. * cdef class RawRequestMessage: # <<<<<<<<<<<<<<
  817. * cdef readonly str method
  818. * cdef readonly str path
  819. */
  820. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage {
  821. PyObject_HEAD
  822. PyObject *method;
  823. PyObject *path;
  824. PyObject *version;
  825. PyObject *headers;
  826. PyObject *raw_headers;
  827. PyObject *should_close;
  828. PyObject *compression;
  829. PyObject *upgrade;
  830. PyObject *chunked;
  831. PyObject *url;
  832. };
  833. /* "aiohttp/_http_parser.pyx":193
  834. *
  835. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  836. * cdef class RawResponseMessage: # <<<<<<<<<<<<<<
  837. * cdef readonly object version # HttpVersion
  838. * cdef readonly int code
  839. */
  840. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage {
  841. PyObject_HEAD
  842. PyObject *version;
  843. int code;
  844. PyObject *reason;
  845. PyObject *headers;
  846. PyObject *raw_headers;
  847. PyObject *should_close;
  848. PyObject *compression;
  849. PyObject *upgrade;
  850. PyObject *chunked;
  851. };
  852. /* "aiohttp/_http_parser.pyx":255
  853. *
  854. * @cython.internal
  855. * cdef class HttpParser: # <<<<<<<<<<<<<<
  856. *
  857. * cdef:
  858. */
  859. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser {
  860. PyObject_HEAD
  861. struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *__pyx_vtab;
  862. struct http_parser *_cparser;
  863. struct http_parser_settings *_csettings;
  864. PyObject *_raw_name;
  865. PyObject *_raw_value;
  866. int _has_value;
  867. PyObject *_protocol;
  868. PyObject *_loop;
  869. PyObject *_timer;
  870. size_t _max_line_size;
  871. size_t _max_field_size;
  872. size_t _max_headers;
  873. int _response_with_body;
  874. int _started;
  875. PyObject *_url;
  876. PyObject *_buf;
  877. PyObject *_path;
  878. PyObject *_reason;
  879. PyObject *_headers;
  880. PyObject *_raw_headers;
  881. int _upgraded;
  882. PyObject *_messages;
  883. PyObject *_payload;
  884. int _payload_error;
  885. PyObject *_payload_exception;
  886. PyObject *_last_error;
  887. int _auto_decompress;
  888. PyObject *_content_encoding;
  889. Py_buffer py_buf;
  890. };
  891. /* "aiohttp/_http_parser.pyx":537
  892. *
  893. *
  894. * cdef class HttpRequestParser(HttpParser): # <<<<<<<<<<<<<<
  895. *
  896. * def __init__(self, protocol, loop, timer=None,
  897. */
  898. struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser {
  899. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser __pyx_base;
  900. };
  901. /* "aiohttp/_http_parser.pyx":564
  902. *
  903. *
  904. * cdef class HttpResponseParser(HttpParser): # <<<<<<<<<<<<<<
  905. *
  906. * def __init__(self, protocol, loop, timer=None,
  907. */
  908. struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser {
  909. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser __pyx_base;
  910. };
  911. /* "aiohttp/_http_parser.pyx":118
  912. * self.url = url
  913. *
  914. * def __repr__(self): # <<<<<<<<<<<<<<
  915. * info = []
  916. * info.append(("method", self.method))
  917. */
  918. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ {
  919. PyObject_HEAD
  920. PyObject *__pyx_v_info;
  921. };
  922. /* "aiohttp/_http_parser.pyx":130
  923. * info.append(("chunked", self.chunked))
  924. * info.append(("url", self.url))
  925. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info) # <<<<<<<<<<<<<<
  926. * return '<RawRequestMessage(' + sinfo + ')>'
  927. *
  928. */
  929. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr {
  930. PyObject_HEAD
  931. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *__pyx_outer_scope;
  932. PyObject *__pyx_v_name;
  933. PyObject *__pyx_v_val;
  934. };
  935. /* "aiohttp/_http_parser.pyx":216
  936. * self.chunked = chunked
  937. *
  938. * def __repr__(self): # <<<<<<<<<<<<<<
  939. * info = []
  940. * info.append(("version", self.version))
  941. */
  942. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ {
  943. PyObject_HEAD
  944. PyObject *__pyx_v_info;
  945. };
  946. /* "aiohttp/_http_parser.pyx":227
  947. * info.append(("upgrade", self.upgrade))
  948. * info.append(("chunked", self.chunked))
  949. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info) # <<<<<<<<<<<<<<
  950. * return '<RawResponseMessage(' + sinfo + ')>'
  951. *
  952. */
  953. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr {
  954. PyObject_HEAD
  955. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *__pyx_outer_scope;
  956. PyObject *__pyx_v_name;
  957. PyObject *__pyx_v_val;
  958. };
  959. /* "aiohttp/_http_parser.pyx":255
  960. *
  961. * @cython.internal
  962. * cdef class HttpParser: # <<<<<<<<<<<<<<
  963. *
  964. * cdef:
  965. */
  966. struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser {
  967. PyObject *(*_init)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *, enum http_parser_type, PyObject *, PyObject *, struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init *__pyx_optional_args);
  968. PyObject *(*_process_header)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  969. PyObject *(*_on_header_field)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *, char *, size_t);
  970. PyObject *(*_on_header_value)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *, char *, size_t);
  971. PyObject *(*_on_headers_complete)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  972. PyObject *(*_on_message_complete)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  973. PyObject *(*_on_chunk_header)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  974. PyObject *(*_on_chunk_complete)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  975. PyObject *(*_on_status_complete)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  976. PyObject *(*http_version)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  977. };
  978. static struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *__pyx_vtabptr_7aiohttp_12_http_parser_HttpParser;
  979. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser_http_version(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *);
  980. /* "aiohttp/_http_parser.pyx":537
  981. *
  982. *
  983. * cdef class HttpRequestParser(HttpParser): # <<<<<<<<<<<<<<
  984. *
  985. * def __init__(self, protocol, loop, timer=None,
  986. */
  987. struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpRequestParser {
  988. struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser __pyx_base;
  989. };
  990. static struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpRequestParser *__pyx_vtabptr_7aiohttp_12_http_parser_HttpRequestParser;
  991. /* "aiohttp/_http_parser.pyx":564
  992. *
  993. *
  994. * cdef class HttpResponseParser(HttpParser): # <<<<<<<<<<<<<<
  995. *
  996. * def __init__(self, protocol, loop, timer=None,
  997. */
  998. struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpResponseParser {
  999. struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser __pyx_base;
  1000. };
  1001. static struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpResponseParser *__pyx_vtabptr_7aiohttp_12_http_parser_HttpResponseParser;
  1002. /* --- Runtime support code (head) --- */
  1003. /* Refnanny.proto */
  1004. #ifndef CYTHON_REFNANNY
  1005. #define CYTHON_REFNANNY 0
  1006. #endif
  1007. #if CYTHON_REFNANNY
  1008. typedef struct {
  1009. void (*INCREF)(void*, PyObject*, int);
  1010. void (*DECREF)(void*, PyObject*, int);
  1011. void (*GOTREF)(void*, PyObject*, int);
  1012. void (*GIVEREF)(void*, PyObject*, int);
  1013. void* (*SetupContext)(const char*, int, const char*);
  1014. void (*FinishContext)(void**);
  1015. } __Pyx_RefNannyAPIStruct;
  1016. static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  1017. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  1018. #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  1019. #ifdef WITH_THREAD
  1020. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  1021. if (acquire_gil) {\
  1022. PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
  1023. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  1024. PyGILState_Release(__pyx_gilstate_save);\
  1025. } else {\
  1026. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
  1027. }
  1028. #else
  1029. #define __Pyx_RefNannySetupContext(name, acquire_gil)\
  1030. __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  1031. #endif
  1032. #define __Pyx_RefNannyFinishContext()\
  1033. __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  1034. #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  1035. #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  1036. #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  1037. #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  1038. #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  1039. #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  1040. #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  1041. #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
  1042. #else
  1043. #define __Pyx_RefNannyDeclarations
  1044. #define __Pyx_RefNannySetupContext(name, acquire_gil)
  1045. #define __Pyx_RefNannyFinishContext()
  1046. #define __Pyx_INCREF(r) Py_INCREF(r)
  1047. #define __Pyx_DECREF(r) Py_DECREF(r)
  1048. #define __Pyx_GOTREF(r)
  1049. #define __Pyx_GIVEREF(r)
  1050. #define __Pyx_XINCREF(r) Py_XINCREF(r)
  1051. #define __Pyx_XDECREF(r) Py_XDECREF(r)
  1052. #define __Pyx_XGOTREF(r)
  1053. #define __Pyx_XGIVEREF(r)
  1054. #endif
  1055. #define __Pyx_XDECREF_SET(r, v) do {\
  1056. PyObject *tmp = (PyObject *) r;\
  1057. r = v; __Pyx_XDECREF(tmp);\
  1058. } while (0)
  1059. #define __Pyx_DECREF_SET(r, v) do {\
  1060. PyObject *tmp = (PyObject *) r;\
  1061. r = v; __Pyx_DECREF(tmp);\
  1062. } while (0)
  1063. #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
  1064. #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
  1065. /* PyObjectGetAttrStr.proto */
  1066. #if CYTHON_USE_TYPE_SLOTS
  1067. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
  1068. #else
  1069. #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
  1070. #endif
  1071. /* GetBuiltinName.proto */
  1072. static PyObject *__Pyx_GetBuiltinName(PyObject *name);
  1073. /* GetItemInt.proto */
  1074. #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  1075. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1076. __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
  1077. (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
  1078. __Pyx_GetItemInt_Generic(o, to_py_func(i))))
  1079. #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  1080. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1081. __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  1082. (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
  1083. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  1084. int wraparound, int boundscheck);
  1085. #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
  1086. (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
  1087. __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
  1088. (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
  1089. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  1090. int wraparound, int boundscheck);
  1091. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
  1092. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
  1093. int is_list, int wraparound, int boundscheck);
  1094. /* decode_c_string_utf16.proto */
  1095. static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
  1096. int byteorder = 0;
  1097. return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
  1098. }
  1099. static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
  1100. int byteorder = -1;
  1101. return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
  1102. }
  1103. static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
  1104. int byteorder = 1;
  1105. return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
  1106. }
  1107. /* decode_c_bytes.proto */
  1108. static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
  1109. const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
  1110. const char* encoding, const char* errors,
  1111. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
  1112. /* decode_bytes.proto */
  1113. static CYTHON_INLINE PyObject* __Pyx_decode_bytes(
  1114. PyObject* string, Py_ssize_t start, Py_ssize_t stop,
  1115. const char* encoding, const char* errors,
  1116. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  1117. return __Pyx_decode_c_bytes(
  1118. PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string),
  1119. start, stop, encoding, errors, decode_func);
  1120. }
  1121. /* RaiseArgTupleInvalid.proto */
  1122. static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
  1123. Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
  1124. /* RaiseDoubleKeywords.proto */
  1125. static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
  1126. /* ParseKeywords.proto */
  1127. static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
  1128. PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
  1129. const char* function_name);
  1130. /* None.proto */
  1131. static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
  1132. /* RaiseTooManyValuesToUnpack.proto */
  1133. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
  1134. /* RaiseNeedMoreValuesToUnpack.proto */
  1135. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
  1136. /* IterFinish.proto */
  1137. static CYTHON_INLINE int __Pyx_IterFinish(void);
  1138. /* UnpackItemEndCheck.proto */
  1139. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
  1140. /* ListCompAppend.proto */
  1141. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  1142. static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
  1143. PyListObject* L = (PyListObject*) list;
  1144. Py_ssize_t len = Py_SIZE(list);
  1145. if (likely(L->allocated > len)) {
  1146. Py_INCREF(x);
  1147. PyList_SET_ITEM(list, len, x);
  1148. Py_SIZE(list) = len+1;
  1149. return 0;
  1150. }
  1151. return PyList_Append(list, x);
  1152. }
  1153. #else
  1154. #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
  1155. #endif
  1156. /* ListAppend.proto */
  1157. #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
  1158. static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
  1159. PyListObject* L = (PyListObject*) list;
  1160. Py_ssize_t len = Py_SIZE(list);
  1161. if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
  1162. Py_INCREF(x);
  1163. PyList_SET_ITEM(list, len, x);
  1164. Py_SIZE(list) = len+1;
  1165. return 0;
  1166. }
  1167. return PyList_Append(list, x);
  1168. }
  1169. #else
  1170. #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
  1171. #endif
  1172. /* KeywordStringCheck.proto */
  1173. static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
  1174. /* ExtTypeTest.proto */
  1175. static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
  1176. /* PyDictContains.proto */
  1177. static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
  1178. int result = PyDict_Contains(dict, item);
  1179. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  1180. }
  1181. /* DictGetItem.proto */
  1182. #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
  1183. static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
  1184. #define __Pyx_PyObject_Dict_GetItem(obj, name)\
  1185. (likely(PyDict_CheckExact(obj)) ?\
  1186. __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
  1187. #else
  1188. #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
  1189. #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
  1190. #endif
  1191. /* PyErrExceptionMatches.proto */
  1192. #if CYTHON_FAST_THREAD_STATE
  1193. #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
  1194. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
  1195. #else
  1196. #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
  1197. #endif
  1198. /* PyThreadStateGet.proto */
  1199. #if CYTHON_FAST_THREAD_STATE
  1200. #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
  1201. #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
  1202. #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
  1203. #else
  1204. #define __Pyx_PyThreadState_declare
  1205. #define __Pyx_PyThreadState_assign
  1206. #define __Pyx_PyErr_Occurred() PyErr_Occurred()
  1207. #endif
  1208. /* PyErrFetchRestore.proto */
  1209. #if CYTHON_FAST_THREAD_STATE
  1210. #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
  1211. #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
  1212. #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
  1213. #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
  1214. #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
  1215. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  1216. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1217. #if CYTHON_COMPILING_IN_CPYTHON
  1218. #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
  1219. #else
  1220. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1221. #endif
  1222. #else
  1223. #define __Pyx_PyErr_Clear() PyErr_Clear()
  1224. #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
  1225. #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
  1226. #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
  1227. #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
  1228. #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
  1229. #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
  1230. #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
  1231. #endif
  1232. /* GetAttr.proto */
  1233. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
  1234. /* GetAttr3.proto */
  1235. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
  1236. /* GetModuleGlobalName.proto */
  1237. static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
  1238. /* PyFunctionFastCall.proto */
  1239. #if CYTHON_FAST_PYCALL
  1240. #define __Pyx_PyFunction_FastCall(func, args, nargs)\
  1241. __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
  1242. #if 1 || PY_VERSION_HEX < 0x030600B1
  1243. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
  1244. #else
  1245. #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
  1246. #endif
  1247. #endif
  1248. /* PyObjectCall.proto */
  1249. #if CYTHON_COMPILING_IN_CPYTHON
  1250. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
  1251. #else
  1252. #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
  1253. #endif
  1254. /* PyObjectCallMethO.proto */
  1255. #if CYTHON_COMPILING_IN_CPYTHON
  1256. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
  1257. #endif
  1258. /* PyObjectCallNoArg.proto */
  1259. #if CYTHON_COMPILING_IN_CPYTHON
  1260. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
  1261. #else
  1262. #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
  1263. #endif
  1264. /* PyCFunctionFastCall.proto */
  1265. #if CYTHON_FAST_PYCCALL
  1266. static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
  1267. #else
  1268. #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
  1269. #endif
  1270. /* PyObjectCallOneArg.proto */
  1271. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
  1272. /* PySequenceContains.proto */
  1273. static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
  1274. int result = PySequence_Contains(seq, item);
  1275. return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
  1276. }
  1277. /* RaiseException.proto */
  1278. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
  1279. /* IncludeStringH.proto */
  1280. #include <string.h>
  1281. /* BytesEquals.proto */
  1282. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
  1283. /* UnicodeEquals.proto */
  1284. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
  1285. /* SliceObject.proto */
  1286. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
  1287. PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
  1288. PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
  1289. int has_cstart, int has_cstop, int wraparound);
  1290. /* decode_bytearray.proto */
  1291. static CYTHON_INLINE PyObject* __Pyx_decode_bytearray(
  1292. PyObject* string, Py_ssize_t start, Py_ssize_t stop,
  1293. const char* encoding, const char* errors,
  1294. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  1295. return __Pyx_decode_c_bytes(
  1296. PyByteArray_AS_STRING(string), PyByteArray_GET_SIZE(string),
  1297. start, stop, encoding, errors, decode_func);
  1298. }
  1299. /* GetException.proto */
  1300. #if CYTHON_FAST_THREAD_STATE
  1301. #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
  1302. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1303. #else
  1304. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
  1305. #endif
  1306. /* SwapException.proto */
  1307. #if CYTHON_FAST_THREAD_STATE
  1308. #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
  1309. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1310. #else
  1311. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
  1312. #endif
  1313. /* SaveResetException.proto */
  1314. #if CYTHON_FAST_THREAD_STATE
  1315. #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
  1316. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
  1317. #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
  1318. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
  1319. #else
  1320. #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
  1321. #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
  1322. #endif
  1323. /* decode_c_string.proto */
  1324. static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
  1325. const char* cstring, Py_ssize_t start, Py_ssize_t stop,
  1326. const char* encoding, const char* errors,
  1327. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
  1328. /* UnpackUnboundCMethod.proto */
  1329. typedef struct {
  1330. PyObject *type;
  1331. PyObject **method_name;
  1332. PyCFunction func;
  1333. PyObject *method;
  1334. int flag;
  1335. } __Pyx_CachedCFunction;
  1336. /* CallUnboundCMethod1.proto */
  1337. static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
  1338. #if CYTHON_COMPILING_IN_CPYTHON
  1339. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
  1340. #else
  1341. #define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg)
  1342. #endif
  1343. /* Import.proto */
  1344. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
  1345. /* ImportFrom.proto */
  1346. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
  1347. /* HasAttr.proto */
  1348. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
  1349. /* PyObject_GenericGetAttrNoDict.proto */
  1350. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  1351. static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
  1352. #else
  1353. #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
  1354. #endif
  1355. /* PyObject_GenericGetAttr.proto */
  1356. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  1357. static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
  1358. #else
  1359. #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
  1360. #endif
  1361. /* SetupReduce.proto */
  1362. static int __Pyx_setup_reduce(PyObject* type_obj);
  1363. /* SetVTable.proto */
  1364. static int __Pyx_SetVtable(PyObject *dict, void *vtable);
  1365. /* CLineInTraceback.proto */
  1366. #ifdef CYTHON_CLINE_IN_TRACEBACK
  1367. #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
  1368. #else
  1369. static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
  1370. #endif
  1371. /* CodeObjectCache.proto */
  1372. typedef struct {
  1373. PyCodeObject* code_object;
  1374. int code_line;
  1375. } __Pyx_CodeObjectCacheEntry;
  1376. struct __Pyx_CodeObjectCache {
  1377. int count;
  1378. int max_count;
  1379. __Pyx_CodeObjectCacheEntry* entries;
  1380. };
  1381. static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
  1382. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
  1383. static PyCodeObject *__pyx_find_code_object(int code_line);
  1384. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
  1385. /* AddTraceback.proto */
  1386. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  1387. int py_line, const char *filename);
  1388. /* CIntToPy.proto */
  1389. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
  1390. /* CIntToPy.proto */
  1391. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);
  1392. /* CIntToPy.proto */
  1393. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);
  1394. /* CIntToPy.proto */
  1395. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
  1396. /* CIntToPy.proto */
  1397. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value);
  1398. /* CIntFromPy.proto */
  1399. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
  1400. /* CIntFromPy.proto */
  1401. static CYTHON_INLINE enum http_method __Pyx_PyInt_As_enum__http_method(PyObject *);
  1402. /* CIntFromPy.proto */
  1403. static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
  1404. /* CIntFromPy.proto */
  1405. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
  1406. /* FastTypeChecks.proto */
  1407. #if CYTHON_COMPILING_IN_CPYTHON
  1408. #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
  1409. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
  1410. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
  1411. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
  1412. #else
  1413. #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
  1414. #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
  1415. #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
  1416. #endif
  1417. #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
  1418. /* FetchCommonType.proto */
  1419. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
  1420. /* PyObjectCallMethod1.proto */
  1421. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
  1422. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
  1423. /* CoroutineBase.proto */
  1424. typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
  1425. typedef struct {
  1426. PyObject_HEAD
  1427. __pyx_coroutine_body_t body;
  1428. PyObject *closure;
  1429. PyObject *exc_type;
  1430. PyObject *exc_value;
  1431. PyObject *exc_traceback;
  1432. PyObject *gi_weakreflist;
  1433. PyObject *classobj;
  1434. PyObject *yieldfrom;
  1435. PyObject *gi_name;
  1436. PyObject *gi_qualname;
  1437. PyObject *gi_modulename;
  1438. PyObject *gi_code;
  1439. int resume_label;
  1440. char is_running;
  1441. } __pyx_CoroutineObject;
  1442. static __pyx_CoroutineObject *__Pyx__Coroutine_New(
  1443. PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  1444. PyObject *name, PyObject *qualname, PyObject *module_name);
  1445. static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
  1446. __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  1447. PyObject *name, PyObject *qualname, PyObject *module_name);
  1448. static int __Pyx_Coroutine_clear(PyObject *self);
  1449. static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
  1450. static PyObject *__Pyx_Coroutine_Close(PyObject *self);
  1451. static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
  1452. #define __Pyx_Coroutine_SwapException(self) {\
  1453. __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
  1454. __Pyx_Coroutine_ResetFrameBackpointer(self);\
  1455. }
  1456. #define __Pyx_Coroutine_ResetAndClearException(self) {\
  1457. __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
  1458. (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
  1459. }
  1460. #if CYTHON_FAST_THREAD_STATE
  1461. #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
  1462. __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
  1463. #else
  1464. #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
  1465. __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
  1466. #endif
  1467. static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
  1468. static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
  1469. /* PatchModuleWithCoroutine.proto */
  1470. static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
  1471. /* PatchGeneratorABC.proto */
  1472. static int __Pyx_patch_abc(void);
  1473. /* Generator.proto */
  1474. #define __Pyx_Generator_USED
  1475. static PyTypeObject *__pyx_GeneratorType = 0;
  1476. #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
  1477. #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
  1478. __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
  1479. static PyObject *__Pyx_Generator_Next(PyObject *self);
  1480. static int __pyx_Generator_init(void);
  1481. /* CheckBinaryVersion.proto */
  1482. static int __Pyx_check_binary_version(void);
  1483. /* PyIdentifierFromString.proto */
  1484. #if !defined(__Pyx_PyIdentifier_FromString)
  1485. #if PY_MAJOR_VERSION < 3
  1486. #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
  1487. #else
  1488. #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
  1489. #endif
  1490. #endif
  1491. /* ModuleImport.proto */
  1492. static PyObject *__Pyx_ImportModule(const char *name);
  1493. /* TypeImport.proto */
  1494. static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);
  1495. /* InitStrings.proto */
  1496. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
  1497. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__init(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, enum http_parser_type __pyx_v_mode, PyObject *__pyx_v_protocol, PyObject *__pyx_v_loop, struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init *__pyx_optional_args); /* proto*/
  1498. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__process_header(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1499. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_header_field(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, char *__pyx_v_at, size_t __pyx_v_length); /* proto*/
  1500. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_header_value(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, char *__pyx_v_at, size_t __pyx_v_length); /* proto*/
  1501. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_headers_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1502. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_message_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1503. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_chunk_header(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1504. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_chunk_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1505. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_status_complete(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1506. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser_http_version(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto*/
  1507. static PyObject *__pyx_f_7aiohttp_12_http_parser_17HttpRequestParser__on_status_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self); /* proto*/
  1508. static PyObject *__pyx_f_7aiohttp_12_http_parser_18HttpResponseParser__on_status_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self); /* proto*/
  1509. /* Module declarations from 'cpython.mem' */
  1510. /* Module declarations from 'libc.string' */
  1511. /* Module declarations from 'cpython.version' */
  1512. /* Module declarations from '__builtin__' */
  1513. /* Module declarations from 'cpython.type' */
  1514. static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
  1515. /* Module declarations from 'libc.stdio' */
  1516. /* Module declarations from 'cpython.object' */
  1517. /* Module declarations from 'cpython.ref' */
  1518. /* Module declarations from 'cpython.exc' */
  1519. /* Module declarations from 'cpython.module' */
  1520. /* Module declarations from 'cpython.tuple' */
  1521. /* Module declarations from 'cpython.list' */
  1522. /* Module declarations from 'cpython.sequence' */
  1523. /* Module declarations from 'cpython.mapping' */
  1524. /* Module declarations from 'cpython.iterator' */
  1525. /* Module declarations from 'cpython.number' */
  1526. /* Module declarations from 'cpython.int' */
  1527. /* Module declarations from '__builtin__' */
  1528. /* Module declarations from 'cpython.bool' */
  1529. static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
  1530. /* Module declarations from 'cpython.long' */
  1531. /* Module declarations from 'cpython.float' */
  1532. /* Module declarations from '__builtin__' */
  1533. /* Module declarations from 'cpython.complex' */
  1534. static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
  1535. /* Module declarations from 'cpython.string' */
  1536. /* Module declarations from 'cpython.unicode' */
  1537. /* Module declarations from 'cpython.dict' */
  1538. /* Module declarations from 'cpython.instance' */
  1539. /* Module declarations from 'cpython.function' */
  1540. /* Module declarations from 'cpython.method' */
  1541. /* Module declarations from 'cpython.weakref' */
  1542. /* Module declarations from 'cpython.getargs' */
  1543. /* Module declarations from 'cpython.pythread' */
  1544. /* Module declarations from 'cpython.pystate' */
  1545. /* Module declarations from 'cpython.cobject' */
  1546. /* Module declarations from 'cpython.oldbuffer' */
  1547. /* Module declarations from 'cpython.set' */
  1548. /* Module declarations from 'cpython.buffer' */
  1549. /* Module declarations from 'cpython.bytes' */
  1550. /* Module declarations from 'cpython.pycapsule' */
  1551. /* Module declarations from 'cpython' */
  1552. /* Module declarations from 'cython' */
  1553. /* Module declarations from 'aiohttp' */
  1554. /* Module declarations from 'libc.stdint' */
  1555. /* Module declarations from 'aiohttp._cparser' */
  1556. /* Module declarations from 'aiohttp._find_header' */
  1557. /* Module declarations from 'aiohttp._http_parser' */
  1558. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser_RawRequestMessage = 0;
  1559. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser_RawResponseMessage = 0;
  1560. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser_HttpParser = 0;
  1561. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser_HttpRequestParser = 0;
  1562. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser_HttpResponseParser = 0;
  1563. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct____repr__ = 0;
  1564. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr = 0;
  1565. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ = 0;
  1566. static PyTypeObject *__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr = 0;
  1567. static PyObject *__pyx_v_7aiohttp_12_http_parser_headers = 0;
  1568. static PyObject *__pyx_v_7aiohttp_12_http_parser_URL = 0;
  1569. static PyObject *__pyx_v_7aiohttp_12_http_parser_URL_build = 0;
  1570. static PyObject *__pyx_v_7aiohttp_12_http_parser_CIMultiDict = 0;
  1571. static PyObject *__pyx_v_7aiohttp_12_http_parser_CIMultiDictProxy = 0;
  1572. static PyObject *__pyx_v_7aiohttp_12_http_parser_HttpVersion = 0;
  1573. static PyObject *__pyx_v_7aiohttp_12_http_parser_HttpVersion10 = 0;
  1574. static PyObject *__pyx_v_7aiohttp_12_http_parser_HttpVersion11 = 0;
  1575. static PyObject *__pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1 = 0;
  1576. static PyObject *__pyx_v_7aiohttp_12_http_parser_CONTENT_ENCODING = 0;
  1577. static PyObject *__pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD = 0;
  1578. static PyObject *__pyx_v_7aiohttp_12_http_parser_StreamReader = 0;
  1579. static PyObject *__pyx_v_7aiohttp_12_http_parser_DeflateBuffer = 0;
  1580. static PyObject *__pyx_v_7aiohttp_12_http_parser__http_method = 0;
  1581. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_extend(PyObject *, char const *, size_t); /*proto*/
  1582. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_http_method_str(int); /*proto*/
  1583. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_find_header(PyObject *); /*proto*/
  1584. static PyObject *__pyx_f_7aiohttp_12_http_parser__new_request_message(PyObject *, PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *, int, int, PyObject *); /*proto*/
  1585. static PyObject *__pyx_f_7aiohttp_12_http_parser__new_response_message(PyObject *, int, PyObject *, PyObject *, PyObject *, int, PyObject *, int, int); /*proto*/
  1586. static int __pyx_f_7aiohttp_12_http_parser_cb_on_message_begin(struct http_parser *); /*proto*/
  1587. static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(struct http_parser *, char const *, size_t); /*proto*/
  1588. static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(struct http_parser *, char const *, size_t); /*proto*/
  1589. static int __pyx_f_7aiohttp_12_http_parser_cb_on_header_field(struct http_parser *, char const *, size_t); /*proto*/
  1590. static int __pyx_f_7aiohttp_12_http_parser_cb_on_header_value(struct http_parser *, char const *, size_t); /*proto*/
  1591. static int __pyx_f_7aiohttp_12_http_parser_cb_on_headers_complete(struct http_parser *); /*proto*/
  1592. static int __pyx_f_7aiohttp_12_http_parser_cb_on_body(struct http_parser *, char const *, size_t); /*proto*/
  1593. static int __pyx_f_7aiohttp_12_http_parser_cb_on_message_complete(struct http_parser *); /*proto*/
  1594. static int __pyx_f_7aiohttp_12_http_parser_cb_on_chunk_header(struct http_parser *); /*proto*/
  1595. static int __pyx_f_7aiohttp_12_http_parser_cb_on_chunk_complete(struct http_parser *); /*proto*/
  1596. static PyObject *__pyx_f_7aiohttp_12_http_parser_parser_error_from_errno(enum http_errno); /*proto*/
  1597. static PyObject *__pyx_f_7aiohttp_12_http_parser__parse_url(char *, size_t); /*proto*/
  1598. static PyObject *__pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawRequestMessage__set_state(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *, PyObject *); /*proto*/
  1599. static PyObject *__pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawResponseMessage__set_state(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *, PyObject *); /*proto*/
  1600. #define __Pyx_MODULE_NAME "aiohttp._http_parser"
  1601. extern int __pyx_module_is_main_aiohttp___http_parser;
  1602. int __pyx_module_is_main_aiohttp___http_parser = 0;
  1603. /* Implementation of 'aiohttp._http_parser' */
  1604. static PyObject *__pyx_builtin_range;
  1605. static PyObject *__pyx_builtin_MemoryError;
  1606. static PyObject *__pyx_builtin_TypeError;
  1607. static PyObject *__pyx_builtin_BaseException;
  1608. static const char __pyx_k_[] = "=";
  1609. static const char __pyx_k_i[] = "i";
  1610. static const char __pyx_k_TE[] = "TE";
  1611. static const char __pyx_k__2[] = ", ";
  1612. static const char __pyx_k__3[] = ")>";
  1613. static const char __pyx_k__6[] = "";
  1614. static const char __pyx_k_br[] = "br";
  1615. static const char __pyx_k_AGE[] = "AGE";
  1616. static const char __pyx_k_URI[] = "URI";
  1617. static const char __pyx_k_URL[] = "URL";
  1618. static const char __pyx_k_VIA[] = "VIA";
  1619. static const char __pyx_k__13[] = ":";
  1620. static const char __pyx_k_add[] = "add";
  1621. static const char __pyx_k_all[] = "__all__";
  1622. static const char __pyx_k_new[] = "__new__";
  1623. static const char __pyx_k_url[] = "url";
  1624. static const char __pyx_k_DATE[] = "DATE";
  1625. static const char __pyx_k_ETAG[] = "ETAG";
  1626. static const char __pyx_k_FROM[] = "FROM";
  1627. static const char __pyx_k_HOST[] = "HOST";
  1628. static const char __pyx_k_LINK[] = "LINK";
  1629. static const char __pyx_k_VARY[] = "VARY";
  1630. static const char __pyx_k_args[] = "args";
  1631. static const char __pyx_k_code[] = "code";
  1632. static const char __pyx_k_dict[] = "__dict__";
  1633. static const char __pyx_k_gzip[] = "gzip";
  1634. static const char __pyx_k_hdrs[] = "hdrs";
  1635. static const char __pyx_k_host[] = "host";
  1636. static const char __pyx_k_loop[] = "loop";
  1637. static const char __pyx_k_main[] = "__main__";
  1638. static const char __pyx_k_name[] = "__name__";
  1639. static const char __pyx_k_path[] = "path";
  1640. static const char __pyx_k_port[] = "port";
  1641. static const char __pyx_k_send[] = "send";
  1642. static const char __pyx_k_test[] = "__test__";
  1643. static const char __pyx_k_user[] = "user";
  1644. static const char __pyx_k_yarl[] = "yarl";
  1645. static const char __pyx_k_ALLOW[] = "ALLOW";
  1646. static const char __pyx_k_RANGE[] = "RANGE";
  1647. static const char __pyx_k_URL_2[] = "_URL";
  1648. static const char __pyx_k_build[] = "build";
  1649. static const char __pyx_k_close[] = "close";
  1650. static const char __pyx_k_lower[] = "lower";
  1651. static const char __pyx_k_query[] = "query";
  1652. static const char __pyx_k_range[] = "range";
  1653. static const char __pyx_k_throw[] = "throw";
  1654. static const char __pyx_k_timer[] = "timer";
  1655. static const char __pyx_k_ACCEPT[] = "ACCEPT";
  1656. static const char __pyx_k_COOKIE[] = "COOKIE";
  1657. static const char __pyx_k_DIGEST[] = "DIGEST";
  1658. static const char __pyx_k_EXPECT[] = "EXPECT";
  1659. static const char __pyx_k_ORIGIN[] = "ORIGIN";
  1660. static const char __pyx_k_PRAGMA[] = "PRAGMA";
  1661. static const char __pyx_k_SERVER[] = "SERVER";
  1662. static const char __pyx_k_format[] = "format";
  1663. static const char __pyx_k_import[] = "__import__";
  1664. static const char __pyx_k_method[] = "method";
  1665. static const char __pyx_k_pickle[] = "pickle";
  1666. static const char __pyx_k_py_buf[] = "py_buf";
  1667. static const char __pyx_k_reason[] = "reason";
  1668. static const char __pyx_k_reduce[] = "__reduce__";
  1669. static const char __pyx_k_scheme[] = "scheme";
  1670. static const char __pyx_k_update[] = "update";
  1671. static const char __pyx_k_EXPIRES[] = "EXPIRES";
  1672. static const char __pyx_k_REFERER[] = "REFERER";
  1673. static const char __pyx_k_TRAILER[] = "TRAILER";
  1674. static const char __pyx_k_UPGRADE[] = "UPGRADE";
  1675. static const char __pyx_k_WARNING[] = "WARNING";
  1676. static const char __pyx_k_aiohttp[] = "aiohttp";
  1677. static const char __pyx_k_chunked[] = "chunked";
  1678. static const char __pyx_k_deflate[] = "deflate";
  1679. static const char __pyx_k_genexpr[] = "genexpr";
  1680. static const char __pyx_k_headers[] = "headers";
  1681. static const char __pyx_k_streams[] = "streams";
  1682. static const char __pyx_k_unknown[] = "<unknown>";
  1683. static const char __pyx_k_upgrade[] = "upgrade";
  1684. static const char __pyx_k_version[] = "version";
  1685. static const char __pyx_k_IF_MATCH[] = "IF_MATCH";
  1686. static const char __pyx_k_IF_RANGE[] = "IF_RANGE";
  1687. static const char __pyx_k_LOCATION[] = "LOCATION";
  1688. static const char __pyx_k_buf_data[] = "buf_data";
  1689. static const char __pyx_k_feed_eof[] = "feed_eof";
  1690. static const char __pyx_k_fragment[] = "fragment";
  1691. static const char __pyx_k_getstate[] = "__getstate__";
  1692. static const char __pyx_k_password[] = "password";
  1693. static const char __pyx_k_protocol[] = "protocol";
  1694. static const char __pyx_k_pyx_type[] = "__pyx_type";
  1695. static const char __pyx_k_setstate[] = "__setstate__";
  1696. static const char __pyx_k_FORWARDED[] = "FORWARDED";
  1697. static const char __pyx_k_TypeError[] = "TypeError";
  1698. static const char __pyx_k_WEBSOCKET[] = "WEBSOCKET";
  1699. static const char __pyx_k_feed_data[] = "feed_data";
  1700. static const char __pyx_k_multidict[] = "multidict";
  1701. static const char __pyx_k_parse_url[] = "parse_url";
  1702. static const char __pyx_k_partition[] = "partition";
  1703. static const char __pyx_k_pyx_state[] = "__pyx_state";
  1704. static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
  1705. static const char __pyx_k_CONNECTION[] = "CONNECTION";
  1706. static const char __pyx_k_KEEP_ALIVE[] = "KEEP_ALIVE";
  1707. static const char __pyx_k_SET_COOKIE[] = "SET_COOKIE";
  1708. static const char __pyx_k_USER_AGENT[] = "USER_AGENT";
  1709. static const char __pyx_k_pyx_result[] = "__pyx_result";
  1710. static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
  1711. static const char __pyx_k_CIMultiDict[] = "CIMultiDict";
  1712. static const char __pyx_k_CONTENT_MD5[] = "CONTENT_MD5";
  1713. static const char __pyx_k_DESTINATION[] = "DESTINATION";
  1714. static const char __pyx_k_HttpVersion[] = "HttpVersion";
  1715. static const char __pyx_k_LineTooLong[] = "LineTooLong";
  1716. static const char __pyx_k_MemoryError[] = "MemoryError";
  1717. static const char __pyx_k_PickleError[] = "PickleError";
  1718. static const char __pyx_k_RETRY_AFTER[] = "RETRY_AFTER";
  1719. static const char __pyx_k_WANT_DIGEST[] = "WANT_DIGEST";
  1720. static const char __pyx_k_compression[] = "compression";
  1721. static const char __pyx_k_http_parser[] = "http_parser";
  1722. static const char __pyx_k_http_writer[] = "http_writer";
  1723. static const char __pyx_k_max_headers[] = "max_headers";
  1724. static const char __pyx_k_raw_headers[] = "raw_headers";
  1725. static const char __pyx_k_CONTENT_TYPE[] = "CONTENT_TYPE";
  1726. static const char __pyx_k_MAX_FORWARDS[] = "MAX_FORWARDS";
  1727. static const char __pyx_k_StreamReader[] = "StreamReader";
  1728. static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
  1729. static const char __pyx_k_should_close[] = "should_close";
  1730. static const char __pyx_k_stringsource[] = "stringsource";
  1731. static const char __pyx_k_ACCEPT_RANGES[] = "ACCEPT_RANGES";
  1732. static const char __pyx_k_AUTHORIZATION[] = "AUTHORIZATION";
  1733. static const char __pyx_k_BadStatusLine[] = "BadStatusLine";
  1734. static const char __pyx_k_BaseException[] = "BaseException";
  1735. static const char __pyx_k_CACHE_CONTROL[] = "CACHE_CONTROL";
  1736. static const char __pyx_k_CIMultiDict_2[] = "_CIMultiDict";
  1737. static const char __pyx_k_CONTENT_RANGE[] = "CONTENT_RANGE";
  1738. static const char __pyx_k_DeflateBuffer[] = "DeflateBuffer";
  1739. static const char __pyx_k_EMPTY_PAYLOAD[] = "EMPTY_PAYLOAD";
  1740. static const char __pyx_k_HttpVersion10[] = "HttpVersion10";
  1741. static const char __pyx_k_HttpVersion11[] = "HttpVersion11";
  1742. static const char __pyx_k_HttpVersion_2[] = "_HttpVersion";
  1743. static const char __pyx_k_IF_NONE_MATCH[] = "IF_NONE_MATCH";
  1744. static const char __pyx_k_InvalidHeader[] = "InvalidHeader";
  1745. static const char __pyx_k_LAST_EVENT_ID[] = "LAST_EVENT_ID";
  1746. static const char __pyx_k_LAST_MODIFIED[] = "LAST_MODIFIED";
  1747. static const char __pyx_k_invalid_url_r[] = "invalid url {!r}";
  1748. static const char __pyx_k_max_line_size[] = "max_line_size";
  1749. static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
  1750. static const char __pyx_k_set_exception[] = "set_exception";
  1751. static const char __pyx_k_ACCEPT_CHARSET[] = "ACCEPT_CHARSET";
  1752. static const char __pyx_k_BadHttpMessage[] = "BadHttpMessage";
  1753. static const char __pyx_k_CONTENT_LENGTH[] = "CONTENT_LENGTH";
  1754. static const char __pyx_k_StreamReader_2[] = "_StreamReader";
  1755. static const char __pyx_k_max_field_size[] = "max_field_size";
  1756. static const char __pyx_k_read_until_eof[] = "read_until_eof";
  1757. static const char __pyx_k_ACCEPT_ENCODING[] = "ACCEPT_ENCODING";
  1758. static const char __pyx_k_ACCEPT_LANGUAGE[] = "ACCEPT_LANGUAGE";
  1759. static const char __pyx_k_DeflateBuffer_2[] = "_DeflateBuffer";
  1760. static const char __pyx_k_EMPTY_PAYLOAD_2[] = "_EMPTY_PAYLOAD";
  1761. static const char __pyx_k_HttpVersion10_2[] = "_HttpVersion10";
  1762. static const char __pyx_k_HttpVersion11_2[] = "_HttpVersion11";
  1763. static const char __pyx_k_InvalidURLError[] = "InvalidURLError";
  1764. static const char __pyx_k_X_FORWARDED_FOR[] = "X_FORWARDED_FOR";
  1765. static const char __pyx_k_auto_decompress[] = "auto_decompress";
  1766. static const char __pyx_k_http_exceptions[] = "http_exceptions";
  1767. static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
  1768. static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
  1769. static const char __pyx_k_CIMultiDictProxy[] = "CIMultiDictProxy";
  1770. static const char __pyx_k_CONTENT_ENCODING[] = "CONTENT_ENCODING";
  1771. static const char __pyx_k_CONTENT_LANGUAGE[] = "CONTENT_LANGUAGE";
  1772. static const char __pyx_k_CONTENT_LOCATION[] = "CONTENT_LOCATION";
  1773. static const char __pyx_k_WWW_AUTHENTICATE[] = "WWW_AUTHENTICATE";
  1774. static const char __pyx_k_X_FORWARDED_HOST[] = "X_FORWARDED_HOST";
  1775. static const char __pyx_k_HttpRequestParser[] = "HttpRequestParser";
  1776. static const char __pyx_k_IF_MODIFIED_SINCE[] = "IF_MODIFIED_SINCE";
  1777. static const char __pyx_k_RawRequestMessage[] = "<RawRequestMessage(";
  1778. static const char __pyx_k_SEC_WEBSOCKET_KEY[] = "SEC_WEBSOCKET_KEY";
  1779. static const char __pyx_k_TRANSFER_ENCODING[] = "TRANSFER_ENCODING";
  1780. static const char __pyx_k_X_FORWARDED_PROTO[] = "X_FORWARDED_PROTO";
  1781. static const char __pyx_k_payload_exception[] = "payload_exception";
  1782. static const char __pyx_k_CIMultiDictProxy_2[] = "_CIMultiDictProxy";
  1783. static const char __pyx_k_ContentLengthError[] = "ContentLengthError";
  1784. static const char __pyx_k_HttpResponseParser[] = "HttpResponseParser";
  1785. static const char __pyx_k_PROXY_AUTHENTICATE[] = "PROXY_AUTHENTICATE";
  1786. static const char __pyx_k_RawResponseMessage[] = "<RawResponseMessage(";
  1787. static const char __pyx_k_SEC_WEBSOCKET_KEY1[] = "SEC_WEBSOCKET_KEY1";
  1788. static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
  1789. static const char __pyx_k_response_with_body[] = "response_with_body";
  1790. static const char __pyx_k_CONTENT_DISPOSITION[] = "CONTENT_DISPOSITION";
  1791. static const char __pyx_k_IF_UNMODIFIED_SINCE[] = "IF_UNMODIFIED_SINCE";
  1792. static const char __pyx_k_PROXY_AUTHORIZATION[] = "PROXY_AUTHORIZATION";
  1793. static const char __pyx_k_RawRequestMessage_2[] = "RawRequestMessage";
  1794. static const char __pyx_k_PayloadEncodingError[] = "PayloadEncodingError";
  1795. static const char __pyx_k_RawResponseMessage_2[] = "RawResponseMessage";
  1796. static const char __pyx_k_SEC_WEBSOCKET_ACCEPT[] = "SEC_WEBSOCKET_ACCEPT";
  1797. static const char __pyx_k_aiohttp__http_parser[] = "aiohttp._http_parser";
  1798. static const char __pyx_k_SEC_WEBSOCKET_VERSION[] = "SEC_WEBSOCKET_VERSION";
  1799. static const char __pyx_k_TransferEncodingError[] = "TransferEncodingError";
  1800. static const char __pyx_k_repr___locals_genexpr[] = "__repr__.<locals>.genexpr";
  1801. static const char __pyx_k_ACCESS_CONTROL_MAX_AGE[] = "ACCESS_CONTROL_MAX_AGE";
  1802. static const char __pyx_k_SEC_WEBSOCKET_PROTOCOL[] = "SEC_WEBSOCKET_PROTOCOL";
  1803. static const char __pyx_k_Header_name_is_too_long[] = "Header name is too long";
  1804. static const char __pyx_k_Status_line_is_too_long[] = "Status line is too long";
  1805. static const char __pyx_k_Header_value_is_too_long[] = "Header value is too long";
  1806. static const char __pyx_k_SEC_WEBSOCKET_EXTENSIONS[] = "SEC_WEBSOCKET_EXTENSIONS";
  1807. static const char __pyx_k_aiohttp__http_parser_pyx[] = "aiohttp/_http_parser.pyx";
  1808. static const char __pyx_k_end_http_chunk_receiving[] = "end_http_chunk_receiving";
  1809. static const char __pyx_k_CONTENT_TRANSFER_ENCODING[] = "CONTENT_TRANSFER_ENCODING";
  1810. static const char __pyx_k_begin_http_chunk_receiving[] = "begin_http_chunk_receiving";
  1811. static const char __pyx_k_ACCESS_CONTROL_ALLOW_ORIGIN[] = "ACCESS_CONTROL_ALLOW_ORIGIN";
  1812. static const char __pyx_k_ACCESS_CONTROL_ALLOW_HEADERS[] = "ACCESS_CONTROL_ALLOW_HEADERS";
  1813. static const char __pyx_k_ACCESS_CONTROL_ALLOW_METHODS[] = "ACCESS_CONTROL_ALLOW_METHODS";
  1814. static const char __pyx_k_ACCESS_CONTROL_EXPOSE_HEADERS[] = "ACCESS_CONTROL_EXPOSE_HEADERS";
  1815. static const char __pyx_k_ACCESS_CONTROL_REQUEST_METHOD[] = "ACCESS_CONTROL_REQUEST_METHOD";
  1816. static const char __pyx_k_ACCESS_CONTROL_REQUEST_HEADERS[] = "ACCESS_CONTROL_REQUEST_HEADERS";
  1817. static const char __pyx_k_pyx_unpickle_RawRequestMessage[] = "__pyx_unpickle_RawRequestMessage";
  1818. static const char __pyx_k_pyx_unpickle_RawResponseMessag[] = "__pyx_unpickle_RawResponseMessage";
  1819. static const char __pyx_k_ACCESS_CONTROL_ALLOW_CREDENTIALS[] = "ACCESS_CONTROL_ALLOW_CREDENTIALS";
  1820. static const char __pyx_k_Incompatible_checksums_s_vs_0x14[] = "Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))";
  1821. static const char __pyx_k_Incompatible_checksums_s_vs_0xc7[] = "Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))";
  1822. static const char __pyx_k_Not_enough_data_for_satisfy_cont[] = "Not enough data for satisfy content length header.";
  1823. static const char __pyx_k_Not_enough_data_for_satisfy_tran[] = "Not enough data for satisfy transfer length header.";
  1824. static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
  1825. static PyObject *__pyx_kp_u_;
  1826. static PyObject *__pyx_n_s_ACCEPT;
  1827. static PyObject *__pyx_n_s_ACCEPT_CHARSET;
  1828. static PyObject *__pyx_n_s_ACCEPT_ENCODING;
  1829. static PyObject *__pyx_n_s_ACCEPT_LANGUAGE;
  1830. static PyObject *__pyx_n_s_ACCEPT_RANGES;
  1831. static PyObject *__pyx_n_s_ACCESS_CONTROL_ALLOW_CREDENTIALS;
  1832. static PyObject *__pyx_n_s_ACCESS_CONTROL_ALLOW_HEADERS;
  1833. static PyObject *__pyx_n_s_ACCESS_CONTROL_ALLOW_METHODS;
  1834. static PyObject *__pyx_n_s_ACCESS_CONTROL_ALLOW_ORIGIN;
  1835. static PyObject *__pyx_n_s_ACCESS_CONTROL_EXPOSE_HEADERS;
  1836. static PyObject *__pyx_n_s_ACCESS_CONTROL_MAX_AGE;
  1837. static PyObject *__pyx_n_s_ACCESS_CONTROL_REQUEST_HEADERS;
  1838. static PyObject *__pyx_n_s_ACCESS_CONTROL_REQUEST_METHOD;
  1839. static PyObject *__pyx_n_s_AGE;
  1840. static PyObject *__pyx_n_s_ALLOW;
  1841. static PyObject *__pyx_n_s_AUTHORIZATION;
  1842. static PyObject *__pyx_n_s_BadHttpMessage;
  1843. static PyObject *__pyx_n_s_BadStatusLine;
  1844. static PyObject *__pyx_n_s_BaseException;
  1845. static PyObject *__pyx_n_s_CACHE_CONTROL;
  1846. static PyObject *__pyx_n_s_CIMultiDict;
  1847. static PyObject *__pyx_n_s_CIMultiDictProxy;
  1848. static PyObject *__pyx_n_s_CIMultiDictProxy_2;
  1849. static PyObject *__pyx_n_s_CIMultiDict_2;
  1850. static PyObject *__pyx_n_s_CONNECTION;
  1851. static PyObject *__pyx_n_s_CONTENT_DISPOSITION;
  1852. static PyObject *__pyx_n_s_CONTENT_ENCODING;
  1853. static PyObject *__pyx_n_s_CONTENT_LANGUAGE;
  1854. static PyObject *__pyx_n_s_CONTENT_LENGTH;
  1855. static PyObject *__pyx_n_s_CONTENT_LOCATION;
  1856. static PyObject *__pyx_n_s_CONTENT_MD5;
  1857. static PyObject *__pyx_n_s_CONTENT_RANGE;
  1858. static PyObject *__pyx_n_s_CONTENT_TRANSFER_ENCODING;
  1859. static PyObject *__pyx_n_s_CONTENT_TYPE;
  1860. static PyObject *__pyx_n_s_COOKIE;
  1861. static PyObject *__pyx_n_s_ContentLengthError;
  1862. static PyObject *__pyx_n_s_DATE;
  1863. static PyObject *__pyx_n_s_DESTINATION;
  1864. static PyObject *__pyx_n_s_DIGEST;
  1865. static PyObject *__pyx_n_s_DeflateBuffer;
  1866. static PyObject *__pyx_n_s_DeflateBuffer_2;
  1867. static PyObject *__pyx_n_s_EMPTY_PAYLOAD;
  1868. static PyObject *__pyx_n_s_EMPTY_PAYLOAD_2;
  1869. static PyObject *__pyx_n_s_ETAG;
  1870. static PyObject *__pyx_n_s_EXPECT;
  1871. static PyObject *__pyx_n_s_EXPIRES;
  1872. static PyObject *__pyx_n_s_FORWARDED;
  1873. static PyObject *__pyx_n_s_FROM;
  1874. static PyObject *__pyx_n_s_HOST;
  1875. static PyObject *__pyx_kp_u_Header_name_is_too_long;
  1876. static PyObject *__pyx_kp_u_Header_value_is_too_long;
  1877. static PyObject *__pyx_n_u_HttpRequestParser;
  1878. static PyObject *__pyx_n_u_HttpResponseParser;
  1879. static PyObject *__pyx_n_s_HttpVersion;
  1880. static PyObject *__pyx_n_s_HttpVersion10;
  1881. static PyObject *__pyx_n_s_HttpVersion10_2;
  1882. static PyObject *__pyx_n_s_HttpVersion11;
  1883. static PyObject *__pyx_n_s_HttpVersion11_2;
  1884. static PyObject *__pyx_n_s_HttpVersion_2;
  1885. static PyObject *__pyx_n_s_IF_MATCH;
  1886. static PyObject *__pyx_n_s_IF_MODIFIED_SINCE;
  1887. static PyObject *__pyx_n_s_IF_NONE_MATCH;
  1888. static PyObject *__pyx_n_s_IF_RANGE;
  1889. static PyObject *__pyx_n_s_IF_UNMODIFIED_SINCE;
  1890. static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0x14;
  1891. static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xc7;
  1892. static PyObject *__pyx_n_s_InvalidHeader;
  1893. static PyObject *__pyx_n_s_InvalidURLError;
  1894. static PyObject *__pyx_n_s_KEEP_ALIVE;
  1895. static PyObject *__pyx_n_s_LAST_EVENT_ID;
  1896. static PyObject *__pyx_n_s_LAST_MODIFIED;
  1897. static PyObject *__pyx_n_s_LINK;
  1898. static PyObject *__pyx_n_s_LOCATION;
  1899. static PyObject *__pyx_n_s_LineTooLong;
  1900. static PyObject *__pyx_n_s_MAX_FORWARDS;
  1901. static PyObject *__pyx_n_s_MemoryError;
  1902. static PyObject *__pyx_kp_u_Not_enough_data_for_satisfy_cont;
  1903. static PyObject *__pyx_kp_u_Not_enough_data_for_satisfy_tran;
  1904. static PyObject *__pyx_n_s_ORIGIN;
  1905. static PyObject *__pyx_n_s_PRAGMA;
  1906. static PyObject *__pyx_n_s_PROXY_AUTHENTICATE;
  1907. static PyObject *__pyx_n_s_PROXY_AUTHORIZATION;
  1908. static PyObject *__pyx_n_s_PayloadEncodingError;
  1909. static PyObject *__pyx_n_s_PickleError;
  1910. static PyObject *__pyx_n_s_RANGE;
  1911. static PyObject *__pyx_n_s_REFERER;
  1912. static PyObject *__pyx_n_s_RETRY_AFTER;
  1913. static PyObject *__pyx_kp_u_RawRequestMessage;
  1914. static PyObject *__pyx_n_u_RawRequestMessage_2;
  1915. static PyObject *__pyx_kp_u_RawResponseMessage;
  1916. static PyObject *__pyx_n_u_RawResponseMessage_2;
  1917. static PyObject *__pyx_n_s_SEC_WEBSOCKET_ACCEPT;
  1918. static PyObject *__pyx_n_s_SEC_WEBSOCKET_EXTENSIONS;
  1919. static PyObject *__pyx_n_s_SEC_WEBSOCKET_KEY;
  1920. static PyObject *__pyx_n_s_SEC_WEBSOCKET_KEY1;
  1921. static PyObject *__pyx_n_s_SEC_WEBSOCKET_PROTOCOL;
  1922. static PyObject *__pyx_n_s_SEC_WEBSOCKET_VERSION;
  1923. static PyObject *__pyx_n_s_SERVER;
  1924. static PyObject *__pyx_n_s_SET_COOKIE;
  1925. static PyObject *__pyx_kp_u_Status_line_is_too_long;
  1926. static PyObject *__pyx_n_s_StreamReader;
  1927. static PyObject *__pyx_n_s_StreamReader_2;
  1928. static PyObject *__pyx_n_s_TE;
  1929. static PyObject *__pyx_n_s_TRAILER;
  1930. static PyObject *__pyx_n_s_TRANSFER_ENCODING;
  1931. static PyObject *__pyx_n_s_TransferEncodingError;
  1932. static PyObject *__pyx_n_s_TypeError;
  1933. static PyObject *__pyx_n_s_UPGRADE;
  1934. static PyObject *__pyx_n_s_URI;
  1935. static PyObject *__pyx_n_s_URL;
  1936. static PyObject *__pyx_n_s_URL_2;
  1937. static PyObject *__pyx_n_s_USER_AGENT;
  1938. static PyObject *__pyx_n_s_VARY;
  1939. static PyObject *__pyx_n_s_VIA;
  1940. static PyObject *__pyx_n_s_WANT_DIGEST;
  1941. static PyObject *__pyx_n_s_WARNING;
  1942. static PyObject *__pyx_n_s_WEBSOCKET;
  1943. static PyObject *__pyx_n_s_WWW_AUTHENTICATE;
  1944. static PyObject *__pyx_n_s_X_FORWARDED_FOR;
  1945. static PyObject *__pyx_n_s_X_FORWARDED_HOST;
  1946. static PyObject *__pyx_n_s_X_FORWARDED_PROTO;
  1947. static PyObject *__pyx_kp_u__13;
  1948. static PyObject *__pyx_kp_u__2;
  1949. static PyObject *__pyx_kp_u__3;
  1950. static PyObject *__pyx_kp_b__6;
  1951. static PyObject *__pyx_kp_u__6;
  1952. static PyObject *__pyx_n_s_add;
  1953. static PyObject *__pyx_n_s_aiohttp;
  1954. static PyObject *__pyx_n_s_aiohttp__http_parser;
  1955. static PyObject *__pyx_kp_s_aiohttp__http_parser_pyx;
  1956. static PyObject *__pyx_n_s_all;
  1957. static PyObject *__pyx_n_s_args;
  1958. static PyObject *__pyx_n_s_auto_decompress;
  1959. static PyObject *__pyx_n_s_begin_http_chunk_receiving;
  1960. static PyObject *__pyx_n_u_br;
  1961. static PyObject *__pyx_n_s_buf_data;
  1962. static PyObject *__pyx_n_s_build;
  1963. static PyObject *__pyx_n_s_chunked;
  1964. static PyObject *__pyx_n_u_chunked;
  1965. static PyObject *__pyx_n_s_cline_in_traceback;
  1966. static PyObject *__pyx_n_s_close;
  1967. static PyObject *__pyx_n_s_code;
  1968. static PyObject *__pyx_n_u_code;
  1969. static PyObject *__pyx_n_s_compression;
  1970. static PyObject *__pyx_n_u_compression;
  1971. static PyObject *__pyx_n_u_deflate;
  1972. static PyObject *__pyx_n_s_dict;
  1973. static PyObject *__pyx_n_s_end_http_chunk_receiving;
  1974. static PyObject *__pyx_n_s_feed_data;
  1975. static PyObject *__pyx_n_s_feed_eof;
  1976. static PyObject *__pyx_n_s_format;
  1977. static PyObject *__pyx_n_s_fragment;
  1978. static PyObject *__pyx_n_s_genexpr;
  1979. static PyObject *__pyx_n_s_getstate;
  1980. static PyObject *__pyx_n_u_gzip;
  1981. static PyObject *__pyx_n_s_hdrs;
  1982. static PyObject *__pyx_n_s_headers;
  1983. static PyObject *__pyx_n_u_headers;
  1984. static PyObject *__pyx_n_s_host;
  1985. static PyObject *__pyx_n_s_http_exceptions;
  1986. static PyObject *__pyx_n_s_http_parser;
  1987. static PyObject *__pyx_n_s_http_writer;
  1988. static PyObject *__pyx_n_s_i;
  1989. static PyObject *__pyx_n_s_import;
  1990. static PyObject *__pyx_kp_u_invalid_url_r;
  1991. static PyObject *__pyx_n_s_loop;
  1992. static PyObject *__pyx_n_s_lower;
  1993. static PyObject *__pyx_n_s_main;
  1994. static PyObject *__pyx_n_s_max_field_size;
  1995. static PyObject *__pyx_n_s_max_headers;
  1996. static PyObject *__pyx_n_s_max_line_size;
  1997. static PyObject *__pyx_n_s_method;
  1998. static PyObject *__pyx_n_u_method;
  1999. static PyObject *__pyx_n_s_multidict;
  2000. static PyObject *__pyx_n_s_name;
  2001. static PyObject *__pyx_n_s_new;
  2002. static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
  2003. static PyObject *__pyx_n_s_parse_url;
  2004. static PyObject *__pyx_n_s_partition;
  2005. static PyObject *__pyx_n_s_password;
  2006. static PyObject *__pyx_n_s_path;
  2007. static PyObject *__pyx_n_u_path;
  2008. static PyObject *__pyx_n_s_payload_exception;
  2009. static PyObject *__pyx_n_s_pickle;
  2010. static PyObject *__pyx_n_s_port;
  2011. static PyObject *__pyx_n_s_protocol;
  2012. static PyObject *__pyx_n_s_py_buf;
  2013. static PyObject *__pyx_n_s_pyx_PickleError;
  2014. static PyObject *__pyx_n_s_pyx_checksum;
  2015. static PyObject *__pyx_n_s_pyx_result;
  2016. static PyObject *__pyx_n_s_pyx_state;
  2017. static PyObject *__pyx_n_s_pyx_type;
  2018. static PyObject *__pyx_n_s_pyx_unpickle_RawRequestMessage;
  2019. static PyObject *__pyx_n_s_pyx_unpickle_RawResponseMessag;
  2020. static PyObject *__pyx_n_s_pyx_vtable;
  2021. static PyObject *__pyx_n_s_query;
  2022. static PyObject *__pyx_n_s_range;
  2023. static PyObject *__pyx_n_s_raw_headers;
  2024. static PyObject *__pyx_n_u_raw_headers;
  2025. static PyObject *__pyx_n_s_read_until_eof;
  2026. static PyObject *__pyx_n_s_reason;
  2027. static PyObject *__pyx_n_u_reason;
  2028. static PyObject *__pyx_n_s_reduce;
  2029. static PyObject *__pyx_n_s_reduce_cython;
  2030. static PyObject *__pyx_n_s_reduce_ex;
  2031. static PyObject *__pyx_n_s_repr___locals_genexpr;
  2032. static PyObject *__pyx_n_s_response_with_body;
  2033. static PyObject *__pyx_n_s_scheme;
  2034. static PyObject *__pyx_n_s_send;
  2035. static PyObject *__pyx_n_s_set_exception;
  2036. static PyObject *__pyx_n_s_setstate;
  2037. static PyObject *__pyx_n_s_setstate_cython;
  2038. static PyObject *__pyx_n_s_should_close;
  2039. static PyObject *__pyx_n_u_should_close;
  2040. static PyObject *__pyx_n_s_streams;
  2041. static PyObject *__pyx_kp_s_stringsource;
  2042. static PyObject *__pyx_n_s_test;
  2043. static PyObject *__pyx_n_s_throw;
  2044. static PyObject *__pyx_n_s_timer;
  2045. static PyObject *__pyx_kp_u_unknown;
  2046. static PyObject *__pyx_n_s_update;
  2047. static PyObject *__pyx_n_s_upgrade;
  2048. static PyObject *__pyx_n_u_upgrade;
  2049. static PyObject *__pyx_n_s_url;
  2050. static PyObject *__pyx_n_u_url;
  2051. static PyObject *__pyx_n_s_user;
  2052. static PyObject *__pyx_n_s_version;
  2053. static PyObject *__pyx_n_u_version;
  2054. static PyObject *__pyx_n_s_yarl;
  2055. static int __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage___init__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_path, PyObject *__pyx_v_version, PyObject *__pyx_v_headers, PyObject *__pyx_v_raw_headers, PyObject *__pyx_v_should_close, PyObject *__pyx_v_compression, PyObject *__pyx_v_upgrade, PyObject *__pyx_v_chunked, PyObject *__pyx_v_url); /* proto */
  2056. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_8__repr___genexpr(PyObject *__pyx_self); /* proto */
  2057. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_2__repr__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2058. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_4_replace(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self, PyObject *__pyx_v_dct); /* proto */
  2059. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_6method___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2060. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_4path___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2061. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7version___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2062. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2063. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_11raw_headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2064. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_12should_close___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2065. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_11compression___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2066. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7upgrade___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2067. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7chunked___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2068. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_3url___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2069. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_6__reduce_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self); /* proto */
  2070. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_8__setstate_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
  2071. static int __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage___init__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self, PyObject *__pyx_v_version, PyObject *__pyx_v_code, PyObject *__pyx_v_reason, PyObject *__pyx_v_headers, PyObject *__pyx_v_raw_headers, PyObject *__pyx_v_should_close, PyObject *__pyx_v_compression, PyObject *__pyx_v_upgrade, PyObject *__pyx_v_chunked); /* proto */
  2072. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_8__repr___genexpr(PyObject *__pyx_self); /* proto */
  2073. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_2__repr__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2074. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7version___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2075. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_4code___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2076. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_6reason___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2077. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2078. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_11raw_headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2079. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_12should_close___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2080. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_11compression___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2081. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7upgrade___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2082. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7chunked___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2083. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_4__reduce_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self); /* proto */
  2084. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_6__setstate_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
  2085. static int __pyx_pf_7aiohttp_12_http_parser_10HttpParser___cinit__(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto */
  2086. static void __pyx_pf_7aiohttp_12_http_parser_10HttpParser_2__dealloc__(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto */
  2087. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_4feed_eof(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto */
  2088. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_6feed_data(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
  2089. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self); /* proto */
  2090. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  2091. static int __pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser___init__(struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_loop, PyObject *__pyx_v_timer, size_t __pyx_v_max_line_size, size_t __pyx_v_max_headers, size_t __pyx_v_max_field_size, PyObject *__pyx_v_payload_exception, int __pyx_v_response_with_body, CYTHON_UNUSED int __pyx_v_read_until_eof); /* proto */
  2092. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self); /* proto */
  2093. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  2094. static int __pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser___init__(struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_loop, PyObject *__pyx_v_timer, size_t __pyx_v_max_line_size, size_t __pyx_v_max_headers, size_t __pyx_v_max_field_size, PyObject *__pyx_v_payload_exception, int __pyx_v_response_with_body, CYTHON_UNUSED int __pyx_v_read_until_eof, int __pyx_v_auto_decompress); /* proto */
  2095. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self); /* proto */
  2096. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
  2097. static PyObject *__pyx_pf_7aiohttp_12_http_parser_parse_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_url); /* proto */
  2098. static PyObject *__pyx_pf_7aiohttp_12_http_parser_2__pyx_unpickle_RawRequestMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
  2099. static PyObject *__pyx_pf_7aiohttp_12_http_parser_4__pyx_unpickle_RawResponseMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
  2100. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_RawRequestMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2101. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_RawResponseMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2102. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_HttpParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2103. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_HttpRequestParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2104. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_HttpResponseParser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2105. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct____repr__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2106. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2107. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2108. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
  2109. static __Pyx_CachedCFunction __pyx_umethod_PyUnicode_Type_partition = {0, &__pyx_n_s_partition, 0, 0, 0};
  2110. static PyObject *__pyx_int_21004882;
  2111. static PyObject *__pyx_int_209127132;
  2112. static PyObject *__pyx_tuple__4;
  2113. static PyObject *__pyx_tuple__5;
  2114. static PyObject *__pyx_tuple__7;
  2115. static PyObject *__pyx_tuple__8;
  2116. static PyObject *__pyx_tuple__9;
  2117. static PyObject *__pyx_tuple__10;
  2118. static PyObject *__pyx_tuple__11;
  2119. static PyObject *__pyx_tuple__12;
  2120. static PyObject *__pyx_tuple__14;
  2121. static PyObject *__pyx_tuple__15;
  2122. static PyObject *__pyx_tuple__17;
  2123. static PyObject *__pyx_tuple__19;
  2124. static PyObject *__pyx_codeobj__16;
  2125. static PyObject *__pyx_codeobj__18;
  2126. static PyObject *__pyx_codeobj__20;
  2127. /* Late includes */
  2128. /* "aiohttp/_http_parser.pyx":57
  2129. *
  2130. *
  2131. * cdef inline object extend(object buf, const char* at, size_t length): # <<<<<<<<<<<<<<
  2132. * cdef Py_ssize_t s
  2133. * cdef char* ptr
  2134. */
  2135. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_extend(PyObject *__pyx_v_buf, char const *__pyx_v_at, size_t __pyx_v_length) {
  2136. Py_ssize_t __pyx_v_s;
  2137. char *__pyx_v_ptr;
  2138. PyObject *__pyx_r = NULL;
  2139. __Pyx_RefNannyDeclarations
  2140. Py_ssize_t __pyx_t_1;
  2141. int __pyx_t_2;
  2142. __Pyx_RefNannySetupContext("extend", 0);
  2143. /* "aiohttp/_http_parser.pyx":60
  2144. * cdef Py_ssize_t s
  2145. * cdef char* ptr
  2146. * s = PyByteArray_Size(buf) # <<<<<<<<<<<<<<
  2147. * PyByteArray_Resize(buf, s + length)
  2148. * ptr = PyByteArray_AsString(buf)
  2149. */
  2150. __pyx_t_1 = PyByteArray_Size(__pyx_v_buf); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 60, __pyx_L1_error)
  2151. __pyx_v_s = __pyx_t_1;
  2152. /* "aiohttp/_http_parser.pyx":61
  2153. * cdef char* ptr
  2154. * s = PyByteArray_Size(buf)
  2155. * PyByteArray_Resize(buf, s + length) # <<<<<<<<<<<<<<
  2156. * ptr = PyByteArray_AsString(buf)
  2157. * memcpy(ptr + s, at, length)
  2158. */
  2159. __pyx_t_2 = PyByteArray_Resize(__pyx_v_buf, (__pyx_v_s + __pyx_v_length)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 61, __pyx_L1_error)
  2160. /* "aiohttp/_http_parser.pyx":62
  2161. * s = PyByteArray_Size(buf)
  2162. * PyByteArray_Resize(buf, s + length)
  2163. * ptr = PyByteArray_AsString(buf) # <<<<<<<<<<<<<<
  2164. * memcpy(ptr + s, at, length)
  2165. *
  2166. */
  2167. __pyx_v_ptr = PyByteArray_AsString(__pyx_v_buf);
  2168. /* "aiohttp/_http_parser.pyx":63
  2169. * PyByteArray_Resize(buf, s + length)
  2170. * ptr = PyByteArray_AsString(buf)
  2171. * memcpy(ptr + s, at, length) # <<<<<<<<<<<<<<
  2172. *
  2173. *
  2174. */
  2175. (void)(memcpy((__pyx_v_ptr + __pyx_v_s), __pyx_v_at, __pyx_v_length));
  2176. /* "aiohttp/_http_parser.pyx":57
  2177. *
  2178. *
  2179. * cdef inline object extend(object buf, const char* at, size_t length): # <<<<<<<<<<<<<<
  2180. * cdef Py_ssize_t s
  2181. * cdef char* ptr
  2182. */
  2183. /* function exit code */
  2184. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  2185. goto __pyx_L0;
  2186. __pyx_L1_error:;
  2187. __Pyx_AddTraceback("aiohttp._http_parser.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2188. __pyx_r = 0;
  2189. __pyx_L0:;
  2190. __Pyx_XGIVEREF(__pyx_r);
  2191. __Pyx_RefNannyFinishContext();
  2192. return __pyx_r;
  2193. }
  2194. /* "aiohttp/_http_parser.pyx":75
  2195. *
  2196. *
  2197. * cdef inline str http_method_str(int i): # <<<<<<<<<<<<<<
  2198. * if i < METHODS_COUNT:
  2199. * return <str>_http_method[i]
  2200. */
  2201. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_http_method_str(int __pyx_v_i) {
  2202. PyObject *__pyx_r = NULL;
  2203. __Pyx_RefNannyDeclarations
  2204. int __pyx_t_1;
  2205. PyObject *__pyx_t_2 = NULL;
  2206. __Pyx_RefNannySetupContext("http_method_str", 0);
  2207. /* "aiohttp/_http_parser.pyx":76
  2208. *
  2209. * cdef inline str http_method_str(int i):
  2210. * if i < METHODS_COUNT: # <<<<<<<<<<<<<<
  2211. * return <str>_http_method[i]
  2212. * else:
  2213. */
  2214. __pyx_t_1 = ((__pyx_v_i < 34) != 0);
  2215. if (__pyx_t_1) {
  2216. /* "aiohttp/_http_parser.pyx":77
  2217. * cdef inline str http_method_str(int i):
  2218. * if i < METHODS_COUNT:
  2219. * return <str>_http_method[i] # <<<<<<<<<<<<<<
  2220. * else:
  2221. * return "<unknown>"
  2222. */
  2223. __Pyx_XDECREF(__pyx_r);
  2224. if (unlikely(__pyx_v_7aiohttp_12_http_parser__http_method == Py_None)) {
  2225. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  2226. __PYX_ERR(0, 77, __pyx_L1_error)
  2227. }
  2228. __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_7aiohttp_12_http_parser__http_method, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
  2229. __Pyx_GOTREF(__pyx_t_2);
  2230. __Pyx_INCREF(((PyObject*)__pyx_t_2));
  2231. __pyx_r = ((PyObject*)__pyx_t_2);
  2232. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  2233. goto __pyx_L0;
  2234. /* "aiohttp/_http_parser.pyx":76
  2235. *
  2236. * cdef inline str http_method_str(int i):
  2237. * if i < METHODS_COUNT: # <<<<<<<<<<<<<<
  2238. * return <str>_http_method[i]
  2239. * else:
  2240. */
  2241. }
  2242. /* "aiohttp/_http_parser.pyx":79
  2243. * return <str>_http_method[i]
  2244. * else:
  2245. * return "<unknown>" # <<<<<<<<<<<<<<
  2246. *
  2247. * cdef inline object find_header(bytes raw_header):
  2248. */
  2249. /*else*/ {
  2250. __Pyx_XDECREF(__pyx_r);
  2251. __Pyx_INCREF(__pyx_kp_u_unknown);
  2252. __pyx_r = __pyx_kp_u_unknown;
  2253. goto __pyx_L0;
  2254. }
  2255. /* "aiohttp/_http_parser.pyx":75
  2256. *
  2257. *
  2258. * cdef inline str http_method_str(int i): # <<<<<<<<<<<<<<
  2259. * if i < METHODS_COUNT:
  2260. * return <str>_http_method[i]
  2261. */
  2262. /* function exit code */
  2263. __pyx_L1_error:;
  2264. __Pyx_XDECREF(__pyx_t_2);
  2265. __Pyx_AddTraceback("aiohttp._http_parser.http_method_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2266. __pyx_r = 0;
  2267. __pyx_L0:;
  2268. __Pyx_XGIVEREF(__pyx_r);
  2269. __Pyx_RefNannyFinishContext();
  2270. return __pyx_r;
  2271. }
  2272. /* "aiohttp/_http_parser.pyx":81
  2273. * return "<unknown>"
  2274. *
  2275. * cdef inline object find_header(bytes raw_header): # <<<<<<<<<<<<<<
  2276. * cdef Py_ssize_t size
  2277. * cdef char *buf
  2278. */
  2279. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_find_header(PyObject *__pyx_v_raw_header) {
  2280. Py_ssize_t __pyx_v_size;
  2281. char *__pyx_v_buf;
  2282. int __pyx_v_idx;
  2283. PyObject *__pyx_r = NULL;
  2284. __Pyx_RefNannyDeclarations
  2285. int __pyx_t_1;
  2286. int __pyx_t_2;
  2287. PyObject *__pyx_t_3 = NULL;
  2288. __Pyx_RefNannySetupContext("find_header", 0);
  2289. /* "aiohttp/_http_parser.pyx":85
  2290. * cdef char *buf
  2291. * cdef int idx
  2292. * PyBytes_AsStringAndSize(raw_header, &buf, &size) # <<<<<<<<<<<<<<
  2293. * idx = _find_header.find_header(buf, size)
  2294. * if idx == -1:
  2295. */
  2296. __pyx_t_1 = PyBytes_AsStringAndSize(__pyx_v_raw_header, (&__pyx_v_buf), (&__pyx_v_size)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 85, __pyx_L1_error)
  2297. /* "aiohttp/_http_parser.pyx":86
  2298. * cdef int idx
  2299. * PyBytes_AsStringAndSize(raw_header, &buf, &size)
  2300. * idx = _find_header.find_header(buf, size) # <<<<<<<<<<<<<<
  2301. * if idx == -1:
  2302. * return raw_header.decode('utf-8', 'surrogateescape')
  2303. */
  2304. __pyx_v_idx = find_header(__pyx_v_buf, __pyx_v_size);
  2305. /* "aiohttp/_http_parser.pyx":87
  2306. * PyBytes_AsStringAndSize(raw_header, &buf, &size)
  2307. * idx = _find_header.find_header(buf, size)
  2308. * if idx == -1: # <<<<<<<<<<<<<<
  2309. * return raw_header.decode('utf-8', 'surrogateescape')
  2310. * return headers[idx]
  2311. */
  2312. __pyx_t_2 = ((__pyx_v_idx == -1L) != 0);
  2313. if (__pyx_t_2) {
  2314. /* "aiohttp/_http_parser.pyx":88
  2315. * idx = _find_header.find_header(buf, size)
  2316. * if idx == -1:
  2317. * return raw_header.decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  2318. * return headers[idx]
  2319. *
  2320. */
  2321. __Pyx_XDECREF(__pyx_r);
  2322. if (unlikely(__pyx_v_raw_header == Py_None)) {
  2323. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
  2324. __PYX_ERR(0, 88, __pyx_L1_error)
  2325. }
  2326. __pyx_t_3 = __Pyx_decode_bytes(__pyx_v_raw_header, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 88, __pyx_L1_error)
  2327. __Pyx_GOTREF(__pyx_t_3);
  2328. __pyx_r = __pyx_t_3;
  2329. __pyx_t_3 = 0;
  2330. goto __pyx_L0;
  2331. /* "aiohttp/_http_parser.pyx":87
  2332. * PyBytes_AsStringAndSize(raw_header, &buf, &size)
  2333. * idx = _find_header.find_header(buf, size)
  2334. * if idx == -1: # <<<<<<<<<<<<<<
  2335. * return raw_header.decode('utf-8', 'surrogateescape')
  2336. * return headers[idx]
  2337. */
  2338. }
  2339. /* "aiohttp/_http_parser.pyx":89
  2340. * if idx == -1:
  2341. * return raw_header.decode('utf-8', 'surrogateescape')
  2342. * return headers[idx] # <<<<<<<<<<<<<<
  2343. *
  2344. *
  2345. */
  2346. __Pyx_XDECREF(__pyx_r);
  2347. if (unlikely(__pyx_v_7aiohttp_12_http_parser_headers == Py_None)) {
  2348. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  2349. __PYX_ERR(0, 89, __pyx_L1_error)
  2350. }
  2351. __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_7aiohttp_12_http_parser_headers, __pyx_v_idx, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
  2352. __Pyx_GOTREF(__pyx_t_3);
  2353. __pyx_r = __pyx_t_3;
  2354. __pyx_t_3 = 0;
  2355. goto __pyx_L0;
  2356. /* "aiohttp/_http_parser.pyx":81
  2357. * return "<unknown>"
  2358. *
  2359. * cdef inline object find_header(bytes raw_header): # <<<<<<<<<<<<<<
  2360. * cdef Py_ssize_t size
  2361. * cdef char *buf
  2362. */
  2363. /* function exit code */
  2364. __pyx_L1_error:;
  2365. __Pyx_XDECREF(__pyx_t_3);
  2366. __Pyx_AddTraceback("aiohttp._http_parser.find_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2367. __pyx_r = 0;
  2368. __pyx_L0:;
  2369. __Pyx_XGIVEREF(__pyx_r);
  2370. __Pyx_RefNannyFinishContext();
  2371. return __pyx_r;
  2372. }
  2373. /* "aiohttp/_http_parser.pyx":105
  2374. * cdef readonly object url # yarl.URL
  2375. *
  2376. * def __init__(self, method, path, version, headers, raw_headers, # <<<<<<<<<<<<<<
  2377. * should_close, compression, upgrade, chunked, url):
  2378. * self.method = method
  2379. */
  2380. /* Python wrapper */
  2381. static int __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  2382. static int __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  2383. PyObject *__pyx_v_method = 0;
  2384. PyObject *__pyx_v_path = 0;
  2385. PyObject *__pyx_v_version = 0;
  2386. PyObject *__pyx_v_headers = 0;
  2387. PyObject *__pyx_v_raw_headers = 0;
  2388. PyObject *__pyx_v_should_close = 0;
  2389. PyObject *__pyx_v_compression = 0;
  2390. PyObject *__pyx_v_upgrade = 0;
  2391. PyObject *__pyx_v_chunked = 0;
  2392. PyObject *__pyx_v_url = 0;
  2393. int __pyx_r;
  2394. __Pyx_RefNannyDeclarations
  2395. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  2396. {
  2397. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_method,&__pyx_n_s_path,&__pyx_n_s_version,&__pyx_n_s_headers,&__pyx_n_s_raw_headers,&__pyx_n_s_should_close,&__pyx_n_s_compression,&__pyx_n_s_upgrade,&__pyx_n_s_chunked,&__pyx_n_s_url,0};
  2398. PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  2399. if (unlikely(__pyx_kwds)) {
  2400. Py_ssize_t kw_args;
  2401. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  2402. switch (pos_args) {
  2403. case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
  2404. CYTHON_FALLTHROUGH;
  2405. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  2406. CYTHON_FALLTHROUGH;
  2407. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  2408. CYTHON_FALLTHROUGH;
  2409. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  2410. CYTHON_FALLTHROUGH;
  2411. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  2412. CYTHON_FALLTHROUGH;
  2413. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  2414. CYTHON_FALLTHROUGH;
  2415. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  2416. CYTHON_FALLTHROUGH;
  2417. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  2418. CYTHON_FALLTHROUGH;
  2419. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  2420. CYTHON_FALLTHROUGH;
  2421. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  2422. CYTHON_FALLTHROUGH;
  2423. case 0: break;
  2424. default: goto __pyx_L5_argtuple_error;
  2425. }
  2426. kw_args = PyDict_Size(__pyx_kwds);
  2427. switch (pos_args) {
  2428. case 0:
  2429. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_method)) != 0)) kw_args--;
  2430. else goto __pyx_L5_argtuple_error;
  2431. CYTHON_FALLTHROUGH;
  2432. case 1:
  2433. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
  2434. else {
  2435. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 1); __PYX_ERR(0, 105, __pyx_L3_error)
  2436. }
  2437. CYTHON_FALLTHROUGH;
  2438. case 2:
  2439. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_version)) != 0)) kw_args--;
  2440. else {
  2441. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 2); __PYX_ERR(0, 105, __pyx_L3_error)
  2442. }
  2443. CYTHON_FALLTHROUGH;
  2444. case 3:
  2445. if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_headers)) != 0)) kw_args--;
  2446. else {
  2447. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 3); __PYX_ERR(0, 105, __pyx_L3_error)
  2448. }
  2449. CYTHON_FALLTHROUGH;
  2450. case 4:
  2451. if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_raw_headers)) != 0)) kw_args--;
  2452. else {
  2453. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 4); __PYX_ERR(0, 105, __pyx_L3_error)
  2454. }
  2455. CYTHON_FALLTHROUGH;
  2456. case 5:
  2457. if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_should_close)) != 0)) kw_args--;
  2458. else {
  2459. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 5); __PYX_ERR(0, 105, __pyx_L3_error)
  2460. }
  2461. CYTHON_FALLTHROUGH;
  2462. case 6:
  2463. if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compression)) != 0)) kw_args--;
  2464. else {
  2465. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 6); __PYX_ERR(0, 105, __pyx_L3_error)
  2466. }
  2467. CYTHON_FALLTHROUGH;
  2468. case 7:
  2469. if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_upgrade)) != 0)) kw_args--;
  2470. else {
  2471. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 7); __PYX_ERR(0, 105, __pyx_L3_error)
  2472. }
  2473. CYTHON_FALLTHROUGH;
  2474. case 8:
  2475. if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chunked)) != 0)) kw_args--;
  2476. else {
  2477. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 8); __PYX_ERR(0, 105, __pyx_L3_error)
  2478. }
  2479. CYTHON_FALLTHROUGH;
  2480. case 9:
  2481. if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_url)) != 0)) kw_args--;
  2482. else {
  2483. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, 9); __PYX_ERR(0, 105, __pyx_L3_error)
  2484. }
  2485. }
  2486. if (unlikely(kw_args > 0)) {
  2487. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 105, __pyx_L3_error)
  2488. }
  2489. } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
  2490. goto __pyx_L5_argtuple_error;
  2491. } else {
  2492. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  2493. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  2494. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  2495. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  2496. values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  2497. values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  2498. values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  2499. values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  2500. values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  2501. values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
  2502. }
  2503. __pyx_v_method = values[0];
  2504. __pyx_v_path = values[1];
  2505. __pyx_v_version = values[2];
  2506. __pyx_v_headers = values[3];
  2507. __pyx_v_raw_headers = values[4];
  2508. __pyx_v_should_close = values[5];
  2509. __pyx_v_compression = values[6];
  2510. __pyx_v_upgrade = values[7];
  2511. __pyx_v_chunked = values[8];
  2512. __pyx_v_url = values[9];
  2513. }
  2514. goto __pyx_L4_argument_unpacking_done;
  2515. __pyx_L5_argtuple_error:;
  2516. __Pyx_RaiseArgtupleInvalid("__init__", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 105, __pyx_L3_error)
  2517. __pyx_L3_error:;
  2518. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2519. __Pyx_RefNannyFinishContext();
  2520. return -1;
  2521. __pyx_L4_argument_unpacking_done:;
  2522. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage___init__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self), __pyx_v_method, __pyx_v_path, __pyx_v_version, __pyx_v_headers, __pyx_v_raw_headers, __pyx_v_should_close, __pyx_v_compression, __pyx_v_upgrade, __pyx_v_chunked, __pyx_v_url);
  2523. /* function exit code */
  2524. __Pyx_RefNannyFinishContext();
  2525. return __pyx_r;
  2526. }
  2527. static int __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage___init__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_path, PyObject *__pyx_v_version, PyObject *__pyx_v_headers, PyObject *__pyx_v_raw_headers, PyObject *__pyx_v_should_close, PyObject *__pyx_v_compression, PyObject *__pyx_v_upgrade, PyObject *__pyx_v_chunked, PyObject *__pyx_v_url) {
  2528. int __pyx_r;
  2529. __Pyx_RefNannyDeclarations
  2530. PyObject *__pyx_t_1 = NULL;
  2531. __Pyx_RefNannySetupContext("__init__", 0);
  2532. /* "aiohttp/_http_parser.pyx":107
  2533. * def __init__(self, method, path, version, headers, raw_headers,
  2534. * should_close, compression, upgrade, chunked, url):
  2535. * self.method = method # <<<<<<<<<<<<<<
  2536. * self.path = path
  2537. * self.version = version
  2538. */
  2539. if (!(likely(PyUnicode_CheckExact(__pyx_v_method))||((__pyx_v_method) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_method)->tp_name), 0))) __PYX_ERR(0, 107, __pyx_L1_error)
  2540. __pyx_t_1 = __pyx_v_method;
  2541. __Pyx_INCREF(__pyx_t_1);
  2542. __Pyx_GIVEREF(__pyx_t_1);
  2543. __Pyx_GOTREF(__pyx_v_self->method);
  2544. __Pyx_DECREF(__pyx_v_self->method);
  2545. __pyx_v_self->method = ((PyObject*)__pyx_t_1);
  2546. __pyx_t_1 = 0;
  2547. /* "aiohttp/_http_parser.pyx":108
  2548. * should_close, compression, upgrade, chunked, url):
  2549. * self.method = method
  2550. * self.path = path # <<<<<<<<<<<<<<
  2551. * self.version = version
  2552. * self.headers = headers
  2553. */
  2554. if (!(likely(PyUnicode_CheckExact(__pyx_v_path))||((__pyx_v_path) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_path)->tp_name), 0))) __PYX_ERR(0, 108, __pyx_L1_error)
  2555. __pyx_t_1 = __pyx_v_path;
  2556. __Pyx_INCREF(__pyx_t_1);
  2557. __Pyx_GIVEREF(__pyx_t_1);
  2558. __Pyx_GOTREF(__pyx_v_self->path);
  2559. __Pyx_DECREF(__pyx_v_self->path);
  2560. __pyx_v_self->path = ((PyObject*)__pyx_t_1);
  2561. __pyx_t_1 = 0;
  2562. /* "aiohttp/_http_parser.pyx":109
  2563. * self.method = method
  2564. * self.path = path
  2565. * self.version = version # <<<<<<<<<<<<<<
  2566. * self.headers = headers
  2567. * self.raw_headers = raw_headers
  2568. */
  2569. __Pyx_INCREF(__pyx_v_version);
  2570. __Pyx_GIVEREF(__pyx_v_version);
  2571. __Pyx_GOTREF(__pyx_v_self->version);
  2572. __Pyx_DECREF(__pyx_v_self->version);
  2573. __pyx_v_self->version = __pyx_v_version;
  2574. /* "aiohttp/_http_parser.pyx":110
  2575. * self.path = path
  2576. * self.version = version
  2577. * self.headers = headers # <<<<<<<<<<<<<<
  2578. * self.raw_headers = raw_headers
  2579. * self.should_close = should_close
  2580. */
  2581. __Pyx_INCREF(__pyx_v_headers);
  2582. __Pyx_GIVEREF(__pyx_v_headers);
  2583. __Pyx_GOTREF(__pyx_v_self->headers);
  2584. __Pyx_DECREF(__pyx_v_self->headers);
  2585. __pyx_v_self->headers = __pyx_v_headers;
  2586. /* "aiohttp/_http_parser.pyx":111
  2587. * self.version = version
  2588. * self.headers = headers
  2589. * self.raw_headers = raw_headers # <<<<<<<<<<<<<<
  2590. * self.should_close = should_close
  2591. * self.compression = compression
  2592. */
  2593. __Pyx_INCREF(__pyx_v_raw_headers);
  2594. __Pyx_GIVEREF(__pyx_v_raw_headers);
  2595. __Pyx_GOTREF(__pyx_v_self->raw_headers);
  2596. __Pyx_DECREF(__pyx_v_self->raw_headers);
  2597. __pyx_v_self->raw_headers = __pyx_v_raw_headers;
  2598. /* "aiohttp/_http_parser.pyx":112
  2599. * self.headers = headers
  2600. * self.raw_headers = raw_headers
  2601. * self.should_close = should_close # <<<<<<<<<<<<<<
  2602. * self.compression = compression
  2603. * self.upgrade = upgrade
  2604. */
  2605. __Pyx_INCREF(__pyx_v_should_close);
  2606. __Pyx_GIVEREF(__pyx_v_should_close);
  2607. __Pyx_GOTREF(__pyx_v_self->should_close);
  2608. __Pyx_DECREF(__pyx_v_self->should_close);
  2609. __pyx_v_self->should_close = __pyx_v_should_close;
  2610. /* "aiohttp/_http_parser.pyx":113
  2611. * self.raw_headers = raw_headers
  2612. * self.should_close = should_close
  2613. * self.compression = compression # <<<<<<<<<<<<<<
  2614. * self.upgrade = upgrade
  2615. * self.chunked = chunked
  2616. */
  2617. __Pyx_INCREF(__pyx_v_compression);
  2618. __Pyx_GIVEREF(__pyx_v_compression);
  2619. __Pyx_GOTREF(__pyx_v_self->compression);
  2620. __Pyx_DECREF(__pyx_v_self->compression);
  2621. __pyx_v_self->compression = __pyx_v_compression;
  2622. /* "aiohttp/_http_parser.pyx":114
  2623. * self.should_close = should_close
  2624. * self.compression = compression
  2625. * self.upgrade = upgrade # <<<<<<<<<<<<<<
  2626. * self.chunked = chunked
  2627. * self.url = url
  2628. */
  2629. __Pyx_INCREF(__pyx_v_upgrade);
  2630. __Pyx_GIVEREF(__pyx_v_upgrade);
  2631. __Pyx_GOTREF(__pyx_v_self->upgrade);
  2632. __Pyx_DECREF(__pyx_v_self->upgrade);
  2633. __pyx_v_self->upgrade = __pyx_v_upgrade;
  2634. /* "aiohttp/_http_parser.pyx":115
  2635. * self.compression = compression
  2636. * self.upgrade = upgrade
  2637. * self.chunked = chunked # <<<<<<<<<<<<<<
  2638. * self.url = url
  2639. *
  2640. */
  2641. __Pyx_INCREF(__pyx_v_chunked);
  2642. __Pyx_GIVEREF(__pyx_v_chunked);
  2643. __Pyx_GOTREF(__pyx_v_self->chunked);
  2644. __Pyx_DECREF(__pyx_v_self->chunked);
  2645. __pyx_v_self->chunked = __pyx_v_chunked;
  2646. /* "aiohttp/_http_parser.pyx":116
  2647. * self.upgrade = upgrade
  2648. * self.chunked = chunked
  2649. * self.url = url # <<<<<<<<<<<<<<
  2650. *
  2651. * def __repr__(self):
  2652. */
  2653. __Pyx_INCREF(__pyx_v_url);
  2654. __Pyx_GIVEREF(__pyx_v_url);
  2655. __Pyx_GOTREF(__pyx_v_self->url);
  2656. __Pyx_DECREF(__pyx_v_self->url);
  2657. __pyx_v_self->url = __pyx_v_url;
  2658. /* "aiohttp/_http_parser.pyx":105
  2659. * cdef readonly object url # yarl.URL
  2660. *
  2661. * def __init__(self, method, path, version, headers, raw_headers, # <<<<<<<<<<<<<<
  2662. * should_close, compression, upgrade, chunked, url):
  2663. * self.method = method
  2664. */
  2665. /* function exit code */
  2666. __pyx_r = 0;
  2667. goto __pyx_L0;
  2668. __pyx_L1_error:;
  2669. __Pyx_XDECREF(__pyx_t_1);
  2670. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2671. __pyx_r = -1;
  2672. __pyx_L0:;
  2673. __Pyx_RefNannyFinishContext();
  2674. return __pyx_r;
  2675. }
  2676. /* "aiohttp/_http_parser.pyx":118
  2677. * self.url = url
  2678. *
  2679. * def __repr__(self): # <<<<<<<<<<<<<<
  2680. * info = []
  2681. * info.append(("method", self.method))
  2682. */
  2683. /* Python wrapper */
  2684. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_3__repr__(PyObject *__pyx_v_self); /*proto*/
  2685. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_3__repr__(PyObject *__pyx_v_self) {
  2686. PyObject *__pyx_r = 0;
  2687. __Pyx_RefNannyDeclarations
  2688. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  2689. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_2__repr__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  2690. /* function exit code */
  2691. __Pyx_RefNannyFinishContext();
  2692. return __pyx_r;
  2693. }
  2694. static PyObject *__pyx_gb_7aiohttp_12_http_parser_17RawRequestMessage_8__repr___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  2695. /* "aiohttp/_http_parser.pyx":130
  2696. * info.append(("chunked", self.chunked))
  2697. * info.append(("url", self.url))
  2698. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info) # <<<<<<<<<<<<<<
  2699. * return '<RawRequestMessage(' + sinfo + ')>'
  2700. *
  2701. */
  2702. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_8__repr___genexpr(PyObject *__pyx_self) {
  2703. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
  2704. PyObject *__pyx_r = NULL;
  2705. __Pyx_RefNannyDeclarations
  2706. __Pyx_RefNannySetupContext("genexpr", 0);
  2707. __pyx_cur_scope = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *)__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr(__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
  2708. if (unlikely(!__pyx_cur_scope)) {
  2709. __pyx_cur_scope = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *)Py_None);
  2710. __Pyx_INCREF(Py_None);
  2711. __PYX_ERR(0, 130, __pyx_L1_error)
  2712. } else {
  2713. __Pyx_GOTREF(__pyx_cur_scope);
  2714. }
  2715. __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *) __pyx_self;
  2716. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  2717. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  2718. {
  2719. __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7aiohttp_12_http_parser_17RawRequestMessage_8__repr___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_repr___locals_genexpr, __pyx_n_s_aiohttp__http_parser); if (unlikely(!gen)) __PYX_ERR(0, 130, __pyx_L1_error)
  2720. __Pyx_DECREF(__pyx_cur_scope);
  2721. __Pyx_RefNannyFinishContext();
  2722. return (PyObject *) gen;
  2723. }
  2724. /* function exit code */
  2725. __pyx_L1_error:;
  2726. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage.__repr__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2727. __pyx_r = NULL;
  2728. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  2729. __Pyx_XGIVEREF(__pyx_r);
  2730. __Pyx_RefNannyFinishContext();
  2731. return __pyx_r;
  2732. }
  2733. static PyObject *__pyx_gb_7aiohttp_12_http_parser_17RawRequestMessage_8__repr___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  2734. {
  2735. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
  2736. PyObject *__pyx_r = NULL;
  2737. PyObject *__pyx_t_1 = NULL;
  2738. Py_ssize_t __pyx_t_2;
  2739. PyObject *__pyx_t_3 = NULL;
  2740. PyObject *__pyx_t_4 = NULL;
  2741. PyObject *__pyx_t_5 = NULL;
  2742. PyObject *__pyx_t_6 = NULL;
  2743. PyObject *(*__pyx_t_7)(PyObject *);
  2744. __Pyx_RefNannyDeclarations
  2745. __Pyx_RefNannySetupContext("genexpr", 0);
  2746. switch (__pyx_generator->resume_label) {
  2747. case 0: goto __pyx_L3_first_run;
  2748. default: /* CPython raises the right error here */
  2749. __Pyx_RefNannyFinishContext();
  2750. return NULL;
  2751. }
  2752. __pyx_L3_first_run:;
  2753. if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 130, __pyx_L1_error)
  2754. __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 130, __pyx_L1_error)
  2755. __Pyx_GOTREF(__pyx_r);
  2756. if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info)) { __Pyx_RaiseClosureNameError("info"); __PYX_ERR(0, 130, __pyx_L1_error) }
  2757. if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info == Py_None)) {
  2758. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  2759. __PYX_ERR(0, 130, __pyx_L1_error)
  2760. }
  2761. __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_info; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  2762. for (;;) {
  2763. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  2764. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2765. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 130, __pyx_L1_error)
  2766. #else
  2767. __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  2768. __Pyx_GOTREF(__pyx_t_3);
  2769. #endif
  2770. if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
  2771. PyObject* sequence = __pyx_t_3;
  2772. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  2773. if (unlikely(size != 2)) {
  2774. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  2775. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  2776. __PYX_ERR(0, 130, __pyx_L1_error)
  2777. }
  2778. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  2779. if (likely(PyTuple_CheckExact(sequence))) {
  2780. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
  2781. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
  2782. } else {
  2783. __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
  2784. __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
  2785. }
  2786. __Pyx_INCREF(__pyx_t_4);
  2787. __Pyx_INCREF(__pyx_t_5);
  2788. #else
  2789. __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
  2790. __Pyx_GOTREF(__pyx_t_4);
  2791. __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
  2792. __Pyx_GOTREF(__pyx_t_5);
  2793. #endif
  2794. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2795. } else {
  2796. Py_ssize_t index = -1;
  2797. __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
  2798. __Pyx_GOTREF(__pyx_t_6);
  2799. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2800. __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
  2801. index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
  2802. __Pyx_GOTREF(__pyx_t_4);
  2803. index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
  2804. __Pyx_GOTREF(__pyx_t_5);
  2805. if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  2806. __pyx_t_7 = NULL;
  2807. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  2808. goto __pyx_L7_unpacking_done;
  2809. __pyx_L6_unpacking_failed:;
  2810. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  2811. __pyx_t_7 = NULL;
  2812. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  2813. __PYX_ERR(0, 130, __pyx_L1_error)
  2814. __pyx_L7_unpacking_done:;
  2815. }
  2816. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name);
  2817. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_4);
  2818. __Pyx_GIVEREF(__pyx_t_4);
  2819. __pyx_t_4 = 0;
  2820. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_val);
  2821. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_val, __pyx_t_5);
  2822. __Pyx_GIVEREF(__pyx_t_5);
  2823. __pyx_t_5 = 0;
  2824. __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_name, __pyx_kp_u_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  2825. __Pyx_GOTREF(__pyx_t_3);
  2826. __pyx_t_5 = PyObject_Repr(__pyx_cur_scope->__pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 130, __pyx_L1_error)
  2827. __Pyx_GOTREF(__pyx_t_5);
  2828. __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 130, __pyx_L1_error)
  2829. __Pyx_GOTREF(__pyx_t_4);
  2830. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  2831. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  2832. if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 130, __pyx_L1_error)
  2833. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  2834. }
  2835. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2836. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  2837. /* function exit code */
  2838. goto __pyx_L0;
  2839. __pyx_L1_error:;
  2840. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  2841. __Pyx_XDECREF(__pyx_t_1);
  2842. __Pyx_XDECREF(__pyx_t_3);
  2843. __Pyx_XDECREF(__pyx_t_4);
  2844. __Pyx_XDECREF(__pyx_t_5);
  2845. __Pyx_XDECREF(__pyx_t_6);
  2846. __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  2847. __pyx_L0:;
  2848. __Pyx_XGIVEREF(__pyx_r);
  2849. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  2850. __pyx_generator->resume_label = -1;
  2851. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  2852. __Pyx_RefNannyFinishContext();
  2853. return __pyx_r;
  2854. }
  2855. /* "aiohttp/_http_parser.pyx":118
  2856. * self.url = url
  2857. *
  2858. * def __repr__(self): # <<<<<<<<<<<<<<
  2859. * info = []
  2860. * info.append(("method", self.method))
  2861. */
  2862. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_2__repr__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  2863. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *__pyx_cur_scope;
  2864. PyObject *__pyx_v_sinfo = NULL;
  2865. PyObject *__pyx_r = NULL;
  2866. __Pyx_RefNannyDeclarations
  2867. PyObject *__pyx_t_1 = NULL;
  2868. int __pyx_t_2;
  2869. PyObject *__pyx_t_3 = NULL;
  2870. __Pyx_RefNannySetupContext("__repr__", 0);
  2871. __pyx_cur_scope = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *)__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct____repr__(__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct____repr__, __pyx_empty_tuple, NULL);
  2872. if (unlikely(!__pyx_cur_scope)) {
  2873. __pyx_cur_scope = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *)Py_None);
  2874. __Pyx_INCREF(Py_None);
  2875. __PYX_ERR(0, 118, __pyx_L1_error)
  2876. } else {
  2877. __Pyx_GOTREF(__pyx_cur_scope);
  2878. }
  2879. /* "aiohttp/_http_parser.pyx":119
  2880. *
  2881. * def __repr__(self):
  2882. * info = [] # <<<<<<<<<<<<<<
  2883. * info.append(("method", self.method))
  2884. * info.append(("path", self.path))
  2885. */
  2886. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  2887. __Pyx_GOTREF(__pyx_t_1);
  2888. __Pyx_GIVEREF(__pyx_t_1);
  2889. __pyx_cur_scope->__pyx_v_info = ((PyObject*)__pyx_t_1);
  2890. __pyx_t_1 = 0;
  2891. /* "aiohttp/_http_parser.pyx":120
  2892. * def __repr__(self):
  2893. * info = []
  2894. * info.append(("method", self.method)) # <<<<<<<<<<<<<<
  2895. * info.append(("path", self.path))
  2896. * info.append(("version", self.version))
  2897. */
  2898. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  2899. __Pyx_GOTREF(__pyx_t_1);
  2900. __Pyx_INCREF(__pyx_n_u_method);
  2901. __Pyx_GIVEREF(__pyx_n_u_method);
  2902. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_method);
  2903. __Pyx_INCREF(__pyx_v_self->method);
  2904. __Pyx_GIVEREF(__pyx_v_self->method);
  2905. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->method);
  2906. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 120, __pyx_L1_error)
  2907. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2908. /* "aiohttp/_http_parser.pyx":121
  2909. * info = []
  2910. * info.append(("method", self.method))
  2911. * info.append(("path", self.path)) # <<<<<<<<<<<<<<
  2912. * info.append(("version", self.version))
  2913. * info.append(("headers", self.headers))
  2914. */
  2915. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
  2916. __Pyx_GOTREF(__pyx_t_1);
  2917. __Pyx_INCREF(__pyx_n_u_path);
  2918. __Pyx_GIVEREF(__pyx_n_u_path);
  2919. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_path);
  2920. __Pyx_INCREF(__pyx_v_self->path);
  2921. __Pyx_GIVEREF(__pyx_v_self->path);
  2922. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->path);
  2923. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 121, __pyx_L1_error)
  2924. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2925. /* "aiohttp/_http_parser.pyx":122
  2926. * info.append(("method", self.method))
  2927. * info.append(("path", self.path))
  2928. * info.append(("version", self.version)) # <<<<<<<<<<<<<<
  2929. * info.append(("headers", self.headers))
  2930. * info.append(("raw_headers", self.raw_headers))
  2931. */
  2932. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
  2933. __Pyx_GOTREF(__pyx_t_1);
  2934. __Pyx_INCREF(__pyx_n_u_version);
  2935. __Pyx_GIVEREF(__pyx_n_u_version);
  2936. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_version);
  2937. __Pyx_INCREF(__pyx_v_self->version);
  2938. __Pyx_GIVEREF(__pyx_v_self->version);
  2939. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->version);
  2940. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 122, __pyx_L1_error)
  2941. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2942. /* "aiohttp/_http_parser.pyx":123
  2943. * info.append(("path", self.path))
  2944. * info.append(("version", self.version))
  2945. * info.append(("headers", self.headers)) # <<<<<<<<<<<<<<
  2946. * info.append(("raw_headers", self.raw_headers))
  2947. * info.append(("should_close", self.should_close))
  2948. */
  2949. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  2950. __Pyx_GOTREF(__pyx_t_1);
  2951. __Pyx_INCREF(__pyx_n_u_headers);
  2952. __Pyx_GIVEREF(__pyx_n_u_headers);
  2953. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_headers);
  2954. __Pyx_INCREF(__pyx_v_self->headers);
  2955. __Pyx_GIVEREF(__pyx_v_self->headers);
  2956. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->headers);
  2957. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error)
  2958. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2959. /* "aiohttp/_http_parser.pyx":124
  2960. * info.append(("version", self.version))
  2961. * info.append(("headers", self.headers))
  2962. * info.append(("raw_headers", self.raw_headers)) # <<<<<<<<<<<<<<
  2963. * info.append(("should_close", self.should_close))
  2964. * info.append(("compression", self.compression))
  2965. */
  2966. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error)
  2967. __Pyx_GOTREF(__pyx_t_1);
  2968. __Pyx_INCREF(__pyx_n_u_raw_headers);
  2969. __Pyx_GIVEREF(__pyx_n_u_raw_headers);
  2970. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_raw_headers);
  2971. __Pyx_INCREF(__pyx_v_self->raw_headers);
  2972. __Pyx_GIVEREF(__pyx_v_self->raw_headers);
  2973. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->raw_headers);
  2974. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 124, __pyx_L1_error)
  2975. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2976. /* "aiohttp/_http_parser.pyx":125
  2977. * info.append(("headers", self.headers))
  2978. * info.append(("raw_headers", self.raw_headers))
  2979. * info.append(("should_close", self.should_close)) # <<<<<<<<<<<<<<
  2980. * info.append(("compression", self.compression))
  2981. * info.append(("upgrade", self.upgrade))
  2982. */
  2983. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
  2984. __Pyx_GOTREF(__pyx_t_1);
  2985. __Pyx_INCREF(__pyx_n_u_should_close);
  2986. __Pyx_GIVEREF(__pyx_n_u_should_close);
  2987. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_should_close);
  2988. __Pyx_INCREF(__pyx_v_self->should_close);
  2989. __Pyx_GIVEREF(__pyx_v_self->should_close);
  2990. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->should_close);
  2991. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 125, __pyx_L1_error)
  2992. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  2993. /* "aiohttp/_http_parser.pyx":126
  2994. * info.append(("raw_headers", self.raw_headers))
  2995. * info.append(("should_close", self.should_close))
  2996. * info.append(("compression", self.compression)) # <<<<<<<<<<<<<<
  2997. * info.append(("upgrade", self.upgrade))
  2998. * info.append(("chunked", self.chunked))
  2999. */
  3000. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
  3001. __Pyx_GOTREF(__pyx_t_1);
  3002. __Pyx_INCREF(__pyx_n_u_compression);
  3003. __Pyx_GIVEREF(__pyx_n_u_compression);
  3004. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_compression);
  3005. __Pyx_INCREF(__pyx_v_self->compression);
  3006. __Pyx_GIVEREF(__pyx_v_self->compression);
  3007. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->compression);
  3008. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 126, __pyx_L1_error)
  3009. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3010. /* "aiohttp/_http_parser.pyx":127
  3011. * info.append(("should_close", self.should_close))
  3012. * info.append(("compression", self.compression))
  3013. * info.append(("upgrade", self.upgrade)) # <<<<<<<<<<<<<<
  3014. * info.append(("chunked", self.chunked))
  3015. * info.append(("url", self.url))
  3016. */
  3017. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
  3018. __Pyx_GOTREF(__pyx_t_1);
  3019. __Pyx_INCREF(__pyx_n_u_upgrade);
  3020. __Pyx_GIVEREF(__pyx_n_u_upgrade);
  3021. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_upgrade);
  3022. __Pyx_INCREF(__pyx_v_self->upgrade);
  3023. __Pyx_GIVEREF(__pyx_v_self->upgrade);
  3024. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->upgrade);
  3025. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 127, __pyx_L1_error)
  3026. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3027. /* "aiohttp/_http_parser.pyx":128
  3028. * info.append(("compression", self.compression))
  3029. * info.append(("upgrade", self.upgrade))
  3030. * info.append(("chunked", self.chunked)) # <<<<<<<<<<<<<<
  3031. * info.append(("url", self.url))
  3032. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info)
  3033. */
  3034. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  3035. __Pyx_GOTREF(__pyx_t_1);
  3036. __Pyx_INCREF(__pyx_n_u_chunked);
  3037. __Pyx_GIVEREF(__pyx_n_u_chunked);
  3038. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_chunked);
  3039. __Pyx_INCREF(__pyx_v_self->chunked);
  3040. __Pyx_GIVEREF(__pyx_v_self->chunked);
  3041. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->chunked);
  3042. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 128, __pyx_L1_error)
  3043. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3044. /* "aiohttp/_http_parser.pyx":129
  3045. * info.append(("upgrade", self.upgrade))
  3046. * info.append(("chunked", self.chunked))
  3047. * info.append(("url", self.url)) # <<<<<<<<<<<<<<
  3048. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info)
  3049. * return '<RawRequestMessage(' + sinfo + ')>'
  3050. */
  3051. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  3052. __Pyx_GOTREF(__pyx_t_1);
  3053. __Pyx_INCREF(__pyx_n_u_url);
  3054. __Pyx_GIVEREF(__pyx_n_u_url);
  3055. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_url);
  3056. __Pyx_INCREF(__pyx_v_self->url);
  3057. __Pyx_GIVEREF(__pyx_v_self->url);
  3058. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->url);
  3059. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
  3060. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3061. /* "aiohttp/_http_parser.pyx":130
  3062. * info.append(("chunked", self.chunked))
  3063. * info.append(("url", self.url))
  3064. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info) # <<<<<<<<<<<<<<
  3065. * return '<RawRequestMessage(' + sinfo + ')>'
  3066. *
  3067. */
  3068. __pyx_t_1 = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_8__repr___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  3069. __Pyx_GOTREF(__pyx_t_1);
  3070. __pyx_t_3 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
  3071. __Pyx_GOTREF(__pyx_t_3);
  3072. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3073. __pyx_t_1 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  3074. __Pyx_GOTREF(__pyx_t_1);
  3075. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3076. __pyx_v_sinfo = ((PyObject*)__pyx_t_1);
  3077. __pyx_t_1 = 0;
  3078. /* "aiohttp/_http_parser.pyx":131
  3079. * info.append(("url", self.url))
  3080. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info)
  3081. * return '<RawRequestMessage(' + sinfo + ')>' # <<<<<<<<<<<<<<
  3082. *
  3083. * def _replace(self, **dct):
  3084. */
  3085. __Pyx_XDECREF(__pyx_r);
  3086. __pyx_t_1 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u_RawRequestMessage, __pyx_v_sinfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
  3087. __Pyx_GOTREF(__pyx_t_1);
  3088. __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_1, __pyx_kp_u__3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  3089. __Pyx_GOTREF(__pyx_t_3);
  3090. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3091. __pyx_r = __pyx_t_3;
  3092. __pyx_t_3 = 0;
  3093. goto __pyx_L0;
  3094. /* "aiohttp/_http_parser.pyx":118
  3095. * self.url = url
  3096. *
  3097. * def __repr__(self): # <<<<<<<<<<<<<<
  3098. * info = []
  3099. * info.append(("method", self.method))
  3100. */
  3101. /* function exit code */
  3102. __pyx_L1_error:;
  3103. __Pyx_XDECREF(__pyx_t_1);
  3104. __Pyx_XDECREF(__pyx_t_3);
  3105. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3106. __pyx_r = NULL;
  3107. __pyx_L0:;
  3108. __Pyx_XDECREF(__pyx_v_sinfo);
  3109. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  3110. __Pyx_XGIVEREF(__pyx_r);
  3111. __Pyx_RefNannyFinishContext();
  3112. return __pyx_r;
  3113. }
  3114. /* "aiohttp/_http_parser.pyx":133
  3115. * return '<RawRequestMessage(' + sinfo + ')>'
  3116. *
  3117. * def _replace(self, **dct): # <<<<<<<<<<<<<<
  3118. * cdef RawRequestMessage ret
  3119. * ret = _new_request_message(self.method,
  3120. */
  3121. /* Python wrapper */
  3122. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_5_replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  3123. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_5_replace(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  3124. PyObject *__pyx_v_dct = 0;
  3125. PyObject *__pyx_r = 0;
  3126. __Pyx_RefNannyDeclarations
  3127. __Pyx_RefNannySetupContext("_replace (wrapper)", 0);
  3128. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  3129. __Pyx_RaiseArgtupleInvalid("_replace", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  3130. if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_replace", 1))) return NULL;
  3131. __pyx_v_dct = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_dct)) return NULL;
  3132. __Pyx_GOTREF(__pyx_v_dct);
  3133. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_4_replace(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self), __pyx_v_dct);
  3134. /* function exit code */
  3135. __Pyx_XDECREF(__pyx_v_dct);
  3136. __Pyx_RefNannyFinishContext();
  3137. return __pyx_r;
  3138. }
  3139. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_4_replace(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self, PyObject *__pyx_v_dct) {
  3140. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_ret = 0;
  3141. PyObject *__pyx_r = NULL;
  3142. __Pyx_RefNannyDeclarations
  3143. PyObject *__pyx_t_1 = NULL;
  3144. PyObject *__pyx_t_2 = NULL;
  3145. PyObject *__pyx_t_3 = NULL;
  3146. PyObject *__pyx_t_4 = NULL;
  3147. PyObject *__pyx_t_5 = NULL;
  3148. int __pyx_t_6;
  3149. PyObject *__pyx_t_7 = NULL;
  3150. int __pyx_t_8;
  3151. int __pyx_t_9;
  3152. PyObject *__pyx_t_10 = NULL;
  3153. PyObject *__pyx_t_11 = NULL;
  3154. __Pyx_RefNannySetupContext("_replace", 0);
  3155. /* "aiohttp/_http_parser.pyx":135
  3156. * def _replace(self, **dct):
  3157. * cdef RawRequestMessage ret
  3158. * ret = _new_request_message(self.method, # <<<<<<<<<<<<<<
  3159. * self.path,
  3160. * self.version,
  3161. */
  3162. __pyx_t_1 = __pyx_v_self->method;
  3163. __Pyx_INCREF(__pyx_t_1);
  3164. /* "aiohttp/_http_parser.pyx":136
  3165. * cdef RawRequestMessage ret
  3166. * ret = _new_request_message(self.method,
  3167. * self.path, # <<<<<<<<<<<<<<
  3168. * self.version,
  3169. * self.headers,
  3170. */
  3171. __pyx_t_2 = __pyx_v_self->path;
  3172. __Pyx_INCREF(__pyx_t_2);
  3173. /* "aiohttp/_http_parser.pyx":137
  3174. * ret = _new_request_message(self.method,
  3175. * self.path,
  3176. * self.version, # <<<<<<<<<<<<<<
  3177. * self.headers,
  3178. * self.raw_headers,
  3179. */
  3180. __pyx_t_3 = __pyx_v_self->version;
  3181. __Pyx_INCREF(__pyx_t_3);
  3182. /* "aiohttp/_http_parser.pyx":138
  3183. * self.path,
  3184. * self.version,
  3185. * self.headers, # <<<<<<<<<<<<<<
  3186. * self.raw_headers,
  3187. * self.should_close,
  3188. */
  3189. __pyx_t_4 = __pyx_v_self->headers;
  3190. __Pyx_INCREF(__pyx_t_4);
  3191. /* "aiohttp/_http_parser.pyx":139
  3192. * self.version,
  3193. * self.headers,
  3194. * self.raw_headers, # <<<<<<<<<<<<<<
  3195. * self.should_close,
  3196. * self.compression,
  3197. */
  3198. __pyx_t_5 = __pyx_v_self->raw_headers;
  3199. __Pyx_INCREF(__pyx_t_5);
  3200. /* "aiohttp/_http_parser.pyx":140
  3201. * self.headers,
  3202. * self.raw_headers,
  3203. * self.should_close, # <<<<<<<<<<<<<<
  3204. * self.compression,
  3205. * self.upgrade,
  3206. */
  3207. __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_self->should_close); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L1_error)
  3208. /* "aiohttp/_http_parser.pyx":141
  3209. * self.raw_headers,
  3210. * self.should_close,
  3211. * self.compression, # <<<<<<<<<<<<<<
  3212. * self.upgrade,
  3213. * self.chunked,
  3214. */
  3215. __pyx_t_7 = __pyx_v_self->compression;
  3216. __Pyx_INCREF(__pyx_t_7);
  3217. /* "aiohttp/_http_parser.pyx":142
  3218. * self.should_close,
  3219. * self.compression,
  3220. * self.upgrade, # <<<<<<<<<<<<<<
  3221. * self.chunked,
  3222. * self.url)
  3223. */
  3224. __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_self->upgrade); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error)
  3225. /* "aiohttp/_http_parser.pyx":143
  3226. * self.compression,
  3227. * self.upgrade,
  3228. * self.chunked, # <<<<<<<<<<<<<<
  3229. * self.url)
  3230. * if "method" in dct:
  3231. */
  3232. __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_self->chunked); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
  3233. /* "aiohttp/_http_parser.pyx":144
  3234. * self.upgrade,
  3235. * self.chunked,
  3236. * self.url) # <<<<<<<<<<<<<<
  3237. * if "method" in dct:
  3238. * ret.method = dct["method"]
  3239. */
  3240. __pyx_t_10 = __pyx_v_self->url;
  3241. __Pyx_INCREF(__pyx_t_10);
  3242. /* "aiohttp/_http_parser.pyx":135
  3243. * def _replace(self, **dct):
  3244. * cdef RawRequestMessage ret
  3245. * ret = _new_request_message(self.method, # <<<<<<<<<<<<<<
  3246. * self.path,
  3247. * self.version,
  3248. */
  3249. __pyx_t_11 = __pyx_f_7aiohttp_12_http_parser__new_request_message(((PyObject*)__pyx_t_1), ((PyObject*)__pyx_t_2), __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 135, __pyx_L1_error)
  3250. __Pyx_GOTREF(__pyx_t_11);
  3251. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  3252. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  3253. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  3254. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  3255. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  3256. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  3257. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  3258. if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_7aiohttp_12_http_parser_RawRequestMessage))))) __PYX_ERR(0, 135, __pyx_L1_error)
  3259. __pyx_v_ret = ((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_t_11);
  3260. __pyx_t_11 = 0;
  3261. /* "aiohttp/_http_parser.pyx":145
  3262. * self.chunked,
  3263. * self.url)
  3264. * if "method" in dct: # <<<<<<<<<<<<<<
  3265. * ret.method = dct["method"]
  3266. * if "path" in dct:
  3267. */
  3268. __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_method, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 145, __pyx_L1_error)
  3269. __pyx_t_8 = (__pyx_t_9 != 0);
  3270. if (__pyx_t_8) {
  3271. /* "aiohttp/_http_parser.pyx":146
  3272. * self.url)
  3273. * if "method" in dct:
  3274. * ret.method = dct["method"] # <<<<<<<<<<<<<<
  3275. * if "path" in dct:
  3276. * ret.path = dct["path"]
  3277. */
  3278. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_method); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 146, __pyx_L1_error)
  3279. __Pyx_GOTREF(__pyx_t_11);
  3280. if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 146, __pyx_L1_error)
  3281. __Pyx_GIVEREF(__pyx_t_11);
  3282. __Pyx_GOTREF(__pyx_v_ret->method);
  3283. __Pyx_DECREF(__pyx_v_ret->method);
  3284. __pyx_v_ret->method = ((PyObject*)__pyx_t_11);
  3285. __pyx_t_11 = 0;
  3286. /* "aiohttp/_http_parser.pyx":145
  3287. * self.chunked,
  3288. * self.url)
  3289. * if "method" in dct: # <<<<<<<<<<<<<<
  3290. * ret.method = dct["method"]
  3291. * if "path" in dct:
  3292. */
  3293. }
  3294. /* "aiohttp/_http_parser.pyx":147
  3295. * if "method" in dct:
  3296. * ret.method = dct["method"]
  3297. * if "path" in dct: # <<<<<<<<<<<<<<
  3298. * ret.path = dct["path"]
  3299. * if "version" in dct:
  3300. */
  3301. __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_path, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 147, __pyx_L1_error)
  3302. __pyx_t_9 = (__pyx_t_8 != 0);
  3303. if (__pyx_t_9) {
  3304. /* "aiohttp/_http_parser.pyx":148
  3305. * ret.method = dct["method"]
  3306. * if "path" in dct:
  3307. * ret.path = dct["path"] # <<<<<<<<<<<<<<
  3308. * if "version" in dct:
  3309. * ret.version = dct["version"]
  3310. */
  3311. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_path); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 148, __pyx_L1_error)
  3312. __Pyx_GOTREF(__pyx_t_11);
  3313. if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 148, __pyx_L1_error)
  3314. __Pyx_GIVEREF(__pyx_t_11);
  3315. __Pyx_GOTREF(__pyx_v_ret->path);
  3316. __Pyx_DECREF(__pyx_v_ret->path);
  3317. __pyx_v_ret->path = ((PyObject*)__pyx_t_11);
  3318. __pyx_t_11 = 0;
  3319. /* "aiohttp/_http_parser.pyx":147
  3320. * if "method" in dct:
  3321. * ret.method = dct["method"]
  3322. * if "path" in dct: # <<<<<<<<<<<<<<
  3323. * ret.path = dct["path"]
  3324. * if "version" in dct:
  3325. */
  3326. }
  3327. /* "aiohttp/_http_parser.pyx":149
  3328. * if "path" in dct:
  3329. * ret.path = dct["path"]
  3330. * if "version" in dct: # <<<<<<<<<<<<<<
  3331. * ret.version = dct["version"]
  3332. * if "headers" in dct:
  3333. */
  3334. __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_version, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 149, __pyx_L1_error)
  3335. __pyx_t_8 = (__pyx_t_9 != 0);
  3336. if (__pyx_t_8) {
  3337. /* "aiohttp/_http_parser.pyx":150
  3338. * ret.path = dct["path"]
  3339. * if "version" in dct:
  3340. * ret.version = dct["version"] # <<<<<<<<<<<<<<
  3341. * if "headers" in dct:
  3342. * ret.headers = dct["headers"]
  3343. */
  3344. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_version); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 150, __pyx_L1_error)
  3345. __Pyx_GOTREF(__pyx_t_11);
  3346. __Pyx_GIVEREF(__pyx_t_11);
  3347. __Pyx_GOTREF(__pyx_v_ret->version);
  3348. __Pyx_DECREF(__pyx_v_ret->version);
  3349. __pyx_v_ret->version = __pyx_t_11;
  3350. __pyx_t_11 = 0;
  3351. /* "aiohttp/_http_parser.pyx":149
  3352. * if "path" in dct:
  3353. * ret.path = dct["path"]
  3354. * if "version" in dct: # <<<<<<<<<<<<<<
  3355. * ret.version = dct["version"]
  3356. * if "headers" in dct:
  3357. */
  3358. }
  3359. /* "aiohttp/_http_parser.pyx":151
  3360. * if "version" in dct:
  3361. * ret.version = dct["version"]
  3362. * if "headers" in dct: # <<<<<<<<<<<<<<
  3363. * ret.headers = dct["headers"]
  3364. * if "raw_headers" in dct:
  3365. */
  3366. __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_headers, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
  3367. __pyx_t_9 = (__pyx_t_8 != 0);
  3368. if (__pyx_t_9) {
  3369. /* "aiohttp/_http_parser.pyx":152
  3370. * ret.version = dct["version"]
  3371. * if "headers" in dct:
  3372. * ret.headers = dct["headers"] # <<<<<<<<<<<<<<
  3373. * if "raw_headers" in dct:
  3374. * ret.raw_headers = dct["raw_headers"]
  3375. */
  3376. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_headers); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 152, __pyx_L1_error)
  3377. __Pyx_GOTREF(__pyx_t_11);
  3378. __Pyx_GIVEREF(__pyx_t_11);
  3379. __Pyx_GOTREF(__pyx_v_ret->headers);
  3380. __Pyx_DECREF(__pyx_v_ret->headers);
  3381. __pyx_v_ret->headers = __pyx_t_11;
  3382. __pyx_t_11 = 0;
  3383. /* "aiohttp/_http_parser.pyx":151
  3384. * if "version" in dct:
  3385. * ret.version = dct["version"]
  3386. * if "headers" in dct: # <<<<<<<<<<<<<<
  3387. * ret.headers = dct["headers"]
  3388. * if "raw_headers" in dct:
  3389. */
  3390. }
  3391. /* "aiohttp/_http_parser.pyx":153
  3392. * if "headers" in dct:
  3393. * ret.headers = dct["headers"]
  3394. * if "raw_headers" in dct: # <<<<<<<<<<<<<<
  3395. * ret.raw_headers = dct["raw_headers"]
  3396. * if "should_close" in dct:
  3397. */
  3398. __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_raw_headers, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 153, __pyx_L1_error)
  3399. __pyx_t_8 = (__pyx_t_9 != 0);
  3400. if (__pyx_t_8) {
  3401. /* "aiohttp/_http_parser.pyx":154
  3402. * ret.headers = dct["headers"]
  3403. * if "raw_headers" in dct:
  3404. * ret.raw_headers = dct["raw_headers"] # <<<<<<<<<<<<<<
  3405. * if "should_close" in dct:
  3406. * ret.should_close = dct["should_close"]
  3407. */
  3408. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_raw_headers); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 154, __pyx_L1_error)
  3409. __Pyx_GOTREF(__pyx_t_11);
  3410. __Pyx_GIVEREF(__pyx_t_11);
  3411. __Pyx_GOTREF(__pyx_v_ret->raw_headers);
  3412. __Pyx_DECREF(__pyx_v_ret->raw_headers);
  3413. __pyx_v_ret->raw_headers = __pyx_t_11;
  3414. __pyx_t_11 = 0;
  3415. /* "aiohttp/_http_parser.pyx":153
  3416. * if "headers" in dct:
  3417. * ret.headers = dct["headers"]
  3418. * if "raw_headers" in dct: # <<<<<<<<<<<<<<
  3419. * ret.raw_headers = dct["raw_headers"]
  3420. * if "should_close" in dct:
  3421. */
  3422. }
  3423. /* "aiohttp/_http_parser.pyx":155
  3424. * if "raw_headers" in dct:
  3425. * ret.raw_headers = dct["raw_headers"]
  3426. * if "should_close" in dct: # <<<<<<<<<<<<<<
  3427. * ret.should_close = dct["should_close"]
  3428. * if "compression" in dct:
  3429. */
  3430. __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_should_close, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
  3431. __pyx_t_9 = (__pyx_t_8 != 0);
  3432. if (__pyx_t_9) {
  3433. /* "aiohttp/_http_parser.pyx":156
  3434. * ret.raw_headers = dct["raw_headers"]
  3435. * if "should_close" in dct:
  3436. * ret.should_close = dct["should_close"] # <<<<<<<<<<<<<<
  3437. * if "compression" in dct:
  3438. * ret.compression = dct["compression"]
  3439. */
  3440. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_should_close); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 156, __pyx_L1_error)
  3441. __Pyx_GOTREF(__pyx_t_11);
  3442. __Pyx_GIVEREF(__pyx_t_11);
  3443. __Pyx_GOTREF(__pyx_v_ret->should_close);
  3444. __Pyx_DECREF(__pyx_v_ret->should_close);
  3445. __pyx_v_ret->should_close = __pyx_t_11;
  3446. __pyx_t_11 = 0;
  3447. /* "aiohttp/_http_parser.pyx":155
  3448. * if "raw_headers" in dct:
  3449. * ret.raw_headers = dct["raw_headers"]
  3450. * if "should_close" in dct: # <<<<<<<<<<<<<<
  3451. * ret.should_close = dct["should_close"]
  3452. * if "compression" in dct:
  3453. */
  3454. }
  3455. /* "aiohttp/_http_parser.pyx":157
  3456. * if "should_close" in dct:
  3457. * ret.should_close = dct["should_close"]
  3458. * if "compression" in dct: # <<<<<<<<<<<<<<
  3459. * ret.compression = dct["compression"]
  3460. * if "upgrade" in dct:
  3461. */
  3462. __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_compression, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
  3463. __pyx_t_8 = (__pyx_t_9 != 0);
  3464. if (__pyx_t_8) {
  3465. /* "aiohttp/_http_parser.pyx":158
  3466. * ret.should_close = dct["should_close"]
  3467. * if "compression" in dct:
  3468. * ret.compression = dct["compression"] # <<<<<<<<<<<<<<
  3469. * if "upgrade" in dct:
  3470. * ret.upgrade = dct["upgrade"]
  3471. */
  3472. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_compression); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 158, __pyx_L1_error)
  3473. __Pyx_GOTREF(__pyx_t_11);
  3474. __Pyx_GIVEREF(__pyx_t_11);
  3475. __Pyx_GOTREF(__pyx_v_ret->compression);
  3476. __Pyx_DECREF(__pyx_v_ret->compression);
  3477. __pyx_v_ret->compression = __pyx_t_11;
  3478. __pyx_t_11 = 0;
  3479. /* "aiohttp/_http_parser.pyx":157
  3480. * if "should_close" in dct:
  3481. * ret.should_close = dct["should_close"]
  3482. * if "compression" in dct: # <<<<<<<<<<<<<<
  3483. * ret.compression = dct["compression"]
  3484. * if "upgrade" in dct:
  3485. */
  3486. }
  3487. /* "aiohttp/_http_parser.pyx":159
  3488. * if "compression" in dct:
  3489. * ret.compression = dct["compression"]
  3490. * if "upgrade" in dct: # <<<<<<<<<<<<<<
  3491. * ret.upgrade = dct["upgrade"]
  3492. * if "chunked" in dct:
  3493. */
  3494. __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_upgrade, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 159, __pyx_L1_error)
  3495. __pyx_t_9 = (__pyx_t_8 != 0);
  3496. if (__pyx_t_9) {
  3497. /* "aiohttp/_http_parser.pyx":160
  3498. * ret.compression = dct["compression"]
  3499. * if "upgrade" in dct:
  3500. * ret.upgrade = dct["upgrade"] # <<<<<<<<<<<<<<
  3501. * if "chunked" in dct:
  3502. * ret.chunked = dct["chunked"]
  3503. */
  3504. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_upgrade); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 160, __pyx_L1_error)
  3505. __Pyx_GOTREF(__pyx_t_11);
  3506. __Pyx_GIVEREF(__pyx_t_11);
  3507. __Pyx_GOTREF(__pyx_v_ret->upgrade);
  3508. __Pyx_DECREF(__pyx_v_ret->upgrade);
  3509. __pyx_v_ret->upgrade = __pyx_t_11;
  3510. __pyx_t_11 = 0;
  3511. /* "aiohttp/_http_parser.pyx":159
  3512. * if "compression" in dct:
  3513. * ret.compression = dct["compression"]
  3514. * if "upgrade" in dct: # <<<<<<<<<<<<<<
  3515. * ret.upgrade = dct["upgrade"]
  3516. * if "chunked" in dct:
  3517. */
  3518. }
  3519. /* "aiohttp/_http_parser.pyx":161
  3520. * if "upgrade" in dct:
  3521. * ret.upgrade = dct["upgrade"]
  3522. * if "chunked" in dct: # <<<<<<<<<<<<<<
  3523. * ret.chunked = dct["chunked"]
  3524. * if "url" in dct:
  3525. */
  3526. __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_chunked, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 161, __pyx_L1_error)
  3527. __pyx_t_8 = (__pyx_t_9 != 0);
  3528. if (__pyx_t_8) {
  3529. /* "aiohttp/_http_parser.pyx":162
  3530. * ret.upgrade = dct["upgrade"]
  3531. * if "chunked" in dct:
  3532. * ret.chunked = dct["chunked"] # <<<<<<<<<<<<<<
  3533. * if "url" in dct:
  3534. * ret.url = dct["url"]
  3535. */
  3536. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_chunked); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 162, __pyx_L1_error)
  3537. __Pyx_GOTREF(__pyx_t_11);
  3538. __Pyx_GIVEREF(__pyx_t_11);
  3539. __Pyx_GOTREF(__pyx_v_ret->chunked);
  3540. __Pyx_DECREF(__pyx_v_ret->chunked);
  3541. __pyx_v_ret->chunked = __pyx_t_11;
  3542. __pyx_t_11 = 0;
  3543. /* "aiohttp/_http_parser.pyx":161
  3544. * if "upgrade" in dct:
  3545. * ret.upgrade = dct["upgrade"]
  3546. * if "chunked" in dct: # <<<<<<<<<<<<<<
  3547. * ret.chunked = dct["chunked"]
  3548. * if "url" in dct:
  3549. */
  3550. }
  3551. /* "aiohttp/_http_parser.pyx":163
  3552. * if "chunked" in dct:
  3553. * ret.chunked = dct["chunked"]
  3554. * if "url" in dct: # <<<<<<<<<<<<<<
  3555. * ret.url = dct["url"]
  3556. * return ret
  3557. */
  3558. __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_u_url, __pyx_v_dct, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 163, __pyx_L1_error)
  3559. __pyx_t_9 = (__pyx_t_8 != 0);
  3560. if (__pyx_t_9) {
  3561. /* "aiohttp/_http_parser.pyx":164
  3562. * ret.chunked = dct["chunked"]
  3563. * if "url" in dct:
  3564. * ret.url = dct["url"] # <<<<<<<<<<<<<<
  3565. * return ret
  3566. *
  3567. */
  3568. __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_dct, __pyx_n_u_url); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 164, __pyx_L1_error)
  3569. __Pyx_GOTREF(__pyx_t_11);
  3570. __Pyx_GIVEREF(__pyx_t_11);
  3571. __Pyx_GOTREF(__pyx_v_ret->url);
  3572. __Pyx_DECREF(__pyx_v_ret->url);
  3573. __pyx_v_ret->url = __pyx_t_11;
  3574. __pyx_t_11 = 0;
  3575. /* "aiohttp/_http_parser.pyx":163
  3576. * if "chunked" in dct:
  3577. * ret.chunked = dct["chunked"]
  3578. * if "url" in dct: # <<<<<<<<<<<<<<
  3579. * ret.url = dct["url"]
  3580. * return ret
  3581. */
  3582. }
  3583. /* "aiohttp/_http_parser.pyx":165
  3584. * if "url" in dct:
  3585. * ret.url = dct["url"]
  3586. * return ret # <<<<<<<<<<<<<<
  3587. *
  3588. * cdef _new_request_message(str method,
  3589. */
  3590. __Pyx_XDECREF(__pyx_r);
  3591. __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  3592. __pyx_r = ((PyObject *)__pyx_v_ret);
  3593. goto __pyx_L0;
  3594. /* "aiohttp/_http_parser.pyx":133
  3595. * return '<RawRequestMessage(' + sinfo + ')>'
  3596. *
  3597. * def _replace(self, **dct): # <<<<<<<<<<<<<<
  3598. * cdef RawRequestMessage ret
  3599. * ret = _new_request_message(self.method,
  3600. */
  3601. /* function exit code */
  3602. __pyx_L1_error:;
  3603. __Pyx_XDECREF(__pyx_t_1);
  3604. __Pyx_XDECREF(__pyx_t_2);
  3605. __Pyx_XDECREF(__pyx_t_3);
  3606. __Pyx_XDECREF(__pyx_t_4);
  3607. __Pyx_XDECREF(__pyx_t_5);
  3608. __Pyx_XDECREF(__pyx_t_7);
  3609. __Pyx_XDECREF(__pyx_t_10);
  3610. __Pyx_XDECREF(__pyx_t_11);
  3611. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage._replace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  3612. __pyx_r = NULL;
  3613. __pyx_L0:;
  3614. __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  3615. __Pyx_XGIVEREF(__pyx_r);
  3616. __Pyx_RefNannyFinishContext();
  3617. return __pyx_r;
  3618. }
  3619. /* "aiohttp/_http_parser.pyx":94
  3620. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  3621. * cdef class RawRequestMessage:
  3622. * cdef readonly str method # <<<<<<<<<<<<<<
  3623. * cdef readonly str path
  3624. * cdef readonly object version # HttpVersion
  3625. */
  3626. /* Python wrapper */
  3627. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_6method_1__get__(PyObject *__pyx_v_self); /*proto*/
  3628. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_6method_1__get__(PyObject *__pyx_v_self) {
  3629. PyObject *__pyx_r = 0;
  3630. __Pyx_RefNannyDeclarations
  3631. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3632. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_6method___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3633. /* function exit code */
  3634. __Pyx_RefNannyFinishContext();
  3635. return __pyx_r;
  3636. }
  3637. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_6method___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3638. PyObject *__pyx_r = NULL;
  3639. __Pyx_RefNannyDeclarations
  3640. __Pyx_RefNannySetupContext("__get__", 0);
  3641. __Pyx_XDECREF(__pyx_r);
  3642. __Pyx_INCREF(__pyx_v_self->method);
  3643. __pyx_r = __pyx_v_self->method;
  3644. goto __pyx_L0;
  3645. /* function exit code */
  3646. __pyx_L0:;
  3647. __Pyx_XGIVEREF(__pyx_r);
  3648. __Pyx_RefNannyFinishContext();
  3649. return __pyx_r;
  3650. }
  3651. /* "aiohttp/_http_parser.pyx":95
  3652. * cdef class RawRequestMessage:
  3653. * cdef readonly str method
  3654. * cdef readonly str path # <<<<<<<<<<<<<<
  3655. * cdef readonly object version # HttpVersion
  3656. * cdef readonly object headers # CIMultiDict
  3657. */
  3658. /* Python wrapper */
  3659. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_4path_1__get__(PyObject *__pyx_v_self); /*proto*/
  3660. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_4path_1__get__(PyObject *__pyx_v_self) {
  3661. PyObject *__pyx_r = 0;
  3662. __Pyx_RefNannyDeclarations
  3663. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3664. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_4path___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3665. /* function exit code */
  3666. __Pyx_RefNannyFinishContext();
  3667. return __pyx_r;
  3668. }
  3669. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_4path___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3670. PyObject *__pyx_r = NULL;
  3671. __Pyx_RefNannyDeclarations
  3672. __Pyx_RefNannySetupContext("__get__", 0);
  3673. __Pyx_XDECREF(__pyx_r);
  3674. __Pyx_INCREF(__pyx_v_self->path);
  3675. __pyx_r = __pyx_v_self->path;
  3676. goto __pyx_L0;
  3677. /* function exit code */
  3678. __pyx_L0:;
  3679. __Pyx_XGIVEREF(__pyx_r);
  3680. __Pyx_RefNannyFinishContext();
  3681. return __pyx_r;
  3682. }
  3683. /* "aiohttp/_http_parser.pyx":96
  3684. * cdef readonly str method
  3685. * cdef readonly str path
  3686. * cdef readonly object version # HttpVersion # <<<<<<<<<<<<<<
  3687. * cdef readonly object headers # CIMultiDict
  3688. * cdef readonly object raw_headers # tuple
  3689. */
  3690. /* Python wrapper */
  3691. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
  3692. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7version_1__get__(PyObject *__pyx_v_self) {
  3693. PyObject *__pyx_r = 0;
  3694. __Pyx_RefNannyDeclarations
  3695. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3696. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7version___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3697. /* function exit code */
  3698. __Pyx_RefNannyFinishContext();
  3699. return __pyx_r;
  3700. }
  3701. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7version___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3702. PyObject *__pyx_r = NULL;
  3703. __Pyx_RefNannyDeclarations
  3704. __Pyx_RefNannySetupContext("__get__", 0);
  3705. __Pyx_XDECREF(__pyx_r);
  3706. __Pyx_INCREF(__pyx_v_self->version);
  3707. __pyx_r = __pyx_v_self->version;
  3708. goto __pyx_L0;
  3709. /* function exit code */
  3710. __pyx_L0:;
  3711. __Pyx_XGIVEREF(__pyx_r);
  3712. __Pyx_RefNannyFinishContext();
  3713. return __pyx_r;
  3714. }
  3715. /* "aiohttp/_http_parser.pyx":97
  3716. * cdef readonly str path
  3717. * cdef readonly object version # HttpVersion
  3718. * cdef readonly object headers # CIMultiDict # <<<<<<<<<<<<<<
  3719. * cdef readonly object raw_headers # tuple
  3720. * cdef readonly object should_close
  3721. */
  3722. /* Python wrapper */
  3723. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7headers_1__get__(PyObject *__pyx_v_self); /*proto*/
  3724. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7headers_1__get__(PyObject *__pyx_v_self) {
  3725. PyObject *__pyx_r = 0;
  3726. __Pyx_RefNannyDeclarations
  3727. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3728. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7headers___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3729. /* function exit code */
  3730. __Pyx_RefNannyFinishContext();
  3731. return __pyx_r;
  3732. }
  3733. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3734. PyObject *__pyx_r = NULL;
  3735. __Pyx_RefNannyDeclarations
  3736. __Pyx_RefNannySetupContext("__get__", 0);
  3737. __Pyx_XDECREF(__pyx_r);
  3738. __Pyx_INCREF(__pyx_v_self->headers);
  3739. __pyx_r = __pyx_v_self->headers;
  3740. goto __pyx_L0;
  3741. /* function exit code */
  3742. __pyx_L0:;
  3743. __Pyx_XGIVEREF(__pyx_r);
  3744. __Pyx_RefNannyFinishContext();
  3745. return __pyx_r;
  3746. }
  3747. /* "aiohttp/_http_parser.pyx":98
  3748. * cdef readonly object version # HttpVersion
  3749. * cdef readonly object headers # CIMultiDict
  3750. * cdef readonly object raw_headers # tuple # <<<<<<<<<<<<<<
  3751. * cdef readonly object should_close
  3752. * cdef readonly object compression
  3753. */
  3754. /* Python wrapper */
  3755. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_11raw_headers_1__get__(PyObject *__pyx_v_self); /*proto*/
  3756. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_11raw_headers_1__get__(PyObject *__pyx_v_self) {
  3757. PyObject *__pyx_r = 0;
  3758. __Pyx_RefNannyDeclarations
  3759. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3760. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_11raw_headers___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3761. /* function exit code */
  3762. __Pyx_RefNannyFinishContext();
  3763. return __pyx_r;
  3764. }
  3765. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_11raw_headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3766. PyObject *__pyx_r = NULL;
  3767. __Pyx_RefNannyDeclarations
  3768. __Pyx_RefNannySetupContext("__get__", 0);
  3769. __Pyx_XDECREF(__pyx_r);
  3770. __Pyx_INCREF(__pyx_v_self->raw_headers);
  3771. __pyx_r = __pyx_v_self->raw_headers;
  3772. goto __pyx_L0;
  3773. /* function exit code */
  3774. __pyx_L0:;
  3775. __Pyx_XGIVEREF(__pyx_r);
  3776. __Pyx_RefNannyFinishContext();
  3777. return __pyx_r;
  3778. }
  3779. /* "aiohttp/_http_parser.pyx":99
  3780. * cdef readonly object headers # CIMultiDict
  3781. * cdef readonly object raw_headers # tuple
  3782. * cdef readonly object should_close # <<<<<<<<<<<<<<
  3783. * cdef readonly object compression
  3784. * cdef readonly object upgrade
  3785. */
  3786. /* Python wrapper */
  3787. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_12should_close_1__get__(PyObject *__pyx_v_self); /*proto*/
  3788. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_12should_close_1__get__(PyObject *__pyx_v_self) {
  3789. PyObject *__pyx_r = 0;
  3790. __Pyx_RefNannyDeclarations
  3791. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3792. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_12should_close___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3793. /* function exit code */
  3794. __Pyx_RefNannyFinishContext();
  3795. return __pyx_r;
  3796. }
  3797. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_12should_close___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3798. PyObject *__pyx_r = NULL;
  3799. __Pyx_RefNannyDeclarations
  3800. __Pyx_RefNannySetupContext("__get__", 0);
  3801. __Pyx_XDECREF(__pyx_r);
  3802. __Pyx_INCREF(__pyx_v_self->should_close);
  3803. __pyx_r = __pyx_v_self->should_close;
  3804. goto __pyx_L0;
  3805. /* function exit code */
  3806. __pyx_L0:;
  3807. __Pyx_XGIVEREF(__pyx_r);
  3808. __Pyx_RefNannyFinishContext();
  3809. return __pyx_r;
  3810. }
  3811. /* "aiohttp/_http_parser.pyx":100
  3812. * cdef readonly object raw_headers # tuple
  3813. * cdef readonly object should_close
  3814. * cdef readonly object compression # <<<<<<<<<<<<<<
  3815. * cdef readonly object upgrade
  3816. * cdef readonly object chunked
  3817. */
  3818. /* Python wrapper */
  3819. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_11compression_1__get__(PyObject *__pyx_v_self); /*proto*/
  3820. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_11compression_1__get__(PyObject *__pyx_v_self) {
  3821. PyObject *__pyx_r = 0;
  3822. __Pyx_RefNannyDeclarations
  3823. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3824. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_11compression___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3825. /* function exit code */
  3826. __Pyx_RefNannyFinishContext();
  3827. return __pyx_r;
  3828. }
  3829. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_11compression___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3830. PyObject *__pyx_r = NULL;
  3831. __Pyx_RefNannyDeclarations
  3832. __Pyx_RefNannySetupContext("__get__", 0);
  3833. __Pyx_XDECREF(__pyx_r);
  3834. __Pyx_INCREF(__pyx_v_self->compression);
  3835. __pyx_r = __pyx_v_self->compression;
  3836. goto __pyx_L0;
  3837. /* function exit code */
  3838. __pyx_L0:;
  3839. __Pyx_XGIVEREF(__pyx_r);
  3840. __Pyx_RefNannyFinishContext();
  3841. return __pyx_r;
  3842. }
  3843. /* "aiohttp/_http_parser.pyx":101
  3844. * cdef readonly object should_close
  3845. * cdef readonly object compression
  3846. * cdef readonly object upgrade # <<<<<<<<<<<<<<
  3847. * cdef readonly object chunked
  3848. * cdef readonly object url # yarl.URL
  3849. */
  3850. /* Python wrapper */
  3851. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7upgrade_1__get__(PyObject *__pyx_v_self); /*proto*/
  3852. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7upgrade_1__get__(PyObject *__pyx_v_self) {
  3853. PyObject *__pyx_r = 0;
  3854. __Pyx_RefNannyDeclarations
  3855. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3856. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7upgrade___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3857. /* function exit code */
  3858. __Pyx_RefNannyFinishContext();
  3859. return __pyx_r;
  3860. }
  3861. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7upgrade___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3862. PyObject *__pyx_r = NULL;
  3863. __Pyx_RefNannyDeclarations
  3864. __Pyx_RefNannySetupContext("__get__", 0);
  3865. __Pyx_XDECREF(__pyx_r);
  3866. __Pyx_INCREF(__pyx_v_self->upgrade);
  3867. __pyx_r = __pyx_v_self->upgrade;
  3868. goto __pyx_L0;
  3869. /* function exit code */
  3870. __pyx_L0:;
  3871. __Pyx_XGIVEREF(__pyx_r);
  3872. __Pyx_RefNannyFinishContext();
  3873. return __pyx_r;
  3874. }
  3875. /* "aiohttp/_http_parser.pyx":102
  3876. * cdef readonly object compression
  3877. * cdef readonly object upgrade
  3878. * cdef readonly object chunked # <<<<<<<<<<<<<<
  3879. * cdef readonly object url # yarl.URL
  3880. *
  3881. */
  3882. /* Python wrapper */
  3883. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7chunked_1__get__(PyObject *__pyx_v_self); /*proto*/
  3884. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7chunked_1__get__(PyObject *__pyx_v_self) {
  3885. PyObject *__pyx_r = 0;
  3886. __Pyx_RefNannyDeclarations
  3887. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3888. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7chunked___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3889. /* function exit code */
  3890. __Pyx_RefNannyFinishContext();
  3891. return __pyx_r;
  3892. }
  3893. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_7chunked___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3894. PyObject *__pyx_r = NULL;
  3895. __Pyx_RefNannyDeclarations
  3896. __Pyx_RefNannySetupContext("__get__", 0);
  3897. __Pyx_XDECREF(__pyx_r);
  3898. __Pyx_INCREF(__pyx_v_self->chunked);
  3899. __pyx_r = __pyx_v_self->chunked;
  3900. goto __pyx_L0;
  3901. /* function exit code */
  3902. __pyx_L0:;
  3903. __Pyx_XGIVEREF(__pyx_r);
  3904. __Pyx_RefNannyFinishContext();
  3905. return __pyx_r;
  3906. }
  3907. /* "aiohttp/_http_parser.pyx":103
  3908. * cdef readonly object upgrade
  3909. * cdef readonly object chunked
  3910. * cdef readonly object url # yarl.URL # <<<<<<<<<<<<<<
  3911. *
  3912. * def __init__(self, method, path, version, headers, raw_headers,
  3913. */
  3914. /* Python wrapper */
  3915. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_3url_1__get__(PyObject *__pyx_v_self); /*proto*/
  3916. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_3url_1__get__(PyObject *__pyx_v_self) {
  3917. PyObject *__pyx_r = 0;
  3918. __Pyx_RefNannyDeclarations
  3919. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  3920. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_3url___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3921. /* function exit code */
  3922. __Pyx_RefNannyFinishContext();
  3923. return __pyx_r;
  3924. }
  3925. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_3url___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3926. PyObject *__pyx_r = NULL;
  3927. __Pyx_RefNannyDeclarations
  3928. __Pyx_RefNannySetupContext("__get__", 0);
  3929. __Pyx_XDECREF(__pyx_r);
  3930. __Pyx_INCREF(__pyx_v_self->url);
  3931. __pyx_r = __pyx_v_self->url;
  3932. goto __pyx_L0;
  3933. /* function exit code */
  3934. __pyx_L0:;
  3935. __Pyx_XGIVEREF(__pyx_r);
  3936. __Pyx_RefNannyFinishContext();
  3937. return __pyx_r;
  3938. }
  3939. /* "(tree fragment)":1
  3940. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  3941. * cdef bint use_setstate
  3942. * state = (self.chunked, self.compression, self.headers, self.method, self.path, self.raw_headers, self.should_close, self.upgrade, self.url, self.version)
  3943. */
  3944. /* Python wrapper */
  3945. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  3946. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  3947. PyObject *__pyx_r = 0;
  3948. __Pyx_RefNannyDeclarations
  3949. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  3950. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_6__reduce_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self));
  3951. /* function exit code */
  3952. __Pyx_RefNannyFinishContext();
  3953. return __pyx_r;
  3954. }
  3955. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_6__reduce_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self) {
  3956. int __pyx_v_use_setstate;
  3957. PyObject *__pyx_v_state = NULL;
  3958. PyObject *__pyx_v__dict = NULL;
  3959. PyObject *__pyx_r = NULL;
  3960. __Pyx_RefNannyDeclarations
  3961. PyObject *__pyx_t_1 = NULL;
  3962. int __pyx_t_2;
  3963. int __pyx_t_3;
  3964. PyObject *__pyx_t_4 = NULL;
  3965. int __pyx_t_5;
  3966. PyObject *__pyx_t_6 = NULL;
  3967. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  3968. /* "(tree fragment)":3
  3969. * def __reduce_cython__(self):
  3970. * cdef bint use_setstate
  3971. * state = (self.chunked, self.compression, self.headers, self.method, self.path, self.raw_headers, self.should_close, self.upgrade, self.url, self.version) # <<<<<<<<<<<<<<
  3972. * _dict = getattr(self, '__dict__', None)
  3973. * if _dict is not None:
  3974. */
  3975. __pyx_t_1 = PyTuple_New(10); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  3976. __Pyx_GOTREF(__pyx_t_1);
  3977. __Pyx_INCREF(__pyx_v_self->chunked);
  3978. __Pyx_GIVEREF(__pyx_v_self->chunked);
  3979. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->chunked);
  3980. __Pyx_INCREF(__pyx_v_self->compression);
  3981. __Pyx_GIVEREF(__pyx_v_self->compression);
  3982. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->compression);
  3983. __Pyx_INCREF(__pyx_v_self->headers);
  3984. __Pyx_GIVEREF(__pyx_v_self->headers);
  3985. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->headers);
  3986. __Pyx_INCREF(__pyx_v_self->method);
  3987. __Pyx_GIVEREF(__pyx_v_self->method);
  3988. PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->method);
  3989. __Pyx_INCREF(__pyx_v_self->path);
  3990. __Pyx_GIVEREF(__pyx_v_self->path);
  3991. PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_self->path);
  3992. __Pyx_INCREF(__pyx_v_self->raw_headers);
  3993. __Pyx_GIVEREF(__pyx_v_self->raw_headers);
  3994. PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_v_self->raw_headers);
  3995. __Pyx_INCREF(__pyx_v_self->should_close);
  3996. __Pyx_GIVEREF(__pyx_v_self->should_close);
  3997. PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_v_self->should_close);
  3998. __Pyx_INCREF(__pyx_v_self->upgrade);
  3999. __Pyx_GIVEREF(__pyx_v_self->upgrade);
  4000. PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_v_self->upgrade);
  4001. __Pyx_INCREF(__pyx_v_self->url);
  4002. __Pyx_GIVEREF(__pyx_v_self->url);
  4003. PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_v_self->url);
  4004. __Pyx_INCREF(__pyx_v_self->version);
  4005. __Pyx_GIVEREF(__pyx_v_self->version);
  4006. PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_v_self->version);
  4007. __pyx_v_state = ((PyObject*)__pyx_t_1);
  4008. __pyx_t_1 = 0;
  4009. /* "(tree fragment)":4
  4010. * cdef bint use_setstate
  4011. * state = (self.chunked, self.compression, self.headers, self.method, self.path, self.raw_headers, self.should_close, self.upgrade, self.url, self.version)
  4012. * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
  4013. * if _dict is not None:
  4014. * state += (_dict,)
  4015. */
  4016. __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  4017. __Pyx_GOTREF(__pyx_t_1);
  4018. __pyx_v__dict = __pyx_t_1;
  4019. __pyx_t_1 = 0;
  4020. /* "(tree fragment)":5
  4021. * state = (self.chunked, self.compression, self.headers, self.method, self.path, self.raw_headers, self.should_close, self.upgrade, self.url, self.version)
  4022. * _dict = getattr(self, '__dict__', None)
  4023. * if _dict is not None: # <<<<<<<<<<<<<<
  4024. * state += (_dict,)
  4025. * use_setstate = True
  4026. */
  4027. __pyx_t_2 = (__pyx_v__dict != Py_None);
  4028. __pyx_t_3 = (__pyx_t_2 != 0);
  4029. if (__pyx_t_3) {
  4030. /* "(tree fragment)":6
  4031. * _dict = getattr(self, '__dict__', None)
  4032. * if _dict is not None:
  4033. * state += (_dict,) # <<<<<<<<<<<<<<
  4034. * use_setstate = True
  4035. * else:
  4036. */
  4037. __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  4038. __Pyx_GOTREF(__pyx_t_1);
  4039. __Pyx_INCREF(__pyx_v__dict);
  4040. __Pyx_GIVEREF(__pyx_v__dict);
  4041. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
  4042. __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
  4043. __Pyx_GOTREF(__pyx_t_4);
  4044. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4045. __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
  4046. __pyx_t_4 = 0;
  4047. /* "(tree fragment)":7
  4048. * if _dict is not None:
  4049. * state += (_dict,)
  4050. * use_setstate = True # <<<<<<<<<<<<<<
  4051. * else:
  4052. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.method is not None or self.path is not None or self.raw_headers is not None or self.should_close is not None or self.upgrade is not None or self.url is not None or self.version is not None
  4053. */
  4054. __pyx_v_use_setstate = 1;
  4055. /* "(tree fragment)":5
  4056. * state = (self.chunked, self.compression, self.headers, self.method, self.path, self.raw_headers, self.should_close, self.upgrade, self.url, self.version)
  4057. * _dict = getattr(self, '__dict__', None)
  4058. * if _dict is not None: # <<<<<<<<<<<<<<
  4059. * state += (_dict,)
  4060. * use_setstate = True
  4061. */
  4062. goto __pyx_L3;
  4063. }
  4064. /* "(tree fragment)":9
  4065. * use_setstate = True
  4066. * else:
  4067. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.method is not None or self.path is not None or self.raw_headers is not None or self.should_close is not None or self.upgrade is not None or self.url is not None or self.version is not None # <<<<<<<<<<<<<<
  4068. * if use_setstate:
  4069. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, None), state
  4070. */
  4071. /*else*/ {
  4072. __pyx_t_2 = (__pyx_v_self->chunked != Py_None);
  4073. __pyx_t_5 = (__pyx_t_2 != 0);
  4074. if (!__pyx_t_5) {
  4075. } else {
  4076. __pyx_t_3 = __pyx_t_5;
  4077. goto __pyx_L4_bool_binop_done;
  4078. }
  4079. __pyx_t_5 = (__pyx_v_self->compression != Py_None);
  4080. __pyx_t_2 = (__pyx_t_5 != 0);
  4081. if (!__pyx_t_2) {
  4082. } else {
  4083. __pyx_t_3 = __pyx_t_2;
  4084. goto __pyx_L4_bool_binop_done;
  4085. }
  4086. __pyx_t_2 = (__pyx_v_self->headers != Py_None);
  4087. __pyx_t_5 = (__pyx_t_2 != 0);
  4088. if (!__pyx_t_5) {
  4089. } else {
  4090. __pyx_t_3 = __pyx_t_5;
  4091. goto __pyx_L4_bool_binop_done;
  4092. }
  4093. __pyx_t_5 = (__pyx_v_self->method != ((PyObject*)Py_None));
  4094. __pyx_t_2 = (__pyx_t_5 != 0);
  4095. if (!__pyx_t_2) {
  4096. } else {
  4097. __pyx_t_3 = __pyx_t_2;
  4098. goto __pyx_L4_bool_binop_done;
  4099. }
  4100. __pyx_t_2 = (__pyx_v_self->path != ((PyObject*)Py_None));
  4101. __pyx_t_5 = (__pyx_t_2 != 0);
  4102. if (!__pyx_t_5) {
  4103. } else {
  4104. __pyx_t_3 = __pyx_t_5;
  4105. goto __pyx_L4_bool_binop_done;
  4106. }
  4107. __pyx_t_5 = (__pyx_v_self->raw_headers != Py_None);
  4108. __pyx_t_2 = (__pyx_t_5 != 0);
  4109. if (!__pyx_t_2) {
  4110. } else {
  4111. __pyx_t_3 = __pyx_t_2;
  4112. goto __pyx_L4_bool_binop_done;
  4113. }
  4114. __pyx_t_2 = (__pyx_v_self->should_close != Py_None);
  4115. __pyx_t_5 = (__pyx_t_2 != 0);
  4116. if (!__pyx_t_5) {
  4117. } else {
  4118. __pyx_t_3 = __pyx_t_5;
  4119. goto __pyx_L4_bool_binop_done;
  4120. }
  4121. __pyx_t_5 = (__pyx_v_self->upgrade != Py_None);
  4122. __pyx_t_2 = (__pyx_t_5 != 0);
  4123. if (!__pyx_t_2) {
  4124. } else {
  4125. __pyx_t_3 = __pyx_t_2;
  4126. goto __pyx_L4_bool_binop_done;
  4127. }
  4128. __pyx_t_2 = (__pyx_v_self->url != Py_None);
  4129. __pyx_t_5 = (__pyx_t_2 != 0);
  4130. if (!__pyx_t_5) {
  4131. } else {
  4132. __pyx_t_3 = __pyx_t_5;
  4133. goto __pyx_L4_bool_binop_done;
  4134. }
  4135. __pyx_t_5 = (__pyx_v_self->version != Py_None);
  4136. __pyx_t_2 = (__pyx_t_5 != 0);
  4137. __pyx_t_3 = __pyx_t_2;
  4138. __pyx_L4_bool_binop_done:;
  4139. __pyx_v_use_setstate = __pyx_t_3;
  4140. }
  4141. __pyx_L3:;
  4142. /* "(tree fragment)":10
  4143. * else:
  4144. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.method is not None or self.path is not None or self.raw_headers is not None or self.should_close is not None or self.upgrade is not None or self.url is not None or self.version is not None
  4145. * if use_setstate: # <<<<<<<<<<<<<<
  4146. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, None), state
  4147. * else:
  4148. */
  4149. __pyx_t_3 = (__pyx_v_use_setstate != 0);
  4150. if (__pyx_t_3) {
  4151. /* "(tree fragment)":11
  4152. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.method is not None or self.path is not None or self.raw_headers is not None or self.should_close is not None or self.upgrade is not None or self.url is not None or self.version is not None
  4153. * if use_setstate:
  4154. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, None), state # <<<<<<<<<<<<<<
  4155. * else:
  4156. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, state)
  4157. */
  4158. __Pyx_XDECREF(__pyx_r);
  4159. __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_RawRequestMessage); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 11, __pyx_L1_error)
  4160. __Pyx_GOTREF(__pyx_t_4);
  4161. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
  4162. __Pyx_GOTREF(__pyx_t_1);
  4163. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  4164. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  4165. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  4166. __Pyx_INCREF(__pyx_int_21004882);
  4167. __Pyx_GIVEREF(__pyx_int_21004882);
  4168. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_21004882);
  4169. __Pyx_INCREF(Py_None);
  4170. __Pyx_GIVEREF(Py_None);
  4171. PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
  4172. __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 11, __pyx_L1_error)
  4173. __Pyx_GOTREF(__pyx_t_6);
  4174. __Pyx_GIVEREF(__pyx_t_4);
  4175. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  4176. __Pyx_GIVEREF(__pyx_t_1);
  4177. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
  4178. __Pyx_INCREF(__pyx_v_state);
  4179. __Pyx_GIVEREF(__pyx_v_state);
  4180. PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
  4181. __pyx_t_4 = 0;
  4182. __pyx_t_1 = 0;
  4183. __pyx_r = __pyx_t_6;
  4184. __pyx_t_6 = 0;
  4185. goto __pyx_L0;
  4186. /* "(tree fragment)":10
  4187. * else:
  4188. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.method is not None or self.path is not None or self.raw_headers is not None or self.should_close is not None or self.upgrade is not None or self.url is not None or self.version is not None
  4189. * if use_setstate: # <<<<<<<<<<<<<<
  4190. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, None), state
  4191. * else:
  4192. */
  4193. }
  4194. /* "(tree fragment)":13
  4195. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, None), state
  4196. * else:
  4197. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, state) # <<<<<<<<<<<<<<
  4198. * def __setstate_cython__(self, __pyx_state):
  4199. * __pyx_unpickle_RawRequestMessage__set_state(self, __pyx_state)
  4200. */
  4201. /*else*/ {
  4202. __Pyx_XDECREF(__pyx_r);
  4203. __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_RawRequestMessage); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
  4204. __Pyx_GOTREF(__pyx_t_6);
  4205. __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
  4206. __Pyx_GOTREF(__pyx_t_1);
  4207. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  4208. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  4209. PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  4210. __Pyx_INCREF(__pyx_int_21004882);
  4211. __Pyx_GIVEREF(__pyx_int_21004882);
  4212. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_21004882);
  4213. __Pyx_INCREF(__pyx_v_state);
  4214. __Pyx_GIVEREF(__pyx_v_state);
  4215. PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
  4216. __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
  4217. __Pyx_GOTREF(__pyx_t_4);
  4218. __Pyx_GIVEREF(__pyx_t_6);
  4219. PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  4220. __Pyx_GIVEREF(__pyx_t_1);
  4221. PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  4222. __pyx_t_6 = 0;
  4223. __pyx_t_1 = 0;
  4224. __pyx_r = __pyx_t_4;
  4225. __pyx_t_4 = 0;
  4226. goto __pyx_L0;
  4227. }
  4228. /* "(tree fragment)":1
  4229. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  4230. * cdef bint use_setstate
  4231. * state = (self.chunked, self.compression, self.headers, self.method, self.path, self.raw_headers, self.should_close, self.upgrade, self.url, self.version)
  4232. */
  4233. /* function exit code */
  4234. __pyx_L1_error:;
  4235. __Pyx_XDECREF(__pyx_t_1);
  4236. __Pyx_XDECREF(__pyx_t_4);
  4237. __Pyx_XDECREF(__pyx_t_6);
  4238. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4239. __pyx_r = NULL;
  4240. __pyx_L0:;
  4241. __Pyx_XDECREF(__pyx_v_state);
  4242. __Pyx_XDECREF(__pyx_v__dict);
  4243. __Pyx_XGIVEREF(__pyx_r);
  4244. __Pyx_RefNannyFinishContext();
  4245. return __pyx_r;
  4246. }
  4247. /* "(tree fragment)":14
  4248. * else:
  4249. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, state)
  4250. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  4251. * __pyx_unpickle_RawRequestMessage__set_state(self, __pyx_state)
  4252. */
  4253. /* Python wrapper */
  4254. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  4255. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  4256. PyObject *__pyx_r = 0;
  4257. __Pyx_RefNannyDeclarations
  4258. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  4259. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_8__setstate_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  4260. /* function exit code */
  4261. __Pyx_RefNannyFinishContext();
  4262. return __pyx_r;
  4263. }
  4264. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17RawRequestMessage_8__setstate_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  4265. PyObject *__pyx_r = NULL;
  4266. __Pyx_RefNannyDeclarations
  4267. PyObject *__pyx_t_1 = NULL;
  4268. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  4269. /* "(tree fragment)":15
  4270. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, state)
  4271. * def __setstate_cython__(self, __pyx_state):
  4272. * __pyx_unpickle_RawRequestMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
  4273. */
  4274. 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)
  4275. __pyx_t_1 = __pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawRequestMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
  4276. __Pyx_GOTREF(__pyx_t_1);
  4277. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4278. /* "(tree fragment)":14
  4279. * else:
  4280. * return __pyx_unpickle_RawRequestMessage, (type(self), 0x1408252, state)
  4281. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  4282. * __pyx_unpickle_RawRequestMessage__set_state(self, __pyx_state)
  4283. */
  4284. /* function exit code */
  4285. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  4286. goto __pyx_L0;
  4287. __pyx_L1_error:;
  4288. __Pyx_XDECREF(__pyx_t_1);
  4289. __Pyx_AddTraceback("aiohttp._http_parser.RawRequestMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4290. __pyx_r = NULL;
  4291. __pyx_L0:;
  4292. __Pyx_XGIVEREF(__pyx_r);
  4293. __Pyx_RefNannyFinishContext();
  4294. return __pyx_r;
  4295. }
  4296. /* "aiohttp/_http_parser.pyx":167
  4297. * return ret
  4298. *
  4299. * cdef _new_request_message(str method, # <<<<<<<<<<<<<<
  4300. * str path,
  4301. * object version,
  4302. */
  4303. static PyObject *__pyx_f_7aiohttp_12_http_parser__new_request_message(PyObject *__pyx_v_method, PyObject *__pyx_v_path, PyObject *__pyx_v_version, PyObject *__pyx_v_headers, PyObject *__pyx_v_raw_headers, int __pyx_v_should_close, PyObject *__pyx_v_compression, int __pyx_v_upgrade, int __pyx_v_chunked, PyObject *__pyx_v_url) {
  4304. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v_ret = 0;
  4305. PyObject *__pyx_r = NULL;
  4306. __Pyx_RefNannyDeclarations
  4307. PyObject *__pyx_t_1 = NULL;
  4308. __Pyx_RefNannySetupContext("_new_request_message", 0);
  4309. /* "aiohttp/_http_parser.pyx":178
  4310. * object url):
  4311. * cdef RawRequestMessage ret
  4312. * ret = RawRequestMessage.__new__(RawRequestMessage) # <<<<<<<<<<<<<<
  4313. * ret.method = method
  4314. * ret.path = path
  4315. */
  4316. __pyx_t_1 = ((PyObject *)__pyx_tp_new_7aiohttp_12_http_parser_RawRequestMessage(((PyTypeObject *)__pyx_ptype_7aiohttp_12_http_parser_RawRequestMessage), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
  4317. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  4318. __pyx_v_ret = ((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_t_1);
  4319. __pyx_t_1 = 0;
  4320. /* "aiohttp/_http_parser.pyx":179
  4321. * cdef RawRequestMessage ret
  4322. * ret = RawRequestMessage.__new__(RawRequestMessage)
  4323. * ret.method = method # <<<<<<<<<<<<<<
  4324. * ret.path = path
  4325. * ret.version = version
  4326. */
  4327. __Pyx_INCREF(__pyx_v_method);
  4328. __Pyx_GIVEREF(__pyx_v_method);
  4329. __Pyx_GOTREF(__pyx_v_ret->method);
  4330. __Pyx_DECREF(__pyx_v_ret->method);
  4331. __pyx_v_ret->method = __pyx_v_method;
  4332. /* "aiohttp/_http_parser.pyx":180
  4333. * ret = RawRequestMessage.__new__(RawRequestMessage)
  4334. * ret.method = method
  4335. * ret.path = path # <<<<<<<<<<<<<<
  4336. * ret.version = version
  4337. * ret.headers = headers
  4338. */
  4339. __Pyx_INCREF(__pyx_v_path);
  4340. __Pyx_GIVEREF(__pyx_v_path);
  4341. __Pyx_GOTREF(__pyx_v_ret->path);
  4342. __Pyx_DECREF(__pyx_v_ret->path);
  4343. __pyx_v_ret->path = __pyx_v_path;
  4344. /* "aiohttp/_http_parser.pyx":181
  4345. * ret.method = method
  4346. * ret.path = path
  4347. * ret.version = version # <<<<<<<<<<<<<<
  4348. * ret.headers = headers
  4349. * ret.raw_headers = raw_headers
  4350. */
  4351. __Pyx_INCREF(__pyx_v_version);
  4352. __Pyx_GIVEREF(__pyx_v_version);
  4353. __Pyx_GOTREF(__pyx_v_ret->version);
  4354. __Pyx_DECREF(__pyx_v_ret->version);
  4355. __pyx_v_ret->version = __pyx_v_version;
  4356. /* "aiohttp/_http_parser.pyx":182
  4357. * ret.path = path
  4358. * ret.version = version
  4359. * ret.headers = headers # <<<<<<<<<<<<<<
  4360. * ret.raw_headers = raw_headers
  4361. * ret.should_close = should_close
  4362. */
  4363. __Pyx_INCREF(__pyx_v_headers);
  4364. __Pyx_GIVEREF(__pyx_v_headers);
  4365. __Pyx_GOTREF(__pyx_v_ret->headers);
  4366. __Pyx_DECREF(__pyx_v_ret->headers);
  4367. __pyx_v_ret->headers = __pyx_v_headers;
  4368. /* "aiohttp/_http_parser.pyx":183
  4369. * ret.version = version
  4370. * ret.headers = headers
  4371. * ret.raw_headers = raw_headers # <<<<<<<<<<<<<<
  4372. * ret.should_close = should_close
  4373. * ret.compression = compression
  4374. */
  4375. __Pyx_INCREF(__pyx_v_raw_headers);
  4376. __Pyx_GIVEREF(__pyx_v_raw_headers);
  4377. __Pyx_GOTREF(__pyx_v_ret->raw_headers);
  4378. __Pyx_DECREF(__pyx_v_ret->raw_headers);
  4379. __pyx_v_ret->raw_headers = __pyx_v_raw_headers;
  4380. /* "aiohttp/_http_parser.pyx":184
  4381. * ret.headers = headers
  4382. * ret.raw_headers = raw_headers
  4383. * ret.should_close = should_close # <<<<<<<<<<<<<<
  4384. * ret.compression = compression
  4385. * ret.upgrade = upgrade
  4386. */
  4387. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_should_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
  4388. __Pyx_GOTREF(__pyx_t_1);
  4389. __Pyx_GIVEREF(__pyx_t_1);
  4390. __Pyx_GOTREF(__pyx_v_ret->should_close);
  4391. __Pyx_DECREF(__pyx_v_ret->should_close);
  4392. __pyx_v_ret->should_close = __pyx_t_1;
  4393. __pyx_t_1 = 0;
  4394. /* "aiohttp/_http_parser.pyx":185
  4395. * ret.raw_headers = raw_headers
  4396. * ret.should_close = should_close
  4397. * ret.compression = compression # <<<<<<<<<<<<<<
  4398. * ret.upgrade = upgrade
  4399. * ret.chunked = chunked
  4400. */
  4401. __Pyx_INCREF(__pyx_v_compression);
  4402. __Pyx_GIVEREF(__pyx_v_compression);
  4403. __Pyx_GOTREF(__pyx_v_ret->compression);
  4404. __Pyx_DECREF(__pyx_v_ret->compression);
  4405. __pyx_v_ret->compression = __pyx_v_compression;
  4406. /* "aiohttp/_http_parser.pyx":186
  4407. * ret.should_close = should_close
  4408. * ret.compression = compression
  4409. * ret.upgrade = upgrade # <<<<<<<<<<<<<<
  4410. * ret.chunked = chunked
  4411. * ret.url = url
  4412. */
  4413. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
  4414. __Pyx_GOTREF(__pyx_t_1);
  4415. __Pyx_GIVEREF(__pyx_t_1);
  4416. __Pyx_GOTREF(__pyx_v_ret->upgrade);
  4417. __Pyx_DECREF(__pyx_v_ret->upgrade);
  4418. __pyx_v_ret->upgrade = __pyx_t_1;
  4419. __pyx_t_1 = 0;
  4420. /* "aiohttp/_http_parser.pyx":187
  4421. * ret.compression = compression
  4422. * ret.upgrade = upgrade
  4423. * ret.chunked = chunked # <<<<<<<<<<<<<<
  4424. * ret.url = url
  4425. * return ret
  4426. */
  4427. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_chunked); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
  4428. __Pyx_GOTREF(__pyx_t_1);
  4429. __Pyx_GIVEREF(__pyx_t_1);
  4430. __Pyx_GOTREF(__pyx_v_ret->chunked);
  4431. __Pyx_DECREF(__pyx_v_ret->chunked);
  4432. __pyx_v_ret->chunked = __pyx_t_1;
  4433. __pyx_t_1 = 0;
  4434. /* "aiohttp/_http_parser.pyx":188
  4435. * ret.upgrade = upgrade
  4436. * ret.chunked = chunked
  4437. * ret.url = url # <<<<<<<<<<<<<<
  4438. * return ret
  4439. *
  4440. */
  4441. __Pyx_INCREF(__pyx_v_url);
  4442. __Pyx_GIVEREF(__pyx_v_url);
  4443. __Pyx_GOTREF(__pyx_v_ret->url);
  4444. __Pyx_DECREF(__pyx_v_ret->url);
  4445. __pyx_v_ret->url = __pyx_v_url;
  4446. /* "aiohttp/_http_parser.pyx":189
  4447. * ret.chunked = chunked
  4448. * ret.url = url
  4449. * return ret # <<<<<<<<<<<<<<
  4450. *
  4451. *
  4452. */
  4453. __Pyx_XDECREF(__pyx_r);
  4454. __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  4455. __pyx_r = ((PyObject *)__pyx_v_ret);
  4456. goto __pyx_L0;
  4457. /* "aiohttp/_http_parser.pyx":167
  4458. * return ret
  4459. *
  4460. * cdef _new_request_message(str method, # <<<<<<<<<<<<<<
  4461. * str path,
  4462. * object version,
  4463. */
  4464. /* function exit code */
  4465. __pyx_L1_error:;
  4466. __Pyx_XDECREF(__pyx_t_1);
  4467. __Pyx_AddTraceback("aiohttp._http_parser._new_request_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4468. __pyx_r = 0;
  4469. __pyx_L0:;
  4470. __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  4471. __Pyx_XGIVEREF(__pyx_r);
  4472. __Pyx_RefNannyFinishContext();
  4473. return __pyx_r;
  4474. }
  4475. /* "aiohttp/_http_parser.pyx":204
  4476. * cdef readonly object chunked
  4477. *
  4478. * def __init__(self, version, code, reason, headers, raw_headers, # <<<<<<<<<<<<<<
  4479. * should_close, compression, upgrade, chunked):
  4480. * self.version = version
  4481. */
  4482. /* Python wrapper */
  4483. static int __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  4484. static int __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  4485. PyObject *__pyx_v_version = 0;
  4486. PyObject *__pyx_v_code = 0;
  4487. PyObject *__pyx_v_reason = 0;
  4488. PyObject *__pyx_v_headers = 0;
  4489. PyObject *__pyx_v_raw_headers = 0;
  4490. PyObject *__pyx_v_should_close = 0;
  4491. PyObject *__pyx_v_compression = 0;
  4492. PyObject *__pyx_v_upgrade = 0;
  4493. PyObject *__pyx_v_chunked = 0;
  4494. int __pyx_r;
  4495. __Pyx_RefNannyDeclarations
  4496. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  4497. {
  4498. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_version,&__pyx_n_s_code,&__pyx_n_s_reason,&__pyx_n_s_headers,&__pyx_n_s_raw_headers,&__pyx_n_s_should_close,&__pyx_n_s_compression,&__pyx_n_s_upgrade,&__pyx_n_s_chunked,0};
  4499. PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  4500. if (unlikely(__pyx_kwds)) {
  4501. Py_ssize_t kw_args;
  4502. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  4503. switch (pos_args) {
  4504. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  4505. CYTHON_FALLTHROUGH;
  4506. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  4507. CYTHON_FALLTHROUGH;
  4508. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  4509. CYTHON_FALLTHROUGH;
  4510. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  4511. CYTHON_FALLTHROUGH;
  4512. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  4513. CYTHON_FALLTHROUGH;
  4514. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  4515. CYTHON_FALLTHROUGH;
  4516. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  4517. CYTHON_FALLTHROUGH;
  4518. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4519. CYTHON_FALLTHROUGH;
  4520. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4521. CYTHON_FALLTHROUGH;
  4522. case 0: break;
  4523. default: goto __pyx_L5_argtuple_error;
  4524. }
  4525. kw_args = PyDict_Size(__pyx_kwds);
  4526. switch (pos_args) {
  4527. case 0:
  4528. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_version)) != 0)) kw_args--;
  4529. else goto __pyx_L5_argtuple_error;
  4530. CYTHON_FALLTHROUGH;
  4531. case 1:
  4532. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_code)) != 0)) kw_args--;
  4533. else {
  4534. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 1); __PYX_ERR(0, 204, __pyx_L3_error)
  4535. }
  4536. CYTHON_FALLTHROUGH;
  4537. case 2:
  4538. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reason)) != 0)) kw_args--;
  4539. else {
  4540. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 2); __PYX_ERR(0, 204, __pyx_L3_error)
  4541. }
  4542. CYTHON_FALLTHROUGH;
  4543. case 3:
  4544. if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_headers)) != 0)) kw_args--;
  4545. else {
  4546. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 3); __PYX_ERR(0, 204, __pyx_L3_error)
  4547. }
  4548. CYTHON_FALLTHROUGH;
  4549. case 4:
  4550. if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_raw_headers)) != 0)) kw_args--;
  4551. else {
  4552. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 4); __PYX_ERR(0, 204, __pyx_L3_error)
  4553. }
  4554. CYTHON_FALLTHROUGH;
  4555. case 5:
  4556. if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_should_close)) != 0)) kw_args--;
  4557. else {
  4558. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 5); __PYX_ERR(0, 204, __pyx_L3_error)
  4559. }
  4560. CYTHON_FALLTHROUGH;
  4561. case 6:
  4562. if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_compression)) != 0)) kw_args--;
  4563. else {
  4564. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 6); __PYX_ERR(0, 204, __pyx_L3_error)
  4565. }
  4566. CYTHON_FALLTHROUGH;
  4567. case 7:
  4568. if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_upgrade)) != 0)) kw_args--;
  4569. else {
  4570. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 7); __PYX_ERR(0, 204, __pyx_L3_error)
  4571. }
  4572. CYTHON_FALLTHROUGH;
  4573. case 8:
  4574. if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chunked)) != 0)) kw_args--;
  4575. else {
  4576. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, 8); __PYX_ERR(0, 204, __pyx_L3_error)
  4577. }
  4578. }
  4579. if (unlikely(kw_args > 0)) {
  4580. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 204, __pyx_L3_error)
  4581. }
  4582. } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
  4583. goto __pyx_L5_argtuple_error;
  4584. } else {
  4585. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  4586. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  4587. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  4588. values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  4589. values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  4590. values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  4591. values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  4592. values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  4593. values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  4594. }
  4595. __pyx_v_version = values[0];
  4596. __pyx_v_code = values[1];
  4597. __pyx_v_reason = values[2];
  4598. __pyx_v_headers = values[3];
  4599. __pyx_v_raw_headers = values[4];
  4600. __pyx_v_should_close = values[5];
  4601. __pyx_v_compression = values[6];
  4602. __pyx_v_upgrade = values[7];
  4603. __pyx_v_chunked = values[8];
  4604. }
  4605. goto __pyx_L4_argument_unpacking_done;
  4606. __pyx_L5_argtuple_error:;
  4607. __Pyx_RaiseArgtupleInvalid("__init__", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 204, __pyx_L3_error)
  4608. __pyx_L3_error:;
  4609. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4610. __Pyx_RefNannyFinishContext();
  4611. return -1;
  4612. __pyx_L4_argument_unpacking_done:;
  4613. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage___init__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self), __pyx_v_version, __pyx_v_code, __pyx_v_reason, __pyx_v_headers, __pyx_v_raw_headers, __pyx_v_should_close, __pyx_v_compression, __pyx_v_upgrade, __pyx_v_chunked);
  4614. /* function exit code */
  4615. __Pyx_RefNannyFinishContext();
  4616. return __pyx_r;
  4617. }
  4618. static int __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage___init__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self, PyObject *__pyx_v_version, PyObject *__pyx_v_code, PyObject *__pyx_v_reason, PyObject *__pyx_v_headers, PyObject *__pyx_v_raw_headers, PyObject *__pyx_v_should_close, PyObject *__pyx_v_compression, PyObject *__pyx_v_upgrade, PyObject *__pyx_v_chunked) {
  4619. int __pyx_r;
  4620. __Pyx_RefNannyDeclarations
  4621. int __pyx_t_1;
  4622. PyObject *__pyx_t_2 = NULL;
  4623. __Pyx_RefNannySetupContext("__init__", 0);
  4624. /* "aiohttp/_http_parser.pyx":206
  4625. * def __init__(self, version, code, reason, headers, raw_headers,
  4626. * should_close, compression, upgrade, chunked):
  4627. * self.version = version # <<<<<<<<<<<<<<
  4628. * self.code = code
  4629. * self.reason = reason
  4630. */
  4631. __Pyx_INCREF(__pyx_v_version);
  4632. __Pyx_GIVEREF(__pyx_v_version);
  4633. __Pyx_GOTREF(__pyx_v_self->version);
  4634. __Pyx_DECREF(__pyx_v_self->version);
  4635. __pyx_v_self->version = __pyx_v_version;
  4636. /* "aiohttp/_http_parser.pyx":207
  4637. * should_close, compression, upgrade, chunked):
  4638. * self.version = version
  4639. * self.code = code # <<<<<<<<<<<<<<
  4640. * self.reason = reason
  4641. * self.headers = headers
  4642. */
  4643. __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_code); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error)
  4644. __pyx_v_self->code = __pyx_t_1;
  4645. /* "aiohttp/_http_parser.pyx":208
  4646. * self.version = version
  4647. * self.code = code
  4648. * self.reason = reason # <<<<<<<<<<<<<<
  4649. * self.headers = headers
  4650. * self.raw_headers = raw_headers
  4651. */
  4652. if (!(likely(PyUnicode_CheckExact(__pyx_v_reason))||((__pyx_v_reason) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_reason)->tp_name), 0))) __PYX_ERR(0, 208, __pyx_L1_error)
  4653. __pyx_t_2 = __pyx_v_reason;
  4654. __Pyx_INCREF(__pyx_t_2);
  4655. __Pyx_GIVEREF(__pyx_t_2);
  4656. __Pyx_GOTREF(__pyx_v_self->reason);
  4657. __Pyx_DECREF(__pyx_v_self->reason);
  4658. __pyx_v_self->reason = ((PyObject*)__pyx_t_2);
  4659. __pyx_t_2 = 0;
  4660. /* "aiohttp/_http_parser.pyx":209
  4661. * self.code = code
  4662. * self.reason = reason
  4663. * self.headers = headers # <<<<<<<<<<<<<<
  4664. * self.raw_headers = raw_headers
  4665. * self.should_close = should_close
  4666. */
  4667. __Pyx_INCREF(__pyx_v_headers);
  4668. __Pyx_GIVEREF(__pyx_v_headers);
  4669. __Pyx_GOTREF(__pyx_v_self->headers);
  4670. __Pyx_DECREF(__pyx_v_self->headers);
  4671. __pyx_v_self->headers = __pyx_v_headers;
  4672. /* "aiohttp/_http_parser.pyx":210
  4673. * self.reason = reason
  4674. * self.headers = headers
  4675. * self.raw_headers = raw_headers # <<<<<<<<<<<<<<
  4676. * self.should_close = should_close
  4677. * self.compression = compression
  4678. */
  4679. __Pyx_INCREF(__pyx_v_raw_headers);
  4680. __Pyx_GIVEREF(__pyx_v_raw_headers);
  4681. __Pyx_GOTREF(__pyx_v_self->raw_headers);
  4682. __Pyx_DECREF(__pyx_v_self->raw_headers);
  4683. __pyx_v_self->raw_headers = __pyx_v_raw_headers;
  4684. /* "aiohttp/_http_parser.pyx":211
  4685. * self.headers = headers
  4686. * self.raw_headers = raw_headers
  4687. * self.should_close = should_close # <<<<<<<<<<<<<<
  4688. * self.compression = compression
  4689. * self.upgrade = upgrade
  4690. */
  4691. __Pyx_INCREF(__pyx_v_should_close);
  4692. __Pyx_GIVEREF(__pyx_v_should_close);
  4693. __Pyx_GOTREF(__pyx_v_self->should_close);
  4694. __Pyx_DECREF(__pyx_v_self->should_close);
  4695. __pyx_v_self->should_close = __pyx_v_should_close;
  4696. /* "aiohttp/_http_parser.pyx":212
  4697. * self.raw_headers = raw_headers
  4698. * self.should_close = should_close
  4699. * self.compression = compression # <<<<<<<<<<<<<<
  4700. * self.upgrade = upgrade
  4701. * self.chunked = chunked
  4702. */
  4703. __Pyx_INCREF(__pyx_v_compression);
  4704. __Pyx_GIVEREF(__pyx_v_compression);
  4705. __Pyx_GOTREF(__pyx_v_self->compression);
  4706. __Pyx_DECREF(__pyx_v_self->compression);
  4707. __pyx_v_self->compression = __pyx_v_compression;
  4708. /* "aiohttp/_http_parser.pyx":213
  4709. * self.should_close = should_close
  4710. * self.compression = compression
  4711. * self.upgrade = upgrade # <<<<<<<<<<<<<<
  4712. * self.chunked = chunked
  4713. *
  4714. */
  4715. __Pyx_INCREF(__pyx_v_upgrade);
  4716. __Pyx_GIVEREF(__pyx_v_upgrade);
  4717. __Pyx_GOTREF(__pyx_v_self->upgrade);
  4718. __Pyx_DECREF(__pyx_v_self->upgrade);
  4719. __pyx_v_self->upgrade = __pyx_v_upgrade;
  4720. /* "aiohttp/_http_parser.pyx":214
  4721. * self.compression = compression
  4722. * self.upgrade = upgrade
  4723. * self.chunked = chunked # <<<<<<<<<<<<<<
  4724. *
  4725. * def __repr__(self):
  4726. */
  4727. __Pyx_INCREF(__pyx_v_chunked);
  4728. __Pyx_GIVEREF(__pyx_v_chunked);
  4729. __Pyx_GOTREF(__pyx_v_self->chunked);
  4730. __Pyx_DECREF(__pyx_v_self->chunked);
  4731. __pyx_v_self->chunked = __pyx_v_chunked;
  4732. /* "aiohttp/_http_parser.pyx":204
  4733. * cdef readonly object chunked
  4734. *
  4735. * def __init__(self, version, code, reason, headers, raw_headers, # <<<<<<<<<<<<<<
  4736. * should_close, compression, upgrade, chunked):
  4737. * self.version = version
  4738. */
  4739. /* function exit code */
  4740. __pyx_r = 0;
  4741. goto __pyx_L0;
  4742. __pyx_L1_error:;
  4743. __Pyx_XDECREF(__pyx_t_2);
  4744. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4745. __pyx_r = -1;
  4746. __pyx_L0:;
  4747. __Pyx_RefNannyFinishContext();
  4748. return __pyx_r;
  4749. }
  4750. /* "aiohttp/_http_parser.pyx":216
  4751. * self.chunked = chunked
  4752. *
  4753. * def __repr__(self): # <<<<<<<<<<<<<<
  4754. * info = []
  4755. * info.append(("version", self.version))
  4756. */
  4757. /* Python wrapper */
  4758. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_3__repr__(PyObject *__pyx_v_self); /*proto*/
  4759. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_3__repr__(PyObject *__pyx_v_self) {
  4760. PyObject *__pyx_r = 0;
  4761. __Pyx_RefNannyDeclarations
  4762. __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  4763. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_2__repr__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  4764. /* function exit code */
  4765. __Pyx_RefNannyFinishContext();
  4766. return __pyx_r;
  4767. }
  4768. static PyObject *__pyx_gb_7aiohttp_12_http_parser_18RawResponseMessage_8__repr___2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
  4769. /* "aiohttp/_http_parser.pyx":227
  4770. * info.append(("upgrade", self.upgrade))
  4771. * info.append(("chunked", self.chunked))
  4772. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info) # <<<<<<<<<<<<<<
  4773. * return '<RawResponseMessage(' + sinfo + ')>'
  4774. *
  4775. */
  4776. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_8__repr___genexpr(PyObject *__pyx_self) {
  4777. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
  4778. PyObject *__pyx_r = NULL;
  4779. __Pyx_RefNannyDeclarations
  4780. __Pyx_RefNannySetupContext("genexpr", 0);
  4781. __pyx_cur_scope = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *)__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr(__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
  4782. if (unlikely(!__pyx_cur_scope)) {
  4783. __pyx_cur_scope = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *)Py_None);
  4784. __Pyx_INCREF(Py_None);
  4785. __PYX_ERR(0, 227, __pyx_L1_error)
  4786. } else {
  4787. __Pyx_GOTREF(__pyx_cur_scope);
  4788. }
  4789. __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *) __pyx_self;
  4790. __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
  4791. __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
  4792. {
  4793. __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_7aiohttp_12_http_parser_18RawResponseMessage_8__repr___2generator1, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_repr___locals_genexpr, __pyx_n_s_aiohttp__http_parser); if (unlikely(!gen)) __PYX_ERR(0, 227, __pyx_L1_error)
  4794. __Pyx_DECREF(__pyx_cur_scope);
  4795. __Pyx_RefNannyFinishContext();
  4796. return (PyObject *) gen;
  4797. }
  4798. /* function exit code */
  4799. __pyx_L1_error:;
  4800. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.__repr__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4801. __pyx_r = NULL;
  4802. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  4803. __Pyx_XGIVEREF(__pyx_r);
  4804. __Pyx_RefNannyFinishContext();
  4805. return __pyx_r;
  4806. }
  4807. static PyObject *__pyx_gb_7aiohttp_12_http_parser_18RawResponseMessage_8__repr___2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
  4808. {
  4809. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
  4810. PyObject *__pyx_r = NULL;
  4811. PyObject *__pyx_t_1 = NULL;
  4812. Py_ssize_t __pyx_t_2;
  4813. PyObject *__pyx_t_3 = NULL;
  4814. PyObject *__pyx_t_4 = NULL;
  4815. PyObject *__pyx_t_5 = NULL;
  4816. PyObject *__pyx_t_6 = NULL;
  4817. PyObject *(*__pyx_t_7)(PyObject *);
  4818. __Pyx_RefNannyDeclarations
  4819. __Pyx_RefNannySetupContext("genexpr", 0);
  4820. switch (__pyx_generator->resume_label) {
  4821. case 0: goto __pyx_L3_first_run;
  4822. default: /* CPython raises the right error here */
  4823. __Pyx_RefNannyFinishContext();
  4824. return NULL;
  4825. }
  4826. __pyx_L3_first_run:;
  4827. if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 227, __pyx_L1_error)
  4828. __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 227, __pyx_L1_error)
  4829. __Pyx_GOTREF(__pyx_r);
  4830. if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info)) { __Pyx_RaiseClosureNameError("info"); __PYX_ERR(0, 227, __pyx_L1_error) }
  4831. if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_info == Py_None)) {
  4832. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  4833. __PYX_ERR(0, 227, __pyx_L1_error)
  4834. }
  4835. __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_info; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
  4836. for (;;) {
  4837. if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
  4838. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  4839. __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 227, __pyx_L1_error)
  4840. #else
  4841. __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  4842. __Pyx_GOTREF(__pyx_t_3);
  4843. #endif
  4844. if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
  4845. PyObject* sequence = __pyx_t_3;
  4846. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  4847. if (unlikely(size != 2)) {
  4848. if (size > 2) __Pyx_RaiseTooManyValuesError(2);
  4849. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  4850. __PYX_ERR(0, 227, __pyx_L1_error)
  4851. }
  4852. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  4853. if (likely(PyTuple_CheckExact(sequence))) {
  4854. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
  4855. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
  4856. } else {
  4857. __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
  4858. __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
  4859. }
  4860. __Pyx_INCREF(__pyx_t_4);
  4861. __Pyx_INCREF(__pyx_t_5);
  4862. #else
  4863. __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
  4864. __Pyx_GOTREF(__pyx_t_4);
  4865. __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)
  4866. __Pyx_GOTREF(__pyx_t_5);
  4867. #endif
  4868. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4869. } else {
  4870. Py_ssize_t index = -1;
  4871. __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error)
  4872. __Pyx_GOTREF(__pyx_t_6);
  4873. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4874. __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext;
  4875. index = 0; __pyx_t_4 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
  4876. __Pyx_GOTREF(__pyx_t_4);
  4877. index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
  4878. __Pyx_GOTREF(__pyx_t_5);
  4879. if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  4880. __pyx_t_7 = NULL;
  4881. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4882. goto __pyx_L7_unpacking_done;
  4883. __pyx_L6_unpacking_failed:;
  4884. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  4885. __pyx_t_7 = NULL;
  4886. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  4887. __PYX_ERR(0, 227, __pyx_L1_error)
  4888. __pyx_L7_unpacking_done:;
  4889. }
  4890. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name);
  4891. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_4);
  4892. __Pyx_GIVEREF(__pyx_t_4);
  4893. __pyx_t_4 = 0;
  4894. __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_val);
  4895. __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_val, __pyx_t_5);
  4896. __Pyx_GIVEREF(__pyx_t_5);
  4897. __pyx_t_5 = 0;
  4898. __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_name, __pyx_kp_u_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  4899. __Pyx_GOTREF(__pyx_t_3);
  4900. __pyx_t_5 = PyObject_Repr(__pyx_cur_scope->__pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error)
  4901. __Pyx_GOTREF(__pyx_t_5);
  4902. __pyx_t_4 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error)
  4903. __Pyx_GOTREF(__pyx_t_4);
  4904. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  4905. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  4906. if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 227, __pyx_L1_error)
  4907. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  4908. }
  4909. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4910. CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
  4911. /* function exit code */
  4912. goto __pyx_L0;
  4913. __pyx_L1_error:;
  4914. __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  4915. __Pyx_XDECREF(__pyx_t_1);
  4916. __Pyx_XDECREF(__pyx_t_3);
  4917. __Pyx_XDECREF(__pyx_t_4);
  4918. __Pyx_XDECREF(__pyx_t_5);
  4919. __Pyx_XDECREF(__pyx_t_6);
  4920. __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  4921. __pyx_L0:;
  4922. __Pyx_XGIVEREF(__pyx_r);
  4923. __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
  4924. __pyx_generator->resume_label = -1;
  4925. __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  4926. __Pyx_RefNannyFinishContext();
  4927. return __pyx_r;
  4928. }
  4929. /* "aiohttp/_http_parser.pyx":216
  4930. * self.chunked = chunked
  4931. *
  4932. * def __repr__(self): # <<<<<<<<<<<<<<
  4933. * info = []
  4934. * info.append(("version", self.version))
  4935. */
  4936. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_2__repr__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  4937. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *__pyx_cur_scope;
  4938. PyObject *__pyx_v_sinfo = NULL;
  4939. PyObject *__pyx_r = NULL;
  4940. __Pyx_RefNannyDeclarations
  4941. PyObject *__pyx_t_1 = NULL;
  4942. int __pyx_t_2;
  4943. PyObject *__pyx_t_3 = NULL;
  4944. __Pyx_RefNannySetupContext("__repr__", 0);
  4945. __pyx_cur_scope = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *)__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__(__pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__, __pyx_empty_tuple, NULL);
  4946. if (unlikely(!__pyx_cur_scope)) {
  4947. __pyx_cur_scope = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *)Py_None);
  4948. __Pyx_INCREF(Py_None);
  4949. __PYX_ERR(0, 216, __pyx_L1_error)
  4950. } else {
  4951. __Pyx_GOTREF(__pyx_cur_scope);
  4952. }
  4953. /* "aiohttp/_http_parser.pyx":217
  4954. *
  4955. * def __repr__(self):
  4956. * info = [] # <<<<<<<<<<<<<<
  4957. * info.append(("version", self.version))
  4958. * info.append(("code", self.code))
  4959. */
  4960. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  4961. __Pyx_GOTREF(__pyx_t_1);
  4962. __Pyx_GIVEREF(__pyx_t_1);
  4963. __pyx_cur_scope->__pyx_v_info = ((PyObject*)__pyx_t_1);
  4964. __pyx_t_1 = 0;
  4965. /* "aiohttp/_http_parser.pyx":218
  4966. * def __repr__(self):
  4967. * info = []
  4968. * info.append(("version", self.version)) # <<<<<<<<<<<<<<
  4969. * info.append(("code", self.code))
  4970. * info.append(("reason", self.reason))
  4971. */
  4972. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
  4973. __Pyx_GOTREF(__pyx_t_1);
  4974. __Pyx_INCREF(__pyx_n_u_version);
  4975. __Pyx_GIVEREF(__pyx_n_u_version);
  4976. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_n_u_version);
  4977. __Pyx_INCREF(__pyx_v_self->version);
  4978. __Pyx_GIVEREF(__pyx_v_self->version);
  4979. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->version);
  4980. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 218, __pyx_L1_error)
  4981. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  4982. /* "aiohttp/_http_parser.pyx":219
  4983. * info = []
  4984. * info.append(("version", self.version))
  4985. * info.append(("code", self.code)) # <<<<<<<<<<<<<<
  4986. * info.append(("reason", self.reason))
  4987. * info.append(("headers", self.headers))
  4988. */
  4989. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
  4990. __Pyx_GOTREF(__pyx_t_1);
  4991. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
  4992. __Pyx_GOTREF(__pyx_t_3);
  4993. __Pyx_INCREF(__pyx_n_u_code);
  4994. __Pyx_GIVEREF(__pyx_n_u_code);
  4995. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_code);
  4996. __Pyx_GIVEREF(__pyx_t_1);
  4997. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  4998. __pyx_t_1 = 0;
  4999. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L1_error)
  5000. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5001. /* "aiohttp/_http_parser.pyx":220
  5002. * info.append(("version", self.version))
  5003. * info.append(("code", self.code))
  5004. * info.append(("reason", self.reason)) # <<<<<<<<<<<<<<
  5005. * info.append(("headers", self.headers))
  5006. * info.append(("raw_headers", self.raw_headers))
  5007. */
  5008. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error)
  5009. __Pyx_GOTREF(__pyx_t_3);
  5010. __Pyx_INCREF(__pyx_n_u_reason);
  5011. __Pyx_GIVEREF(__pyx_n_u_reason);
  5012. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_reason);
  5013. __Pyx_INCREF(__pyx_v_self->reason);
  5014. __Pyx_GIVEREF(__pyx_v_self->reason);
  5015. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->reason);
  5016. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 220, __pyx_L1_error)
  5017. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5018. /* "aiohttp/_http_parser.pyx":221
  5019. * info.append(("code", self.code))
  5020. * info.append(("reason", self.reason))
  5021. * info.append(("headers", self.headers)) # <<<<<<<<<<<<<<
  5022. * info.append(("raw_headers", self.raw_headers))
  5023. * info.append(("should_close", self.should_close))
  5024. */
  5025. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
  5026. __Pyx_GOTREF(__pyx_t_3);
  5027. __Pyx_INCREF(__pyx_n_u_headers);
  5028. __Pyx_GIVEREF(__pyx_n_u_headers);
  5029. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_headers);
  5030. __Pyx_INCREF(__pyx_v_self->headers);
  5031. __Pyx_GIVEREF(__pyx_v_self->headers);
  5032. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->headers);
  5033. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 221, __pyx_L1_error)
  5034. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5035. /* "aiohttp/_http_parser.pyx":222
  5036. * info.append(("reason", self.reason))
  5037. * info.append(("headers", self.headers))
  5038. * info.append(("raw_headers", self.raw_headers)) # <<<<<<<<<<<<<<
  5039. * info.append(("should_close", self.should_close))
  5040. * info.append(("compression", self.compression))
  5041. */
  5042. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
  5043. __Pyx_GOTREF(__pyx_t_3);
  5044. __Pyx_INCREF(__pyx_n_u_raw_headers);
  5045. __Pyx_GIVEREF(__pyx_n_u_raw_headers);
  5046. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_raw_headers);
  5047. __Pyx_INCREF(__pyx_v_self->raw_headers);
  5048. __Pyx_GIVEREF(__pyx_v_self->raw_headers);
  5049. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->raw_headers);
  5050. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 222, __pyx_L1_error)
  5051. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5052. /* "aiohttp/_http_parser.pyx":223
  5053. * info.append(("headers", self.headers))
  5054. * info.append(("raw_headers", self.raw_headers))
  5055. * info.append(("should_close", self.should_close)) # <<<<<<<<<<<<<<
  5056. * info.append(("compression", self.compression))
  5057. * info.append(("upgrade", self.upgrade))
  5058. */
  5059. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error)
  5060. __Pyx_GOTREF(__pyx_t_3);
  5061. __Pyx_INCREF(__pyx_n_u_should_close);
  5062. __Pyx_GIVEREF(__pyx_n_u_should_close);
  5063. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_should_close);
  5064. __Pyx_INCREF(__pyx_v_self->should_close);
  5065. __Pyx_GIVEREF(__pyx_v_self->should_close);
  5066. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->should_close);
  5067. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 223, __pyx_L1_error)
  5068. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5069. /* "aiohttp/_http_parser.pyx":224
  5070. * info.append(("raw_headers", self.raw_headers))
  5071. * info.append(("should_close", self.should_close))
  5072. * info.append(("compression", self.compression)) # <<<<<<<<<<<<<<
  5073. * info.append(("upgrade", self.upgrade))
  5074. * info.append(("chunked", self.chunked))
  5075. */
  5076. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
  5077. __Pyx_GOTREF(__pyx_t_3);
  5078. __Pyx_INCREF(__pyx_n_u_compression);
  5079. __Pyx_GIVEREF(__pyx_n_u_compression);
  5080. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_compression);
  5081. __Pyx_INCREF(__pyx_v_self->compression);
  5082. __Pyx_GIVEREF(__pyx_v_self->compression);
  5083. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->compression);
  5084. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 224, __pyx_L1_error)
  5085. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5086. /* "aiohttp/_http_parser.pyx":225
  5087. * info.append(("should_close", self.should_close))
  5088. * info.append(("compression", self.compression))
  5089. * info.append(("upgrade", self.upgrade)) # <<<<<<<<<<<<<<
  5090. * info.append(("chunked", self.chunked))
  5091. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info)
  5092. */
  5093. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
  5094. __Pyx_GOTREF(__pyx_t_3);
  5095. __Pyx_INCREF(__pyx_n_u_upgrade);
  5096. __Pyx_GIVEREF(__pyx_n_u_upgrade);
  5097. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_upgrade);
  5098. __Pyx_INCREF(__pyx_v_self->upgrade);
  5099. __Pyx_GIVEREF(__pyx_v_self->upgrade);
  5100. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->upgrade);
  5101. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error)
  5102. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5103. /* "aiohttp/_http_parser.pyx":226
  5104. * info.append(("compression", self.compression))
  5105. * info.append(("upgrade", self.upgrade))
  5106. * info.append(("chunked", self.chunked)) # <<<<<<<<<<<<<<
  5107. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info)
  5108. * return '<RawResponseMessage(' + sinfo + ')>'
  5109. */
  5110. __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error)
  5111. __Pyx_GOTREF(__pyx_t_3);
  5112. __Pyx_INCREF(__pyx_n_u_chunked);
  5113. __Pyx_GIVEREF(__pyx_n_u_chunked);
  5114. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_chunked);
  5115. __Pyx_INCREF(__pyx_v_self->chunked);
  5116. __Pyx_GIVEREF(__pyx_v_self->chunked);
  5117. PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->chunked);
  5118. __pyx_t_2 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_info, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error)
  5119. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5120. /* "aiohttp/_http_parser.pyx":227
  5121. * info.append(("upgrade", self.upgrade))
  5122. * info.append(("chunked", self.chunked))
  5123. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info) # <<<<<<<<<<<<<<
  5124. * return '<RawResponseMessage(' + sinfo + ')>'
  5125. *
  5126. */
  5127. __pyx_t_3 = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_8__repr___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  5128. __Pyx_GOTREF(__pyx_t_3);
  5129. __pyx_t_1 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
  5130. __Pyx_GOTREF(__pyx_t_1);
  5131. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5132. __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error)
  5133. __Pyx_GOTREF(__pyx_t_3);
  5134. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5135. __pyx_v_sinfo = ((PyObject*)__pyx_t_3);
  5136. __pyx_t_3 = 0;
  5137. /* "aiohttp/_http_parser.pyx":228
  5138. * info.append(("chunked", self.chunked))
  5139. * sinfo = ', '.join(name + '=' + repr(val) for name, val in info)
  5140. * return '<RawResponseMessage(' + sinfo + ')>' # <<<<<<<<<<<<<<
  5141. *
  5142. *
  5143. */
  5144. __Pyx_XDECREF(__pyx_r);
  5145. __pyx_t_3 = __Pyx_PyUnicode_ConcatSafe(__pyx_kp_u_RawResponseMessage, __pyx_v_sinfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
  5146. __Pyx_GOTREF(__pyx_t_3);
  5147. __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_3, __pyx_kp_u__3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
  5148. __Pyx_GOTREF(__pyx_t_1);
  5149. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  5150. __pyx_r = __pyx_t_1;
  5151. __pyx_t_1 = 0;
  5152. goto __pyx_L0;
  5153. /* "aiohttp/_http_parser.pyx":216
  5154. * self.chunked = chunked
  5155. *
  5156. * def __repr__(self): # <<<<<<<<<<<<<<
  5157. * info = []
  5158. * info.append(("version", self.version))
  5159. */
  5160. /* function exit code */
  5161. __pyx_L1_error:;
  5162. __Pyx_XDECREF(__pyx_t_1);
  5163. __Pyx_XDECREF(__pyx_t_3);
  5164. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5165. __pyx_r = NULL;
  5166. __pyx_L0:;
  5167. __Pyx_XDECREF(__pyx_v_sinfo);
  5168. __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  5169. __Pyx_XGIVEREF(__pyx_r);
  5170. __Pyx_RefNannyFinishContext();
  5171. return __pyx_r;
  5172. }
  5173. /* "aiohttp/_http_parser.pyx":194
  5174. * @cython.freelist(DEFAULT_FREELIST_SIZE)
  5175. * cdef class RawResponseMessage:
  5176. * cdef readonly object version # HttpVersion # <<<<<<<<<<<<<<
  5177. * cdef readonly int code
  5178. * cdef readonly str reason
  5179. */
  5180. /* Python wrapper */
  5181. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7version_1__get__(PyObject *__pyx_v_self); /*proto*/
  5182. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7version_1__get__(PyObject *__pyx_v_self) {
  5183. PyObject *__pyx_r = 0;
  5184. __Pyx_RefNannyDeclarations
  5185. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5186. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7version___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5187. /* function exit code */
  5188. __Pyx_RefNannyFinishContext();
  5189. return __pyx_r;
  5190. }
  5191. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7version___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5192. PyObject *__pyx_r = NULL;
  5193. __Pyx_RefNannyDeclarations
  5194. __Pyx_RefNannySetupContext("__get__", 0);
  5195. __Pyx_XDECREF(__pyx_r);
  5196. __Pyx_INCREF(__pyx_v_self->version);
  5197. __pyx_r = __pyx_v_self->version;
  5198. goto __pyx_L0;
  5199. /* function exit code */
  5200. __pyx_L0:;
  5201. __Pyx_XGIVEREF(__pyx_r);
  5202. __Pyx_RefNannyFinishContext();
  5203. return __pyx_r;
  5204. }
  5205. /* "aiohttp/_http_parser.pyx":195
  5206. * cdef class RawResponseMessage:
  5207. * cdef readonly object version # HttpVersion
  5208. * cdef readonly int code # <<<<<<<<<<<<<<
  5209. * cdef readonly str reason
  5210. * cdef readonly object headers # CIMultiDict
  5211. */
  5212. /* Python wrapper */
  5213. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_4code_1__get__(PyObject *__pyx_v_self); /*proto*/
  5214. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_4code_1__get__(PyObject *__pyx_v_self) {
  5215. PyObject *__pyx_r = 0;
  5216. __Pyx_RefNannyDeclarations
  5217. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5218. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_4code___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5219. /* function exit code */
  5220. __Pyx_RefNannyFinishContext();
  5221. return __pyx_r;
  5222. }
  5223. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_4code___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5224. PyObject *__pyx_r = NULL;
  5225. __Pyx_RefNannyDeclarations
  5226. PyObject *__pyx_t_1 = NULL;
  5227. __Pyx_RefNannySetupContext("__get__", 0);
  5228. __Pyx_XDECREF(__pyx_r);
  5229. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error)
  5230. __Pyx_GOTREF(__pyx_t_1);
  5231. __pyx_r = __pyx_t_1;
  5232. __pyx_t_1 = 0;
  5233. goto __pyx_L0;
  5234. /* function exit code */
  5235. __pyx_L1_error:;
  5236. __Pyx_XDECREF(__pyx_t_1);
  5237. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.code.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5238. __pyx_r = NULL;
  5239. __pyx_L0:;
  5240. __Pyx_XGIVEREF(__pyx_r);
  5241. __Pyx_RefNannyFinishContext();
  5242. return __pyx_r;
  5243. }
  5244. /* "aiohttp/_http_parser.pyx":196
  5245. * cdef readonly object version # HttpVersion
  5246. * cdef readonly int code
  5247. * cdef readonly str reason # <<<<<<<<<<<<<<
  5248. * cdef readonly object headers # CIMultiDict
  5249. * cdef readonly object raw_headers # tuple
  5250. */
  5251. /* Python wrapper */
  5252. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_6reason_1__get__(PyObject *__pyx_v_self); /*proto*/
  5253. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_6reason_1__get__(PyObject *__pyx_v_self) {
  5254. PyObject *__pyx_r = 0;
  5255. __Pyx_RefNannyDeclarations
  5256. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5257. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_6reason___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5258. /* function exit code */
  5259. __Pyx_RefNannyFinishContext();
  5260. return __pyx_r;
  5261. }
  5262. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_6reason___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5263. PyObject *__pyx_r = NULL;
  5264. __Pyx_RefNannyDeclarations
  5265. __Pyx_RefNannySetupContext("__get__", 0);
  5266. __Pyx_XDECREF(__pyx_r);
  5267. __Pyx_INCREF(__pyx_v_self->reason);
  5268. __pyx_r = __pyx_v_self->reason;
  5269. goto __pyx_L0;
  5270. /* function exit code */
  5271. __pyx_L0:;
  5272. __Pyx_XGIVEREF(__pyx_r);
  5273. __Pyx_RefNannyFinishContext();
  5274. return __pyx_r;
  5275. }
  5276. /* "aiohttp/_http_parser.pyx":197
  5277. * cdef readonly int code
  5278. * cdef readonly str reason
  5279. * cdef readonly object headers # CIMultiDict # <<<<<<<<<<<<<<
  5280. * cdef readonly object raw_headers # tuple
  5281. * cdef readonly object should_close
  5282. */
  5283. /* Python wrapper */
  5284. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7headers_1__get__(PyObject *__pyx_v_self); /*proto*/
  5285. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7headers_1__get__(PyObject *__pyx_v_self) {
  5286. PyObject *__pyx_r = 0;
  5287. __Pyx_RefNannyDeclarations
  5288. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5289. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7headers___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5290. /* function exit code */
  5291. __Pyx_RefNannyFinishContext();
  5292. return __pyx_r;
  5293. }
  5294. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5295. PyObject *__pyx_r = NULL;
  5296. __Pyx_RefNannyDeclarations
  5297. __Pyx_RefNannySetupContext("__get__", 0);
  5298. __Pyx_XDECREF(__pyx_r);
  5299. __Pyx_INCREF(__pyx_v_self->headers);
  5300. __pyx_r = __pyx_v_self->headers;
  5301. goto __pyx_L0;
  5302. /* function exit code */
  5303. __pyx_L0:;
  5304. __Pyx_XGIVEREF(__pyx_r);
  5305. __Pyx_RefNannyFinishContext();
  5306. return __pyx_r;
  5307. }
  5308. /* "aiohttp/_http_parser.pyx":198
  5309. * cdef readonly str reason
  5310. * cdef readonly object headers # CIMultiDict
  5311. * cdef readonly object raw_headers # tuple # <<<<<<<<<<<<<<
  5312. * cdef readonly object should_close
  5313. * cdef readonly object compression
  5314. */
  5315. /* Python wrapper */
  5316. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_11raw_headers_1__get__(PyObject *__pyx_v_self); /*proto*/
  5317. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_11raw_headers_1__get__(PyObject *__pyx_v_self) {
  5318. PyObject *__pyx_r = 0;
  5319. __Pyx_RefNannyDeclarations
  5320. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5321. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_11raw_headers___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5322. /* function exit code */
  5323. __Pyx_RefNannyFinishContext();
  5324. return __pyx_r;
  5325. }
  5326. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_11raw_headers___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5327. PyObject *__pyx_r = NULL;
  5328. __Pyx_RefNannyDeclarations
  5329. __Pyx_RefNannySetupContext("__get__", 0);
  5330. __Pyx_XDECREF(__pyx_r);
  5331. __Pyx_INCREF(__pyx_v_self->raw_headers);
  5332. __pyx_r = __pyx_v_self->raw_headers;
  5333. goto __pyx_L0;
  5334. /* function exit code */
  5335. __pyx_L0:;
  5336. __Pyx_XGIVEREF(__pyx_r);
  5337. __Pyx_RefNannyFinishContext();
  5338. return __pyx_r;
  5339. }
  5340. /* "aiohttp/_http_parser.pyx":199
  5341. * cdef readonly object headers # CIMultiDict
  5342. * cdef readonly object raw_headers # tuple
  5343. * cdef readonly object should_close # <<<<<<<<<<<<<<
  5344. * cdef readonly object compression
  5345. * cdef readonly object upgrade
  5346. */
  5347. /* Python wrapper */
  5348. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_12should_close_1__get__(PyObject *__pyx_v_self); /*proto*/
  5349. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_12should_close_1__get__(PyObject *__pyx_v_self) {
  5350. PyObject *__pyx_r = 0;
  5351. __Pyx_RefNannyDeclarations
  5352. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5353. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_12should_close___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5354. /* function exit code */
  5355. __Pyx_RefNannyFinishContext();
  5356. return __pyx_r;
  5357. }
  5358. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_12should_close___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5359. PyObject *__pyx_r = NULL;
  5360. __Pyx_RefNannyDeclarations
  5361. __Pyx_RefNannySetupContext("__get__", 0);
  5362. __Pyx_XDECREF(__pyx_r);
  5363. __Pyx_INCREF(__pyx_v_self->should_close);
  5364. __pyx_r = __pyx_v_self->should_close;
  5365. goto __pyx_L0;
  5366. /* function exit code */
  5367. __pyx_L0:;
  5368. __Pyx_XGIVEREF(__pyx_r);
  5369. __Pyx_RefNannyFinishContext();
  5370. return __pyx_r;
  5371. }
  5372. /* "aiohttp/_http_parser.pyx":200
  5373. * cdef readonly object raw_headers # tuple
  5374. * cdef readonly object should_close
  5375. * cdef readonly object compression # <<<<<<<<<<<<<<
  5376. * cdef readonly object upgrade
  5377. * cdef readonly object chunked
  5378. */
  5379. /* Python wrapper */
  5380. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_11compression_1__get__(PyObject *__pyx_v_self); /*proto*/
  5381. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_11compression_1__get__(PyObject *__pyx_v_self) {
  5382. PyObject *__pyx_r = 0;
  5383. __Pyx_RefNannyDeclarations
  5384. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5385. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_11compression___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5386. /* function exit code */
  5387. __Pyx_RefNannyFinishContext();
  5388. return __pyx_r;
  5389. }
  5390. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_11compression___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5391. PyObject *__pyx_r = NULL;
  5392. __Pyx_RefNannyDeclarations
  5393. __Pyx_RefNannySetupContext("__get__", 0);
  5394. __Pyx_XDECREF(__pyx_r);
  5395. __Pyx_INCREF(__pyx_v_self->compression);
  5396. __pyx_r = __pyx_v_self->compression;
  5397. goto __pyx_L0;
  5398. /* function exit code */
  5399. __pyx_L0:;
  5400. __Pyx_XGIVEREF(__pyx_r);
  5401. __Pyx_RefNannyFinishContext();
  5402. return __pyx_r;
  5403. }
  5404. /* "aiohttp/_http_parser.pyx":201
  5405. * cdef readonly object should_close
  5406. * cdef readonly object compression
  5407. * cdef readonly object upgrade # <<<<<<<<<<<<<<
  5408. * cdef readonly object chunked
  5409. *
  5410. */
  5411. /* Python wrapper */
  5412. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7upgrade_1__get__(PyObject *__pyx_v_self); /*proto*/
  5413. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7upgrade_1__get__(PyObject *__pyx_v_self) {
  5414. PyObject *__pyx_r = 0;
  5415. __Pyx_RefNannyDeclarations
  5416. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5417. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7upgrade___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5418. /* function exit code */
  5419. __Pyx_RefNannyFinishContext();
  5420. return __pyx_r;
  5421. }
  5422. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7upgrade___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5423. PyObject *__pyx_r = NULL;
  5424. __Pyx_RefNannyDeclarations
  5425. __Pyx_RefNannySetupContext("__get__", 0);
  5426. __Pyx_XDECREF(__pyx_r);
  5427. __Pyx_INCREF(__pyx_v_self->upgrade);
  5428. __pyx_r = __pyx_v_self->upgrade;
  5429. goto __pyx_L0;
  5430. /* function exit code */
  5431. __pyx_L0:;
  5432. __Pyx_XGIVEREF(__pyx_r);
  5433. __Pyx_RefNannyFinishContext();
  5434. return __pyx_r;
  5435. }
  5436. /* "aiohttp/_http_parser.pyx":202
  5437. * cdef readonly object compression
  5438. * cdef readonly object upgrade
  5439. * cdef readonly object chunked # <<<<<<<<<<<<<<
  5440. *
  5441. * def __init__(self, version, code, reason, headers, raw_headers,
  5442. */
  5443. /* Python wrapper */
  5444. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7chunked_1__get__(PyObject *__pyx_v_self); /*proto*/
  5445. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7chunked_1__get__(PyObject *__pyx_v_self) {
  5446. PyObject *__pyx_r = 0;
  5447. __Pyx_RefNannyDeclarations
  5448. __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  5449. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7chunked___get__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5450. /* function exit code */
  5451. __Pyx_RefNannyFinishContext();
  5452. return __pyx_r;
  5453. }
  5454. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_7chunked___get__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5455. PyObject *__pyx_r = NULL;
  5456. __Pyx_RefNannyDeclarations
  5457. __Pyx_RefNannySetupContext("__get__", 0);
  5458. __Pyx_XDECREF(__pyx_r);
  5459. __Pyx_INCREF(__pyx_v_self->chunked);
  5460. __pyx_r = __pyx_v_self->chunked;
  5461. goto __pyx_L0;
  5462. /* function exit code */
  5463. __pyx_L0:;
  5464. __Pyx_XGIVEREF(__pyx_r);
  5465. __Pyx_RefNannyFinishContext();
  5466. return __pyx_r;
  5467. }
  5468. /* "(tree fragment)":1
  5469. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  5470. * cdef bint use_setstate
  5471. * state = (self.chunked, self.code, self.compression, self.headers, self.raw_headers, self.reason, self.should_close, self.upgrade, self.version)
  5472. */
  5473. /* Python wrapper */
  5474. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  5475. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  5476. PyObject *__pyx_r = 0;
  5477. __Pyx_RefNannyDeclarations
  5478. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  5479. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_4__reduce_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self));
  5480. /* function exit code */
  5481. __Pyx_RefNannyFinishContext();
  5482. return __pyx_r;
  5483. }
  5484. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_4__reduce_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self) {
  5485. int __pyx_v_use_setstate;
  5486. PyObject *__pyx_v_state = NULL;
  5487. PyObject *__pyx_v__dict = NULL;
  5488. PyObject *__pyx_r = NULL;
  5489. __Pyx_RefNannyDeclarations
  5490. PyObject *__pyx_t_1 = NULL;
  5491. PyObject *__pyx_t_2 = NULL;
  5492. int __pyx_t_3;
  5493. int __pyx_t_4;
  5494. int __pyx_t_5;
  5495. PyObject *__pyx_t_6 = NULL;
  5496. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  5497. /* "(tree fragment)":3
  5498. * def __reduce_cython__(self):
  5499. * cdef bint use_setstate
  5500. * state = (self.chunked, self.code, self.compression, self.headers, self.raw_headers, self.reason, self.should_close, self.upgrade, self.version) # <<<<<<<<<<<<<<
  5501. * _dict = getattr(self, '__dict__', None)
  5502. * if _dict is not None:
  5503. */
  5504. __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->code); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 3, __pyx_L1_error)
  5505. __Pyx_GOTREF(__pyx_t_1);
  5506. __pyx_t_2 = PyTuple_New(9); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  5507. __Pyx_GOTREF(__pyx_t_2);
  5508. __Pyx_INCREF(__pyx_v_self->chunked);
  5509. __Pyx_GIVEREF(__pyx_v_self->chunked);
  5510. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->chunked);
  5511. __Pyx_GIVEREF(__pyx_t_1);
  5512. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  5513. __Pyx_INCREF(__pyx_v_self->compression);
  5514. __Pyx_GIVEREF(__pyx_v_self->compression);
  5515. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->compression);
  5516. __Pyx_INCREF(__pyx_v_self->headers);
  5517. __Pyx_GIVEREF(__pyx_v_self->headers);
  5518. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_self->headers);
  5519. __Pyx_INCREF(__pyx_v_self->raw_headers);
  5520. __Pyx_GIVEREF(__pyx_v_self->raw_headers);
  5521. PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v_self->raw_headers);
  5522. __Pyx_INCREF(__pyx_v_self->reason);
  5523. __Pyx_GIVEREF(__pyx_v_self->reason);
  5524. PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_v_self->reason);
  5525. __Pyx_INCREF(__pyx_v_self->should_close);
  5526. __Pyx_GIVEREF(__pyx_v_self->should_close);
  5527. PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_v_self->should_close);
  5528. __Pyx_INCREF(__pyx_v_self->upgrade);
  5529. __Pyx_GIVEREF(__pyx_v_self->upgrade);
  5530. PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_v_self->upgrade);
  5531. __Pyx_INCREF(__pyx_v_self->version);
  5532. __Pyx_GIVEREF(__pyx_v_self->version);
  5533. PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_v_self->version);
  5534. __pyx_t_1 = 0;
  5535. __pyx_v_state = ((PyObject*)__pyx_t_2);
  5536. __pyx_t_2 = 0;
  5537. /* "(tree fragment)":4
  5538. * cdef bint use_setstate
  5539. * state = (self.chunked, self.code, self.compression, self.headers, self.raw_headers, self.reason, self.should_close, self.upgrade, self.version)
  5540. * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
  5541. * if _dict is not None:
  5542. * state += (_dict,)
  5543. */
  5544. __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)
  5545. __Pyx_GOTREF(__pyx_t_2);
  5546. __pyx_v__dict = __pyx_t_2;
  5547. __pyx_t_2 = 0;
  5548. /* "(tree fragment)":5
  5549. * state = (self.chunked, self.code, self.compression, self.headers, self.raw_headers, self.reason, self.should_close, self.upgrade, self.version)
  5550. * _dict = getattr(self, '__dict__', None)
  5551. * if _dict is not None: # <<<<<<<<<<<<<<
  5552. * state += (_dict,)
  5553. * use_setstate = True
  5554. */
  5555. __pyx_t_3 = (__pyx_v__dict != Py_None);
  5556. __pyx_t_4 = (__pyx_t_3 != 0);
  5557. if (__pyx_t_4) {
  5558. /* "(tree fragment)":6
  5559. * _dict = getattr(self, '__dict__', None)
  5560. * if _dict is not None:
  5561. * state += (_dict,) # <<<<<<<<<<<<<<
  5562. * use_setstate = True
  5563. * else:
  5564. */
  5565. __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
  5566. __Pyx_GOTREF(__pyx_t_2);
  5567. __Pyx_INCREF(__pyx_v__dict);
  5568. __Pyx_GIVEREF(__pyx_v__dict);
  5569. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__dict);
  5570. __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  5571. __Pyx_GOTREF(__pyx_t_1);
  5572. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  5573. __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_1));
  5574. __pyx_t_1 = 0;
  5575. /* "(tree fragment)":7
  5576. * if _dict is not None:
  5577. * state += (_dict,)
  5578. * use_setstate = True # <<<<<<<<<<<<<<
  5579. * else:
  5580. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.raw_headers is not None or self.reason is not None or self.should_close is not None or self.upgrade is not None or self.version is not None
  5581. */
  5582. __pyx_v_use_setstate = 1;
  5583. /* "(tree fragment)":5
  5584. * state = (self.chunked, self.code, self.compression, self.headers, self.raw_headers, self.reason, self.should_close, self.upgrade, self.version)
  5585. * _dict = getattr(self, '__dict__', None)
  5586. * if _dict is not None: # <<<<<<<<<<<<<<
  5587. * state += (_dict,)
  5588. * use_setstate = True
  5589. */
  5590. goto __pyx_L3;
  5591. }
  5592. /* "(tree fragment)":9
  5593. * use_setstate = True
  5594. * else:
  5595. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.raw_headers is not None or self.reason is not None or self.should_close is not None or self.upgrade is not None or self.version is not None # <<<<<<<<<<<<<<
  5596. * if use_setstate:
  5597. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, None), state
  5598. */
  5599. /*else*/ {
  5600. __pyx_t_3 = (__pyx_v_self->chunked != Py_None);
  5601. __pyx_t_5 = (__pyx_t_3 != 0);
  5602. if (!__pyx_t_5) {
  5603. } else {
  5604. __pyx_t_4 = __pyx_t_5;
  5605. goto __pyx_L4_bool_binop_done;
  5606. }
  5607. __pyx_t_5 = (__pyx_v_self->compression != Py_None);
  5608. __pyx_t_3 = (__pyx_t_5 != 0);
  5609. if (!__pyx_t_3) {
  5610. } else {
  5611. __pyx_t_4 = __pyx_t_3;
  5612. goto __pyx_L4_bool_binop_done;
  5613. }
  5614. __pyx_t_3 = (__pyx_v_self->headers != Py_None);
  5615. __pyx_t_5 = (__pyx_t_3 != 0);
  5616. if (!__pyx_t_5) {
  5617. } else {
  5618. __pyx_t_4 = __pyx_t_5;
  5619. goto __pyx_L4_bool_binop_done;
  5620. }
  5621. __pyx_t_5 = (__pyx_v_self->raw_headers != Py_None);
  5622. __pyx_t_3 = (__pyx_t_5 != 0);
  5623. if (!__pyx_t_3) {
  5624. } else {
  5625. __pyx_t_4 = __pyx_t_3;
  5626. goto __pyx_L4_bool_binop_done;
  5627. }
  5628. __pyx_t_3 = (__pyx_v_self->reason != ((PyObject*)Py_None));
  5629. __pyx_t_5 = (__pyx_t_3 != 0);
  5630. if (!__pyx_t_5) {
  5631. } else {
  5632. __pyx_t_4 = __pyx_t_5;
  5633. goto __pyx_L4_bool_binop_done;
  5634. }
  5635. __pyx_t_5 = (__pyx_v_self->should_close != Py_None);
  5636. __pyx_t_3 = (__pyx_t_5 != 0);
  5637. if (!__pyx_t_3) {
  5638. } else {
  5639. __pyx_t_4 = __pyx_t_3;
  5640. goto __pyx_L4_bool_binop_done;
  5641. }
  5642. __pyx_t_3 = (__pyx_v_self->upgrade != Py_None);
  5643. __pyx_t_5 = (__pyx_t_3 != 0);
  5644. if (!__pyx_t_5) {
  5645. } else {
  5646. __pyx_t_4 = __pyx_t_5;
  5647. goto __pyx_L4_bool_binop_done;
  5648. }
  5649. __pyx_t_5 = (__pyx_v_self->version != Py_None);
  5650. __pyx_t_3 = (__pyx_t_5 != 0);
  5651. __pyx_t_4 = __pyx_t_3;
  5652. __pyx_L4_bool_binop_done:;
  5653. __pyx_v_use_setstate = __pyx_t_4;
  5654. }
  5655. __pyx_L3:;
  5656. /* "(tree fragment)":10
  5657. * else:
  5658. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.raw_headers is not None or self.reason is not None or self.should_close is not None or self.upgrade is not None or self.version is not None
  5659. * if use_setstate: # <<<<<<<<<<<<<<
  5660. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, None), state
  5661. * else:
  5662. */
  5663. __pyx_t_4 = (__pyx_v_use_setstate != 0);
  5664. if (__pyx_t_4) {
  5665. /* "(tree fragment)":11
  5666. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.raw_headers is not None or self.reason is not None or self.should_close is not None or self.upgrade is not None or self.version is not None
  5667. * if use_setstate:
  5668. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, None), state # <<<<<<<<<<<<<<
  5669. * else:
  5670. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, state)
  5671. */
  5672. __Pyx_XDECREF(__pyx_r);
  5673. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_RawResponseMessag); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 11, __pyx_L1_error)
  5674. __Pyx_GOTREF(__pyx_t_1);
  5675. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 11, __pyx_L1_error)
  5676. __Pyx_GOTREF(__pyx_t_2);
  5677. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  5678. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  5679. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  5680. __Pyx_INCREF(__pyx_int_209127132);
  5681. __Pyx_GIVEREF(__pyx_int_209127132);
  5682. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_209127132);
  5683. __Pyx_INCREF(Py_None);
  5684. __Pyx_GIVEREF(Py_None);
  5685. PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None);
  5686. __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 11, __pyx_L1_error)
  5687. __Pyx_GOTREF(__pyx_t_6);
  5688. __Pyx_GIVEREF(__pyx_t_1);
  5689. PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  5690. __Pyx_GIVEREF(__pyx_t_2);
  5691. PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  5692. __Pyx_INCREF(__pyx_v_state);
  5693. __Pyx_GIVEREF(__pyx_v_state);
  5694. PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_state);
  5695. __pyx_t_1 = 0;
  5696. __pyx_t_2 = 0;
  5697. __pyx_r = __pyx_t_6;
  5698. __pyx_t_6 = 0;
  5699. goto __pyx_L0;
  5700. /* "(tree fragment)":10
  5701. * else:
  5702. * use_setstate = self.chunked is not None or self.compression is not None or self.headers is not None or self.raw_headers is not None or self.reason is not None or self.should_close is not None or self.upgrade is not None or self.version is not None
  5703. * if use_setstate: # <<<<<<<<<<<<<<
  5704. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, None), state
  5705. * else:
  5706. */
  5707. }
  5708. /* "(tree fragment)":13
  5709. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, None), state
  5710. * else:
  5711. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, state) # <<<<<<<<<<<<<<
  5712. * def __setstate_cython__(self, __pyx_state):
  5713. * __pyx_unpickle_RawResponseMessage__set_state(self, __pyx_state)
  5714. */
  5715. /*else*/ {
  5716. __Pyx_XDECREF(__pyx_r);
  5717. __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_RawResponseMessag); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
  5718. __Pyx_GOTREF(__pyx_t_6);
  5719. __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 13, __pyx_L1_error)
  5720. __Pyx_GOTREF(__pyx_t_2);
  5721. __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  5722. __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  5723. PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
  5724. __Pyx_INCREF(__pyx_int_209127132);
  5725. __Pyx_GIVEREF(__pyx_int_209127132);
  5726. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_209127132);
  5727. __Pyx_INCREF(__pyx_v_state);
  5728. __Pyx_GIVEREF(__pyx_v_state);
  5729. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_state);
  5730. __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
  5731. __Pyx_GOTREF(__pyx_t_1);
  5732. __Pyx_GIVEREF(__pyx_t_6);
  5733. PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6);
  5734. __Pyx_GIVEREF(__pyx_t_2);
  5735. PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  5736. __pyx_t_6 = 0;
  5737. __pyx_t_2 = 0;
  5738. __pyx_r = __pyx_t_1;
  5739. __pyx_t_1 = 0;
  5740. goto __pyx_L0;
  5741. }
  5742. /* "(tree fragment)":1
  5743. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  5744. * cdef bint use_setstate
  5745. * state = (self.chunked, self.code, self.compression, self.headers, self.raw_headers, self.reason, self.should_close, self.upgrade, self.version)
  5746. */
  5747. /* function exit code */
  5748. __pyx_L1_error:;
  5749. __Pyx_XDECREF(__pyx_t_1);
  5750. __Pyx_XDECREF(__pyx_t_2);
  5751. __Pyx_XDECREF(__pyx_t_6);
  5752. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5753. __pyx_r = NULL;
  5754. __pyx_L0:;
  5755. __Pyx_XDECREF(__pyx_v_state);
  5756. __Pyx_XDECREF(__pyx_v__dict);
  5757. __Pyx_XGIVEREF(__pyx_r);
  5758. __Pyx_RefNannyFinishContext();
  5759. return __pyx_r;
  5760. }
  5761. /* "(tree fragment)":14
  5762. * else:
  5763. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, state)
  5764. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  5765. * __pyx_unpickle_RawResponseMessage__set_state(self, __pyx_state)
  5766. */
  5767. /* Python wrapper */
  5768. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  5769. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  5770. PyObject *__pyx_r = 0;
  5771. __Pyx_RefNannyDeclarations
  5772. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  5773. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_6__setstate_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  5774. /* function exit code */
  5775. __Pyx_RefNannyFinishContext();
  5776. return __pyx_r;
  5777. }
  5778. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18RawResponseMessage_6__setstate_cython__(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  5779. PyObject *__pyx_r = NULL;
  5780. __Pyx_RefNannyDeclarations
  5781. PyObject *__pyx_t_1 = NULL;
  5782. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  5783. /* "(tree fragment)":15
  5784. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, state)
  5785. * def __setstate_cython__(self, __pyx_state):
  5786. * __pyx_unpickle_RawResponseMessage__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
  5787. */
  5788. 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)
  5789. __pyx_t_1 = __pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawResponseMessage__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
  5790. __Pyx_GOTREF(__pyx_t_1);
  5791. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  5792. /* "(tree fragment)":14
  5793. * else:
  5794. * return __pyx_unpickle_RawResponseMessage, (type(self), 0xc7706dc, state)
  5795. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  5796. * __pyx_unpickle_RawResponseMessage__set_state(self, __pyx_state)
  5797. */
  5798. /* function exit code */
  5799. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  5800. goto __pyx_L0;
  5801. __pyx_L1_error:;
  5802. __Pyx_XDECREF(__pyx_t_1);
  5803. __Pyx_AddTraceback("aiohttp._http_parser.RawResponseMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5804. __pyx_r = NULL;
  5805. __pyx_L0:;
  5806. __Pyx_XGIVEREF(__pyx_r);
  5807. __Pyx_RefNannyFinishContext();
  5808. return __pyx_r;
  5809. }
  5810. /* "aiohttp/_http_parser.pyx":231
  5811. *
  5812. *
  5813. * cdef _new_response_message(object version, # <<<<<<<<<<<<<<
  5814. * int code,
  5815. * str reason,
  5816. */
  5817. static PyObject *__pyx_f_7aiohttp_12_http_parser__new_response_message(PyObject *__pyx_v_version, int __pyx_v_code, PyObject *__pyx_v_reason, PyObject *__pyx_v_headers, PyObject *__pyx_v_raw_headers, int __pyx_v_should_close, PyObject *__pyx_v_compression, int __pyx_v_upgrade, int __pyx_v_chunked) {
  5818. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v_ret = 0;
  5819. PyObject *__pyx_r = NULL;
  5820. __Pyx_RefNannyDeclarations
  5821. PyObject *__pyx_t_1 = NULL;
  5822. __Pyx_RefNannySetupContext("_new_response_message", 0);
  5823. /* "aiohttp/_http_parser.pyx":241
  5824. * bint chunked):
  5825. * cdef RawResponseMessage ret
  5826. * ret = RawResponseMessage.__new__(RawResponseMessage) # <<<<<<<<<<<<<<
  5827. * ret.version = version
  5828. * ret.code = code
  5829. */
  5830. __pyx_t_1 = ((PyObject *)__pyx_tp_new_7aiohttp_12_http_parser_RawResponseMessage(((PyTypeObject *)__pyx_ptype_7aiohttp_12_http_parser_RawResponseMessage), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
  5831. __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  5832. __pyx_v_ret = ((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_t_1);
  5833. __pyx_t_1 = 0;
  5834. /* "aiohttp/_http_parser.pyx":242
  5835. * cdef RawResponseMessage ret
  5836. * ret = RawResponseMessage.__new__(RawResponseMessage)
  5837. * ret.version = version # <<<<<<<<<<<<<<
  5838. * ret.code = code
  5839. * ret.reason = reason
  5840. */
  5841. __Pyx_INCREF(__pyx_v_version);
  5842. __Pyx_GIVEREF(__pyx_v_version);
  5843. __Pyx_GOTREF(__pyx_v_ret->version);
  5844. __Pyx_DECREF(__pyx_v_ret->version);
  5845. __pyx_v_ret->version = __pyx_v_version;
  5846. /* "aiohttp/_http_parser.pyx":243
  5847. * ret = RawResponseMessage.__new__(RawResponseMessage)
  5848. * ret.version = version
  5849. * ret.code = code # <<<<<<<<<<<<<<
  5850. * ret.reason = reason
  5851. * ret.headers = headers
  5852. */
  5853. __pyx_v_ret->code = __pyx_v_code;
  5854. /* "aiohttp/_http_parser.pyx":244
  5855. * ret.version = version
  5856. * ret.code = code
  5857. * ret.reason = reason # <<<<<<<<<<<<<<
  5858. * ret.headers = headers
  5859. * ret.raw_headers = raw_headers
  5860. */
  5861. __Pyx_INCREF(__pyx_v_reason);
  5862. __Pyx_GIVEREF(__pyx_v_reason);
  5863. __Pyx_GOTREF(__pyx_v_ret->reason);
  5864. __Pyx_DECREF(__pyx_v_ret->reason);
  5865. __pyx_v_ret->reason = __pyx_v_reason;
  5866. /* "aiohttp/_http_parser.pyx":245
  5867. * ret.code = code
  5868. * ret.reason = reason
  5869. * ret.headers = headers # <<<<<<<<<<<<<<
  5870. * ret.raw_headers = raw_headers
  5871. * ret.should_close = should_close
  5872. */
  5873. __Pyx_INCREF(__pyx_v_headers);
  5874. __Pyx_GIVEREF(__pyx_v_headers);
  5875. __Pyx_GOTREF(__pyx_v_ret->headers);
  5876. __Pyx_DECREF(__pyx_v_ret->headers);
  5877. __pyx_v_ret->headers = __pyx_v_headers;
  5878. /* "aiohttp/_http_parser.pyx":246
  5879. * ret.reason = reason
  5880. * ret.headers = headers
  5881. * ret.raw_headers = raw_headers # <<<<<<<<<<<<<<
  5882. * ret.should_close = should_close
  5883. * ret.compression = compression
  5884. */
  5885. __Pyx_INCREF(__pyx_v_raw_headers);
  5886. __Pyx_GIVEREF(__pyx_v_raw_headers);
  5887. __Pyx_GOTREF(__pyx_v_ret->raw_headers);
  5888. __Pyx_DECREF(__pyx_v_ret->raw_headers);
  5889. __pyx_v_ret->raw_headers = __pyx_v_raw_headers;
  5890. /* "aiohttp/_http_parser.pyx":247
  5891. * ret.headers = headers
  5892. * ret.raw_headers = raw_headers
  5893. * ret.should_close = should_close # <<<<<<<<<<<<<<
  5894. * ret.compression = compression
  5895. * ret.upgrade = upgrade
  5896. */
  5897. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_should_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
  5898. __Pyx_GOTREF(__pyx_t_1);
  5899. __Pyx_GIVEREF(__pyx_t_1);
  5900. __Pyx_GOTREF(__pyx_v_ret->should_close);
  5901. __Pyx_DECREF(__pyx_v_ret->should_close);
  5902. __pyx_v_ret->should_close = __pyx_t_1;
  5903. __pyx_t_1 = 0;
  5904. /* "aiohttp/_http_parser.pyx":248
  5905. * ret.raw_headers = raw_headers
  5906. * ret.should_close = should_close
  5907. * ret.compression = compression # <<<<<<<<<<<<<<
  5908. * ret.upgrade = upgrade
  5909. * ret.chunked = chunked
  5910. */
  5911. __Pyx_INCREF(__pyx_v_compression);
  5912. __Pyx_GIVEREF(__pyx_v_compression);
  5913. __Pyx_GOTREF(__pyx_v_ret->compression);
  5914. __Pyx_DECREF(__pyx_v_ret->compression);
  5915. __pyx_v_ret->compression = __pyx_v_compression;
  5916. /* "aiohttp/_http_parser.pyx":249
  5917. * ret.should_close = should_close
  5918. * ret.compression = compression
  5919. * ret.upgrade = upgrade # <<<<<<<<<<<<<<
  5920. * ret.chunked = chunked
  5921. * return ret
  5922. */
  5923. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_upgrade); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
  5924. __Pyx_GOTREF(__pyx_t_1);
  5925. __Pyx_GIVEREF(__pyx_t_1);
  5926. __Pyx_GOTREF(__pyx_v_ret->upgrade);
  5927. __Pyx_DECREF(__pyx_v_ret->upgrade);
  5928. __pyx_v_ret->upgrade = __pyx_t_1;
  5929. __pyx_t_1 = 0;
  5930. /* "aiohttp/_http_parser.pyx":250
  5931. * ret.compression = compression
  5932. * ret.upgrade = upgrade
  5933. * ret.chunked = chunked # <<<<<<<<<<<<<<
  5934. * return ret
  5935. *
  5936. */
  5937. __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_chunked); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
  5938. __Pyx_GOTREF(__pyx_t_1);
  5939. __Pyx_GIVEREF(__pyx_t_1);
  5940. __Pyx_GOTREF(__pyx_v_ret->chunked);
  5941. __Pyx_DECREF(__pyx_v_ret->chunked);
  5942. __pyx_v_ret->chunked = __pyx_t_1;
  5943. __pyx_t_1 = 0;
  5944. /* "aiohttp/_http_parser.pyx":251
  5945. * ret.upgrade = upgrade
  5946. * ret.chunked = chunked
  5947. * return ret # <<<<<<<<<<<<<<
  5948. *
  5949. *
  5950. */
  5951. __Pyx_XDECREF(__pyx_r);
  5952. __Pyx_INCREF(((PyObject *)__pyx_v_ret));
  5953. __pyx_r = ((PyObject *)__pyx_v_ret);
  5954. goto __pyx_L0;
  5955. /* "aiohttp/_http_parser.pyx":231
  5956. *
  5957. *
  5958. * cdef _new_response_message(object version, # <<<<<<<<<<<<<<
  5959. * int code,
  5960. * str reason,
  5961. */
  5962. /* function exit code */
  5963. __pyx_L1_error:;
  5964. __Pyx_XDECREF(__pyx_t_1);
  5965. __Pyx_AddTraceback("aiohttp._http_parser._new_response_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
  5966. __pyx_r = 0;
  5967. __pyx_L0:;
  5968. __Pyx_XDECREF((PyObject *)__pyx_v_ret);
  5969. __Pyx_XGIVEREF(__pyx_r);
  5970. __Pyx_RefNannyFinishContext();
  5971. return __pyx_r;
  5972. }
  5973. /* "aiohttp/_http_parser.pyx":293
  5974. * Py_buffer py_buf
  5975. *
  5976. * def __cinit__(self): # <<<<<<<<<<<<<<
  5977. * self._cparser = <cparser.http_parser*> \
  5978. * PyMem_Malloc(sizeof(cparser.http_parser))
  5979. */
  5980. /* Python wrapper */
  5981. static int __pyx_pw_7aiohttp_12_http_parser_10HttpParser_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  5982. static int __pyx_pw_7aiohttp_12_http_parser_10HttpParser_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  5983. int __pyx_r;
  5984. __Pyx_RefNannyDeclarations
  5985. __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  5986. if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
  5987. __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  5988. if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  5989. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_10HttpParser___cinit__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self));
  5990. /* function exit code */
  5991. __Pyx_RefNannyFinishContext();
  5992. return __pyx_r;
  5993. }
  5994. static int __pyx_pf_7aiohttp_12_http_parser_10HttpParser___cinit__(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  5995. int __pyx_r;
  5996. __Pyx_RefNannyDeclarations
  5997. int __pyx_t_1;
  5998. __Pyx_RefNannySetupContext("__cinit__", 0);
  5999. /* "aiohttp/_http_parser.pyx":294
  6000. *
  6001. * def __cinit__(self):
  6002. * self._cparser = <cparser.http_parser*> \ # <<<<<<<<<<<<<<
  6003. * PyMem_Malloc(sizeof(cparser.http_parser))
  6004. * if self._cparser is NULL:
  6005. */
  6006. __pyx_v_self->_cparser = ((struct http_parser *)PyMem_Malloc((sizeof(struct http_parser))));
  6007. /* "aiohttp/_http_parser.pyx":296
  6008. * self._cparser = <cparser.http_parser*> \
  6009. * PyMem_Malloc(sizeof(cparser.http_parser))
  6010. * if self._cparser is NULL: # <<<<<<<<<<<<<<
  6011. * raise MemoryError()
  6012. *
  6013. */
  6014. __pyx_t_1 = ((__pyx_v_self->_cparser == NULL) != 0);
  6015. if (unlikely(__pyx_t_1)) {
  6016. /* "aiohttp/_http_parser.pyx":297
  6017. * PyMem_Malloc(sizeof(cparser.http_parser))
  6018. * if self._cparser is NULL:
  6019. * raise MemoryError() # <<<<<<<<<<<<<<
  6020. *
  6021. * self._csettings = <cparser.http_parser_settings*> \
  6022. */
  6023. PyErr_NoMemory(); __PYX_ERR(0, 297, __pyx_L1_error)
  6024. /* "aiohttp/_http_parser.pyx":296
  6025. * self._cparser = <cparser.http_parser*> \
  6026. * PyMem_Malloc(sizeof(cparser.http_parser))
  6027. * if self._cparser is NULL: # <<<<<<<<<<<<<<
  6028. * raise MemoryError()
  6029. *
  6030. */
  6031. }
  6032. /* "aiohttp/_http_parser.pyx":299
  6033. * raise MemoryError()
  6034. *
  6035. * self._csettings = <cparser.http_parser_settings*> \ # <<<<<<<<<<<<<<
  6036. * PyMem_Malloc(sizeof(cparser.http_parser_settings))
  6037. * if self._csettings is NULL:
  6038. */
  6039. __pyx_v_self->_csettings = ((struct http_parser_settings *)PyMem_Malloc((sizeof(struct http_parser_settings))));
  6040. /* "aiohttp/_http_parser.pyx":301
  6041. * self._csettings = <cparser.http_parser_settings*> \
  6042. * PyMem_Malloc(sizeof(cparser.http_parser_settings))
  6043. * if self._csettings is NULL: # <<<<<<<<<<<<<<
  6044. * raise MemoryError()
  6045. *
  6046. */
  6047. __pyx_t_1 = ((__pyx_v_self->_csettings == NULL) != 0);
  6048. if (unlikely(__pyx_t_1)) {
  6049. /* "aiohttp/_http_parser.pyx":302
  6050. * PyMem_Malloc(sizeof(cparser.http_parser_settings))
  6051. * if self._csettings is NULL:
  6052. * raise MemoryError() # <<<<<<<<<<<<<<
  6053. *
  6054. * def __dealloc__(self):
  6055. */
  6056. PyErr_NoMemory(); __PYX_ERR(0, 302, __pyx_L1_error)
  6057. /* "aiohttp/_http_parser.pyx":301
  6058. * self._csettings = <cparser.http_parser_settings*> \
  6059. * PyMem_Malloc(sizeof(cparser.http_parser_settings))
  6060. * if self._csettings is NULL: # <<<<<<<<<<<<<<
  6061. * raise MemoryError()
  6062. *
  6063. */
  6064. }
  6065. /* "aiohttp/_http_parser.pyx":293
  6066. * Py_buffer py_buf
  6067. *
  6068. * def __cinit__(self): # <<<<<<<<<<<<<<
  6069. * self._cparser = <cparser.http_parser*> \
  6070. * PyMem_Malloc(sizeof(cparser.http_parser))
  6071. */
  6072. /* function exit code */
  6073. __pyx_r = 0;
  6074. goto __pyx_L0;
  6075. __pyx_L1_error:;
  6076. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6077. __pyx_r = -1;
  6078. __pyx_L0:;
  6079. __Pyx_RefNannyFinishContext();
  6080. return __pyx_r;
  6081. }
  6082. /* "aiohttp/_http_parser.pyx":304
  6083. * raise MemoryError()
  6084. *
  6085. * def __dealloc__(self): # <<<<<<<<<<<<<<
  6086. * PyMem_Free(self._cparser)
  6087. * PyMem_Free(self._csettings)
  6088. */
  6089. /* Python wrapper */
  6090. static void __pyx_pw_7aiohttp_12_http_parser_10HttpParser_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
  6091. static void __pyx_pw_7aiohttp_12_http_parser_10HttpParser_3__dealloc__(PyObject *__pyx_v_self) {
  6092. __Pyx_RefNannyDeclarations
  6093. __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  6094. __pyx_pf_7aiohttp_12_http_parser_10HttpParser_2__dealloc__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self));
  6095. /* function exit code */
  6096. __Pyx_RefNannyFinishContext();
  6097. }
  6098. static void __pyx_pf_7aiohttp_12_http_parser_10HttpParser_2__dealloc__(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  6099. __Pyx_RefNannyDeclarations
  6100. __Pyx_RefNannySetupContext("__dealloc__", 0);
  6101. /* "aiohttp/_http_parser.pyx":305
  6102. *
  6103. * def __dealloc__(self):
  6104. * PyMem_Free(self._cparser) # <<<<<<<<<<<<<<
  6105. * PyMem_Free(self._csettings)
  6106. *
  6107. */
  6108. PyMem_Free(__pyx_v_self->_cparser);
  6109. /* "aiohttp/_http_parser.pyx":306
  6110. * def __dealloc__(self):
  6111. * PyMem_Free(self._cparser)
  6112. * PyMem_Free(self._csettings) # <<<<<<<<<<<<<<
  6113. *
  6114. * cdef _init(self, cparser.http_parser_type mode,
  6115. */
  6116. PyMem_Free(__pyx_v_self->_csettings);
  6117. /* "aiohttp/_http_parser.pyx":304
  6118. * raise MemoryError()
  6119. *
  6120. * def __dealloc__(self): # <<<<<<<<<<<<<<
  6121. * PyMem_Free(self._cparser)
  6122. * PyMem_Free(self._csettings)
  6123. */
  6124. /* function exit code */
  6125. __Pyx_RefNannyFinishContext();
  6126. }
  6127. /* "aiohttp/_http_parser.pyx":308
  6128. * PyMem_Free(self._csettings)
  6129. *
  6130. * cdef _init(self, cparser.http_parser_type mode, # <<<<<<<<<<<<<<
  6131. * object protocol, object loop, object timer=None,
  6132. * size_t max_line_size=8190, size_t max_headers=32768,
  6133. */
  6134. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__init(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, enum http_parser_type __pyx_v_mode, PyObject *__pyx_v_protocol, PyObject *__pyx_v_loop, struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init *__pyx_optional_args) {
  6135. /* "aiohttp/_http_parser.pyx":309
  6136. *
  6137. * cdef _init(self, cparser.http_parser_type mode,
  6138. * object protocol, object loop, object timer=None, # <<<<<<<<<<<<<<
  6139. * size_t max_line_size=8190, size_t max_headers=32768,
  6140. * size_t max_field_size=8190, payload_exception=None,
  6141. */
  6142. PyObject *__pyx_v_timer = ((PyObject *)Py_None);
  6143. size_t __pyx_v_max_line_size = ((size_t)0x1FFE);
  6144. size_t __pyx_v_max_headers = ((size_t)0x8000);
  6145. size_t __pyx_v_max_field_size = ((size_t)0x1FFE);
  6146. /* "aiohttp/_http_parser.pyx":311
  6147. * object protocol, object loop, object timer=None,
  6148. * size_t max_line_size=8190, size_t max_headers=32768,
  6149. * size_t max_field_size=8190, payload_exception=None, # <<<<<<<<<<<<<<
  6150. * bint response_with_body=True, bint auto_decompress=True):
  6151. * cparser.http_parser_init(self._cparser, mode)
  6152. */
  6153. PyObject *__pyx_v_payload_exception = ((PyObject *)Py_None);
  6154. /* "aiohttp/_http_parser.pyx":312
  6155. * size_t max_line_size=8190, size_t max_headers=32768,
  6156. * size_t max_field_size=8190, payload_exception=None,
  6157. * bint response_with_body=True, bint auto_decompress=True): # <<<<<<<<<<<<<<
  6158. * cparser.http_parser_init(self._cparser, mode)
  6159. * self._cparser.data = <void*>self
  6160. */
  6161. int __pyx_v_response_with_body = ((int)1);
  6162. int __pyx_v_auto_decompress = ((int)1);
  6163. PyObject *__pyx_r = NULL;
  6164. __Pyx_RefNannyDeclarations
  6165. PyObject *__pyx_t_1 = NULL;
  6166. __Pyx_RefNannySetupContext("_init", 0);
  6167. if (__pyx_optional_args) {
  6168. if (__pyx_optional_args->__pyx_n > 0) {
  6169. __pyx_v_timer = __pyx_optional_args->timer;
  6170. if (__pyx_optional_args->__pyx_n > 1) {
  6171. __pyx_v_max_line_size = __pyx_optional_args->max_line_size;
  6172. if (__pyx_optional_args->__pyx_n > 2) {
  6173. __pyx_v_max_headers = __pyx_optional_args->max_headers;
  6174. if (__pyx_optional_args->__pyx_n > 3) {
  6175. __pyx_v_max_field_size = __pyx_optional_args->max_field_size;
  6176. if (__pyx_optional_args->__pyx_n > 4) {
  6177. __pyx_v_payload_exception = __pyx_optional_args->payload_exception;
  6178. if (__pyx_optional_args->__pyx_n > 5) {
  6179. __pyx_v_response_with_body = __pyx_optional_args->response_with_body;
  6180. if (__pyx_optional_args->__pyx_n > 6) {
  6181. __pyx_v_auto_decompress = __pyx_optional_args->auto_decompress;
  6182. }
  6183. }
  6184. }
  6185. }
  6186. }
  6187. }
  6188. }
  6189. }
  6190. /* "aiohttp/_http_parser.pyx":313
  6191. * size_t max_field_size=8190, payload_exception=None,
  6192. * bint response_with_body=True, bint auto_decompress=True):
  6193. * cparser.http_parser_init(self._cparser, mode) # <<<<<<<<<<<<<<
  6194. * self._cparser.data = <void*>self
  6195. * self._cparser.content_length = 0
  6196. */
  6197. http_parser_init(__pyx_v_self->_cparser, __pyx_v_mode);
  6198. /* "aiohttp/_http_parser.pyx":314
  6199. * bint response_with_body=True, bint auto_decompress=True):
  6200. * cparser.http_parser_init(self._cparser, mode)
  6201. * self._cparser.data = <void*>self # <<<<<<<<<<<<<<
  6202. * self._cparser.content_length = 0
  6203. *
  6204. */
  6205. __pyx_v_self->_cparser->data = ((void *)__pyx_v_self);
  6206. /* "aiohttp/_http_parser.pyx":315
  6207. * cparser.http_parser_init(self._cparser, mode)
  6208. * self._cparser.data = <void*>self
  6209. * self._cparser.content_length = 0 # <<<<<<<<<<<<<<
  6210. *
  6211. * cparser.http_parser_settings_init(self._csettings)
  6212. */
  6213. __pyx_v_self->_cparser->content_length = 0;
  6214. /* "aiohttp/_http_parser.pyx":317
  6215. * self._cparser.content_length = 0
  6216. *
  6217. * cparser.http_parser_settings_init(self._csettings) # <<<<<<<<<<<<<<
  6218. *
  6219. * self._protocol = protocol
  6220. */
  6221. http_parser_settings_init(__pyx_v_self->_csettings);
  6222. /* "aiohttp/_http_parser.pyx":319
  6223. * cparser.http_parser_settings_init(self._csettings)
  6224. *
  6225. * self._protocol = protocol # <<<<<<<<<<<<<<
  6226. * self._loop = loop
  6227. * self._timer = timer
  6228. */
  6229. __Pyx_INCREF(__pyx_v_protocol);
  6230. __Pyx_GIVEREF(__pyx_v_protocol);
  6231. __Pyx_GOTREF(__pyx_v_self->_protocol);
  6232. __Pyx_DECREF(__pyx_v_self->_protocol);
  6233. __pyx_v_self->_protocol = __pyx_v_protocol;
  6234. /* "aiohttp/_http_parser.pyx":320
  6235. *
  6236. * self._protocol = protocol
  6237. * self._loop = loop # <<<<<<<<<<<<<<
  6238. * self._timer = timer
  6239. *
  6240. */
  6241. __Pyx_INCREF(__pyx_v_loop);
  6242. __Pyx_GIVEREF(__pyx_v_loop);
  6243. __Pyx_GOTREF(__pyx_v_self->_loop);
  6244. __Pyx_DECREF(__pyx_v_self->_loop);
  6245. __pyx_v_self->_loop = __pyx_v_loop;
  6246. /* "aiohttp/_http_parser.pyx":321
  6247. * self._protocol = protocol
  6248. * self._loop = loop
  6249. * self._timer = timer # <<<<<<<<<<<<<<
  6250. *
  6251. * self._buf = bytearray()
  6252. */
  6253. __Pyx_INCREF(__pyx_v_timer);
  6254. __Pyx_GIVEREF(__pyx_v_timer);
  6255. __Pyx_GOTREF(__pyx_v_self->_timer);
  6256. __Pyx_DECREF(__pyx_v_self->_timer);
  6257. __pyx_v_self->_timer = __pyx_v_timer;
  6258. /* "aiohttp/_http_parser.pyx":323
  6259. * self._timer = timer
  6260. *
  6261. * self._buf = bytearray() # <<<<<<<<<<<<<<
  6262. * self._payload = None
  6263. * self._payload_error = 0
  6264. */
  6265. __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error)
  6266. __Pyx_GOTREF(__pyx_t_1);
  6267. __Pyx_GIVEREF(__pyx_t_1);
  6268. __Pyx_GOTREF(__pyx_v_self->_buf);
  6269. __Pyx_DECREF(__pyx_v_self->_buf);
  6270. __pyx_v_self->_buf = ((PyObject*)__pyx_t_1);
  6271. __pyx_t_1 = 0;
  6272. /* "aiohttp/_http_parser.pyx":324
  6273. *
  6274. * self._buf = bytearray()
  6275. * self._payload = None # <<<<<<<<<<<<<<
  6276. * self._payload_error = 0
  6277. * self._payload_exception = payload_exception
  6278. */
  6279. __Pyx_INCREF(Py_None);
  6280. __Pyx_GIVEREF(Py_None);
  6281. __Pyx_GOTREF(__pyx_v_self->_payload);
  6282. __Pyx_DECREF(__pyx_v_self->_payload);
  6283. __pyx_v_self->_payload = Py_None;
  6284. /* "aiohttp/_http_parser.pyx":325
  6285. * self._buf = bytearray()
  6286. * self._payload = None
  6287. * self._payload_error = 0 # <<<<<<<<<<<<<<
  6288. * self._payload_exception = payload_exception
  6289. * self._messages = []
  6290. */
  6291. __pyx_v_self->_payload_error = 0;
  6292. /* "aiohttp/_http_parser.pyx":326
  6293. * self._payload = None
  6294. * self._payload_error = 0
  6295. * self._payload_exception = payload_exception # <<<<<<<<<<<<<<
  6296. * self._messages = []
  6297. *
  6298. */
  6299. __Pyx_INCREF(__pyx_v_payload_exception);
  6300. __Pyx_GIVEREF(__pyx_v_payload_exception);
  6301. __Pyx_GOTREF(__pyx_v_self->_payload_exception);
  6302. __Pyx_DECREF(__pyx_v_self->_payload_exception);
  6303. __pyx_v_self->_payload_exception = __pyx_v_payload_exception;
  6304. /* "aiohttp/_http_parser.pyx":327
  6305. * self._payload_error = 0
  6306. * self._payload_exception = payload_exception
  6307. * self._messages = [] # <<<<<<<<<<<<<<
  6308. *
  6309. * self._raw_name = bytearray()
  6310. */
  6311. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
  6312. __Pyx_GOTREF(__pyx_t_1);
  6313. __Pyx_GIVEREF(__pyx_t_1);
  6314. __Pyx_GOTREF(__pyx_v_self->_messages);
  6315. __Pyx_DECREF(__pyx_v_self->_messages);
  6316. __pyx_v_self->_messages = ((PyObject*)__pyx_t_1);
  6317. __pyx_t_1 = 0;
  6318. /* "aiohttp/_http_parser.pyx":329
  6319. * self._messages = []
  6320. *
  6321. * self._raw_name = bytearray() # <<<<<<<<<<<<<<
  6322. * self._raw_value = bytearray()
  6323. * self._has_value = False
  6324. */
  6325. __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error)
  6326. __Pyx_GOTREF(__pyx_t_1);
  6327. __Pyx_GIVEREF(__pyx_t_1);
  6328. __Pyx_GOTREF(__pyx_v_self->_raw_name);
  6329. __Pyx_DECREF(__pyx_v_self->_raw_name);
  6330. __pyx_v_self->_raw_name = ((PyObject*)__pyx_t_1);
  6331. __pyx_t_1 = 0;
  6332. /* "aiohttp/_http_parser.pyx":330
  6333. *
  6334. * self._raw_name = bytearray()
  6335. * self._raw_value = bytearray() # <<<<<<<<<<<<<<
  6336. * self._has_value = False
  6337. *
  6338. */
  6339. __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)(&PyByteArray_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
  6340. __Pyx_GOTREF(__pyx_t_1);
  6341. __Pyx_GIVEREF(__pyx_t_1);
  6342. __Pyx_GOTREF(__pyx_v_self->_raw_value);
  6343. __Pyx_DECREF(__pyx_v_self->_raw_value);
  6344. __pyx_v_self->_raw_value = ((PyObject*)__pyx_t_1);
  6345. __pyx_t_1 = 0;
  6346. /* "aiohttp/_http_parser.pyx":331
  6347. * self._raw_name = bytearray()
  6348. * self._raw_value = bytearray()
  6349. * self._has_value = False # <<<<<<<<<<<<<<
  6350. *
  6351. * self._max_line_size = max_line_size
  6352. */
  6353. __pyx_v_self->_has_value = 0;
  6354. /* "aiohttp/_http_parser.pyx":333
  6355. * self._has_value = False
  6356. *
  6357. * self._max_line_size = max_line_size # <<<<<<<<<<<<<<
  6358. * self._max_headers = max_headers
  6359. * self._max_field_size = max_field_size
  6360. */
  6361. __pyx_v_self->_max_line_size = __pyx_v_max_line_size;
  6362. /* "aiohttp/_http_parser.pyx":334
  6363. *
  6364. * self._max_line_size = max_line_size
  6365. * self._max_headers = max_headers # <<<<<<<<<<<<<<
  6366. * self._max_field_size = max_field_size
  6367. * self._response_with_body = response_with_body
  6368. */
  6369. __pyx_v_self->_max_headers = __pyx_v_max_headers;
  6370. /* "aiohttp/_http_parser.pyx":335
  6371. * self._max_line_size = max_line_size
  6372. * self._max_headers = max_headers
  6373. * self._max_field_size = max_field_size # <<<<<<<<<<<<<<
  6374. * self._response_with_body = response_with_body
  6375. * self._upgraded = False
  6376. */
  6377. __pyx_v_self->_max_field_size = __pyx_v_max_field_size;
  6378. /* "aiohttp/_http_parser.pyx":336
  6379. * self._max_headers = max_headers
  6380. * self._max_field_size = max_field_size
  6381. * self._response_with_body = response_with_body # <<<<<<<<<<<<<<
  6382. * self._upgraded = False
  6383. * self._auto_decompress = auto_decompress
  6384. */
  6385. __pyx_v_self->_response_with_body = __pyx_v_response_with_body;
  6386. /* "aiohttp/_http_parser.pyx":337
  6387. * self._max_field_size = max_field_size
  6388. * self._response_with_body = response_with_body
  6389. * self._upgraded = False # <<<<<<<<<<<<<<
  6390. * self._auto_decompress = auto_decompress
  6391. * self._content_encoding = None
  6392. */
  6393. __pyx_v_self->_upgraded = 0;
  6394. /* "aiohttp/_http_parser.pyx":338
  6395. * self._response_with_body = response_with_body
  6396. * self._upgraded = False
  6397. * self._auto_decompress = auto_decompress # <<<<<<<<<<<<<<
  6398. * self._content_encoding = None
  6399. *
  6400. */
  6401. __pyx_v_self->_auto_decompress = __pyx_v_auto_decompress;
  6402. /* "aiohttp/_http_parser.pyx":339
  6403. * self._upgraded = False
  6404. * self._auto_decompress = auto_decompress
  6405. * self._content_encoding = None # <<<<<<<<<<<<<<
  6406. *
  6407. * self._csettings.on_url = cb_on_url
  6408. */
  6409. __Pyx_INCREF(Py_None);
  6410. __Pyx_GIVEREF(Py_None);
  6411. __Pyx_GOTREF(__pyx_v_self->_content_encoding);
  6412. __Pyx_DECREF(__pyx_v_self->_content_encoding);
  6413. __pyx_v_self->_content_encoding = ((PyObject*)Py_None);
  6414. /* "aiohttp/_http_parser.pyx":341
  6415. * self._content_encoding = None
  6416. *
  6417. * self._csettings.on_url = cb_on_url # <<<<<<<<<<<<<<
  6418. * self._csettings.on_status = cb_on_status
  6419. * self._csettings.on_header_field = cb_on_header_field
  6420. */
  6421. __pyx_v_self->_csettings->on_url = __pyx_f_7aiohttp_12_http_parser_cb_on_url;
  6422. /* "aiohttp/_http_parser.pyx":342
  6423. *
  6424. * self._csettings.on_url = cb_on_url
  6425. * self._csettings.on_status = cb_on_status # <<<<<<<<<<<<<<
  6426. * self._csettings.on_header_field = cb_on_header_field
  6427. * self._csettings.on_header_value = cb_on_header_value
  6428. */
  6429. __pyx_v_self->_csettings->on_status = __pyx_f_7aiohttp_12_http_parser_cb_on_status;
  6430. /* "aiohttp/_http_parser.pyx":343
  6431. * self._csettings.on_url = cb_on_url
  6432. * self._csettings.on_status = cb_on_status
  6433. * self._csettings.on_header_field = cb_on_header_field # <<<<<<<<<<<<<<
  6434. * self._csettings.on_header_value = cb_on_header_value
  6435. * self._csettings.on_headers_complete = cb_on_headers_complete
  6436. */
  6437. __pyx_v_self->_csettings->on_header_field = __pyx_f_7aiohttp_12_http_parser_cb_on_header_field;
  6438. /* "aiohttp/_http_parser.pyx":344
  6439. * self._csettings.on_status = cb_on_status
  6440. * self._csettings.on_header_field = cb_on_header_field
  6441. * self._csettings.on_header_value = cb_on_header_value # <<<<<<<<<<<<<<
  6442. * self._csettings.on_headers_complete = cb_on_headers_complete
  6443. * self._csettings.on_body = cb_on_body
  6444. */
  6445. __pyx_v_self->_csettings->on_header_value = __pyx_f_7aiohttp_12_http_parser_cb_on_header_value;
  6446. /* "aiohttp/_http_parser.pyx":345
  6447. * self._csettings.on_header_field = cb_on_header_field
  6448. * self._csettings.on_header_value = cb_on_header_value
  6449. * self._csettings.on_headers_complete = cb_on_headers_complete # <<<<<<<<<<<<<<
  6450. * self._csettings.on_body = cb_on_body
  6451. * self._csettings.on_message_begin = cb_on_message_begin
  6452. */
  6453. __pyx_v_self->_csettings->on_headers_complete = __pyx_f_7aiohttp_12_http_parser_cb_on_headers_complete;
  6454. /* "aiohttp/_http_parser.pyx":346
  6455. * self._csettings.on_header_value = cb_on_header_value
  6456. * self._csettings.on_headers_complete = cb_on_headers_complete
  6457. * self._csettings.on_body = cb_on_body # <<<<<<<<<<<<<<
  6458. * self._csettings.on_message_begin = cb_on_message_begin
  6459. * self._csettings.on_message_complete = cb_on_message_complete
  6460. */
  6461. __pyx_v_self->_csettings->on_body = __pyx_f_7aiohttp_12_http_parser_cb_on_body;
  6462. /* "aiohttp/_http_parser.pyx":347
  6463. * self._csettings.on_headers_complete = cb_on_headers_complete
  6464. * self._csettings.on_body = cb_on_body
  6465. * self._csettings.on_message_begin = cb_on_message_begin # <<<<<<<<<<<<<<
  6466. * self._csettings.on_message_complete = cb_on_message_complete
  6467. * self._csettings.on_chunk_header = cb_on_chunk_header
  6468. */
  6469. __pyx_v_self->_csettings->on_message_begin = __pyx_f_7aiohttp_12_http_parser_cb_on_message_begin;
  6470. /* "aiohttp/_http_parser.pyx":348
  6471. * self._csettings.on_body = cb_on_body
  6472. * self._csettings.on_message_begin = cb_on_message_begin
  6473. * self._csettings.on_message_complete = cb_on_message_complete # <<<<<<<<<<<<<<
  6474. * self._csettings.on_chunk_header = cb_on_chunk_header
  6475. * self._csettings.on_chunk_complete = cb_on_chunk_complete
  6476. */
  6477. __pyx_v_self->_csettings->on_message_complete = __pyx_f_7aiohttp_12_http_parser_cb_on_message_complete;
  6478. /* "aiohttp/_http_parser.pyx":349
  6479. * self._csettings.on_message_begin = cb_on_message_begin
  6480. * self._csettings.on_message_complete = cb_on_message_complete
  6481. * self._csettings.on_chunk_header = cb_on_chunk_header # <<<<<<<<<<<<<<
  6482. * self._csettings.on_chunk_complete = cb_on_chunk_complete
  6483. *
  6484. */
  6485. __pyx_v_self->_csettings->on_chunk_header = __pyx_f_7aiohttp_12_http_parser_cb_on_chunk_header;
  6486. /* "aiohttp/_http_parser.pyx":350
  6487. * self._csettings.on_message_complete = cb_on_message_complete
  6488. * self._csettings.on_chunk_header = cb_on_chunk_header
  6489. * self._csettings.on_chunk_complete = cb_on_chunk_complete # <<<<<<<<<<<<<<
  6490. *
  6491. * self._last_error = None
  6492. */
  6493. __pyx_v_self->_csettings->on_chunk_complete = __pyx_f_7aiohttp_12_http_parser_cb_on_chunk_complete;
  6494. /* "aiohttp/_http_parser.pyx":352
  6495. * self._csettings.on_chunk_complete = cb_on_chunk_complete
  6496. *
  6497. * self._last_error = None # <<<<<<<<<<<<<<
  6498. *
  6499. * cdef _process_header(self):
  6500. */
  6501. __Pyx_INCREF(Py_None);
  6502. __Pyx_GIVEREF(Py_None);
  6503. __Pyx_GOTREF(__pyx_v_self->_last_error);
  6504. __Pyx_DECREF(__pyx_v_self->_last_error);
  6505. __pyx_v_self->_last_error = Py_None;
  6506. /* "aiohttp/_http_parser.pyx":308
  6507. * PyMem_Free(self._csettings)
  6508. *
  6509. * cdef _init(self, cparser.http_parser_type mode, # <<<<<<<<<<<<<<
  6510. * object protocol, object loop, object timer=None,
  6511. * size_t max_line_size=8190, size_t max_headers=32768,
  6512. */
  6513. /* function exit code */
  6514. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6515. goto __pyx_L0;
  6516. __pyx_L1_error:;
  6517. __Pyx_XDECREF(__pyx_t_1);
  6518. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6519. __pyx_r = 0;
  6520. __pyx_L0:;
  6521. __Pyx_XGIVEREF(__pyx_r);
  6522. __Pyx_RefNannyFinishContext();
  6523. return __pyx_r;
  6524. }
  6525. /* "aiohttp/_http_parser.pyx":354
  6526. * self._last_error = None
  6527. *
  6528. * cdef _process_header(self): # <<<<<<<<<<<<<<
  6529. * if self._raw_name:
  6530. * raw_name = bytes(self._raw_name)
  6531. */
  6532. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__process_header(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  6533. PyObject *__pyx_v_raw_name = NULL;
  6534. PyObject *__pyx_v_raw_value = NULL;
  6535. PyObject *__pyx_v_name = NULL;
  6536. PyObject *__pyx_v_value = NULL;
  6537. PyObject *__pyx_r = NULL;
  6538. __Pyx_RefNannyDeclarations
  6539. int __pyx_t_1;
  6540. PyObject *__pyx_t_2 = NULL;
  6541. PyObject *__pyx_t_3 = NULL;
  6542. PyObject *__pyx_t_4 = NULL;
  6543. int __pyx_t_5;
  6544. PyObject *__pyx_t_6 = NULL;
  6545. int __pyx_t_7;
  6546. int __pyx_t_8;
  6547. __Pyx_RefNannySetupContext("_process_header", 0);
  6548. /* "aiohttp/_http_parser.pyx":355
  6549. *
  6550. * cdef _process_header(self):
  6551. * if self._raw_name: # <<<<<<<<<<<<<<
  6552. * raw_name = bytes(self._raw_name)
  6553. * raw_value = bytes(self._raw_value)
  6554. */
  6555. __pyx_t_1 = (__pyx_v_self->_raw_name != Py_None)&&(PyByteArray_GET_SIZE(__pyx_v_self->_raw_name) != 0);
  6556. if (__pyx_t_1) {
  6557. /* "aiohttp/_http_parser.pyx":356
  6558. * cdef _process_header(self):
  6559. * if self._raw_name:
  6560. * raw_name = bytes(self._raw_name) # <<<<<<<<<<<<<<
  6561. * raw_value = bytes(self._raw_value)
  6562. *
  6563. */
  6564. __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_self->_raw_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 356, __pyx_L1_error)
  6565. __Pyx_GOTREF(__pyx_t_2);
  6566. __pyx_v_raw_name = ((PyObject*)__pyx_t_2);
  6567. __pyx_t_2 = 0;
  6568. /* "aiohttp/_http_parser.pyx":357
  6569. * if self._raw_name:
  6570. * raw_name = bytes(self._raw_name)
  6571. * raw_value = bytes(self._raw_value) # <<<<<<<<<<<<<<
  6572. *
  6573. * name = find_header(raw_name)
  6574. */
  6575. __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_self->_raw_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 357, __pyx_L1_error)
  6576. __Pyx_GOTREF(__pyx_t_2);
  6577. __pyx_v_raw_value = ((PyObject*)__pyx_t_2);
  6578. __pyx_t_2 = 0;
  6579. /* "aiohttp/_http_parser.pyx":359
  6580. * raw_value = bytes(self._raw_value)
  6581. *
  6582. * name = find_header(raw_name) # <<<<<<<<<<<<<<
  6583. * value = raw_value.decode('utf-8', 'surrogateescape')
  6584. *
  6585. */
  6586. __pyx_t_2 = __pyx_f_7aiohttp_12_http_parser_find_header(__pyx_v_raw_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error)
  6587. __Pyx_GOTREF(__pyx_t_2);
  6588. __pyx_v_name = __pyx_t_2;
  6589. __pyx_t_2 = 0;
  6590. /* "aiohttp/_http_parser.pyx":360
  6591. *
  6592. * name = find_header(raw_name)
  6593. * value = raw_value.decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  6594. *
  6595. * self._headers.add(name, value)
  6596. */
  6597. __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_raw_value, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
  6598. __Pyx_GOTREF(__pyx_t_2);
  6599. __pyx_v_value = __pyx_t_2;
  6600. __pyx_t_2 = 0;
  6601. /* "aiohttp/_http_parser.pyx":362
  6602. * value = raw_value.decode('utf-8', 'surrogateescape')
  6603. *
  6604. * self._headers.add(name, value) # <<<<<<<<<<<<<<
  6605. *
  6606. * if name is CONTENT_ENCODING:
  6607. */
  6608. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_headers, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 362, __pyx_L1_error)
  6609. __Pyx_GOTREF(__pyx_t_3);
  6610. __pyx_t_4 = NULL;
  6611. __pyx_t_5 = 0;
  6612. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  6613. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  6614. if (likely(__pyx_t_4)) {
  6615. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  6616. __Pyx_INCREF(__pyx_t_4);
  6617. __Pyx_INCREF(function);
  6618. __Pyx_DECREF_SET(__pyx_t_3, function);
  6619. __pyx_t_5 = 1;
  6620. }
  6621. }
  6622. #if CYTHON_FAST_PYCALL
  6623. if (PyFunction_Check(__pyx_t_3)) {
  6624. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_value};
  6625. __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
  6626. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  6627. __Pyx_GOTREF(__pyx_t_2);
  6628. } else
  6629. #endif
  6630. #if CYTHON_FAST_PYCCALL
  6631. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  6632. PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_name, __pyx_v_value};
  6633. __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
  6634. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  6635. __Pyx_GOTREF(__pyx_t_2);
  6636. } else
  6637. #endif
  6638. {
  6639. __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 362, __pyx_L1_error)
  6640. __Pyx_GOTREF(__pyx_t_6);
  6641. if (__pyx_t_4) {
  6642. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
  6643. }
  6644. __Pyx_INCREF(__pyx_v_name);
  6645. __Pyx_GIVEREF(__pyx_v_name);
  6646. PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_name);
  6647. __Pyx_INCREF(__pyx_v_value);
  6648. __Pyx_GIVEREF(__pyx_v_value);
  6649. PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_value);
  6650. __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
  6651. __Pyx_GOTREF(__pyx_t_2);
  6652. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  6653. }
  6654. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  6655. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6656. /* "aiohttp/_http_parser.pyx":364
  6657. * self._headers.add(name, value)
  6658. *
  6659. * if name is CONTENT_ENCODING: # <<<<<<<<<<<<<<
  6660. * self._content_encoding = value
  6661. *
  6662. */
  6663. __pyx_t_1 = (__pyx_v_name == __pyx_v_7aiohttp_12_http_parser_CONTENT_ENCODING);
  6664. __pyx_t_7 = (__pyx_t_1 != 0);
  6665. if (__pyx_t_7) {
  6666. /* "aiohttp/_http_parser.pyx":365
  6667. *
  6668. * if name is CONTENT_ENCODING:
  6669. * self._content_encoding = value # <<<<<<<<<<<<<<
  6670. *
  6671. * PyByteArray_Resize(self._raw_name, 0)
  6672. */
  6673. if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 365, __pyx_L1_error)
  6674. __pyx_t_2 = __pyx_v_value;
  6675. __Pyx_INCREF(__pyx_t_2);
  6676. __Pyx_GIVEREF(__pyx_t_2);
  6677. __Pyx_GOTREF(__pyx_v_self->_content_encoding);
  6678. __Pyx_DECREF(__pyx_v_self->_content_encoding);
  6679. __pyx_v_self->_content_encoding = ((PyObject*)__pyx_t_2);
  6680. __pyx_t_2 = 0;
  6681. /* "aiohttp/_http_parser.pyx":364
  6682. * self._headers.add(name, value)
  6683. *
  6684. * if name is CONTENT_ENCODING: # <<<<<<<<<<<<<<
  6685. * self._content_encoding = value
  6686. *
  6687. */
  6688. }
  6689. /* "aiohttp/_http_parser.pyx":367
  6690. * self._content_encoding = value
  6691. *
  6692. * PyByteArray_Resize(self._raw_name, 0) # <<<<<<<<<<<<<<
  6693. * PyByteArray_Resize(self._raw_value, 0)
  6694. * self._has_value = False
  6695. */
  6696. __pyx_t_2 = __pyx_v_self->_raw_name;
  6697. __Pyx_INCREF(__pyx_t_2);
  6698. __pyx_t_5 = PyByteArray_Resize(__pyx_t_2, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 367, __pyx_L1_error)
  6699. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6700. /* "aiohttp/_http_parser.pyx":368
  6701. *
  6702. * PyByteArray_Resize(self._raw_name, 0)
  6703. * PyByteArray_Resize(self._raw_value, 0) # <<<<<<<<<<<<<<
  6704. * self._has_value = False
  6705. * self._raw_headers.append((raw_name, raw_value))
  6706. */
  6707. __pyx_t_2 = __pyx_v_self->_raw_value;
  6708. __Pyx_INCREF(__pyx_t_2);
  6709. __pyx_t_5 = PyByteArray_Resize(__pyx_t_2, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 368, __pyx_L1_error)
  6710. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6711. /* "aiohttp/_http_parser.pyx":369
  6712. * PyByteArray_Resize(self._raw_name, 0)
  6713. * PyByteArray_Resize(self._raw_value, 0)
  6714. * self._has_value = False # <<<<<<<<<<<<<<
  6715. * self._raw_headers.append((raw_name, raw_value))
  6716. *
  6717. */
  6718. __pyx_v_self->_has_value = 0;
  6719. /* "aiohttp/_http_parser.pyx":370
  6720. * PyByteArray_Resize(self._raw_value, 0)
  6721. * self._has_value = False
  6722. * self._raw_headers.append((raw_name, raw_value)) # <<<<<<<<<<<<<<
  6723. *
  6724. * cdef _on_header_field(self, char* at, size_t length):
  6725. */
  6726. if (unlikely(__pyx_v_self->_raw_headers == Py_None)) {
  6727. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  6728. __PYX_ERR(0, 370, __pyx_L1_error)
  6729. }
  6730. __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
  6731. __Pyx_GOTREF(__pyx_t_2);
  6732. __Pyx_INCREF(__pyx_v_raw_name);
  6733. __Pyx_GIVEREF(__pyx_v_raw_name);
  6734. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_raw_name);
  6735. __Pyx_INCREF(__pyx_v_raw_value);
  6736. __Pyx_GIVEREF(__pyx_v_raw_value);
  6737. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_raw_value);
  6738. __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->_raw_headers, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 370, __pyx_L1_error)
  6739. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6740. /* "aiohttp/_http_parser.pyx":355
  6741. *
  6742. * cdef _process_header(self):
  6743. * if self._raw_name: # <<<<<<<<<<<<<<
  6744. * raw_name = bytes(self._raw_name)
  6745. * raw_value = bytes(self._raw_value)
  6746. */
  6747. }
  6748. /* "aiohttp/_http_parser.pyx":354
  6749. * self._last_error = None
  6750. *
  6751. * cdef _process_header(self): # <<<<<<<<<<<<<<
  6752. * if self._raw_name:
  6753. * raw_name = bytes(self._raw_name)
  6754. */
  6755. /* function exit code */
  6756. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6757. goto __pyx_L0;
  6758. __pyx_L1_error:;
  6759. __Pyx_XDECREF(__pyx_t_2);
  6760. __Pyx_XDECREF(__pyx_t_3);
  6761. __Pyx_XDECREF(__pyx_t_4);
  6762. __Pyx_XDECREF(__pyx_t_6);
  6763. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._process_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6764. __pyx_r = 0;
  6765. __pyx_L0:;
  6766. __Pyx_XDECREF(__pyx_v_raw_name);
  6767. __Pyx_XDECREF(__pyx_v_raw_value);
  6768. __Pyx_XDECREF(__pyx_v_name);
  6769. __Pyx_XDECREF(__pyx_v_value);
  6770. __Pyx_XGIVEREF(__pyx_r);
  6771. __Pyx_RefNannyFinishContext();
  6772. return __pyx_r;
  6773. }
  6774. /* "aiohttp/_http_parser.pyx":372
  6775. * self._raw_headers.append((raw_name, raw_value))
  6776. *
  6777. * cdef _on_header_field(self, char* at, size_t length): # <<<<<<<<<<<<<<
  6778. * cdef Py_ssize_t size
  6779. * cdef char *buf
  6780. */
  6781. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_header_field(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, char *__pyx_v_at, size_t __pyx_v_length) {
  6782. Py_ssize_t __pyx_v_size;
  6783. char *__pyx_v_buf;
  6784. PyObject *__pyx_r = NULL;
  6785. __Pyx_RefNannyDeclarations
  6786. int __pyx_t_1;
  6787. PyObject *__pyx_t_2 = NULL;
  6788. Py_ssize_t __pyx_t_3;
  6789. int __pyx_t_4;
  6790. __Pyx_RefNannySetupContext("_on_header_field", 0);
  6791. /* "aiohttp/_http_parser.pyx":375
  6792. * cdef Py_ssize_t size
  6793. * cdef char *buf
  6794. * if self._has_value: # <<<<<<<<<<<<<<
  6795. * self._process_header()
  6796. *
  6797. */
  6798. __pyx_t_1 = (__pyx_v_self->_has_value != 0);
  6799. if (__pyx_t_1) {
  6800. /* "aiohttp/_http_parser.pyx":376
  6801. * cdef char *buf
  6802. * if self._has_value:
  6803. * self._process_header() # <<<<<<<<<<<<<<
  6804. *
  6805. * size = PyByteArray_Size(self._raw_name)
  6806. */
  6807. __pyx_t_2 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self->__pyx_vtab)->_process_header(__pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
  6808. __Pyx_GOTREF(__pyx_t_2);
  6809. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6810. /* "aiohttp/_http_parser.pyx":375
  6811. * cdef Py_ssize_t size
  6812. * cdef char *buf
  6813. * if self._has_value: # <<<<<<<<<<<<<<
  6814. * self._process_header()
  6815. *
  6816. */
  6817. }
  6818. /* "aiohttp/_http_parser.pyx":378
  6819. * self._process_header()
  6820. *
  6821. * size = PyByteArray_Size(self._raw_name) # <<<<<<<<<<<<<<
  6822. * PyByteArray_Resize(self._raw_name, size + length)
  6823. * buf = PyByteArray_AsString(self._raw_name)
  6824. */
  6825. __pyx_t_2 = __pyx_v_self->_raw_name;
  6826. __Pyx_INCREF(__pyx_t_2);
  6827. __pyx_t_3 = PyByteArray_Size(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 378, __pyx_L1_error)
  6828. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6829. __pyx_v_size = __pyx_t_3;
  6830. /* "aiohttp/_http_parser.pyx":379
  6831. *
  6832. * size = PyByteArray_Size(self._raw_name)
  6833. * PyByteArray_Resize(self._raw_name, size + length) # <<<<<<<<<<<<<<
  6834. * buf = PyByteArray_AsString(self._raw_name)
  6835. * memcpy(buf + size, at, length)
  6836. */
  6837. __pyx_t_2 = __pyx_v_self->_raw_name;
  6838. __Pyx_INCREF(__pyx_t_2);
  6839. __pyx_t_4 = PyByteArray_Resize(__pyx_t_2, (__pyx_v_size + __pyx_v_length)); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 379, __pyx_L1_error)
  6840. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6841. /* "aiohttp/_http_parser.pyx":380
  6842. * size = PyByteArray_Size(self._raw_name)
  6843. * PyByteArray_Resize(self._raw_name, size + length)
  6844. * buf = PyByteArray_AsString(self._raw_name) # <<<<<<<<<<<<<<
  6845. * memcpy(buf + size, at, length)
  6846. *
  6847. */
  6848. __pyx_t_2 = __pyx_v_self->_raw_name;
  6849. __Pyx_INCREF(__pyx_t_2);
  6850. __pyx_v_buf = PyByteArray_AsString(__pyx_t_2);
  6851. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  6852. /* "aiohttp/_http_parser.pyx":381
  6853. * PyByteArray_Resize(self._raw_name, size + length)
  6854. * buf = PyByteArray_AsString(self._raw_name)
  6855. * memcpy(buf + size, at, length) # <<<<<<<<<<<<<<
  6856. *
  6857. * cdef _on_header_value(self, char* at, size_t length):
  6858. */
  6859. (void)(memcpy((__pyx_v_buf + __pyx_v_size), __pyx_v_at, __pyx_v_length));
  6860. /* "aiohttp/_http_parser.pyx":372
  6861. * self._raw_headers.append((raw_name, raw_value))
  6862. *
  6863. * cdef _on_header_field(self, char* at, size_t length): # <<<<<<<<<<<<<<
  6864. * cdef Py_ssize_t size
  6865. * cdef char *buf
  6866. */
  6867. /* function exit code */
  6868. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6869. goto __pyx_L0;
  6870. __pyx_L1_error:;
  6871. __Pyx_XDECREF(__pyx_t_2);
  6872. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._on_header_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6873. __pyx_r = 0;
  6874. __pyx_L0:;
  6875. __Pyx_XGIVEREF(__pyx_r);
  6876. __Pyx_RefNannyFinishContext();
  6877. return __pyx_r;
  6878. }
  6879. /* "aiohttp/_http_parser.pyx":383
  6880. * memcpy(buf + size, at, length)
  6881. *
  6882. * cdef _on_header_value(self, char* at, size_t length): # <<<<<<<<<<<<<<
  6883. * cdef Py_ssize_t size
  6884. * cdef char *buf
  6885. */
  6886. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_header_value(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, char *__pyx_v_at, size_t __pyx_v_length) {
  6887. Py_ssize_t __pyx_v_size;
  6888. char *__pyx_v_buf;
  6889. PyObject *__pyx_r = NULL;
  6890. __Pyx_RefNannyDeclarations
  6891. PyObject *__pyx_t_1 = NULL;
  6892. Py_ssize_t __pyx_t_2;
  6893. int __pyx_t_3;
  6894. __Pyx_RefNannySetupContext("_on_header_value", 0);
  6895. /* "aiohttp/_http_parser.pyx":387
  6896. * cdef char *buf
  6897. *
  6898. * size = PyByteArray_Size(self._raw_value) # <<<<<<<<<<<<<<
  6899. * PyByteArray_Resize(self._raw_value, size + length)
  6900. * buf = PyByteArray_AsString(self._raw_value)
  6901. */
  6902. __pyx_t_1 = __pyx_v_self->_raw_value;
  6903. __Pyx_INCREF(__pyx_t_1);
  6904. __pyx_t_2 = PyByteArray_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 387, __pyx_L1_error)
  6905. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6906. __pyx_v_size = __pyx_t_2;
  6907. /* "aiohttp/_http_parser.pyx":388
  6908. *
  6909. * size = PyByteArray_Size(self._raw_value)
  6910. * PyByteArray_Resize(self._raw_value, size + length) # <<<<<<<<<<<<<<
  6911. * buf = PyByteArray_AsString(self._raw_value)
  6912. * memcpy(buf + size, at, length)
  6913. */
  6914. __pyx_t_1 = __pyx_v_self->_raw_value;
  6915. __Pyx_INCREF(__pyx_t_1);
  6916. __pyx_t_3 = PyByteArray_Resize(__pyx_t_1, (__pyx_v_size + __pyx_v_length)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 388, __pyx_L1_error)
  6917. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6918. /* "aiohttp/_http_parser.pyx":389
  6919. * size = PyByteArray_Size(self._raw_value)
  6920. * PyByteArray_Resize(self._raw_value, size + length)
  6921. * buf = PyByteArray_AsString(self._raw_value) # <<<<<<<<<<<<<<
  6922. * memcpy(buf + size, at, length)
  6923. * self._has_value = True
  6924. */
  6925. __pyx_t_1 = __pyx_v_self->_raw_value;
  6926. __Pyx_INCREF(__pyx_t_1);
  6927. __pyx_v_buf = PyByteArray_AsString(__pyx_t_1);
  6928. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  6929. /* "aiohttp/_http_parser.pyx":390
  6930. * PyByteArray_Resize(self._raw_value, size + length)
  6931. * buf = PyByteArray_AsString(self._raw_value)
  6932. * memcpy(buf + size, at, length) # <<<<<<<<<<<<<<
  6933. * self._has_value = True
  6934. *
  6935. */
  6936. (void)(memcpy((__pyx_v_buf + __pyx_v_size), __pyx_v_at, __pyx_v_length));
  6937. /* "aiohttp/_http_parser.pyx":391
  6938. * buf = PyByteArray_AsString(self._raw_value)
  6939. * memcpy(buf + size, at, length)
  6940. * self._has_value = True # <<<<<<<<<<<<<<
  6941. *
  6942. * cdef _on_headers_complete(self):
  6943. */
  6944. __pyx_v_self->_has_value = 1;
  6945. /* "aiohttp/_http_parser.pyx":383
  6946. * memcpy(buf + size, at, length)
  6947. *
  6948. * cdef _on_header_value(self, char* at, size_t length): # <<<<<<<<<<<<<<
  6949. * cdef Py_ssize_t size
  6950. * cdef char *buf
  6951. */
  6952. /* function exit code */
  6953. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  6954. goto __pyx_L0;
  6955. __pyx_L1_error:;
  6956. __Pyx_XDECREF(__pyx_t_1);
  6957. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._on_header_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  6958. __pyx_r = 0;
  6959. __pyx_L0:;
  6960. __Pyx_XGIVEREF(__pyx_r);
  6961. __Pyx_RefNannyFinishContext();
  6962. return __pyx_r;
  6963. }
  6964. /* "aiohttp/_http_parser.pyx":393
  6965. * self._has_value = True
  6966. *
  6967. * cdef _on_headers_complete(self): # <<<<<<<<<<<<<<
  6968. * self._process_header()
  6969. *
  6970. */
  6971. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_headers_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  6972. PyObject *__pyx_v_method = NULL;
  6973. int __pyx_v_should_close;
  6974. unsigned int __pyx_v_upgrade;
  6975. unsigned int __pyx_v_chunked;
  6976. PyObject *__pyx_v_raw_headers = NULL;
  6977. PyObject *__pyx_v_headers = NULL;
  6978. PyObject *__pyx_v_encoding = NULL;
  6979. PyObject *__pyx_v_enc = NULL;
  6980. PyObject *__pyx_v_msg = NULL;
  6981. PyObject *__pyx_v_payload = NULL;
  6982. PyObject *__pyx_r = NULL;
  6983. __Pyx_RefNannyDeclarations
  6984. PyObject *__pyx_t_1 = NULL;
  6985. unsigned int __pyx_t_2;
  6986. PyObject *__pyx_t_3 = NULL;
  6987. PyObject *__pyx_t_4 = NULL;
  6988. PyObject *__pyx_t_5 = NULL;
  6989. int __pyx_t_6;
  6990. int __pyx_t_7;
  6991. int __pyx_t_8;
  6992. int __pyx_t_9;
  6993. int __pyx_t_10;
  6994. __Pyx_RefNannySetupContext("_on_headers_complete", 0);
  6995. /* "aiohttp/_http_parser.pyx":394
  6996. *
  6997. * cdef _on_headers_complete(self):
  6998. * self._process_header() # <<<<<<<<<<<<<<
  6999. *
  7000. * method = http_method_str(self._cparser.method)
  7001. */
  7002. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self->__pyx_vtab)->_process_header(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
  7003. __Pyx_GOTREF(__pyx_t_1);
  7004. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7005. /* "aiohttp/_http_parser.pyx":396
  7006. * self._process_header()
  7007. *
  7008. * method = http_method_str(self._cparser.method) # <<<<<<<<<<<<<<
  7009. * should_close = not cparser.http_should_keep_alive(self._cparser)
  7010. * upgrade = self._cparser.upgrade
  7011. */
  7012. __pyx_t_1 = __pyx_f_7aiohttp_12_http_parser_http_method_str(__pyx_v_self->_cparser->method); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
  7013. __Pyx_GOTREF(__pyx_t_1);
  7014. __pyx_v_method = ((PyObject*)__pyx_t_1);
  7015. __pyx_t_1 = 0;
  7016. /* "aiohttp/_http_parser.pyx":397
  7017. *
  7018. * method = http_method_str(self._cparser.method)
  7019. * should_close = not cparser.http_should_keep_alive(self._cparser) # <<<<<<<<<<<<<<
  7020. * upgrade = self._cparser.upgrade
  7021. * chunked = self._cparser.flags & cparser.F_CHUNKED
  7022. */
  7023. __pyx_v_should_close = (!(http_should_keep_alive(__pyx_v_self->_cparser) != 0));
  7024. /* "aiohttp/_http_parser.pyx":398
  7025. * method = http_method_str(self._cparser.method)
  7026. * should_close = not cparser.http_should_keep_alive(self._cparser)
  7027. * upgrade = self._cparser.upgrade # <<<<<<<<<<<<<<
  7028. * chunked = self._cparser.flags & cparser.F_CHUNKED
  7029. *
  7030. */
  7031. __pyx_t_2 = __pyx_v_self->_cparser->upgrade;
  7032. __pyx_v_upgrade = __pyx_t_2;
  7033. /* "aiohttp/_http_parser.pyx":399
  7034. * should_close = not cparser.http_should_keep_alive(self._cparser)
  7035. * upgrade = self._cparser.upgrade
  7036. * chunked = self._cparser.flags & cparser.F_CHUNKED # <<<<<<<<<<<<<<
  7037. *
  7038. * raw_headers = tuple(self._raw_headers)
  7039. */
  7040. __pyx_v_chunked = (__pyx_v_self->_cparser->flags & F_CHUNKED);
  7041. /* "aiohttp/_http_parser.pyx":401
  7042. * chunked = self._cparser.flags & cparser.F_CHUNKED
  7043. *
  7044. * raw_headers = tuple(self._raw_headers) # <<<<<<<<<<<<<<
  7045. * headers = CIMultiDictProxy(self._headers)
  7046. *
  7047. */
  7048. if (unlikely(__pyx_v_self->_raw_headers == Py_None)) {
  7049. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
  7050. __PYX_ERR(0, 401, __pyx_L1_error)
  7051. }
  7052. __pyx_t_1 = PyList_AsTuple(__pyx_v_self->_raw_headers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  7053. __Pyx_GOTREF(__pyx_t_1);
  7054. __pyx_v_raw_headers = ((PyObject*)__pyx_t_1);
  7055. __pyx_t_1 = 0;
  7056. /* "aiohttp/_http_parser.pyx":402
  7057. *
  7058. * raw_headers = tuple(self._raw_headers)
  7059. * headers = CIMultiDictProxy(self._headers) # <<<<<<<<<<<<<<
  7060. *
  7061. * if upgrade or self._cparser.method == 5: # cparser.CONNECT:
  7062. */
  7063. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_CIMultiDictProxy);
  7064. __pyx_t_3 = __pyx_v_7aiohttp_12_http_parser_CIMultiDictProxy; __pyx_t_4 = NULL;
  7065. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  7066. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  7067. if (likely(__pyx_t_4)) {
  7068. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  7069. __Pyx_INCREF(__pyx_t_4);
  7070. __Pyx_INCREF(function);
  7071. __Pyx_DECREF_SET(__pyx_t_3, function);
  7072. }
  7073. }
  7074. if (!__pyx_t_4) {
  7075. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->_headers); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
  7076. __Pyx_GOTREF(__pyx_t_1);
  7077. } else {
  7078. #if CYTHON_FAST_PYCALL
  7079. if (PyFunction_Check(__pyx_t_3)) {
  7080. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->_headers};
  7081. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
  7082. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  7083. __Pyx_GOTREF(__pyx_t_1);
  7084. } else
  7085. #endif
  7086. #if CYTHON_FAST_PYCCALL
  7087. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  7088. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->_headers};
  7089. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
  7090. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  7091. __Pyx_GOTREF(__pyx_t_1);
  7092. } else
  7093. #endif
  7094. {
  7095. __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 402, __pyx_L1_error)
  7096. __Pyx_GOTREF(__pyx_t_5);
  7097. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
  7098. __Pyx_INCREF(__pyx_v_self->_headers);
  7099. __Pyx_GIVEREF(__pyx_v_self->_headers);
  7100. PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_self->_headers);
  7101. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
  7102. __Pyx_GOTREF(__pyx_t_1);
  7103. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  7104. }
  7105. }
  7106. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7107. __pyx_v_headers = __pyx_t_1;
  7108. __pyx_t_1 = 0;
  7109. /* "aiohttp/_http_parser.pyx":404
  7110. * headers = CIMultiDictProxy(self._headers)
  7111. *
  7112. * if upgrade or self._cparser.method == 5: # cparser.CONNECT: # <<<<<<<<<<<<<<
  7113. * self._upgraded = True
  7114. *
  7115. */
  7116. __pyx_t_7 = (__pyx_v_upgrade != 0);
  7117. if (!__pyx_t_7) {
  7118. } else {
  7119. __pyx_t_6 = __pyx_t_7;
  7120. goto __pyx_L4_bool_binop_done;
  7121. }
  7122. __pyx_t_7 = ((__pyx_v_self->_cparser->method == 5) != 0);
  7123. __pyx_t_6 = __pyx_t_7;
  7124. __pyx_L4_bool_binop_done:;
  7125. if (__pyx_t_6) {
  7126. /* "aiohttp/_http_parser.pyx":405
  7127. *
  7128. * if upgrade or self._cparser.method == 5: # cparser.CONNECT:
  7129. * self._upgraded = True # <<<<<<<<<<<<<<
  7130. *
  7131. * # do not support old websocket spec
  7132. */
  7133. __pyx_v_self->_upgraded = 1;
  7134. /* "aiohttp/_http_parser.pyx":404
  7135. * headers = CIMultiDictProxy(self._headers)
  7136. *
  7137. * if upgrade or self._cparser.method == 5: # cparser.CONNECT: # <<<<<<<<<<<<<<
  7138. * self._upgraded = True
  7139. *
  7140. */
  7141. }
  7142. /* "aiohttp/_http_parser.pyx":408
  7143. *
  7144. * # do not support old websocket spec
  7145. * if SEC_WEBSOCKET_KEY1 in headers: # <<<<<<<<<<<<<<
  7146. * raise InvalidHeader(SEC_WEBSOCKET_KEY1)
  7147. *
  7148. */
  7149. __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1, __pyx_v_headers, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 408, __pyx_L1_error)
  7150. __pyx_t_7 = (__pyx_t_6 != 0);
  7151. if (unlikely(__pyx_t_7)) {
  7152. /* "aiohttp/_http_parser.pyx":409
  7153. * # do not support old websocket spec
  7154. * if SEC_WEBSOCKET_KEY1 in headers:
  7155. * raise InvalidHeader(SEC_WEBSOCKET_KEY1) # <<<<<<<<<<<<<<
  7156. *
  7157. * encoding = None
  7158. */
  7159. __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidHeader); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error)
  7160. __Pyx_GOTREF(__pyx_t_3);
  7161. __pyx_t_5 = NULL;
  7162. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  7163. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
  7164. if (likely(__pyx_t_5)) {
  7165. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  7166. __Pyx_INCREF(__pyx_t_5);
  7167. __Pyx_INCREF(function);
  7168. __Pyx_DECREF_SET(__pyx_t_3, function);
  7169. }
  7170. }
  7171. if (!__pyx_t_5) {
  7172. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
  7173. __Pyx_GOTREF(__pyx_t_1);
  7174. } else {
  7175. #if CYTHON_FAST_PYCALL
  7176. if (PyFunction_Check(__pyx_t_3)) {
  7177. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1};
  7178. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
  7179. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  7180. __Pyx_GOTREF(__pyx_t_1);
  7181. } else
  7182. #endif
  7183. #if CYTHON_FAST_PYCCALL
  7184. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  7185. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1};
  7186. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
  7187. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  7188. __Pyx_GOTREF(__pyx_t_1);
  7189. } else
  7190. #endif
  7191. {
  7192. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 409, __pyx_L1_error)
  7193. __Pyx_GOTREF(__pyx_t_4);
  7194. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
  7195. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1);
  7196. __Pyx_GIVEREF(__pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1);
  7197. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1);
  7198. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
  7199. __Pyx_GOTREF(__pyx_t_1);
  7200. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7201. }
  7202. }
  7203. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7204. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  7205. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7206. __PYX_ERR(0, 409, __pyx_L1_error)
  7207. /* "aiohttp/_http_parser.pyx":408
  7208. *
  7209. * # do not support old websocket spec
  7210. * if SEC_WEBSOCKET_KEY1 in headers: # <<<<<<<<<<<<<<
  7211. * raise InvalidHeader(SEC_WEBSOCKET_KEY1)
  7212. *
  7213. */
  7214. }
  7215. /* "aiohttp/_http_parser.pyx":411
  7216. * raise InvalidHeader(SEC_WEBSOCKET_KEY1)
  7217. *
  7218. * encoding = None # <<<<<<<<<<<<<<
  7219. * enc = self._content_encoding
  7220. * if enc is not None:
  7221. */
  7222. __Pyx_INCREF(Py_None);
  7223. __pyx_v_encoding = Py_None;
  7224. /* "aiohttp/_http_parser.pyx":412
  7225. *
  7226. * encoding = None
  7227. * enc = self._content_encoding # <<<<<<<<<<<<<<
  7228. * if enc is not None:
  7229. * self._content_encoding = None
  7230. */
  7231. __pyx_t_1 = __pyx_v_self->_content_encoding;
  7232. __Pyx_INCREF(__pyx_t_1);
  7233. __pyx_v_enc = __pyx_t_1;
  7234. __pyx_t_1 = 0;
  7235. /* "aiohttp/_http_parser.pyx":413
  7236. * encoding = None
  7237. * enc = self._content_encoding
  7238. * if enc is not None: # <<<<<<<<<<<<<<
  7239. * self._content_encoding = None
  7240. * enc = enc.lower()
  7241. */
  7242. __pyx_t_7 = (__pyx_v_enc != Py_None);
  7243. __pyx_t_6 = (__pyx_t_7 != 0);
  7244. if (__pyx_t_6) {
  7245. /* "aiohttp/_http_parser.pyx":414
  7246. * enc = self._content_encoding
  7247. * if enc is not None:
  7248. * self._content_encoding = None # <<<<<<<<<<<<<<
  7249. * enc = enc.lower()
  7250. * if enc in ('gzip', 'deflate', 'br'):
  7251. */
  7252. __Pyx_INCREF(Py_None);
  7253. __Pyx_GIVEREF(Py_None);
  7254. __Pyx_GOTREF(__pyx_v_self->_content_encoding);
  7255. __Pyx_DECREF(__pyx_v_self->_content_encoding);
  7256. __pyx_v_self->_content_encoding = ((PyObject*)Py_None);
  7257. /* "aiohttp/_http_parser.pyx":415
  7258. * if enc is not None:
  7259. * self._content_encoding = None
  7260. * enc = enc.lower() # <<<<<<<<<<<<<<
  7261. * if enc in ('gzip', 'deflate', 'br'):
  7262. * encoding = enc
  7263. */
  7264. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_enc, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L1_error)
  7265. __Pyx_GOTREF(__pyx_t_3);
  7266. __pyx_t_4 = NULL;
  7267. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
  7268. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  7269. if (likely(__pyx_t_4)) {
  7270. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  7271. __Pyx_INCREF(__pyx_t_4);
  7272. __Pyx_INCREF(function);
  7273. __Pyx_DECREF_SET(__pyx_t_3, function);
  7274. }
  7275. }
  7276. if (__pyx_t_4) {
  7277. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
  7278. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7279. } else {
  7280. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error)
  7281. }
  7282. __Pyx_GOTREF(__pyx_t_1);
  7283. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7284. __Pyx_DECREF_SET(__pyx_v_enc, __pyx_t_1);
  7285. __pyx_t_1 = 0;
  7286. /* "aiohttp/_http_parser.pyx":416
  7287. * self._content_encoding = None
  7288. * enc = enc.lower()
  7289. * if enc in ('gzip', 'deflate', 'br'): # <<<<<<<<<<<<<<
  7290. * encoding = enc
  7291. *
  7292. */
  7293. __Pyx_INCREF(__pyx_v_enc);
  7294. __pyx_t_1 = __pyx_v_enc;
  7295. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_gzip, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
  7296. if (!__pyx_t_7) {
  7297. } else {
  7298. __pyx_t_6 = __pyx_t_7;
  7299. goto __pyx_L9_bool_binop_done;
  7300. }
  7301. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_deflate, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
  7302. if (!__pyx_t_7) {
  7303. } else {
  7304. __pyx_t_6 = __pyx_t_7;
  7305. goto __pyx_L9_bool_binop_done;
  7306. }
  7307. __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_br, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 416, __pyx_L1_error)
  7308. __pyx_t_6 = __pyx_t_7;
  7309. __pyx_L9_bool_binop_done:;
  7310. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7311. __pyx_t_7 = (__pyx_t_6 != 0);
  7312. if (__pyx_t_7) {
  7313. /* "aiohttp/_http_parser.pyx":417
  7314. * enc = enc.lower()
  7315. * if enc in ('gzip', 'deflate', 'br'):
  7316. * encoding = enc # <<<<<<<<<<<<<<
  7317. *
  7318. * if self._cparser.type == cparser.HTTP_REQUEST:
  7319. */
  7320. __Pyx_INCREF(__pyx_v_enc);
  7321. __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_v_enc);
  7322. /* "aiohttp/_http_parser.pyx":416
  7323. * self._content_encoding = None
  7324. * enc = enc.lower()
  7325. * if enc in ('gzip', 'deflate', 'br'): # <<<<<<<<<<<<<<
  7326. * encoding = enc
  7327. *
  7328. */
  7329. }
  7330. /* "aiohttp/_http_parser.pyx":413
  7331. * encoding = None
  7332. * enc = self._content_encoding
  7333. * if enc is not None: # <<<<<<<<<<<<<<
  7334. * self._content_encoding = None
  7335. * enc = enc.lower()
  7336. */
  7337. }
  7338. /* "aiohttp/_http_parser.pyx":419
  7339. * encoding = enc
  7340. *
  7341. * if self._cparser.type == cparser.HTTP_REQUEST: # <<<<<<<<<<<<<<
  7342. * msg = _new_request_message(
  7343. * method, self._path,
  7344. */
  7345. __pyx_t_7 = ((__pyx_v_self->_cparser->type == HTTP_REQUEST) != 0);
  7346. if (__pyx_t_7) {
  7347. /* "aiohttp/_http_parser.pyx":421
  7348. * if self._cparser.type == cparser.HTTP_REQUEST:
  7349. * msg = _new_request_message(
  7350. * method, self._path, # <<<<<<<<<<<<<<
  7351. * self.http_version(), headers, raw_headers,
  7352. * should_close, encoding, upgrade, chunked, self._url)
  7353. */
  7354. __pyx_t_1 = __pyx_v_self->_path;
  7355. __Pyx_INCREF(__pyx_t_1);
  7356. /* "aiohttp/_http_parser.pyx":422
  7357. * msg = _new_request_message(
  7358. * method, self._path,
  7359. * self.http_version(), headers, raw_headers, # <<<<<<<<<<<<<<
  7360. * should_close, encoding, upgrade, chunked, self._url)
  7361. * else:
  7362. */
  7363. __pyx_t_3 = __pyx_f_7aiohttp_12_http_parser_10HttpParser_http_version(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
  7364. __Pyx_GOTREF(__pyx_t_3);
  7365. /* "aiohttp/_http_parser.pyx":423
  7366. * method, self._path,
  7367. * self.http_version(), headers, raw_headers,
  7368. * should_close, encoding, upgrade, chunked, self._url) # <<<<<<<<<<<<<<
  7369. * else:
  7370. * msg = _new_response_message(
  7371. */
  7372. __pyx_t_4 = __pyx_v_self->_url;
  7373. __Pyx_INCREF(__pyx_t_4);
  7374. /* "aiohttp/_http_parser.pyx":420
  7375. *
  7376. * if self._cparser.type == cparser.HTTP_REQUEST:
  7377. * msg = _new_request_message( # <<<<<<<<<<<<<<
  7378. * method, self._path,
  7379. * self.http_version(), headers, raw_headers,
  7380. */
  7381. __pyx_t_5 = __pyx_f_7aiohttp_12_http_parser__new_request_message(__pyx_v_method, ((PyObject*)__pyx_t_1), __pyx_t_3, __pyx_v_headers, __pyx_v_raw_headers, __pyx_v_should_close, __pyx_v_encoding, __pyx_v_upgrade, __pyx_v_chunked, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 420, __pyx_L1_error)
  7382. __Pyx_GOTREF(__pyx_t_5);
  7383. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7384. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7385. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7386. __pyx_v_msg = __pyx_t_5;
  7387. __pyx_t_5 = 0;
  7388. /* "aiohttp/_http_parser.pyx":419
  7389. * encoding = enc
  7390. *
  7391. * if self._cparser.type == cparser.HTTP_REQUEST: # <<<<<<<<<<<<<<
  7392. * msg = _new_request_message(
  7393. * method, self._path,
  7394. */
  7395. goto __pyx_L12;
  7396. }
  7397. /* "aiohttp/_http_parser.pyx":425
  7398. * should_close, encoding, upgrade, chunked, self._url)
  7399. * else:
  7400. * msg = _new_response_message( # <<<<<<<<<<<<<<
  7401. * self.http_version(), self._cparser.status_code, self._reason,
  7402. * headers, raw_headers, should_close, encoding,
  7403. */
  7404. /*else*/ {
  7405. /* "aiohttp/_http_parser.pyx":426
  7406. * else:
  7407. * msg = _new_response_message(
  7408. * self.http_version(), self._cparser.status_code, self._reason, # <<<<<<<<<<<<<<
  7409. * headers, raw_headers, should_close, encoding,
  7410. * upgrade, chunked)
  7411. */
  7412. __pyx_t_5 = __pyx_f_7aiohttp_12_http_parser_10HttpParser_http_version(__pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 426, __pyx_L1_error)
  7413. __Pyx_GOTREF(__pyx_t_5);
  7414. __pyx_t_4 = __pyx_v_self->_reason;
  7415. __Pyx_INCREF(__pyx_t_4);
  7416. /* "aiohttp/_http_parser.pyx":425
  7417. * should_close, encoding, upgrade, chunked, self._url)
  7418. * else:
  7419. * msg = _new_response_message( # <<<<<<<<<<<<<<
  7420. * self.http_version(), self._cparser.status_code, self._reason,
  7421. * headers, raw_headers, should_close, encoding,
  7422. */
  7423. __pyx_t_3 = __pyx_f_7aiohttp_12_http_parser__new_response_message(__pyx_t_5, __pyx_v_self->_cparser->status_code, ((PyObject*)__pyx_t_4), __pyx_v_headers, __pyx_v_raw_headers, __pyx_v_should_close, __pyx_v_encoding, __pyx_v_upgrade, __pyx_v_chunked); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error)
  7424. __Pyx_GOTREF(__pyx_t_3);
  7425. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  7426. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7427. __pyx_v_msg = __pyx_t_3;
  7428. __pyx_t_3 = 0;
  7429. }
  7430. __pyx_L12:;
  7431. /* "aiohttp/_http_parser.pyx":430
  7432. * upgrade, chunked)
  7433. *
  7434. * if (self._cparser.content_length > 0 or chunked or # <<<<<<<<<<<<<<
  7435. * self._cparser.method == 5): # CONNECT: 5
  7436. * payload = StreamReader(
  7437. */
  7438. __pyx_t_6 = ((__pyx_v_self->_cparser->content_length > 0) != 0);
  7439. if (!__pyx_t_6) {
  7440. } else {
  7441. __pyx_t_7 = __pyx_t_6;
  7442. goto __pyx_L14_bool_binop_done;
  7443. }
  7444. __pyx_t_6 = (__pyx_v_chunked != 0);
  7445. if (!__pyx_t_6) {
  7446. } else {
  7447. __pyx_t_7 = __pyx_t_6;
  7448. goto __pyx_L14_bool_binop_done;
  7449. }
  7450. /* "aiohttp/_http_parser.pyx":431
  7451. *
  7452. * if (self._cparser.content_length > 0 or chunked or
  7453. * self._cparser.method == 5): # CONNECT: 5 # <<<<<<<<<<<<<<
  7454. * payload = StreamReader(
  7455. * self._protocol, timer=self._timer, loop=self._loop)
  7456. */
  7457. __pyx_t_6 = ((__pyx_v_self->_cparser->method == 5) != 0);
  7458. __pyx_t_7 = __pyx_t_6;
  7459. __pyx_L14_bool_binop_done:;
  7460. /* "aiohttp/_http_parser.pyx":430
  7461. * upgrade, chunked)
  7462. *
  7463. * if (self._cparser.content_length > 0 or chunked or # <<<<<<<<<<<<<<
  7464. * self._cparser.method == 5): # CONNECT: 5
  7465. * payload = StreamReader(
  7466. */
  7467. if (__pyx_t_7) {
  7468. /* "aiohttp/_http_parser.pyx":432
  7469. * if (self._cparser.content_length > 0 or chunked or
  7470. * self._cparser.method == 5): # CONNECT: 5
  7471. * payload = StreamReader( # <<<<<<<<<<<<<<
  7472. * self._protocol, timer=self._timer, loop=self._loop)
  7473. * else:
  7474. */
  7475. __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L1_error)
  7476. __Pyx_GOTREF(__pyx_t_3);
  7477. __Pyx_INCREF(__pyx_v_self->_protocol);
  7478. __Pyx_GIVEREF(__pyx_v_self->_protocol);
  7479. PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_protocol);
  7480. /* "aiohttp/_http_parser.pyx":433
  7481. * self._cparser.method == 5): # CONNECT: 5
  7482. * payload = StreamReader(
  7483. * self._protocol, timer=self._timer, loop=self._loop) # <<<<<<<<<<<<<<
  7484. * else:
  7485. * payload = EMPTY_PAYLOAD
  7486. */
  7487. __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
  7488. __Pyx_GOTREF(__pyx_t_4);
  7489. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_timer, __pyx_v_self->_timer) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  7490. if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_loop, __pyx_v_self->_loop) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
  7491. /* "aiohttp/_http_parser.pyx":432
  7492. * if (self._cparser.content_length > 0 or chunked or
  7493. * self._cparser.method == 5): # CONNECT: 5
  7494. * payload = StreamReader( # <<<<<<<<<<<<<<
  7495. * self._protocol, timer=self._timer, loop=self._loop)
  7496. * else:
  7497. */
  7498. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_7aiohttp_12_http_parser_StreamReader, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 432, __pyx_L1_error)
  7499. __Pyx_GOTREF(__pyx_t_5);
  7500. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7501. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7502. __pyx_v_payload = __pyx_t_5;
  7503. __pyx_t_5 = 0;
  7504. /* "aiohttp/_http_parser.pyx":430
  7505. * upgrade, chunked)
  7506. *
  7507. * if (self._cparser.content_length > 0 or chunked or # <<<<<<<<<<<<<<
  7508. * self._cparser.method == 5): # CONNECT: 5
  7509. * payload = StreamReader(
  7510. */
  7511. goto __pyx_L13;
  7512. }
  7513. /* "aiohttp/_http_parser.pyx":435
  7514. * self._protocol, timer=self._timer, loop=self._loop)
  7515. * else:
  7516. * payload = EMPTY_PAYLOAD # <<<<<<<<<<<<<<
  7517. *
  7518. * self._payload = payload
  7519. */
  7520. /*else*/ {
  7521. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD);
  7522. __pyx_v_payload = __pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD;
  7523. }
  7524. __pyx_L13:;
  7525. /* "aiohttp/_http_parser.pyx":437
  7526. * payload = EMPTY_PAYLOAD
  7527. *
  7528. * self._payload = payload # <<<<<<<<<<<<<<
  7529. * if encoding is not None and self._auto_decompress:
  7530. * self._payload = DeflateBuffer(payload, encoding)
  7531. */
  7532. __Pyx_INCREF(__pyx_v_payload);
  7533. __Pyx_GIVEREF(__pyx_v_payload);
  7534. __Pyx_GOTREF(__pyx_v_self->_payload);
  7535. __Pyx_DECREF(__pyx_v_self->_payload);
  7536. __pyx_v_self->_payload = __pyx_v_payload;
  7537. /* "aiohttp/_http_parser.pyx":438
  7538. *
  7539. * self._payload = payload
  7540. * if encoding is not None and self._auto_decompress: # <<<<<<<<<<<<<<
  7541. * self._payload = DeflateBuffer(payload, encoding)
  7542. *
  7543. */
  7544. __pyx_t_6 = (__pyx_v_encoding != Py_None);
  7545. __pyx_t_8 = (__pyx_t_6 != 0);
  7546. if (__pyx_t_8) {
  7547. } else {
  7548. __pyx_t_7 = __pyx_t_8;
  7549. goto __pyx_L18_bool_binop_done;
  7550. }
  7551. __pyx_t_8 = (__pyx_v_self->_auto_decompress != 0);
  7552. __pyx_t_7 = __pyx_t_8;
  7553. __pyx_L18_bool_binop_done:;
  7554. if (__pyx_t_7) {
  7555. /* "aiohttp/_http_parser.pyx":439
  7556. * self._payload = payload
  7557. * if encoding is not None and self._auto_decompress:
  7558. * self._payload = DeflateBuffer(payload, encoding) # <<<<<<<<<<<<<<
  7559. *
  7560. * if not self._response_with_body:
  7561. */
  7562. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_DeflateBuffer);
  7563. __pyx_t_4 = __pyx_v_7aiohttp_12_http_parser_DeflateBuffer; __pyx_t_3 = NULL;
  7564. __pyx_t_9 = 0;
  7565. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  7566. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
  7567. if (likely(__pyx_t_3)) {
  7568. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  7569. __Pyx_INCREF(__pyx_t_3);
  7570. __Pyx_INCREF(function);
  7571. __Pyx_DECREF_SET(__pyx_t_4, function);
  7572. __pyx_t_9 = 1;
  7573. }
  7574. }
  7575. #if CYTHON_FAST_PYCALL
  7576. if (PyFunction_Check(__pyx_t_4)) {
  7577. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_payload, __pyx_v_encoding};
  7578. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error)
  7579. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7580. __Pyx_GOTREF(__pyx_t_5);
  7581. } else
  7582. #endif
  7583. #if CYTHON_FAST_PYCCALL
  7584. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  7585. PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_payload, __pyx_v_encoding};
  7586. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error)
  7587. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  7588. __Pyx_GOTREF(__pyx_t_5);
  7589. } else
  7590. #endif
  7591. {
  7592. __pyx_t_1 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)
  7593. __Pyx_GOTREF(__pyx_t_1);
  7594. if (__pyx_t_3) {
  7595. __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
  7596. }
  7597. __Pyx_INCREF(__pyx_v_payload);
  7598. __Pyx_GIVEREF(__pyx_v_payload);
  7599. PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_9, __pyx_v_payload);
  7600. __Pyx_INCREF(__pyx_v_encoding);
  7601. __Pyx_GIVEREF(__pyx_v_encoding);
  7602. PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_9, __pyx_v_encoding);
  7603. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 439, __pyx_L1_error)
  7604. __Pyx_GOTREF(__pyx_t_5);
  7605. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7606. }
  7607. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  7608. __Pyx_GIVEREF(__pyx_t_5);
  7609. __Pyx_GOTREF(__pyx_v_self->_payload);
  7610. __Pyx_DECREF(__pyx_v_self->_payload);
  7611. __pyx_v_self->_payload = __pyx_t_5;
  7612. __pyx_t_5 = 0;
  7613. /* "aiohttp/_http_parser.pyx":438
  7614. *
  7615. * self._payload = payload
  7616. * if encoding is not None and self._auto_decompress: # <<<<<<<<<<<<<<
  7617. * self._payload = DeflateBuffer(payload, encoding)
  7618. *
  7619. */
  7620. }
  7621. /* "aiohttp/_http_parser.pyx":441
  7622. * self._payload = DeflateBuffer(payload, encoding)
  7623. *
  7624. * if not self._response_with_body: # <<<<<<<<<<<<<<
  7625. * payload = EMPTY_PAYLOAD
  7626. *
  7627. */
  7628. __pyx_t_7 = ((!(__pyx_v_self->_response_with_body != 0)) != 0);
  7629. if (__pyx_t_7) {
  7630. /* "aiohttp/_http_parser.pyx":442
  7631. *
  7632. * if not self._response_with_body:
  7633. * payload = EMPTY_PAYLOAD # <<<<<<<<<<<<<<
  7634. *
  7635. * self._messages.append((msg, payload))
  7636. */
  7637. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD);
  7638. __Pyx_DECREF_SET(__pyx_v_payload, __pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD);
  7639. /* "aiohttp/_http_parser.pyx":441
  7640. * self._payload = DeflateBuffer(payload, encoding)
  7641. *
  7642. * if not self._response_with_body: # <<<<<<<<<<<<<<
  7643. * payload = EMPTY_PAYLOAD
  7644. *
  7645. */
  7646. }
  7647. /* "aiohttp/_http_parser.pyx":444
  7648. * payload = EMPTY_PAYLOAD
  7649. *
  7650. * self._messages.append((msg, payload)) # <<<<<<<<<<<<<<
  7651. *
  7652. * cdef _on_message_complete(self):
  7653. */
  7654. if (unlikely(__pyx_v_self->_messages == Py_None)) {
  7655. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  7656. __PYX_ERR(0, 444, __pyx_L1_error)
  7657. }
  7658. __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 444, __pyx_L1_error)
  7659. __Pyx_GOTREF(__pyx_t_5);
  7660. __Pyx_INCREF(__pyx_v_msg);
  7661. __Pyx_GIVEREF(__pyx_v_msg);
  7662. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_msg);
  7663. __Pyx_INCREF(__pyx_v_payload);
  7664. __Pyx_GIVEREF(__pyx_v_payload);
  7665. PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_payload);
  7666. __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->_messages, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 444, __pyx_L1_error)
  7667. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  7668. /* "aiohttp/_http_parser.pyx":393
  7669. * self._has_value = True
  7670. *
  7671. * cdef _on_headers_complete(self): # <<<<<<<<<<<<<<
  7672. * self._process_header()
  7673. *
  7674. */
  7675. /* function exit code */
  7676. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  7677. goto __pyx_L0;
  7678. __pyx_L1_error:;
  7679. __Pyx_XDECREF(__pyx_t_1);
  7680. __Pyx_XDECREF(__pyx_t_3);
  7681. __Pyx_XDECREF(__pyx_t_4);
  7682. __Pyx_XDECREF(__pyx_t_5);
  7683. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._on_headers_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7684. __pyx_r = 0;
  7685. __pyx_L0:;
  7686. __Pyx_XDECREF(__pyx_v_method);
  7687. __Pyx_XDECREF(__pyx_v_raw_headers);
  7688. __Pyx_XDECREF(__pyx_v_headers);
  7689. __Pyx_XDECREF(__pyx_v_encoding);
  7690. __Pyx_XDECREF(__pyx_v_enc);
  7691. __Pyx_XDECREF(__pyx_v_msg);
  7692. __Pyx_XDECREF(__pyx_v_payload);
  7693. __Pyx_XGIVEREF(__pyx_r);
  7694. __Pyx_RefNannyFinishContext();
  7695. return __pyx_r;
  7696. }
  7697. /* "aiohttp/_http_parser.pyx":446
  7698. * self._messages.append((msg, payload))
  7699. *
  7700. * cdef _on_message_complete(self): # <<<<<<<<<<<<<<
  7701. * self._payload.feed_eof()
  7702. * self._payload = None
  7703. */
  7704. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_message_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  7705. PyObject *__pyx_r = NULL;
  7706. __Pyx_RefNannyDeclarations
  7707. PyObject *__pyx_t_1 = NULL;
  7708. PyObject *__pyx_t_2 = NULL;
  7709. PyObject *__pyx_t_3 = NULL;
  7710. __Pyx_RefNannySetupContext("_on_message_complete", 0);
  7711. /* "aiohttp/_http_parser.pyx":447
  7712. *
  7713. * cdef _on_message_complete(self):
  7714. * self._payload.feed_eof() # <<<<<<<<<<<<<<
  7715. * self._payload = None
  7716. *
  7717. */
  7718. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_payload, __pyx_n_s_feed_eof); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error)
  7719. __Pyx_GOTREF(__pyx_t_2);
  7720. __pyx_t_3 = NULL;
  7721. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  7722. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  7723. if (likely(__pyx_t_3)) {
  7724. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  7725. __Pyx_INCREF(__pyx_t_3);
  7726. __Pyx_INCREF(function);
  7727. __Pyx_DECREF_SET(__pyx_t_2, function);
  7728. }
  7729. }
  7730. if (__pyx_t_3) {
  7731. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  7732. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7733. } else {
  7734. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error)
  7735. }
  7736. __Pyx_GOTREF(__pyx_t_1);
  7737. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7738. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7739. /* "aiohttp/_http_parser.pyx":448
  7740. * cdef _on_message_complete(self):
  7741. * self._payload.feed_eof()
  7742. * self._payload = None # <<<<<<<<<<<<<<
  7743. *
  7744. * cdef _on_chunk_header(self):
  7745. */
  7746. __Pyx_INCREF(Py_None);
  7747. __Pyx_GIVEREF(Py_None);
  7748. __Pyx_GOTREF(__pyx_v_self->_payload);
  7749. __Pyx_DECREF(__pyx_v_self->_payload);
  7750. __pyx_v_self->_payload = Py_None;
  7751. /* "aiohttp/_http_parser.pyx":446
  7752. * self._messages.append((msg, payload))
  7753. *
  7754. * cdef _on_message_complete(self): # <<<<<<<<<<<<<<
  7755. * self._payload.feed_eof()
  7756. * self._payload = None
  7757. */
  7758. /* function exit code */
  7759. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  7760. goto __pyx_L0;
  7761. __pyx_L1_error:;
  7762. __Pyx_XDECREF(__pyx_t_1);
  7763. __Pyx_XDECREF(__pyx_t_2);
  7764. __Pyx_XDECREF(__pyx_t_3);
  7765. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._on_message_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7766. __pyx_r = 0;
  7767. __pyx_L0:;
  7768. __Pyx_XGIVEREF(__pyx_r);
  7769. __Pyx_RefNannyFinishContext();
  7770. return __pyx_r;
  7771. }
  7772. /* "aiohttp/_http_parser.pyx":450
  7773. * self._payload = None
  7774. *
  7775. * cdef _on_chunk_header(self): # <<<<<<<<<<<<<<
  7776. * self._payload.begin_http_chunk_receiving()
  7777. *
  7778. */
  7779. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_chunk_header(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  7780. PyObject *__pyx_r = NULL;
  7781. __Pyx_RefNannyDeclarations
  7782. PyObject *__pyx_t_1 = NULL;
  7783. PyObject *__pyx_t_2 = NULL;
  7784. PyObject *__pyx_t_3 = NULL;
  7785. __Pyx_RefNannySetupContext("_on_chunk_header", 0);
  7786. /* "aiohttp/_http_parser.pyx":451
  7787. *
  7788. * cdef _on_chunk_header(self):
  7789. * self._payload.begin_http_chunk_receiving() # <<<<<<<<<<<<<<
  7790. *
  7791. * cdef _on_chunk_complete(self):
  7792. */
  7793. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_payload, __pyx_n_s_begin_http_chunk_receiving); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
  7794. __Pyx_GOTREF(__pyx_t_2);
  7795. __pyx_t_3 = NULL;
  7796. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  7797. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  7798. if (likely(__pyx_t_3)) {
  7799. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  7800. __Pyx_INCREF(__pyx_t_3);
  7801. __Pyx_INCREF(function);
  7802. __Pyx_DECREF_SET(__pyx_t_2, function);
  7803. }
  7804. }
  7805. if (__pyx_t_3) {
  7806. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
  7807. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7808. } else {
  7809. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error)
  7810. }
  7811. __Pyx_GOTREF(__pyx_t_1);
  7812. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7813. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7814. /* "aiohttp/_http_parser.pyx":450
  7815. * self._payload = None
  7816. *
  7817. * cdef _on_chunk_header(self): # <<<<<<<<<<<<<<
  7818. * self._payload.begin_http_chunk_receiving()
  7819. *
  7820. */
  7821. /* function exit code */
  7822. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  7823. goto __pyx_L0;
  7824. __pyx_L1_error:;
  7825. __Pyx_XDECREF(__pyx_t_1);
  7826. __Pyx_XDECREF(__pyx_t_2);
  7827. __Pyx_XDECREF(__pyx_t_3);
  7828. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._on_chunk_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7829. __pyx_r = 0;
  7830. __pyx_L0:;
  7831. __Pyx_XGIVEREF(__pyx_r);
  7832. __Pyx_RefNannyFinishContext();
  7833. return __pyx_r;
  7834. }
  7835. /* "aiohttp/_http_parser.pyx":453
  7836. * self._payload.begin_http_chunk_receiving()
  7837. *
  7838. * cdef _on_chunk_complete(self): # <<<<<<<<<<<<<<
  7839. * self._payload.end_http_chunk_receiving()
  7840. *
  7841. */
  7842. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_chunk_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  7843. PyObject *__pyx_r = NULL;
  7844. __Pyx_RefNannyDeclarations
  7845. PyObject *__pyx_t_1 = NULL;
  7846. PyObject *__pyx_t_2 = NULL;
  7847. PyObject *__pyx_t_3 = NULL;
  7848. __Pyx_RefNannySetupContext("_on_chunk_complete", 0);
  7849. /* "aiohttp/_http_parser.pyx":454
  7850. *
  7851. * cdef _on_chunk_complete(self):
  7852. * self._payload.end_http_chunk_receiving() # <<<<<<<<<<<<<<
  7853. *
  7854. * cdef object _on_status_complete(self):
  7855. */
  7856. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_payload, __pyx_n_s_end_http_chunk_receiving); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
  7857. __Pyx_GOTREF(__pyx_t_2);
  7858. __pyx_t_3 = NULL;
  7859. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  7860. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  7861. if (likely(__pyx_t_3)) {
  7862. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  7863. __Pyx_INCREF(__pyx_t_3);
  7864. __Pyx_INCREF(function);
  7865. __Pyx_DECREF_SET(__pyx_t_2, function);
  7866. }
  7867. }
  7868. if (__pyx_t_3) {
  7869. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  7870. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  7871. } else {
  7872. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error)
  7873. }
  7874. __Pyx_GOTREF(__pyx_t_1);
  7875. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7876. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  7877. /* "aiohttp/_http_parser.pyx":453
  7878. * self._payload.begin_http_chunk_receiving()
  7879. *
  7880. * cdef _on_chunk_complete(self): # <<<<<<<<<<<<<<
  7881. * self._payload.end_http_chunk_receiving()
  7882. *
  7883. */
  7884. /* function exit code */
  7885. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  7886. goto __pyx_L0;
  7887. __pyx_L1_error:;
  7888. __Pyx_XDECREF(__pyx_t_1);
  7889. __Pyx_XDECREF(__pyx_t_2);
  7890. __Pyx_XDECREF(__pyx_t_3);
  7891. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser._on_chunk_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  7892. __pyx_r = 0;
  7893. __pyx_L0:;
  7894. __Pyx_XGIVEREF(__pyx_r);
  7895. __Pyx_RefNannyFinishContext();
  7896. return __pyx_r;
  7897. }
  7898. /* "aiohttp/_http_parser.pyx":456
  7899. * self._payload.end_http_chunk_receiving()
  7900. *
  7901. * cdef object _on_status_complete(self): # <<<<<<<<<<<<<<
  7902. * pass
  7903. *
  7904. */
  7905. static PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_status_complete(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  7906. PyObject *__pyx_r = NULL;
  7907. __Pyx_RefNannyDeclarations
  7908. __Pyx_RefNannySetupContext("_on_status_complete", 0);
  7909. /* function exit code */
  7910. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  7911. __Pyx_XGIVEREF(__pyx_r);
  7912. __Pyx_RefNannyFinishContext();
  7913. return __pyx_r;
  7914. }
  7915. /* "aiohttp/_http_parser.pyx":459
  7916. * pass
  7917. *
  7918. * cdef inline http_version(self): # <<<<<<<<<<<<<<
  7919. * cdef cparser.http_parser* parser = self._cparser
  7920. *
  7921. */
  7922. static CYTHON_INLINE PyObject *__pyx_f_7aiohttp_12_http_parser_10HttpParser_http_version(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  7923. struct http_parser *__pyx_v_parser;
  7924. PyObject *__pyx_r = NULL;
  7925. __Pyx_RefNannyDeclarations
  7926. struct http_parser *__pyx_t_1;
  7927. int __pyx_t_2;
  7928. PyObject *__pyx_t_3 = NULL;
  7929. PyObject *__pyx_t_4 = NULL;
  7930. PyObject *__pyx_t_5 = NULL;
  7931. PyObject *__pyx_t_6 = NULL;
  7932. PyObject *__pyx_t_7 = NULL;
  7933. int __pyx_t_8;
  7934. PyObject *__pyx_t_9 = NULL;
  7935. __Pyx_RefNannySetupContext("http_version", 0);
  7936. /* "aiohttp/_http_parser.pyx":460
  7937. *
  7938. * cdef inline http_version(self):
  7939. * cdef cparser.http_parser* parser = self._cparser # <<<<<<<<<<<<<<
  7940. *
  7941. * if parser.http_major == 1:
  7942. */
  7943. __pyx_t_1 = __pyx_v_self->_cparser;
  7944. __pyx_v_parser = __pyx_t_1;
  7945. /* "aiohttp/_http_parser.pyx":462
  7946. * cdef cparser.http_parser* parser = self._cparser
  7947. *
  7948. * if parser.http_major == 1: # <<<<<<<<<<<<<<
  7949. * if parser.http_minor == 0:
  7950. * return HttpVersion10
  7951. */
  7952. __pyx_t_2 = ((__pyx_v_parser->http_major == 1) != 0);
  7953. if (__pyx_t_2) {
  7954. /* "aiohttp/_http_parser.pyx":463
  7955. *
  7956. * if parser.http_major == 1:
  7957. * if parser.http_minor == 0: # <<<<<<<<<<<<<<
  7958. * return HttpVersion10
  7959. * elif parser.http_minor == 1:
  7960. */
  7961. switch (__pyx_v_parser->http_minor) {
  7962. case 0:
  7963. /* "aiohttp/_http_parser.pyx":464
  7964. * if parser.http_major == 1:
  7965. * if parser.http_minor == 0:
  7966. * return HttpVersion10 # <<<<<<<<<<<<<<
  7967. * elif parser.http_minor == 1:
  7968. * return HttpVersion11
  7969. */
  7970. __Pyx_XDECREF(__pyx_r);
  7971. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_HttpVersion10);
  7972. __pyx_r = __pyx_v_7aiohttp_12_http_parser_HttpVersion10;
  7973. goto __pyx_L0;
  7974. /* "aiohttp/_http_parser.pyx":463
  7975. *
  7976. * if parser.http_major == 1:
  7977. * if parser.http_minor == 0: # <<<<<<<<<<<<<<
  7978. * return HttpVersion10
  7979. * elif parser.http_minor == 1:
  7980. */
  7981. break;
  7982. /* "aiohttp/_http_parser.pyx":465
  7983. * if parser.http_minor == 0:
  7984. * return HttpVersion10
  7985. * elif parser.http_minor == 1: # <<<<<<<<<<<<<<
  7986. * return HttpVersion11
  7987. *
  7988. */
  7989. case 1:
  7990. /* "aiohttp/_http_parser.pyx":466
  7991. * return HttpVersion10
  7992. * elif parser.http_minor == 1:
  7993. * return HttpVersion11 # <<<<<<<<<<<<<<
  7994. *
  7995. * return HttpVersion(parser.http_major, parser.http_minor)
  7996. */
  7997. __Pyx_XDECREF(__pyx_r);
  7998. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_HttpVersion11);
  7999. __pyx_r = __pyx_v_7aiohttp_12_http_parser_HttpVersion11;
  8000. goto __pyx_L0;
  8001. /* "aiohttp/_http_parser.pyx":465
  8002. * if parser.http_minor == 0:
  8003. * return HttpVersion10
  8004. * elif parser.http_minor == 1: # <<<<<<<<<<<<<<
  8005. * return HttpVersion11
  8006. *
  8007. */
  8008. break;
  8009. default: break;
  8010. }
  8011. /* "aiohttp/_http_parser.pyx":462
  8012. * cdef cparser.http_parser* parser = self._cparser
  8013. *
  8014. * if parser.http_major == 1: # <<<<<<<<<<<<<<
  8015. * if parser.http_minor == 0:
  8016. * return HttpVersion10
  8017. */
  8018. }
  8019. /* "aiohttp/_http_parser.pyx":468
  8020. * return HttpVersion11
  8021. *
  8022. * return HttpVersion(parser.http_major, parser.http_minor) # <<<<<<<<<<<<<<
  8023. *
  8024. * ### Public API ###
  8025. */
  8026. __Pyx_XDECREF(__pyx_r);
  8027. __pyx_t_4 = __Pyx_PyInt_From_unsigned_short(__pyx_v_parser->http_major); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error)
  8028. __Pyx_GOTREF(__pyx_t_4);
  8029. __pyx_t_5 = __Pyx_PyInt_From_unsigned_short(__pyx_v_parser->http_minor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 468, __pyx_L1_error)
  8030. __Pyx_GOTREF(__pyx_t_5);
  8031. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_HttpVersion);
  8032. __pyx_t_6 = __pyx_v_7aiohttp_12_http_parser_HttpVersion; __pyx_t_7 = NULL;
  8033. __pyx_t_8 = 0;
  8034. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  8035. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
  8036. if (likely(__pyx_t_7)) {
  8037. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  8038. __Pyx_INCREF(__pyx_t_7);
  8039. __Pyx_INCREF(function);
  8040. __Pyx_DECREF_SET(__pyx_t_6, function);
  8041. __pyx_t_8 = 1;
  8042. }
  8043. }
  8044. #if CYTHON_FAST_PYCALL
  8045. if (PyFunction_Check(__pyx_t_6)) {
  8046. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_5};
  8047. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
  8048. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  8049. __Pyx_GOTREF(__pyx_t_3);
  8050. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8051. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8052. } else
  8053. #endif
  8054. #if CYTHON_FAST_PYCCALL
  8055. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  8056. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_5};
  8057. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
  8058. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  8059. __Pyx_GOTREF(__pyx_t_3);
  8060. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8061. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8062. } else
  8063. #endif
  8064. {
  8065. __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 468, __pyx_L1_error)
  8066. __Pyx_GOTREF(__pyx_t_9);
  8067. if (__pyx_t_7) {
  8068. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  8069. }
  8070. __Pyx_GIVEREF(__pyx_t_4);
  8071. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
  8072. __Pyx_GIVEREF(__pyx_t_5);
  8073. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
  8074. __pyx_t_4 = 0;
  8075. __pyx_t_5 = 0;
  8076. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
  8077. __Pyx_GOTREF(__pyx_t_3);
  8078. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  8079. }
  8080. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  8081. __pyx_r = __pyx_t_3;
  8082. __pyx_t_3 = 0;
  8083. goto __pyx_L0;
  8084. /* "aiohttp/_http_parser.pyx":459
  8085. * pass
  8086. *
  8087. * cdef inline http_version(self): # <<<<<<<<<<<<<<
  8088. * cdef cparser.http_parser* parser = self._cparser
  8089. *
  8090. */
  8091. /* function exit code */
  8092. __pyx_L1_error:;
  8093. __Pyx_XDECREF(__pyx_t_3);
  8094. __Pyx_XDECREF(__pyx_t_4);
  8095. __Pyx_XDECREF(__pyx_t_5);
  8096. __Pyx_XDECREF(__pyx_t_6);
  8097. __Pyx_XDECREF(__pyx_t_7);
  8098. __Pyx_XDECREF(__pyx_t_9);
  8099. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser.http_version", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8100. __pyx_r = 0;
  8101. __pyx_L0:;
  8102. __Pyx_XGIVEREF(__pyx_r);
  8103. __Pyx_RefNannyFinishContext();
  8104. return __pyx_r;
  8105. }
  8106. /* "aiohttp/_http_parser.pyx":472
  8107. * ### Public API ###
  8108. *
  8109. * def feed_eof(self): # <<<<<<<<<<<<<<
  8110. * cdef bytes desc
  8111. *
  8112. */
  8113. /* Python wrapper */
  8114. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_5feed_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  8115. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_5feed_eof(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  8116. PyObject *__pyx_r = 0;
  8117. __Pyx_RefNannyDeclarations
  8118. __Pyx_RefNannySetupContext("feed_eof (wrapper)", 0);
  8119. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_10HttpParser_4feed_eof(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self));
  8120. /* function exit code */
  8121. __Pyx_RefNannyFinishContext();
  8122. return __pyx_r;
  8123. }
  8124. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_4feed_eof(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  8125. PyObject *__pyx_v_desc = 0;
  8126. PyObject *__pyx_r = NULL;
  8127. __Pyx_RefNannyDeclarations
  8128. int __pyx_t_1;
  8129. int __pyx_t_2;
  8130. PyObject *__pyx_t_3 = NULL;
  8131. PyObject *__pyx_t_4 = NULL;
  8132. PyObject *__pyx_t_5 = NULL;
  8133. PyObject *__pyx_t_6 = NULL;
  8134. PyObject *__pyx_t_7 = NULL;
  8135. __Pyx_RefNannySetupContext("feed_eof", 0);
  8136. /* "aiohttp/_http_parser.pyx":475
  8137. * cdef bytes desc
  8138. *
  8139. * if self._payload is not None: # <<<<<<<<<<<<<<
  8140. * if self._cparser.flags & cparser.F_CHUNKED:
  8141. * raise TransferEncodingError(
  8142. */
  8143. __pyx_t_1 = (__pyx_v_self->_payload != Py_None);
  8144. __pyx_t_2 = (__pyx_t_1 != 0);
  8145. if (__pyx_t_2) {
  8146. /* "aiohttp/_http_parser.pyx":476
  8147. *
  8148. * if self._payload is not None:
  8149. * if self._cparser.flags & cparser.F_CHUNKED: # <<<<<<<<<<<<<<
  8150. * raise TransferEncodingError(
  8151. * "Not enough data for satisfy transfer length header.")
  8152. */
  8153. __pyx_t_2 = ((__pyx_v_self->_cparser->flags & F_CHUNKED) != 0);
  8154. if (unlikely(__pyx_t_2)) {
  8155. /* "aiohttp/_http_parser.pyx":477
  8156. * if self._payload is not None:
  8157. * if self._cparser.flags & cparser.F_CHUNKED:
  8158. * raise TransferEncodingError( # <<<<<<<<<<<<<<
  8159. * "Not enough data for satisfy transfer length header.")
  8160. * elif self._cparser.flags & cparser.F_CONTENTLENGTH:
  8161. */
  8162. __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_TransferEncodingError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 477, __pyx_L1_error)
  8163. __Pyx_GOTREF(__pyx_t_3);
  8164. __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error)
  8165. __Pyx_GOTREF(__pyx_t_4);
  8166. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8167. __Pyx_Raise(__pyx_t_4, 0, 0, 0);
  8168. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8169. __PYX_ERR(0, 477, __pyx_L1_error)
  8170. /* "aiohttp/_http_parser.pyx":476
  8171. *
  8172. * if self._payload is not None:
  8173. * if self._cparser.flags & cparser.F_CHUNKED: # <<<<<<<<<<<<<<
  8174. * raise TransferEncodingError(
  8175. * "Not enough data for satisfy transfer length header.")
  8176. */
  8177. }
  8178. /* "aiohttp/_http_parser.pyx":479
  8179. * raise TransferEncodingError(
  8180. * "Not enough data for satisfy transfer length header.")
  8181. * elif self._cparser.flags & cparser.F_CONTENTLENGTH: # <<<<<<<<<<<<<<
  8182. * raise ContentLengthError(
  8183. * "Not enough data for satisfy content length header.")
  8184. */
  8185. __pyx_t_2 = ((__pyx_v_self->_cparser->flags & F_CONTENTLENGTH) != 0);
  8186. if (unlikely(__pyx_t_2)) {
  8187. /* "aiohttp/_http_parser.pyx":480
  8188. * "Not enough data for satisfy transfer length header.")
  8189. * elif self._cparser.flags & cparser.F_CONTENTLENGTH:
  8190. * raise ContentLengthError( # <<<<<<<<<<<<<<
  8191. * "Not enough data for satisfy content length header.")
  8192. * elif self._cparser.http_errno != cparser.HPE_OK:
  8193. */
  8194. __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ContentLengthError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error)
  8195. __Pyx_GOTREF(__pyx_t_4);
  8196. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 480, __pyx_L1_error)
  8197. __Pyx_GOTREF(__pyx_t_3);
  8198. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8199. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  8200. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8201. __PYX_ERR(0, 480, __pyx_L1_error)
  8202. /* "aiohttp/_http_parser.pyx":479
  8203. * raise TransferEncodingError(
  8204. * "Not enough data for satisfy transfer length header.")
  8205. * elif self._cparser.flags & cparser.F_CONTENTLENGTH: # <<<<<<<<<<<<<<
  8206. * raise ContentLengthError(
  8207. * "Not enough data for satisfy content length header.")
  8208. */
  8209. }
  8210. /* "aiohttp/_http_parser.pyx":482
  8211. * raise ContentLengthError(
  8212. * "Not enough data for satisfy content length header.")
  8213. * elif self._cparser.http_errno != cparser.HPE_OK: # <<<<<<<<<<<<<<
  8214. * desc = cparser.http_errno_description(
  8215. * <cparser.http_errno> self._cparser.http_errno)
  8216. */
  8217. __pyx_t_2 = ((__pyx_v_self->_cparser->http_errno != HPE_OK) != 0);
  8218. if (unlikely(__pyx_t_2)) {
  8219. /* "aiohttp/_http_parser.pyx":483
  8220. * "Not enough data for satisfy content length header.")
  8221. * elif self._cparser.http_errno != cparser.HPE_OK:
  8222. * desc = cparser.http_errno_description( # <<<<<<<<<<<<<<
  8223. * <cparser.http_errno> self._cparser.http_errno)
  8224. * raise PayloadEncodingError(desc.decode('latin-1'))
  8225. */
  8226. __pyx_t_3 = __Pyx_PyBytes_FromString(http_errno_description(((enum http_errno)__pyx_v_self->_cparser->http_errno))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 483, __pyx_L1_error)
  8227. __Pyx_GOTREF(__pyx_t_3);
  8228. __pyx_v_desc = ((PyObject*)__pyx_t_3);
  8229. __pyx_t_3 = 0;
  8230. /* "aiohttp/_http_parser.pyx":485
  8231. * desc = cparser.http_errno_description(
  8232. * <cparser.http_errno> self._cparser.http_errno)
  8233. * raise PayloadEncodingError(desc.decode('latin-1')) # <<<<<<<<<<<<<<
  8234. * else:
  8235. * self._payload.feed_eof()
  8236. */
  8237. __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_PayloadEncodingError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 485, __pyx_L1_error)
  8238. __Pyx_GOTREF(__pyx_t_4);
  8239. __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_desc, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error)
  8240. __Pyx_GOTREF(__pyx_t_5);
  8241. __pyx_t_6 = NULL;
  8242. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  8243. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
  8244. if (likely(__pyx_t_6)) {
  8245. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  8246. __Pyx_INCREF(__pyx_t_6);
  8247. __Pyx_INCREF(function);
  8248. __Pyx_DECREF_SET(__pyx_t_4, function);
  8249. }
  8250. }
  8251. if (!__pyx_t_6) {
  8252. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  8253. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8254. __Pyx_GOTREF(__pyx_t_3);
  8255. } else {
  8256. #if CYTHON_FAST_PYCALL
  8257. if (PyFunction_Check(__pyx_t_4)) {
  8258. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
  8259. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  8260. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  8261. __Pyx_GOTREF(__pyx_t_3);
  8262. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8263. } else
  8264. #endif
  8265. #if CYTHON_FAST_PYCCALL
  8266. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  8267. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
  8268. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  8269. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  8270. __Pyx_GOTREF(__pyx_t_3);
  8271. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  8272. } else
  8273. #endif
  8274. {
  8275. __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error)
  8276. __Pyx_GOTREF(__pyx_t_7);
  8277. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
  8278. __Pyx_GIVEREF(__pyx_t_5);
  8279. PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
  8280. __pyx_t_5 = 0;
  8281. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 485, __pyx_L1_error)
  8282. __Pyx_GOTREF(__pyx_t_3);
  8283. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  8284. }
  8285. }
  8286. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8287. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  8288. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8289. __PYX_ERR(0, 485, __pyx_L1_error)
  8290. /* "aiohttp/_http_parser.pyx":482
  8291. * raise ContentLengthError(
  8292. * "Not enough data for satisfy content length header.")
  8293. * elif self._cparser.http_errno != cparser.HPE_OK: # <<<<<<<<<<<<<<
  8294. * desc = cparser.http_errno_description(
  8295. * <cparser.http_errno> self._cparser.http_errno)
  8296. */
  8297. }
  8298. /* "aiohttp/_http_parser.pyx":487
  8299. * raise PayloadEncodingError(desc.decode('latin-1'))
  8300. * else:
  8301. * self._payload.feed_eof() # <<<<<<<<<<<<<<
  8302. * elif self._started:
  8303. * self._on_headers_complete()
  8304. */
  8305. /*else*/ {
  8306. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_payload, __pyx_n_s_feed_eof); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 487, __pyx_L1_error)
  8307. __Pyx_GOTREF(__pyx_t_4);
  8308. __pyx_t_7 = NULL;
  8309. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  8310. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
  8311. if (likely(__pyx_t_7)) {
  8312. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  8313. __Pyx_INCREF(__pyx_t_7);
  8314. __Pyx_INCREF(function);
  8315. __Pyx_DECREF_SET(__pyx_t_4, function);
  8316. }
  8317. }
  8318. if (__pyx_t_7) {
  8319. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  8320. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  8321. } else {
  8322. __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  8323. }
  8324. __Pyx_GOTREF(__pyx_t_3);
  8325. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  8326. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8327. }
  8328. /* "aiohttp/_http_parser.pyx":475
  8329. * cdef bytes desc
  8330. *
  8331. * if self._payload is not None: # <<<<<<<<<<<<<<
  8332. * if self._cparser.flags & cparser.F_CHUNKED:
  8333. * raise TransferEncodingError(
  8334. */
  8335. goto __pyx_L3;
  8336. }
  8337. /* "aiohttp/_http_parser.pyx":488
  8338. * else:
  8339. * self._payload.feed_eof()
  8340. * elif self._started: # <<<<<<<<<<<<<<
  8341. * self._on_headers_complete()
  8342. * if self._messages:
  8343. */
  8344. __pyx_t_2 = (__pyx_v_self->_started != 0);
  8345. if (__pyx_t_2) {
  8346. /* "aiohttp/_http_parser.pyx":489
  8347. * self._payload.feed_eof()
  8348. * elif self._started:
  8349. * self._on_headers_complete() # <<<<<<<<<<<<<<
  8350. * if self._messages:
  8351. * return self._messages[-1][0]
  8352. */
  8353. __pyx_t_3 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self->__pyx_vtab)->_on_headers_complete(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 489, __pyx_L1_error)
  8354. __Pyx_GOTREF(__pyx_t_3);
  8355. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8356. /* "aiohttp/_http_parser.pyx":490
  8357. * elif self._started:
  8358. * self._on_headers_complete()
  8359. * if self._messages: # <<<<<<<<<<<<<<
  8360. * return self._messages[-1][0]
  8361. *
  8362. */
  8363. __pyx_t_2 = (__pyx_v_self->_messages != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_messages) != 0);
  8364. if (__pyx_t_2) {
  8365. /* "aiohttp/_http_parser.pyx":491
  8366. * self._on_headers_complete()
  8367. * if self._messages:
  8368. * return self._messages[-1][0] # <<<<<<<<<<<<<<
  8369. *
  8370. * def feed_data(self, data):
  8371. */
  8372. __Pyx_XDECREF(__pyx_r);
  8373. if (unlikely(__pyx_v_self->_messages == Py_None)) {
  8374. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  8375. __PYX_ERR(0, 491, __pyx_L1_error)
  8376. }
  8377. __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->_messages, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 491, __pyx_L1_error)
  8378. __Pyx_GOTREF(__pyx_t_3);
  8379. __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 491, __pyx_L1_error)
  8380. __Pyx_GOTREF(__pyx_t_4);
  8381. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  8382. __pyx_r = __pyx_t_4;
  8383. __pyx_t_4 = 0;
  8384. goto __pyx_L0;
  8385. /* "aiohttp/_http_parser.pyx":490
  8386. * elif self._started:
  8387. * self._on_headers_complete()
  8388. * if self._messages: # <<<<<<<<<<<<<<
  8389. * return self._messages[-1][0]
  8390. *
  8391. */
  8392. }
  8393. /* "aiohttp/_http_parser.pyx":488
  8394. * else:
  8395. * self._payload.feed_eof()
  8396. * elif self._started: # <<<<<<<<<<<<<<
  8397. * self._on_headers_complete()
  8398. * if self._messages:
  8399. */
  8400. }
  8401. __pyx_L3:;
  8402. /* "aiohttp/_http_parser.pyx":472
  8403. * ### Public API ###
  8404. *
  8405. * def feed_eof(self): # <<<<<<<<<<<<<<
  8406. * cdef bytes desc
  8407. *
  8408. */
  8409. /* function exit code */
  8410. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  8411. goto __pyx_L0;
  8412. __pyx_L1_error:;
  8413. __Pyx_XDECREF(__pyx_t_3);
  8414. __Pyx_XDECREF(__pyx_t_4);
  8415. __Pyx_XDECREF(__pyx_t_5);
  8416. __Pyx_XDECREF(__pyx_t_6);
  8417. __Pyx_XDECREF(__pyx_t_7);
  8418. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser.feed_eof", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8419. __pyx_r = NULL;
  8420. __pyx_L0:;
  8421. __Pyx_XDECREF(__pyx_v_desc);
  8422. __Pyx_XGIVEREF(__pyx_r);
  8423. __Pyx_RefNannyFinishContext();
  8424. return __pyx_r;
  8425. }
  8426. /* "aiohttp/_http_parser.pyx":493
  8427. * return self._messages[-1][0]
  8428. *
  8429. * def feed_data(self, data): # <<<<<<<<<<<<<<
  8430. * cdef:
  8431. * size_t data_len
  8432. */
  8433. /* Python wrapper */
  8434. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_7feed_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
  8435. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_7feed_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  8436. PyObject *__pyx_r = 0;
  8437. __Pyx_RefNannyDeclarations
  8438. __Pyx_RefNannySetupContext("feed_data (wrapper)", 0);
  8439. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_10HttpParser_6feed_data(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self), ((PyObject *)__pyx_v_data));
  8440. /* function exit code */
  8441. __Pyx_RefNannyFinishContext();
  8442. return __pyx_r;
  8443. }
  8444. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_6feed_data(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, PyObject *__pyx_v_data) {
  8445. size_t __pyx_v_data_len;
  8446. size_t __pyx_v_nb;
  8447. PyObject *__pyx_v_ex = NULL;
  8448. PyObject *__pyx_v_messages = NULL;
  8449. PyObject *__pyx_r = NULL;
  8450. __Pyx_RefNannyDeclarations
  8451. int __pyx_t_1;
  8452. int __pyx_t_2;
  8453. int __pyx_t_3;
  8454. PyObject *__pyx_t_4 = NULL;
  8455. PyObject *__pyx_t_5 = NULL;
  8456. __Pyx_RefNannySetupContext("feed_data", 0);
  8457. /* "aiohttp/_http_parser.pyx":498
  8458. * size_t nb
  8459. *
  8460. * PyObject_GetBuffer(data, &self.py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<<
  8461. * data_len = <size_t>self.py_buf.len
  8462. *
  8463. */
  8464. __pyx_t_1 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_self->py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 498, __pyx_L1_error)
  8465. /* "aiohttp/_http_parser.pyx":499
  8466. *
  8467. * PyObject_GetBuffer(data, &self.py_buf, PyBUF_SIMPLE)
  8468. * data_len = <size_t>self.py_buf.len # <<<<<<<<<<<<<<
  8469. *
  8470. * nb = cparser.http_parser_execute(
  8471. */
  8472. __pyx_v_data_len = ((size_t)__pyx_v_self->py_buf.len);
  8473. /* "aiohttp/_http_parser.pyx":501
  8474. * data_len = <size_t>self.py_buf.len
  8475. *
  8476. * nb = cparser.http_parser_execute( # <<<<<<<<<<<<<<
  8477. * self._cparser,
  8478. * self._csettings,
  8479. */
  8480. __pyx_v_nb = http_parser_execute(__pyx_v_self->_cparser, __pyx_v_self->_csettings, ((char *)__pyx_v_self->py_buf.buf), __pyx_v_data_len);
  8481. /* "aiohttp/_http_parser.pyx":507
  8482. * data_len)
  8483. *
  8484. * PyBuffer_Release(&self.py_buf) # <<<<<<<<<<<<<<
  8485. *
  8486. * # i am not sure about cparser.HPE_INVALID_METHOD,
  8487. */
  8488. PyBuffer_Release((&__pyx_v_self->py_buf));
  8489. /* "aiohttp/_http_parser.pyx":512
  8490. * # seems get err for valid request
  8491. * # test_client_functional.py::test_post_data_with_bytesio_file
  8492. * if (self._cparser.http_errno != cparser.HPE_OK and # <<<<<<<<<<<<<<
  8493. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or
  8494. * self._cparser.method == 0)):
  8495. */
  8496. __pyx_t_3 = ((__pyx_v_self->_cparser->http_errno != HPE_OK) != 0);
  8497. if (__pyx_t_3) {
  8498. } else {
  8499. __pyx_t_2 = __pyx_t_3;
  8500. goto __pyx_L4_bool_binop_done;
  8501. }
  8502. /* "aiohttp/_http_parser.pyx":513
  8503. * # test_client_functional.py::test_post_data_with_bytesio_file
  8504. * if (self._cparser.http_errno != cparser.HPE_OK and
  8505. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or # <<<<<<<<<<<<<<
  8506. * self._cparser.method == 0)):
  8507. * if self._payload_error == 0:
  8508. */
  8509. __pyx_t_3 = ((__pyx_v_self->_cparser->http_errno != HPE_INVALID_METHOD) != 0);
  8510. if (!__pyx_t_3) {
  8511. } else {
  8512. __pyx_t_2 = __pyx_t_3;
  8513. goto __pyx_L4_bool_binop_done;
  8514. }
  8515. /* "aiohttp/_http_parser.pyx":514
  8516. * if (self._cparser.http_errno != cparser.HPE_OK and
  8517. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or
  8518. * self._cparser.method == 0)): # <<<<<<<<<<<<<<
  8519. * if self._payload_error == 0:
  8520. * if self._last_error is not None:
  8521. */
  8522. __pyx_t_3 = ((__pyx_v_self->_cparser->method == 0) != 0);
  8523. __pyx_t_2 = __pyx_t_3;
  8524. __pyx_L4_bool_binop_done:;
  8525. /* "aiohttp/_http_parser.pyx":512
  8526. * # seems get err for valid request
  8527. * # test_client_functional.py::test_post_data_with_bytesio_file
  8528. * if (self._cparser.http_errno != cparser.HPE_OK and # <<<<<<<<<<<<<<
  8529. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or
  8530. * self._cparser.method == 0)):
  8531. */
  8532. if (__pyx_t_2) {
  8533. /* "aiohttp/_http_parser.pyx":515
  8534. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or
  8535. * self._cparser.method == 0)):
  8536. * if self._payload_error == 0: # <<<<<<<<<<<<<<
  8537. * if self._last_error is not None:
  8538. * ex = self._last_error
  8539. */
  8540. __pyx_t_2 = ((__pyx_v_self->_payload_error == 0) != 0);
  8541. if (__pyx_t_2) {
  8542. /* "aiohttp/_http_parser.pyx":516
  8543. * self._cparser.method == 0)):
  8544. * if self._payload_error == 0:
  8545. * if self._last_error is not None: # <<<<<<<<<<<<<<
  8546. * ex = self._last_error
  8547. * self._last_error = None
  8548. */
  8549. __pyx_t_2 = (__pyx_v_self->_last_error != Py_None);
  8550. __pyx_t_3 = (__pyx_t_2 != 0);
  8551. if (__pyx_t_3) {
  8552. /* "aiohttp/_http_parser.pyx":517
  8553. * if self._payload_error == 0:
  8554. * if self._last_error is not None:
  8555. * ex = self._last_error # <<<<<<<<<<<<<<
  8556. * self._last_error = None
  8557. * else:
  8558. */
  8559. __pyx_t_4 = __pyx_v_self->_last_error;
  8560. __Pyx_INCREF(__pyx_t_4);
  8561. __pyx_v_ex = __pyx_t_4;
  8562. __pyx_t_4 = 0;
  8563. /* "aiohttp/_http_parser.pyx":518
  8564. * if self._last_error is not None:
  8565. * ex = self._last_error
  8566. * self._last_error = None # <<<<<<<<<<<<<<
  8567. * else:
  8568. * ex = parser_error_from_errno(
  8569. */
  8570. __Pyx_INCREF(Py_None);
  8571. __Pyx_GIVEREF(Py_None);
  8572. __Pyx_GOTREF(__pyx_v_self->_last_error);
  8573. __Pyx_DECREF(__pyx_v_self->_last_error);
  8574. __pyx_v_self->_last_error = Py_None;
  8575. /* "aiohttp/_http_parser.pyx":516
  8576. * self._cparser.method == 0)):
  8577. * if self._payload_error == 0:
  8578. * if self._last_error is not None: # <<<<<<<<<<<<<<
  8579. * ex = self._last_error
  8580. * self._last_error = None
  8581. */
  8582. goto __pyx_L8;
  8583. }
  8584. /* "aiohttp/_http_parser.pyx":520
  8585. * self._last_error = None
  8586. * else:
  8587. * ex = parser_error_from_errno( # <<<<<<<<<<<<<<
  8588. * <cparser.http_errno> self._cparser.http_errno)
  8589. * self._payload = None
  8590. */
  8591. /*else*/ {
  8592. /* "aiohttp/_http_parser.pyx":521
  8593. * else:
  8594. * ex = parser_error_from_errno(
  8595. * <cparser.http_errno> self._cparser.http_errno) # <<<<<<<<<<<<<<
  8596. * self._payload = None
  8597. * raise ex
  8598. */
  8599. __pyx_t_4 = __pyx_f_7aiohttp_12_http_parser_parser_error_from_errno(((enum http_errno)__pyx_v_self->_cparser->http_errno)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
  8600. __Pyx_GOTREF(__pyx_t_4);
  8601. __pyx_v_ex = __pyx_t_4;
  8602. __pyx_t_4 = 0;
  8603. }
  8604. __pyx_L8:;
  8605. /* "aiohttp/_http_parser.pyx":522
  8606. * ex = parser_error_from_errno(
  8607. * <cparser.http_errno> self._cparser.http_errno)
  8608. * self._payload = None # <<<<<<<<<<<<<<
  8609. * raise ex
  8610. *
  8611. */
  8612. __Pyx_INCREF(Py_None);
  8613. __Pyx_GIVEREF(Py_None);
  8614. __Pyx_GOTREF(__pyx_v_self->_payload);
  8615. __Pyx_DECREF(__pyx_v_self->_payload);
  8616. __pyx_v_self->_payload = Py_None;
  8617. /* "aiohttp/_http_parser.pyx":523
  8618. * <cparser.http_errno> self._cparser.http_errno)
  8619. * self._payload = None
  8620. * raise ex # <<<<<<<<<<<<<<
  8621. *
  8622. * if self._messages:
  8623. */
  8624. __Pyx_Raise(__pyx_v_ex, 0, 0, 0);
  8625. __PYX_ERR(0, 523, __pyx_L1_error)
  8626. /* "aiohttp/_http_parser.pyx":515
  8627. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or
  8628. * self._cparser.method == 0)):
  8629. * if self._payload_error == 0: # <<<<<<<<<<<<<<
  8630. * if self._last_error is not None:
  8631. * ex = self._last_error
  8632. */
  8633. }
  8634. /* "aiohttp/_http_parser.pyx":512
  8635. * # seems get err for valid request
  8636. * # test_client_functional.py::test_post_data_with_bytesio_file
  8637. * if (self._cparser.http_errno != cparser.HPE_OK and # <<<<<<<<<<<<<<
  8638. * (self._cparser.http_errno != cparser.HPE_INVALID_METHOD or
  8639. * self._cparser.method == 0)):
  8640. */
  8641. }
  8642. /* "aiohttp/_http_parser.pyx":525
  8643. * raise ex
  8644. *
  8645. * if self._messages: # <<<<<<<<<<<<<<
  8646. * messages = self._messages
  8647. * self._messages = []
  8648. */
  8649. __pyx_t_3 = (__pyx_v_self->_messages != Py_None)&&(PyList_GET_SIZE(__pyx_v_self->_messages) != 0);
  8650. if (__pyx_t_3) {
  8651. /* "aiohttp/_http_parser.pyx":526
  8652. *
  8653. * if self._messages:
  8654. * messages = self._messages # <<<<<<<<<<<<<<
  8655. * self._messages = []
  8656. * else:
  8657. */
  8658. __pyx_t_4 = __pyx_v_self->_messages;
  8659. __Pyx_INCREF(__pyx_t_4);
  8660. __pyx_v_messages = __pyx_t_4;
  8661. __pyx_t_4 = 0;
  8662. /* "aiohttp/_http_parser.pyx":527
  8663. * if self._messages:
  8664. * messages = self._messages
  8665. * self._messages = [] # <<<<<<<<<<<<<<
  8666. * else:
  8667. * messages = ()
  8668. */
  8669. __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error)
  8670. __Pyx_GOTREF(__pyx_t_4);
  8671. __Pyx_GIVEREF(__pyx_t_4);
  8672. __Pyx_GOTREF(__pyx_v_self->_messages);
  8673. __Pyx_DECREF(__pyx_v_self->_messages);
  8674. __pyx_v_self->_messages = ((PyObject*)__pyx_t_4);
  8675. __pyx_t_4 = 0;
  8676. /* "aiohttp/_http_parser.pyx":525
  8677. * raise ex
  8678. *
  8679. * if self._messages: # <<<<<<<<<<<<<<
  8680. * messages = self._messages
  8681. * self._messages = []
  8682. */
  8683. goto __pyx_L9;
  8684. }
  8685. /* "aiohttp/_http_parser.pyx":529
  8686. * self._messages = []
  8687. * else:
  8688. * messages = () # <<<<<<<<<<<<<<
  8689. *
  8690. * if self._upgraded:
  8691. */
  8692. /*else*/ {
  8693. __Pyx_INCREF(__pyx_empty_tuple);
  8694. __pyx_v_messages = __pyx_empty_tuple;
  8695. }
  8696. __pyx_L9:;
  8697. /* "aiohttp/_http_parser.pyx":531
  8698. * messages = ()
  8699. *
  8700. * if self._upgraded: # <<<<<<<<<<<<<<
  8701. * return messages, True, data[nb:]
  8702. * else:
  8703. */
  8704. __pyx_t_3 = (__pyx_v_self->_upgraded != 0);
  8705. if (__pyx_t_3) {
  8706. /* "aiohttp/_http_parser.pyx":532
  8707. *
  8708. * if self._upgraded:
  8709. * return messages, True, data[nb:] # <<<<<<<<<<<<<<
  8710. * else:
  8711. * return messages, False, b''
  8712. */
  8713. __Pyx_XDECREF(__pyx_r);
  8714. __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_data, __pyx_v_nb, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 532, __pyx_L1_error)
  8715. __Pyx_GOTREF(__pyx_t_4);
  8716. __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error)
  8717. __Pyx_GOTREF(__pyx_t_5);
  8718. __Pyx_INCREF(__pyx_v_messages);
  8719. __Pyx_GIVEREF(__pyx_v_messages);
  8720. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_messages);
  8721. __Pyx_INCREF(Py_True);
  8722. __Pyx_GIVEREF(Py_True);
  8723. PyTuple_SET_ITEM(__pyx_t_5, 1, Py_True);
  8724. __Pyx_GIVEREF(__pyx_t_4);
  8725. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  8726. __pyx_t_4 = 0;
  8727. __pyx_r = __pyx_t_5;
  8728. __pyx_t_5 = 0;
  8729. goto __pyx_L0;
  8730. /* "aiohttp/_http_parser.pyx":531
  8731. * messages = ()
  8732. *
  8733. * if self._upgraded: # <<<<<<<<<<<<<<
  8734. * return messages, True, data[nb:]
  8735. * else:
  8736. */
  8737. }
  8738. /* "aiohttp/_http_parser.pyx":534
  8739. * return messages, True, data[nb:]
  8740. * else:
  8741. * return messages, False, b'' # <<<<<<<<<<<<<<
  8742. *
  8743. *
  8744. */
  8745. /*else*/ {
  8746. __Pyx_XDECREF(__pyx_r);
  8747. __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
  8748. __Pyx_GOTREF(__pyx_t_5);
  8749. __Pyx_INCREF(__pyx_v_messages);
  8750. __Pyx_GIVEREF(__pyx_v_messages);
  8751. PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_messages);
  8752. __Pyx_INCREF(Py_False);
  8753. __Pyx_GIVEREF(Py_False);
  8754. PyTuple_SET_ITEM(__pyx_t_5, 1, Py_False);
  8755. __Pyx_INCREF(__pyx_kp_b__6);
  8756. __Pyx_GIVEREF(__pyx_kp_b__6);
  8757. PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_b__6);
  8758. __pyx_r = __pyx_t_5;
  8759. __pyx_t_5 = 0;
  8760. goto __pyx_L0;
  8761. }
  8762. /* "aiohttp/_http_parser.pyx":493
  8763. * return self._messages[-1][0]
  8764. *
  8765. * def feed_data(self, data): # <<<<<<<<<<<<<<
  8766. * cdef:
  8767. * size_t data_len
  8768. */
  8769. /* function exit code */
  8770. __pyx_L1_error:;
  8771. __Pyx_XDECREF(__pyx_t_4);
  8772. __Pyx_XDECREF(__pyx_t_5);
  8773. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser.feed_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8774. __pyx_r = NULL;
  8775. __pyx_L0:;
  8776. __Pyx_XDECREF(__pyx_v_ex);
  8777. __Pyx_XDECREF(__pyx_v_messages);
  8778. __Pyx_XGIVEREF(__pyx_r);
  8779. __Pyx_RefNannyFinishContext();
  8780. return __pyx_r;
  8781. }
  8782. /* "(tree fragment)":1
  8783. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  8784. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8785. * def __setstate_cython__(self, __pyx_state):
  8786. */
  8787. /* Python wrapper */
  8788. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  8789. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  8790. PyObject *__pyx_r = 0;
  8791. __Pyx_RefNannyDeclarations
  8792. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  8793. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_10HttpParser_8__reduce_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self));
  8794. /* function exit code */
  8795. __Pyx_RefNannyFinishContext();
  8796. return __pyx_r;
  8797. }
  8798. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self) {
  8799. PyObject *__pyx_r = NULL;
  8800. __Pyx_RefNannyDeclarations
  8801. PyObject *__pyx_t_1 = NULL;
  8802. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  8803. /* "(tree fragment)":2
  8804. * def __reduce_cython__(self):
  8805. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  8806. * def __setstate_cython__(self, __pyx_state):
  8807. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8808. */
  8809. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  8810. __Pyx_GOTREF(__pyx_t_1);
  8811. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  8812. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8813. __PYX_ERR(1, 2, __pyx_L1_error)
  8814. /* "(tree fragment)":1
  8815. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  8816. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8817. * def __setstate_cython__(self, __pyx_state):
  8818. */
  8819. /* function exit code */
  8820. __pyx_L1_error:;
  8821. __Pyx_XDECREF(__pyx_t_1);
  8822. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8823. __pyx_r = NULL;
  8824. __Pyx_XGIVEREF(__pyx_r);
  8825. __Pyx_RefNannyFinishContext();
  8826. return __pyx_r;
  8827. }
  8828. /* "(tree fragment)":3
  8829. * def __reduce_cython__(self):
  8830. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8831. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  8832. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8833. */
  8834. /* Python wrapper */
  8835. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  8836. static PyObject *__pyx_pw_7aiohttp_12_http_parser_10HttpParser_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  8837. PyObject *__pyx_r = 0;
  8838. __Pyx_RefNannyDeclarations
  8839. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  8840. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_10HttpParser_10__setstate_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  8841. /* function exit code */
  8842. __Pyx_RefNannyFinishContext();
  8843. return __pyx_r;
  8844. }
  8845. static PyObject *__pyx_pf_7aiohttp_12_http_parser_10HttpParser_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  8846. PyObject *__pyx_r = NULL;
  8847. __Pyx_RefNannyDeclarations
  8848. PyObject *__pyx_t_1 = NULL;
  8849. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  8850. /* "(tree fragment)":4
  8851. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8852. * def __setstate_cython__(self, __pyx_state):
  8853. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  8854. */
  8855. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  8856. __Pyx_GOTREF(__pyx_t_1);
  8857. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  8858. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  8859. __PYX_ERR(1, 4, __pyx_L1_error)
  8860. /* "(tree fragment)":3
  8861. * def __reduce_cython__(self):
  8862. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8863. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  8864. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  8865. */
  8866. /* function exit code */
  8867. __pyx_L1_error:;
  8868. __Pyx_XDECREF(__pyx_t_1);
  8869. __Pyx_AddTraceback("aiohttp._http_parser.HttpParser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  8870. __pyx_r = NULL;
  8871. __Pyx_XGIVEREF(__pyx_r);
  8872. __Pyx_RefNannyFinishContext();
  8873. return __pyx_r;
  8874. }
  8875. /* "aiohttp/_http_parser.pyx":539
  8876. * cdef class HttpRequestParser(HttpParser):
  8877. *
  8878. * def __init__(self, protocol, loop, timer=None, # <<<<<<<<<<<<<<
  8879. * size_t max_line_size=8190, size_t max_headers=32768,
  8880. * size_t max_field_size=8190, payload_exception=None,
  8881. */
  8882. /* Python wrapper */
  8883. static int __pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  8884. static int __pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  8885. PyObject *__pyx_v_protocol = 0;
  8886. PyObject *__pyx_v_loop = 0;
  8887. PyObject *__pyx_v_timer = 0;
  8888. size_t __pyx_v_max_line_size;
  8889. size_t __pyx_v_max_headers;
  8890. size_t __pyx_v_max_field_size;
  8891. PyObject *__pyx_v_payload_exception = 0;
  8892. int __pyx_v_response_with_body;
  8893. CYTHON_UNUSED int __pyx_v_read_until_eof;
  8894. int __pyx_r;
  8895. __Pyx_RefNannyDeclarations
  8896. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  8897. {
  8898. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol,&__pyx_n_s_loop,&__pyx_n_s_timer,&__pyx_n_s_max_line_size,&__pyx_n_s_max_headers,&__pyx_n_s_max_field_size,&__pyx_n_s_payload_exception,&__pyx_n_s_response_with_body,&__pyx_n_s_read_until_eof,0};
  8899. PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
  8900. values[2] = ((PyObject *)Py_None);
  8901. /* "aiohttp/_http_parser.pyx":541
  8902. * def __init__(self, protocol, loop, timer=None,
  8903. * size_t max_line_size=8190, size_t max_headers=32768,
  8904. * size_t max_field_size=8190, payload_exception=None, # <<<<<<<<<<<<<<
  8905. * bint response_with_body=True, bint read_until_eof=False):
  8906. * self._init(cparser.HTTP_REQUEST, protocol, loop, timer,
  8907. */
  8908. values[6] = ((PyObject *)Py_None);
  8909. if (unlikely(__pyx_kwds)) {
  8910. Py_ssize_t kw_args;
  8911. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  8912. switch (pos_args) {
  8913. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  8914. CYTHON_FALLTHROUGH;
  8915. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  8916. CYTHON_FALLTHROUGH;
  8917. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  8918. CYTHON_FALLTHROUGH;
  8919. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  8920. CYTHON_FALLTHROUGH;
  8921. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  8922. CYTHON_FALLTHROUGH;
  8923. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  8924. CYTHON_FALLTHROUGH;
  8925. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  8926. CYTHON_FALLTHROUGH;
  8927. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  8928. CYTHON_FALLTHROUGH;
  8929. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  8930. CYTHON_FALLTHROUGH;
  8931. case 0: break;
  8932. default: goto __pyx_L5_argtuple_error;
  8933. }
  8934. kw_args = PyDict_Size(__pyx_kwds);
  8935. switch (pos_args) {
  8936. case 0:
  8937. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol)) != 0)) kw_args--;
  8938. else goto __pyx_L5_argtuple_error;
  8939. CYTHON_FALLTHROUGH;
  8940. case 1:
  8941. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  8942. else {
  8943. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 9, 1); __PYX_ERR(0, 539, __pyx_L3_error)
  8944. }
  8945. CYTHON_FALLTHROUGH;
  8946. case 2:
  8947. if (kw_args > 0) {
  8948. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timer);
  8949. if (value) { values[2] = value; kw_args--; }
  8950. }
  8951. CYTHON_FALLTHROUGH;
  8952. case 3:
  8953. if (kw_args > 0) {
  8954. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_line_size);
  8955. if (value) { values[3] = value; kw_args--; }
  8956. }
  8957. CYTHON_FALLTHROUGH;
  8958. case 4:
  8959. if (kw_args > 0) {
  8960. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_headers);
  8961. if (value) { values[4] = value; kw_args--; }
  8962. }
  8963. CYTHON_FALLTHROUGH;
  8964. case 5:
  8965. if (kw_args > 0) {
  8966. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_field_size);
  8967. if (value) { values[5] = value; kw_args--; }
  8968. }
  8969. CYTHON_FALLTHROUGH;
  8970. case 6:
  8971. if (kw_args > 0) {
  8972. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_payload_exception);
  8973. if (value) { values[6] = value; kw_args--; }
  8974. }
  8975. CYTHON_FALLTHROUGH;
  8976. case 7:
  8977. if (kw_args > 0) {
  8978. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_response_with_body);
  8979. if (value) { values[7] = value; kw_args--; }
  8980. }
  8981. CYTHON_FALLTHROUGH;
  8982. case 8:
  8983. if (kw_args > 0) {
  8984. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read_until_eof);
  8985. if (value) { values[8] = value; kw_args--; }
  8986. }
  8987. }
  8988. if (unlikely(kw_args > 0)) {
  8989. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 539, __pyx_L3_error)
  8990. }
  8991. } else {
  8992. switch (PyTuple_GET_SIZE(__pyx_args)) {
  8993. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  8994. CYTHON_FALLTHROUGH;
  8995. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  8996. CYTHON_FALLTHROUGH;
  8997. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  8998. CYTHON_FALLTHROUGH;
  8999. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  9000. CYTHON_FALLTHROUGH;
  9001. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  9002. CYTHON_FALLTHROUGH;
  9003. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  9004. CYTHON_FALLTHROUGH;
  9005. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  9006. CYTHON_FALLTHROUGH;
  9007. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9008. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9009. break;
  9010. default: goto __pyx_L5_argtuple_error;
  9011. }
  9012. }
  9013. __pyx_v_protocol = values[0];
  9014. __pyx_v_loop = values[1];
  9015. __pyx_v_timer = values[2];
  9016. if (values[3]) {
  9017. __pyx_v_max_line_size = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_max_line_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L3_error)
  9018. } else {
  9019. __pyx_v_max_line_size = ((size_t)0x1FFE);
  9020. }
  9021. if (values[4]) {
  9022. __pyx_v_max_headers = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_max_headers == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L3_error)
  9023. } else {
  9024. __pyx_v_max_headers = ((size_t)0x8000);
  9025. }
  9026. if (values[5]) {
  9027. __pyx_v_max_field_size = __Pyx_PyInt_As_size_t(values[5]); if (unlikely((__pyx_v_max_field_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 541, __pyx_L3_error)
  9028. } else {
  9029. __pyx_v_max_field_size = ((size_t)0x1FFE);
  9030. }
  9031. __pyx_v_payload_exception = values[6];
  9032. if (values[7]) {
  9033. __pyx_v_response_with_body = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_response_with_body == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L3_error)
  9034. } else {
  9035. /* "aiohttp/_http_parser.pyx":542
  9036. * size_t max_line_size=8190, size_t max_headers=32768,
  9037. * size_t max_field_size=8190, payload_exception=None,
  9038. * bint response_with_body=True, bint read_until_eof=False): # <<<<<<<<<<<<<<
  9039. * self._init(cparser.HTTP_REQUEST, protocol, loop, timer,
  9040. * max_line_size, max_headers, max_field_size,
  9041. */
  9042. __pyx_v_response_with_body = ((int)1);
  9043. }
  9044. if (values[8]) {
  9045. __pyx_v_read_until_eof = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_read_until_eof == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 542, __pyx_L3_error)
  9046. } else {
  9047. __pyx_v_read_until_eof = ((int)0);
  9048. }
  9049. }
  9050. goto __pyx_L4_argument_unpacking_done;
  9051. __pyx_L5_argtuple_error:;
  9052. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 539, __pyx_L3_error)
  9053. __pyx_L3_error:;
  9054. __Pyx_AddTraceback("aiohttp._http_parser.HttpRequestParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9055. __Pyx_RefNannyFinishContext();
  9056. return -1;
  9057. __pyx_L4_argument_unpacking_done:;
  9058. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser___init__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *)__pyx_v_self), __pyx_v_protocol, __pyx_v_loop, __pyx_v_timer, __pyx_v_max_line_size, __pyx_v_max_headers, __pyx_v_max_field_size, __pyx_v_payload_exception, __pyx_v_response_with_body, __pyx_v_read_until_eof);
  9059. /* "aiohttp/_http_parser.pyx":539
  9060. * cdef class HttpRequestParser(HttpParser):
  9061. *
  9062. * def __init__(self, protocol, loop, timer=None, # <<<<<<<<<<<<<<
  9063. * size_t max_line_size=8190, size_t max_headers=32768,
  9064. * size_t max_field_size=8190, payload_exception=None,
  9065. */
  9066. /* function exit code */
  9067. __Pyx_RefNannyFinishContext();
  9068. return __pyx_r;
  9069. }
  9070. static int __pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser___init__(struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_loop, PyObject *__pyx_v_timer, size_t __pyx_v_max_line_size, size_t __pyx_v_max_headers, size_t __pyx_v_max_field_size, PyObject *__pyx_v_payload_exception, int __pyx_v_response_with_body, CYTHON_UNUSED int __pyx_v_read_until_eof) {
  9071. int __pyx_r;
  9072. __Pyx_RefNannyDeclarations
  9073. PyObject *__pyx_t_1 = NULL;
  9074. struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init __pyx_t_2;
  9075. __Pyx_RefNannySetupContext("__init__", 0);
  9076. /* "aiohttp/_http_parser.pyx":543
  9077. * size_t max_field_size=8190, payload_exception=None,
  9078. * bint response_with_body=True, bint read_until_eof=False):
  9079. * self._init(cparser.HTTP_REQUEST, protocol, loop, timer, # <<<<<<<<<<<<<<
  9080. * max_line_size, max_headers, max_field_size,
  9081. * payload_exception, response_with_body)
  9082. */
  9083. __pyx_t_2.__pyx_n = 6;
  9084. __pyx_t_2.timer = __pyx_v_timer;
  9085. __pyx_t_2.max_line_size = __pyx_v_max_line_size;
  9086. __pyx_t_2.max_headers = __pyx_v_max_headers;
  9087. __pyx_t_2.max_field_size = __pyx_v_max_field_size;
  9088. __pyx_t_2.payload_exception = __pyx_v_payload_exception;
  9089. __pyx_t_2.response_with_body = __pyx_v_response_with_body;
  9090. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpRequestParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self), HTTP_REQUEST, __pyx_v_protocol, __pyx_v_loop, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
  9091. __Pyx_GOTREF(__pyx_t_1);
  9092. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9093. /* "aiohttp/_http_parser.pyx":539
  9094. * cdef class HttpRequestParser(HttpParser):
  9095. *
  9096. * def __init__(self, protocol, loop, timer=None, # <<<<<<<<<<<<<<
  9097. * size_t max_line_size=8190, size_t max_headers=32768,
  9098. * size_t max_field_size=8190, payload_exception=None,
  9099. */
  9100. /* function exit code */
  9101. __pyx_r = 0;
  9102. goto __pyx_L0;
  9103. __pyx_L1_error:;
  9104. __Pyx_XDECREF(__pyx_t_1);
  9105. __Pyx_AddTraceback("aiohttp._http_parser.HttpRequestParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9106. __pyx_r = -1;
  9107. __pyx_L0:;
  9108. __Pyx_RefNannyFinishContext();
  9109. return __pyx_r;
  9110. }
  9111. /* "aiohttp/_http_parser.pyx":547
  9112. * payload_exception, response_with_body)
  9113. *
  9114. * cdef object _on_status_complete(self): # <<<<<<<<<<<<<<
  9115. * cdef Py_buffer py_buf
  9116. * if not self._buf:
  9117. */
  9118. static PyObject *__pyx_f_7aiohttp_12_http_parser_17HttpRequestParser__on_status_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self) {
  9119. Py_buffer __pyx_v_py_buf;
  9120. PyObject *__pyx_r = NULL;
  9121. __Pyx_RefNannyDeclarations
  9122. int __pyx_t_1;
  9123. int __pyx_t_2;
  9124. PyObject *__pyx_t_3 = NULL;
  9125. PyObject *__pyx_t_4 = NULL;
  9126. PyObject *__pyx_t_5 = NULL;
  9127. PyObject *__pyx_t_6 = NULL;
  9128. int __pyx_t_7;
  9129. int __pyx_t_8;
  9130. char const *__pyx_t_9;
  9131. PyObject *__pyx_t_10 = NULL;
  9132. PyObject *__pyx_t_11 = NULL;
  9133. PyObject *__pyx_t_12 = NULL;
  9134. PyObject *__pyx_t_13 = NULL;
  9135. PyObject *__pyx_t_14 = NULL;
  9136. PyObject *__pyx_t_15 = NULL;
  9137. __Pyx_RefNannySetupContext("_on_status_complete", 0);
  9138. /* "aiohttp/_http_parser.pyx":549
  9139. * cdef object _on_status_complete(self):
  9140. * cdef Py_buffer py_buf
  9141. * if not self._buf: # <<<<<<<<<<<<<<
  9142. * return
  9143. * self._path = self._buf.decode('utf-8', 'surrogateescape')
  9144. */
  9145. __pyx_t_1 = (__pyx_v_self->__pyx_base._buf != Py_None)&&(PyByteArray_GET_SIZE(__pyx_v_self->__pyx_base._buf) != 0);
  9146. __pyx_t_2 = ((!__pyx_t_1) != 0);
  9147. if (__pyx_t_2) {
  9148. /* "aiohttp/_http_parser.pyx":550
  9149. * cdef Py_buffer py_buf
  9150. * if not self._buf:
  9151. * return # <<<<<<<<<<<<<<
  9152. * self._path = self._buf.decode('utf-8', 'surrogateescape')
  9153. * if self._cparser.method == 5: # CONNECT
  9154. */
  9155. __Pyx_XDECREF(__pyx_r);
  9156. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9157. goto __pyx_L0;
  9158. /* "aiohttp/_http_parser.pyx":549
  9159. * cdef object _on_status_complete(self):
  9160. * cdef Py_buffer py_buf
  9161. * if not self._buf: # <<<<<<<<<<<<<<
  9162. * return
  9163. * self._path = self._buf.decode('utf-8', 'surrogateescape')
  9164. */
  9165. }
  9166. /* "aiohttp/_http_parser.pyx":551
  9167. * if not self._buf:
  9168. * return
  9169. * self._path = self._buf.decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  9170. * if self._cparser.method == 5: # CONNECT
  9171. * self._url = URL(self._path)
  9172. */
  9173. if (unlikely(__pyx_v_self->__pyx_base._buf == Py_None)) {
  9174. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
  9175. __PYX_ERR(0, 551, __pyx_L1_error)
  9176. }
  9177. __pyx_t_3 = __Pyx_decode_bytearray(__pyx_v_self->__pyx_base._buf, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error)
  9178. __Pyx_GOTREF(__pyx_t_3);
  9179. __Pyx_GIVEREF(__pyx_t_3);
  9180. __Pyx_GOTREF(__pyx_v_self->__pyx_base._path);
  9181. __Pyx_DECREF(__pyx_v_self->__pyx_base._path);
  9182. __pyx_v_self->__pyx_base._path = ((PyObject*)__pyx_t_3);
  9183. __pyx_t_3 = 0;
  9184. /* "aiohttp/_http_parser.pyx":552
  9185. * return
  9186. * self._path = self._buf.decode('utf-8', 'surrogateescape')
  9187. * if self._cparser.method == 5: # CONNECT # <<<<<<<<<<<<<<
  9188. * self._url = URL(self._path)
  9189. * else:
  9190. */
  9191. __pyx_t_2 = ((__pyx_v_self->__pyx_base._cparser->method == 5) != 0);
  9192. if (__pyx_t_2) {
  9193. /* "aiohttp/_http_parser.pyx":553
  9194. * self._path = self._buf.decode('utf-8', 'surrogateescape')
  9195. * if self._cparser.method == 5: # CONNECT
  9196. * self._url = URL(self._path) # <<<<<<<<<<<<<<
  9197. * else:
  9198. * PyObject_GetBuffer(self._buf, &py_buf, PyBUF_SIMPLE)
  9199. */
  9200. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_URL);
  9201. __pyx_t_4 = __pyx_v_7aiohttp_12_http_parser_URL; __pyx_t_5 = NULL;
  9202. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
  9203. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
  9204. if (likely(__pyx_t_5)) {
  9205. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  9206. __Pyx_INCREF(__pyx_t_5);
  9207. __Pyx_INCREF(function);
  9208. __Pyx_DECREF_SET(__pyx_t_4, function);
  9209. }
  9210. }
  9211. if (!__pyx_t_5) {
  9212. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_self->__pyx_base._path); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
  9213. __Pyx_GOTREF(__pyx_t_3);
  9214. } else {
  9215. #if CYTHON_FAST_PYCALL
  9216. if (PyFunction_Check(__pyx_t_4)) {
  9217. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->__pyx_base._path};
  9218. __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
  9219. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  9220. __Pyx_GOTREF(__pyx_t_3);
  9221. } else
  9222. #endif
  9223. #if CYTHON_FAST_PYCCALL
  9224. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  9225. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_self->__pyx_base._path};
  9226. __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
  9227. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  9228. __Pyx_GOTREF(__pyx_t_3);
  9229. } else
  9230. #endif
  9231. {
  9232. __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 553, __pyx_L1_error)
  9233. __Pyx_GOTREF(__pyx_t_6);
  9234. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
  9235. __Pyx_INCREF(__pyx_v_self->__pyx_base._path);
  9236. __Pyx_GIVEREF(__pyx_v_self->__pyx_base._path);
  9237. PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_self->__pyx_base._path);
  9238. __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
  9239. __Pyx_GOTREF(__pyx_t_3);
  9240. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  9241. }
  9242. }
  9243. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  9244. __Pyx_GIVEREF(__pyx_t_3);
  9245. __Pyx_GOTREF(__pyx_v_self->__pyx_base._url);
  9246. __Pyx_DECREF(__pyx_v_self->__pyx_base._url);
  9247. __pyx_v_self->__pyx_base._url = __pyx_t_3;
  9248. __pyx_t_3 = 0;
  9249. /* "aiohttp/_http_parser.pyx":552
  9250. * return
  9251. * self._path = self._buf.decode('utf-8', 'surrogateescape')
  9252. * if self._cparser.method == 5: # CONNECT # <<<<<<<<<<<<<<
  9253. * self._url = URL(self._path)
  9254. * else:
  9255. */
  9256. goto __pyx_L4;
  9257. }
  9258. /* "aiohttp/_http_parser.pyx":555
  9259. * self._url = URL(self._path)
  9260. * else:
  9261. * PyObject_GetBuffer(self._buf, &py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<<
  9262. * try:
  9263. * self._url = _parse_url(<char*>py_buf.buf,
  9264. */
  9265. /*else*/ {
  9266. __pyx_t_3 = __pyx_v_self->__pyx_base._buf;
  9267. __Pyx_INCREF(__pyx_t_3);
  9268. __pyx_t_7 = PyObject_GetBuffer(__pyx_t_3, (&__pyx_v_py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 555, __pyx_L1_error)
  9269. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9270. /* "aiohttp/_http_parser.pyx":556
  9271. * else:
  9272. * PyObject_GetBuffer(self._buf, &py_buf, PyBUF_SIMPLE)
  9273. * try: # <<<<<<<<<<<<<<
  9274. * self._url = _parse_url(<char*>py_buf.buf,
  9275. * py_buf.len)
  9276. */
  9277. /*try:*/ {
  9278. /* "aiohttp/_http_parser.pyx":557
  9279. * PyObject_GetBuffer(self._buf, &py_buf, PyBUF_SIMPLE)
  9280. * try:
  9281. * self._url = _parse_url(<char*>py_buf.buf, # <<<<<<<<<<<<<<
  9282. * py_buf.len)
  9283. * finally:
  9284. */
  9285. __pyx_t_3 = __pyx_f_7aiohttp_12_http_parser__parse_url(((char *)__pyx_v_py_buf.buf), __pyx_v_py_buf.len); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 557, __pyx_L6_error)
  9286. __Pyx_GOTREF(__pyx_t_3);
  9287. __Pyx_GIVEREF(__pyx_t_3);
  9288. __Pyx_GOTREF(__pyx_v_self->__pyx_base._url);
  9289. __Pyx_DECREF(__pyx_v_self->__pyx_base._url);
  9290. __pyx_v_self->__pyx_base._url = __pyx_t_3;
  9291. __pyx_t_3 = 0;
  9292. }
  9293. /* "aiohttp/_http_parser.pyx":560
  9294. * py_buf.len)
  9295. * finally:
  9296. * PyBuffer_Release(&py_buf) # <<<<<<<<<<<<<<
  9297. * PyByteArray_Resize(self._buf, 0)
  9298. *
  9299. */
  9300. /*finally:*/ {
  9301. /*normal exit:*/{
  9302. PyBuffer_Release((&__pyx_v_py_buf));
  9303. goto __pyx_L7;
  9304. }
  9305. __pyx_L6_error:;
  9306. /*exception exit:*/{
  9307. __Pyx_PyThreadState_declare
  9308. __Pyx_PyThreadState_assign
  9309. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  9310. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  9311. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  9312. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  9313. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  9314. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
  9315. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
  9316. __Pyx_XGOTREF(__pyx_t_10);
  9317. __Pyx_XGOTREF(__pyx_t_11);
  9318. __Pyx_XGOTREF(__pyx_t_12);
  9319. __Pyx_XGOTREF(__pyx_t_13);
  9320. __Pyx_XGOTREF(__pyx_t_14);
  9321. __Pyx_XGOTREF(__pyx_t_15);
  9322. __pyx_t_7 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
  9323. {
  9324. PyBuffer_Release((&__pyx_v_py_buf));
  9325. }
  9326. if (PY_MAJOR_VERSION >= 3) {
  9327. __Pyx_XGIVEREF(__pyx_t_13);
  9328. __Pyx_XGIVEREF(__pyx_t_14);
  9329. __Pyx_XGIVEREF(__pyx_t_15);
  9330. __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
  9331. }
  9332. __Pyx_XGIVEREF(__pyx_t_10);
  9333. __Pyx_XGIVEREF(__pyx_t_11);
  9334. __Pyx_XGIVEREF(__pyx_t_12);
  9335. __Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
  9336. __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
  9337. __pyx_lineno = __pyx_t_7; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
  9338. goto __pyx_L1_error;
  9339. }
  9340. __pyx_L7:;
  9341. }
  9342. }
  9343. __pyx_L4:;
  9344. /* "aiohttp/_http_parser.pyx":561
  9345. * finally:
  9346. * PyBuffer_Release(&py_buf)
  9347. * PyByteArray_Resize(self._buf, 0) # <<<<<<<<<<<<<<
  9348. *
  9349. *
  9350. */
  9351. __pyx_t_3 = __pyx_v_self->__pyx_base._buf;
  9352. __Pyx_INCREF(__pyx_t_3);
  9353. __pyx_t_8 = PyByteArray_Resize(__pyx_t_3, 0); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 561, __pyx_L1_error)
  9354. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9355. /* "aiohttp/_http_parser.pyx":547
  9356. * payload_exception, response_with_body)
  9357. *
  9358. * cdef object _on_status_complete(self): # <<<<<<<<<<<<<<
  9359. * cdef Py_buffer py_buf
  9360. * if not self._buf:
  9361. */
  9362. /* function exit code */
  9363. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9364. goto __pyx_L0;
  9365. __pyx_L1_error:;
  9366. __Pyx_XDECREF(__pyx_t_3);
  9367. __Pyx_XDECREF(__pyx_t_4);
  9368. __Pyx_XDECREF(__pyx_t_5);
  9369. __Pyx_XDECREF(__pyx_t_6);
  9370. __Pyx_AddTraceback("aiohttp._http_parser.HttpRequestParser._on_status_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9371. __pyx_r = 0;
  9372. __pyx_L0:;
  9373. __Pyx_XGIVEREF(__pyx_r);
  9374. __Pyx_RefNannyFinishContext();
  9375. return __pyx_r;
  9376. }
  9377. /* "(tree fragment)":1
  9378. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  9379. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9380. * def __setstate_cython__(self, __pyx_state):
  9381. */
  9382. /* Python wrapper */
  9383. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  9384. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  9385. PyObject *__pyx_r = 0;
  9386. __Pyx_RefNannyDeclarations
  9387. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  9388. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser_2__reduce_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *)__pyx_v_self));
  9389. /* function exit code */
  9390. __Pyx_RefNannyFinishContext();
  9391. return __pyx_r;
  9392. }
  9393. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self) {
  9394. PyObject *__pyx_r = NULL;
  9395. __Pyx_RefNannyDeclarations
  9396. PyObject *__pyx_t_1 = NULL;
  9397. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  9398. /* "(tree fragment)":2
  9399. * def __reduce_cython__(self):
  9400. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  9401. * def __setstate_cython__(self, __pyx_state):
  9402. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9403. */
  9404. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  9405. __Pyx_GOTREF(__pyx_t_1);
  9406. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  9407. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9408. __PYX_ERR(1, 2, __pyx_L1_error)
  9409. /* "(tree fragment)":1
  9410. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  9411. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9412. * def __setstate_cython__(self, __pyx_state):
  9413. */
  9414. /* function exit code */
  9415. __pyx_L1_error:;
  9416. __Pyx_XDECREF(__pyx_t_1);
  9417. __Pyx_AddTraceback("aiohttp._http_parser.HttpRequestParser.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9418. __pyx_r = NULL;
  9419. __Pyx_XGIVEREF(__pyx_r);
  9420. __Pyx_RefNannyFinishContext();
  9421. return __pyx_r;
  9422. }
  9423. /* "(tree fragment)":3
  9424. * def __reduce_cython__(self):
  9425. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9426. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  9427. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9428. */
  9429. /* Python wrapper */
  9430. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  9431. static PyObject *__pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  9432. PyObject *__pyx_r = 0;
  9433. __Pyx_RefNannyDeclarations
  9434. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  9435. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser_4__setstate_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  9436. /* function exit code */
  9437. __Pyx_RefNannyFinishContext();
  9438. return __pyx_r;
  9439. }
  9440. static PyObject *__pyx_pf_7aiohttp_12_http_parser_17HttpRequestParser_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  9441. PyObject *__pyx_r = NULL;
  9442. __Pyx_RefNannyDeclarations
  9443. PyObject *__pyx_t_1 = NULL;
  9444. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  9445. /* "(tree fragment)":4
  9446. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9447. * def __setstate_cython__(self, __pyx_state):
  9448. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  9449. */
  9450. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  9451. __Pyx_GOTREF(__pyx_t_1);
  9452. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  9453. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9454. __PYX_ERR(1, 4, __pyx_L1_error)
  9455. /* "(tree fragment)":3
  9456. * def __reduce_cython__(self):
  9457. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9458. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  9459. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9460. */
  9461. /* function exit code */
  9462. __pyx_L1_error:;
  9463. __Pyx_XDECREF(__pyx_t_1);
  9464. __Pyx_AddTraceback("aiohttp._http_parser.HttpRequestParser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9465. __pyx_r = NULL;
  9466. __Pyx_XGIVEREF(__pyx_r);
  9467. __Pyx_RefNannyFinishContext();
  9468. return __pyx_r;
  9469. }
  9470. /* "aiohttp/_http_parser.pyx":566
  9471. * cdef class HttpResponseParser(HttpParser):
  9472. *
  9473. * def __init__(self, protocol, loop, timer=None, # <<<<<<<<<<<<<<
  9474. * size_t max_line_size=8190, size_t max_headers=32768,
  9475. * size_t max_field_size=8190, payload_exception=None,
  9476. */
  9477. /* Python wrapper */
  9478. static int __pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  9479. static int __pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  9480. PyObject *__pyx_v_protocol = 0;
  9481. PyObject *__pyx_v_loop = 0;
  9482. PyObject *__pyx_v_timer = 0;
  9483. size_t __pyx_v_max_line_size;
  9484. size_t __pyx_v_max_headers;
  9485. size_t __pyx_v_max_field_size;
  9486. PyObject *__pyx_v_payload_exception = 0;
  9487. int __pyx_v_response_with_body;
  9488. CYTHON_UNUSED int __pyx_v_read_until_eof;
  9489. int __pyx_v_auto_decompress;
  9490. int __pyx_r;
  9491. __Pyx_RefNannyDeclarations
  9492. __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  9493. {
  9494. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_protocol,&__pyx_n_s_loop,&__pyx_n_s_timer,&__pyx_n_s_max_line_size,&__pyx_n_s_max_headers,&__pyx_n_s_max_field_size,&__pyx_n_s_payload_exception,&__pyx_n_s_response_with_body,&__pyx_n_s_read_until_eof,&__pyx_n_s_auto_decompress,0};
  9495. PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
  9496. values[2] = ((PyObject *)Py_None);
  9497. /* "aiohttp/_http_parser.pyx":568
  9498. * def __init__(self, protocol, loop, timer=None,
  9499. * size_t max_line_size=8190, size_t max_headers=32768,
  9500. * size_t max_field_size=8190, payload_exception=None, # <<<<<<<<<<<<<<
  9501. * bint response_with_body=True, bint read_until_eof=False,
  9502. * bint auto_decompress=True):
  9503. */
  9504. values[6] = ((PyObject *)Py_None);
  9505. if (unlikely(__pyx_kwds)) {
  9506. Py_ssize_t kw_args;
  9507. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  9508. switch (pos_args) {
  9509. case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
  9510. CYTHON_FALLTHROUGH;
  9511. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  9512. CYTHON_FALLTHROUGH;
  9513. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  9514. CYTHON_FALLTHROUGH;
  9515. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  9516. CYTHON_FALLTHROUGH;
  9517. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  9518. CYTHON_FALLTHROUGH;
  9519. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  9520. CYTHON_FALLTHROUGH;
  9521. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  9522. CYTHON_FALLTHROUGH;
  9523. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  9524. CYTHON_FALLTHROUGH;
  9525. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9526. CYTHON_FALLTHROUGH;
  9527. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9528. CYTHON_FALLTHROUGH;
  9529. case 0: break;
  9530. default: goto __pyx_L5_argtuple_error;
  9531. }
  9532. kw_args = PyDict_Size(__pyx_kwds);
  9533. switch (pos_args) {
  9534. case 0:
  9535. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_protocol)) != 0)) kw_args--;
  9536. else goto __pyx_L5_argtuple_error;
  9537. CYTHON_FALLTHROUGH;
  9538. case 1:
  9539. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_loop)) != 0)) kw_args--;
  9540. else {
  9541. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 10, 1); __PYX_ERR(0, 566, __pyx_L3_error)
  9542. }
  9543. CYTHON_FALLTHROUGH;
  9544. case 2:
  9545. if (kw_args > 0) {
  9546. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_timer);
  9547. if (value) { values[2] = value; kw_args--; }
  9548. }
  9549. CYTHON_FALLTHROUGH;
  9550. case 3:
  9551. if (kw_args > 0) {
  9552. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_line_size);
  9553. if (value) { values[3] = value; kw_args--; }
  9554. }
  9555. CYTHON_FALLTHROUGH;
  9556. case 4:
  9557. if (kw_args > 0) {
  9558. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_headers);
  9559. if (value) { values[4] = value; kw_args--; }
  9560. }
  9561. CYTHON_FALLTHROUGH;
  9562. case 5:
  9563. if (kw_args > 0) {
  9564. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_field_size);
  9565. if (value) { values[5] = value; kw_args--; }
  9566. }
  9567. CYTHON_FALLTHROUGH;
  9568. case 6:
  9569. if (kw_args > 0) {
  9570. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_payload_exception);
  9571. if (value) { values[6] = value; kw_args--; }
  9572. }
  9573. CYTHON_FALLTHROUGH;
  9574. case 7:
  9575. if (kw_args > 0) {
  9576. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_response_with_body);
  9577. if (value) { values[7] = value; kw_args--; }
  9578. }
  9579. CYTHON_FALLTHROUGH;
  9580. case 8:
  9581. if (kw_args > 0) {
  9582. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_read_until_eof);
  9583. if (value) { values[8] = value; kw_args--; }
  9584. }
  9585. CYTHON_FALLTHROUGH;
  9586. case 9:
  9587. if (kw_args > 0) {
  9588. PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_auto_decompress);
  9589. if (value) { values[9] = value; kw_args--; }
  9590. }
  9591. }
  9592. if (unlikely(kw_args > 0)) {
  9593. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 566, __pyx_L3_error)
  9594. }
  9595. } else {
  9596. switch (PyTuple_GET_SIZE(__pyx_args)) {
  9597. case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
  9598. CYTHON_FALLTHROUGH;
  9599. case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
  9600. CYTHON_FALLTHROUGH;
  9601. case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
  9602. CYTHON_FALLTHROUGH;
  9603. case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
  9604. CYTHON_FALLTHROUGH;
  9605. case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
  9606. CYTHON_FALLTHROUGH;
  9607. case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
  9608. CYTHON_FALLTHROUGH;
  9609. case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
  9610. CYTHON_FALLTHROUGH;
  9611. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  9612. CYTHON_FALLTHROUGH;
  9613. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  9614. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  9615. break;
  9616. default: goto __pyx_L5_argtuple_error;
  9617. }
  9618. }
  9619. __pyx_v_protocol = values[0];
  9620. __pyx_v_loop = values[1];
  9621. __pyx_v_timer = values[2];
  9622. if (values[3]) {
  9623. __pyx_v_max_line_size = __Pyx_PyInt_As_size_t(values[3]); if (unlikely((__pyx_v_max_line_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error)
  9624. } else {
  9625. __pyx_v_max_line_size = ((size_t)0x1FFE);
  9626. }
  9627. if (values[4]) {
  9628. __pyx_v_max_headers = __Pyx_PyInt_As_size_t(values[4]); if (unlikely((__pyx_v_max_headers == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error)
  9629. } else {
  9630. __pyx_v_max_headers = ((size_t)0x8000);
  9631. }
  9632. if (values[5]) {
  9633. __pyx_v_max_field_size = __Pyx_PyInt_As_size_t(values[5]); if (unlikely((__pyx_v_max_field_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 568, __pyx_L3_error)
  9634. } else {
  9635. __pyx_v_max_field_size = ((size_t)0x1FFE);
  9636. }
  9637. __pyx_v_payload_exception = values[6];
  9638. if (values[7]) {
  9639. __pyx_v_response_with_body = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_response_with_body == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L3_error)
  9640. } else {
  9641. /* "aiohttp/_http_parser.pyx":569
  9642. * size_t max_line_size=8190, size_t max_headers=32768,
  9643. * size_t max_field_size=8190, payload_exception=None,
  9644. * bint response_with_body=True, bint read_until_eof=False, # <<<<<<<<<<<<<<
  9645. * bint auto_decompress=True):
  9646. * self._init(cparser.HTTP_RESPONSE, protocol, loop, timer,
  9647. */
  9648. __pyx_v_response_with_body = ((int)1);
  9649. }
  9650. if (values[8]) {
  9651. __pyx_v_read_until_eof = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_read_until_eof == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L3_error)
  9652. } else {
  9653. __pyx_v_read_until_eof = ((int)0);
  9654. }
  9655. if (values[9]) {
  9656. __pyx_v_auto_decompress = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_auto_decompress == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 570, __pyx_L3_error)
  9657. } else {
  9658. /* "aiohttp/_http_parser.pyx":570
  9659. * size_t max_field_size=8190, payload_exception=None,
  9660. * bint response_with_body=True, bint read_until_eof=False,
  9661. * bint auto_decompress=True): # <<<<<<<<<<<<<<
  9662. * self._init(cparser.HTTP_RESPONSE, protocol, loop, timer,
  9663. * max_line_size, max_headers, max_field_size,
  9664. */
  9665. __pyx_v_auto_decompress = ((int)1);
  9666. }
  9667. }
  9668. goto __pyx_L4_argument_unpacking_done;
  9669. __pyx_L5_argtuple_error:;
  9670. __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 566, __pyx_L3_error)
  9671. __pyx_L3_error:;
  9672. __Pyx_AddTraceback("aiohttp._http_parser.HttpResponseParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9673. __Pyx_RefNannyFinishContext();
  9674. return -1;
  9675. __pyx_L4_argument_unpacking_done:;
  9676. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser___init__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *)__pyx_v_self), __pyx_v_protocol, __pyx_v_loop, __pyx_v_timer, __pyx_v_max_line_size, __pyx_v_max_headers, __pyx_v_max_field_size, __pyx_v_payload_exception, __pyx_v_response_with_body, __pyx_v_read_until_eof, __pyx_v_auto_decompress);
  9677. /* "aiohttp/_http_parser.pyx":566
  9678. * cdef class HttpResponseParser(HttpParser):
  9679. *
  9680. * def __init__(self, protocol, loop, timer=None, # <<<<<<<<<<<<<<
  9681. * size_t max_line_size=8190, size_t max_headers=32768,
  9682. * size_t max_field_size=8190, payload_exception=None,
  9683. */
  9684. /* function exit code */
  9685. __Pyx_RefNannyFinishContext();
  9686. return __pyx_r;
  9687. }
  9688. static int __pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser___init__(struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self, PyObject *__pyx_v_protocol, PyObject *__pyx_v_loop, PyObject *__pyx_v_timer, size_t __pyx_v_max_line_size, size_t __pyx_v_max_headers, size_t __pyx_v_max_field_size, PyObject *__pyx_v_payload_exception, int __pyx_v_response_with_body, CYTHON_UNUSED int __pyx_v_read_until_eof, int __pyx_v_auto_decompress) {
  9689. int __pyx_r;
  9690. __Pyx_RefNannyDeclarations
  9691. PyObject *__pyx_t_1 = NULL;
  9692. struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init __pyx_t_2;
  9693. __Pyx_RefNannySetupContext("__init__", 0);
  9694. /* "aiohttp/_http_parser.pyx":571
  9695. * bint response_with_body=True, bint read_until_eof=False,
  9696. * bint auto_decompress=True):
  9697. * self._init(cparser.HTTP_RESPONSE, protocol, loop, timer, # <<<<<<<<<<<<<<
  9698. * max_line_size, max_headers, max_field_size,
  9699. * payload_exception, response_with_body, auto_decompress)
  9700. */
  9701. __pyx_t_2.__pyx_n = 7;
  9702. __pyx_t_2.timer = __pyx_v_timer;
  9703. __pyx_t_2.max_line_size = __pyx_v_max_line_size;
  9704. __pyx_t_2.max_headers = __pyx_v_max_headers;
  9705. __pyx_t_2.max_field_size = __pyx_v_max_field_size;
  9706. __pyx_t_2.payload_exception = __pyx_v_payload_exception;
  9707. __pyx_t_2.response_with_body = __pyx_v_response_with_body;
  9708. __pyx_t_2.auto_decompress = __pyx_v_auto_decompress;
  9709. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpResponseParser *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._init(((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_v_self), HTTP_RESPONSE, __pyx_v_protocol, __pyx_v_loop, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
  9710. __Pyx_GOTREF(__pyx_t_1);
  9711. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9712. /* "aiohttp/_http_parser.pyx":566
  9713. * cdef class HttpResponseParser(HttpParser):
  9714. *
  9715. * def __init__(self, protocol, loop, timer=None, # <<<<<<<<<<<<<<
  9716. * size_t max_line_size=8190, size_t max_headers=32768,
  9717. * size_t max_field_size=8190, payload_exception=None,
  9718. */
  9719. /* function exit code */
  9720. __pyx_r = 0;
  9721. goto __pyx_L0;
  9722. __pyx_L1_error:;
  9723. __Pyx_XDECREF(__pyx_t_1);
  9724. __Pyx_AddTraceback("aiohttp._http_parser.HttpResponseParser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9725. __pyx_r = -1;
  9726. __pyx_L0:;
  9727. __Pyx_RefNannyFinishContext();
  9728. return __pyx_r;
  9729. }
  9730. /* "aiohttp/_http_parser.pyx":575
  9731. * payload_exception, response_with_body, auto_decompress)
  9732. *
  9733. * cdef object _on_status_complete(self): # <<<<<<<<<<<<<<
  9734. * if self._buf:
  9735. * self._reason = self._buf.decode('utf-8', 'surrogateescape')
  9736. */
  9737. static PyObject *__pyx_f_7aiohttp_12_http_parser_18HttpResponseParser__on_status_complete(struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self) {
  9738. PyObject *__pyx_r = NULL;
  9739. __Pyx_RefNannyDeclarations
  9740. int __pyx_t_1;
  9741. PyObject *__pyx_t_2 = NULL;
  9742. int __pyx_t_3;
  9743. __Pyx_RefNannySetupContext("_on_status_complete", 0);
  9744. /* "aiohttp/_http_parser.pyx":576
  9745. *
  9746. * cdef object _on_status_complete(self):
  9747. * if self._buf: # <<<<<<<<<<<<<<
  9748. * self._reason = self._buf.decode('utf-8', 'surrogateescape')
  9749. * PyByteArray_Resize(self._buf, 0)
  9750. */
  9751. __pyx_t_1 = (__pyx_v_self->__pyx_base._buf != Py_None)&&(PyByteArray_GET_SIZE(__pyx_v_self->__pyx_base._buf) != 0);
  9752. if (__pyx_t_1) {
  9753. /* "aiohttp/_http_parser.pyx":577
  9754. * cdef object _on_status_complete(self):
  9755. * if self._buf:
  9756. * self._reason = self._buf.decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  9757. * PyByteArray_Resize(self._buf, 0)
  9758. *
  9759. */
  9760. if (unlikely(__pyx_v_self->__pyx_base._buf == Py_None)) {
  9761. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode");
  9762. __PYX_ERR(0, 577, __pyx_L1_error)
  9763. }
  9764. __pyx_t_2 = __Pyx_decode_bytearray(__pyx_v_self->__pyx_base._buf, 0, PY_SSIZE_T_MAX, NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
  9765. __Pyx_GOTREF(__pyx_t_2);
  9766. __Pyx_GIVEREF(__pyx_t_2);
  9767. __Pyx_GOTREF(__pyx_v_self->__pyx_base._reason);
  9768. __Pyx_DECREF(__pyx_v_self->__pyx_base._reason);
  9769. __pyx_v_self->__pyx_base._reason = ((PyObject*)__pyx_t_2);
  9770. __pyx_t_2 = 0;
  9771. /* "aiohttp/_http_parser.pyx":578
  9772. * if self._buf:
  9773. * self._reason = self._buf.decode('utf-8', 'surrogateescape')
  9774. * PyByteArray_Resize(self._buf, 0) # <<<<<<<<<<<<<<
  9775. *
  9776. *
  9777. */
  9778. __pyx_t_2 = __pyx_v_self->__pyx_base._buf;
  9779. __Pyx_INCREF(__pyx_t_2);
  9780. __pyx_t_3 = PyByteArray_Resize(__pyx_t_2, 0); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 578, __pyx_L1_error)
  9781. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9782. /* "aiohttp/_http_parser.pyx":576
  9783. *
  9784. * cdef object _on_status_complete(self):
  9785. * if self._buf: # <<<<<<<<<<<<<<
  9786. * self._reason = self._buf.decode('utf-8', 'surrogateescape')
  9787. * PyByteArray_Resize(self._buf, 0)
  9788. */
  9789. }
  9790. /* "aiohttp/_http_parser.pyx":575
  9791. * payload_exception, response_with_body, auto_decompress)
  9792. *
  9793. * cdef object _on_status_complete(self): # <<<<<<<<<<<<<<
  9794. * if self._buf:
  9795. * self._reason = self._buf.decode('utf-8', 'surrogateescape')
  9796. */
  9797. /* function exit code */
  9798. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  9799. goto __pyx_L0;
  9800. __pyx_L1_error:;
  9801. __Pyx_XDECREF(__pyx_t_2);
  9802. __Pyx_AddTraceback("aiohttp._http_parser.HttpResponseParser._on_status_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9803. __pyx_r = 0;
  9804. __pyx_L0:;
  9805. __Pyx_XGIVEREF(__pyx_r);
  9806. __Pyx_RefNannyFinishContext();
  9807. return __pyx_r;
  9808. }
  9809. /* "(tree fragment)":1
  9810. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  9811. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9812. * def __setstate_cython__(self, __pyx_state):
  9813. */
  9814. /* Python wrapper */
  9815. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
  9816. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  9817. PyObject *__pyx_r = 0;
  9818. __Pyx_RefNannyDeclarations
  9819. __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  9820. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser_2__reduce_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *)__pyx_v_self));
  9821. /* function exit code */
  9822. __Pyx_RefNannyFinishContext();
  9823. return __pyx_r;
  9824. }
  9825. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self) {
  9826. PyObject *__pyx_r = NULL;
  9827. __Pyx_RefNannyDeclarations
  9828. PyObject *__pyx_t_1 = NULL;
  9829. __Pyx_RefNannySetupContext("__reduce_cython__", 0);
  9830. /* "(tree fragment)":2
  9831. * def __reduce_cython__(self):
  9832. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  9833. * def __setstate_cython__(self, __pyx_state):
  9834. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9835. */
  9836. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  9837. __Pyx_GOTREF(__pyx_t_1);
  9838. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  9839. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9840. __PYX_ERR(1, 2, __pyx_L1_error)
  9841. /* "(tree fragment)":1
  9842. * def __reduce_cython__(self): # <<<<<<<<<<<<<<
  9843. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9844. * def __setstate_cython__(self, __pyx_state):
  9845. */
  9846. /* function exit code */
  9847. __pyx_L1_error:;
  9848. __Pyx_XDECREF(__pyx_t_1);
  9849. __Pyx_AddTraceback("aiohttp._http_parser.HttpResponseParser.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9850. __pyx_r = NULL;
  9851. __Pyx_XGIVEREF(__pyx_r);
  9852. __Pyx_RefNannyFinishContext();
  9853. return __pyx_r;
  9854. }
  9855. /* "(tree fragment)":3
  9856. * def __reduce_cython__(self):
  9857. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9858. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  9859. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9860. */
  9861. /* Python wrapper */
  9862. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
  9863. static PyObject *__pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  9864. PyObject *__pyx_r = 0;
  9865. __Pyx_RefNannyDeclarations
  9866. __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  9867. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser_4__setstate_cython__(((struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
  9868. /* function exit code */
  9869. __Pyx_RefNannyFinishContext();
  9870. return __pyx_r;
  9871. }
  9872. static PyObject *__pyx_pf_7aiohttp_12_http_parser_18HttpResponseParser_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  9873. PyObject *__pyx_r = NULL;
  9874. __Pyx_RefNannyDeclarations
  9875. PyObject *__pyx_t_1 = NULL;
  9876. __Pyx_RefNannySetupContext("__setstate_cython__", 0);
  9877. /* "(tree fragment)":4
  9878. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9879. * def __setstate_cython__(self, __pyx_state):
  9880. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  9881. */
  9882. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  9883. __Pyx_GOTREF(__pyx_t_1);
  9884. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  9885. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9886. __PYX_ERR(1, 4, __pyx_L1_error)
  9887. /* "(tree fragment)":3
  9888. * def __reduce_cython__(self):
  9889. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9890. * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
  9891. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  9892. */
  9893. /* function exit code */
  9894. __pyx_L1_error:;
  9895. __Pyx_XDECREF(__pyx_t_1);
  9896. __Pyx_AddTraceback("aiohttp._http_parser.HttpResponseParser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  9897. __pyx_r = NULL;
  9898. __Pyx_XGIVEREF(__pyx_r);
  9899. __Pyx_RefNannyFinishContext();
  9900. return __pyx_r;
  9901. }
  9902. /* "aiohttp/_http_parser.pyx":581
  9903. *
  9904. *
  9905. * cdef int cb_on_message_begin(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  9906. * cdef HttpParser pyparser = <HttpParser>parser.data
  9907. *
  9908. */
  9909. static int __pyx_f_7aiohttp_12_http_parser_cb_on_message_begin(struct http_parser *__pyx_v_parser) {
  9910. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  9911. int __pyx_r;
  9912. __Pyx_RefNannyDeclarations
  9913. PyObject *__pyx_t_1 = NULL;
  9914. PyObject *__pyx_t_2 = NULL;
  9915. PyObject *__pyx_t_3 = NULL;
  9916. int __pyx_t_4;
  9917. __Pyx_RefNannySetupContext("cb_on_message_begin", 0);
  9918. /* "aiohttp/_http_parser.pyx":582
  9919. *
  9920. * cdef int cb_on_message_begin(cparser.http_parser* parser) except -1:
  9921. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  9922. *
  9923. * pyparser._started = True
  9924. */
  9925. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  9926. __Pyx_INCREF(__pyx_t_1);
  9927. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  9928. __pyx_t_1 = 0;
  9929. /* "aiohttp/_http_parser.pyx":584
  9930. * cdef HttpParser pyparser = <HttpParser>parser.data
  9931. *
  9932. * pyparser._started = True # <<<<<<<<<<<<<<
  9933. * pyparser._headers = CIMultiDict()
  9934. * pyparser._raw_headers = []
  9935. */
  9936. __pyx_v_pyparser->_started = 1;
  9937. /* "aiohttp/_http_parser.pyx":585
  9938. *
  9939. * pyparser._started = True
  9940. * pyparser._headers = CIMultiDict() # <<<<<<<<<<<<<<
  9941. * pyparser._raw_headers = []
  9942. * PyByteArray_Resize(pyparser._buf, 0)
  9943. */
  9944. __Pyx_INCREF(__pyx_v_7aiohttp_12_http_parser_CIMultiDict);
  9945. __pyx_t_2 = __pyx_v_7aiohttp_12_http_parser_CIMultiDict; __pyx_t_3 = NULL;
  9946. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  9947. __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
  9948. if (likely(__pyx_t_3)) {
  9949. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  9950. __Pyx_INCREF(__pyx_t_3);
  9951. __Pyx_INCREF(function);
  9952. __Pyx_DECREF_SET(__pyx_t_2, function);
  9953. }
  9954. }
  9955. if (__pyx_t_3) {
  9956. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
  9957. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  9958. } else {
  9959. __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
  9960. }
  9961. __Pyx_GOTREF(__pyx_t_1);
  9962. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  9963. __Pyx_GIVEREF(__pyx_t_1);
  9964. __Pyx_GOTREF(__pyx_v_pyparser->_headers);
  9965. __Pyx_DECREF(__pyx_v_pyparser->_headers);
  9966. __pyx_v_pyparser->_headers = __pyx_t_1;
  9967. __pyx_t_1 = 0;
  9968. /* "aiohttp/_http_parser.pyx":586
  9969. * pyparser._started = True
  9970. * pyparser._headers = CIMultiDict()
  9971. * pyparser._raw_headers = [] # <<<<<<<<<<<<<<
  9972. * PyByteArray_Resize(pyparser._buf, 0)
  9973. * pyparser._path = None
  9974. */
  9975. __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
  9976. __Pyx_GOTREF(__pyx_t_1);
  9977. __Pyx_GIVEREF(__pyx_t_1);
  9978. __Pyx_GOTREF(__pyx_v_pyparser->_raw_headers);
  9979. __Pyx_DECREF(__pyx_v_pyparser->_raw_headers);
  9980. __pyx_v_pyparser->_raw_headers = ((PyObject*)__pyx_t_1);
  9981. __pyx_t_1 = 0;
  9982. /* "aiohttp/_http_parser.pyx":587
  9983. * pyparser._headers = CIMultiDict()
  9984. * pyparser._raw_headers = []
  9985. * PyByteArray_Resize(pyparser._buf, 0) # <<<<<<<<<<<<<<
  9986. * pyparser._path = None
  9987. * pyparser._reason = None
  9988. */
  9989. __pyx_t_1 = __pyx_v_pyparser->_buf;
  9990. __Pyx_INCREF(__pyx_t_1);
  9991. __pyx_t_4 = PyByteArray_Resize(__pyx_t_1, 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 587, __pyx_L1_error)
  9992. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  9993. /* "aiohttp/_http_parser.pyx":588
  9994. * pyparser._raw_headers = []
  9995. * PyByteArray_Resize(pyparser._buf, 0)
  9996. * pyparser._path = None # <<<<<<<<<<<<<<
  9997. * pyparser._reason = None
  9998. * return 0
  9999. */
  10000. __Pyx_INCREF(Py_None);
  10001. __Pyx_GIVEREF(Py_None);
  10002. __Pyx_GOTREF(__pyx_v_pyparser->_path);
  10003. __Pyx_DECREF(__pyx_v_pyparser->_path);
  10004. __pyx_v_pyparser->_path = ((PyObject*)Py_None);
  10005. /* "aiohttp/_http_parser.pyx":589
  10006. * PyByteArray_Resize(pyparser._buf, 0)
  10007. * pyparser._path = None
  10008. * pyparser._reason = None # <<<<<<<<<<<<<<
  10009. * return 0
  10010. *
  10011. */
  10012. __Pyx_INCREF(Py_None);
  10013. __Pyx_GIVEREF(Py_None);
  10014. __Pyx_GOTREF(__pyx_v_pyparser->_reason);
  10015. __Pyx_DECREF(__pyx_v_pyparser->_reason);
  10016. __pyx_v_pyparser->_reason = ((PyObject*)Py_None);
  10017. /* "aiohttp/_http_parser.pyx":590
  10018. * pyparser._path = None
  10019. * pyparser._reason = None
  10020. * return 0 # <<<<<<<<<<<<<<
  10021. *
  10022. *
  10023. */
  10024. __pyx_r = 0;
  10025. goto __pyx_L0;
  10026. /* "aiohttp/_http_parser.pyx":581
  10027. *
  10028. *
  10029. * cdef int cb_on_message_begin(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  10030. * cdef HttpParser pyparser = <HttpParser>parser.data
  10031. *
  10032. */
  10033. /* function exit code */
  10034. __pyx_L1_error:;
  10035. __Pyx_XDECREF(__pyx_t_1);
  10036. __Pyx_XDECREF(__pyx_t_2);
  10037. __Pyx_XDECREF(__pyx_t_3);
  10038. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_message_begin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10039. __pyx_r = -1;
  10040. __pyx_L0:;
  10041. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  10042. __Pyx_RefNannyFinishContext();
  10043. return __pyx_r;
  10044. }
  10045. /* "aiohttp/_http_parser.pyx":593
  10046. *
  10047. *
  10048. * cdef int cb_on_url(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10049. * const char *at, size_t length) except -1:
  10050. * cdef HttpParser pyparser = <HttpParser>parser.data
  10051. */
  10052. static int __pyx_f_7aiohttp_12_http_parser_cb_on_url(struct http_parser *__pyx_v_parser, char const *__pyx_v_at, size_t __pyx_v_length) {
  10053. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  10054. PyObject *__pyx_v_ex = NULL;
  10055. int __pyx_r;
  10056. __Pyx_RefNannyDeclarations
  10057. PyObject *__pyx_t_1 = NULL;
  10058. PyObject *__pyx_t_2 = NULL;
  10059. PyObject *__pyx_t_3 = NULL;
  10060. PyObject *__pyx_t_4 = NULL;
  10061. int __pyx_t_5;
  10062. PyObject *__pyx_t_6 = NULL;
  10063. PyObject *__pyx_t_7 = NULL;
  10064. PyObject *__pyx_t_8 = NULL;
  10065. PyObject *__pyx_t_9 = NULL;
  10066. int __pyx_t_10;
  10067. PyObject *__pyx_t_11 = NULL;
  10068. __Pyx_RefNannySetupContext("cb_on_url", 0);
  10069. /* "aiohttp/_http_parser.pyx":595
  10070. * cdef int cb_on_url(cparser.http_parser* parser,
  10071. * const char *at, size_t length) except -1:
  10072. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  10073. * try:
  10074. * if length > pyparser._max_line_size:
  10075. */
  10076. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  10077. __Pyx_INCREF(__pyx_t_1);
  10078. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  10079. __pyx_t_1 = 0;
  10080. /* "aiohttp/_http_parser.pyx":596
  10081. * const char *at, size_t length) except -1:
  10082. * cdef HttpParser pyparser = <HttpParser>parser.data
  10083. * try: # <<<<<<<<<<<<<<
  10084. * if length > pyparser._max_line_size:
  10085. * raise LineTooLong(
  10086. */
  10087. {
  10088. __Pyx_PyThreadState_declare
  10089. __Pyx_PyThreadState_assign
  10090. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  10091. __Pyx_XGOTREF(__pyx_t_2);
  10092. __Pyx_XGOTREF(__pyx_t_3);
  10093. __Pyx_XGOTREF(__pyx_t_4);
  10094. /*try:*/ {
  10095. /* "aiohttp/_http_parser.pyx":597
  10096. * cdef HttpParser pyparser = <HttpParser>parser.data
  10097. * try:
  10098. * if length > pyparser._max_line_size: # <<<<<<<<<<<<<<
  10099. * raise LineTooLong(
  10100. * 'Status line is too long', pyparser._max_line_size, length)
  10101. */
  10102. __pyx_t_5 = ((__pyx_v_length > __pyx_v_pyparser->_max_line_size) != 0);
  10103. if (unlikely(__pyx_t_5)) {
  10104. /* "aiohttp/_http_parser.pyx":598
  10105. * try:
  10106. * if length > pyparser._max_line_size:
  10107. * raise LineTooLong( # <<<<<<<<<<<<<<
  10108. * 'Status line is too long', pyparser._max_line_size, length)
  10109. * extend(pyparser._buf, at, length)
  10110. */
  10111. __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_LineTooLong); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L3_error)
  10112. __Pyx_GOTREF(__pyx_t_6);
  10113. /* "aiohttp/_http_parser.pyx":599
  10114. * if length > pyparser._max_line_size:
  10115. * raise LineTooLong(
  10116. * 'Status line is too long', pyparser._max_line_size, length) # <<<<<<<<<<<<<<
  10117. * extend(pyparser._buf, at, length)
  10118. * except BaseException as ex:
  10119. */
  10120. __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_pyparser->_max_line_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L3_error)
  10121. __Pyx_GOTREF(__pyx_t_7);
  10122. __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 599, __pyx_L3_error)
  10123. __Pyx_GOTREF(__pyx_t_8);
  10124. __pyx_t_9 = NULL;
  10125. __pyx_t_10 = 0;
  10126. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  10127. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
  10128. if (likely(__pyx_t_9)) {
  10129. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  10130. __Pyx_INCREF(__pyx_t_9);
  10131. __Pyx_INCREF(function);
  10132. __Pyx_DECREF_SET(__pyx_t_6, function);
  10133. __pyx_t_10 = 1;
  10134. }
  10135. }
  10136. #if CYTHON_FAST_PYCALL
  10137. if (PyFunction_Check(__pyx_t_6)) {
  10138. PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_kp_u_Status_line_is_too_long, __pyx_t_7, __pyx_t_8};
  10139. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L3_error)
  10140. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10141. __Pyx_GOTREF(__pyx_t_1);
  10142. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  10143. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  10144. } else
  10145. #endif
  10146. #if CYTHON_FAST_PYCCALL
  10147. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  10148. PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_kp_u_Status_line_is_too_long, __pyx_t_7, __pyx_t_8};
  10149. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L3_error)
  10150. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10151. __Pyx_GOTREF(__pyx_t_1);
  10152. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  10153. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  10154. } else
  10155. #endif
  10156. {
  10157. __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 598, __pyx_L3_error)
  10158. __Pyx_GOTREF(__pyx_t_11);
  10159. if (__pyx_t_9) {
  10160. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
  10161. }
  10162. __Pyx_INCREF(__pyx_kp_u_Status_line_is_too_long);
  10163. __Pyx_GIVEREF(__pyx_kp_u_Status_line_is_too_long);
  10164. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_Status_line_is_too_long);
  10165. __Pyx_GIVEREF(__pyx_t_7);
  10166. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
  10167. __Pyx_GIVEREF(__pyx_t_8);
  10168. PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_8);
  10169. __pyx_t_7 = 0;
  10170. __pyx_t_8 = 0;
  10171. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L3_error)
  10172. __Pyx_GOTREF(__pyx_t_1);
  10173. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10174. }
  10175. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10176. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  10177. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10178. __PYX_ERR(0, 598, __pyx_L3_error)
  10179. /* "aiohttp/_http_parser.pyx":597
  10180. * cdef HttpParser pyparser = <HttpParser>parser.data
  10181. * try:
  10182. * if length > pyparser._max_line_size: # <<<<<<<<<<<<<<
  10183. * raise LineTooLong(
  10184. * 'Status line is too long', pyparser._max_line_size, length)
  10185. */
  10186. }
  10187. /* "aiohttp/_http_parser.pyx":600
  10188. * raise LineTooLong(
  10189. * 'Status line is too long', pyparser._max_line_size, length)
  10190. * extend(pyparser._buf, at, length) # <<<<<<<<<<<<<<
  10191. * except BaseException as ex:
  10192. * pyparser._last_error = ex
  10193. */
  10194. __pyx_t_1 = __pyx_v_pyparser->_buf;
  10195. __Pyx_INCREF(__pyx_t_1);
  10196. __pyx_t_6 = __pyx_f_7aiohttp_12_http_parser_extend(__pyx_t_1, __pyx_v_at, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L3_error)
  10197. __Pyx_GOTREF(__pyx_t_6);
  10198. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10199. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10200. /* "aiohttp/_http_parser.pyx":596
  10201. * const char *at, size_t length) except -1:
  10202. * cdef HttpParser pyparser = <HttpParser>parser.data
  10203. * try: # <<<<<<<<<<<<<<
  10204. * if length > pyparser._max_line_size:
  10205. * raise LineTooLong(
  10206. */
  10207. }
  10208. /* "aiohttp/_http_parser.pyx":605
  10209. * return -1
  10210. * else:
  10211. * return 0 # <<<<<<<<<<<<<<
  10212. *
  10213. *
  10214. */
  10215. /*else:*/ {
  10216. __pyx_r = 0;
  10217. goto __pyx_L6_except_return;
  10218. }
  10219. __pyx_L3_error:;
  10220. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10221. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  10222. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  10223. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  10224. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  10225. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  10226. /* "aiohttp/_http_parser.pyx":601
  10227. * 'Status line is too long', pyparser._max_line_size, length)
  10228. * extend(pyparser._buf, at, length)
  10229. * except BaseException as ex: # <<<<<<<<<<<<<<
  10230. * pyparser._last_error = ex
  10231. * return -1
  10232. */
  10233. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  10234. if (__pyx_t_10) {
  10235. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10236. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_11) < 0) __PYX_ERR(0, 601, __pyx_L5_except_error)
  10237. __Pyx_GOTREF(__pyx_t_6);
  10238. __Pyx_GOTREF(__pyx_t_1);
  10239. __Pyx_GOTREF(__pyx_t_11);
  10240. __Pyx_INCREF(__pyx_t_1);
  10241. __pyx_v_ex = __pyx_t_1;
  10242. /*try:*/ {
  10243. /* "aiohttp/_http_parser.pyx":602
  10244. * extend(pyparser._buf, at, length)
  10245. * except BaseException as ex:
  10246. * pyparser._last_error = ex # <<<<<<<<<<<<<<
  10247. * return -1
  10248. * else:
  10249. */
  10250. __Pyx_INCREF(__pyx_v_ex);
  10251. __Pyx_GIVEREF(__pyx_v_ex);
  10252. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  10253. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  10254. __pyx_v_pyparser->_last_error = __pyx_v_ex;
  10255. /* "aiohttp/_http_parser.pyx":603
  10256. * except BaseException as ex:
  10257. * pyparser._last_error = ex
  10258. * return -1 # <<<<<<<<<<<<<<
  10259. * else:
  10260. * return 0
  10261. */
  10262. __pyx_r = -1;
  10263. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10264. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10265. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10266. goto __pyx_L14_return;
  10267. }
  10268. /* "aiohttp/_http_parser.pyx":601
  10269. * 'Status line is too long', pyparser._max_line_size, length)
  10270. * extend(pyparser._buf, at, length)
  10271. * except BaseException as ex: # <<<<<<<<<<<<<<
  10272. * pyparser._last_error = ex
  10273. * return -1
  10274. */
  10275. /*finally:*/ {
  10276. __pyx_L14_return: {
  10277. __pyx_t_10 = __pyx_r;
  10278. __Pyx_DECREF(__pyx_v_ex);
  10279. __pyx_v_ex = NULL;
  10280. __pyx_r = __pyx_t_10;
  10281. goto __pyx_L6_except_return;
  10282. }
  10283. }
  10284. }
  10285. goto __pyx_L5_except_error;
  10286. __pyx_L5_except_error:;
  10287. /* "aiohttp/_http_parser.pyx":596
  10288. * const char *at, size_t length) except -1:
  10289. * cdef HttpParser pyparser = <HttpParser>parser.data
  10290. * try: # <<<<<<<<<<<<<<
  10291. * if length > pyparser._max_line_size:
  10292. * raise LineTooLong(
  10293. */
  10294. __Pyx_XGIVEREF(__pyx_t_2);
  10295. __Pyx_XGIVEREF(__pyx_t_3);
  10296. __Pyx_XGIVEREF(__pyx_t_4);
  10297. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  10298. goto __pyx_L1_error;
  10299. __pyx_L6_except_return:;
  10300. __Pyx_XGIVEREF(__pyx_t_2);
  10301. __Pyx_XGIVEREF(__pyx_t_3);
  10302. __Pyx_XGIVEREF(__pyx_t_4);
  10303. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  10304. goto __pyx_L0;
  10305. }
  10306. /* "aiohttp/_http_parser.pyx":593
  10307. *
  10308. *
  10309. * cdef int cb_on_url(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10310. * const char *at, size_t length) except -1:
  10311. * cdef HttpParser pyparser = <HttpParser>parser.data
  10312. */
  10313. /* function exit code */
  10314. __pyx_L1_error:;
  10315. __Pyx_XDECREF(__pyx_t_1);
  10316. __Pyx_XDECREF(__pyx_t_6);
  10317. __Pyx_XDECREF(__pyx_t_7);
  10318. __Pyx_XDECREF(__pyx_t_8);
  10319. __Pyx_XDECREF(__pyx_t_9);
  10320. __Pyx_XDECREF(__pyx_t_11);
  10321. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10322. __pyx_r = -1;
  10323. __pyx_L0:;
  10324. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  10325. __Pyx_XDECREF(__pyx_v_ex);
  10326. __Pyx_RefNannyFinishContext();
  10327. return __pyx_r;
  10328. }
  10329. /* "aiohttp/_http_parser.pyx":608
  10330. *
  10331. *
  10332. * cdef int cb_on_status(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10333. * const char *at, size_t length) except -1:
  10334. * cdef HttpParser pyparser = <HttpParser>parser.data
  10335. */
  10336. static int __pyx_f_7aiohttp_12_http_parser_cb_on_status(struct http_parser *__pyx_v_parser, char const *__pyx_v_at, size_t __pyx_v_length) {
  10337. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  10338. PyObject *__pyx_v_ex = NULL;
  10339. int __pyx_r;
  10340. __Pyx_RefNannyDeclarations
  10341. PyObject *__pyx_t_1 = NULL;
  10342. PyObject *__pyx_t_2 = NULL;
  10343. PyObject *__pyx_t_3 = NULL;
  10344. PyObject *__pyx_t_4 = NULL;
  10345. int __pyx_t_5;
  10346. PyObject *__pyx_t_6 = NULL;
  10347. PyObject *__pyx_t_7 = NULL;
  10348. PyObject *__pyx_t_8 = NULL;
  10349. PyObject *__pyx_t_9 = NULL;
  10350. int __pyx_t_10;
  10351. PyObject *__pyx_t_11 = NULL;
  10352. __Pyx_RefNannySetupContext("cb_on_status", 0);
  10353. /* "aiohttp/_http_parser.pyx":610
  10354. * cdef int cb_on_status(cparser.http_parser* parser,
  10355. * const char *at, size_t length) except -1:
  10356. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  10357. * cdef str reason
  10358. * try:
  10359. */
  10360. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  10361. __Pyx_INCREF(__pyx_t_1);
  10362. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  10363. __pyx_t_1 = 0;
  10364. /* "aiohttp/_http_parser.pyx":612
  10365. * cdef HttpParser pyparser = <HttpParser>parser.data
  10366. * cdef str reason
  10367. * try: # <<<<<<<<<<<<<<
  10368. * if length > pyparser._max_line_size:
  10369. * raise LineTooLong(
  10370. */
  10371. {
  10372. __Pyx_PyThreadState_declare
  10373. __Pyx_PyThreadState_assign
  10374. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  10375. __Pyx_XGOTREF(__pyx_t_2);
  10376. __Pyx_XGOTREF(__pyx_t_3);
  10377. __Pyx_XGOTREF(__pyx_t_4);
  10378. /*try:*/ {
  10379. /* "aiohttp/_http_parser.pyx":613
  10380. * cdef str reason
  10381. * try:
  10382. * if length > pyparser._max_line_size: # <<<<<<<<<<<<<<
  10383. * raise LineTooLong(
  10384. * 'Status line is too long', pyparser._max_line_size, length)
  10385. */
  10386. __pyx_t_5 = ((__pyx_v_length > __pyx_v_pyparser->_max_line_size) != 0);
  10387. if (unlikely(__pyx_t_5)) {
  10388. /* "aiohttp/_http_parser.pyx":614
  10389. * try:
  10390. * if length > pyparser._max_line_size:
  10391. * raise LineTooLong( # <<<<<<<<<<<<<<
  10392. * 'Status line is too long', pyparser._max_line_size, length)
  10393. * extend(pyparser._buf, at, length)
  10394. */
  10395. __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_LineTooLong); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L3_error)
  10396. __Pyx_GOTREF(__pyx_t_6);
  10397. /* "aiohttp/_http_parser.pyx":615
  10398. * if length > pyparser._max_line_size:
  10399. * raise LineTooLong(
  10400. * 'Status line is too long', pyparser._max_line_size, length) # <<<<<<<<<<<<<<
  10401. * extend(pyparser._buf, at, length)
  10402. * except BaseException as ex:
  10403. */
  10404. __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_pyparser->_max_line_size); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 615, __pyx_L3_error)
  10405. __Pyx_GOTREF(__pyx_t_7);
  10406. __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 615, __pyx_L3_error)
  10407. __Pyx_GOTREF(__pyx_t_8);
  10408. __pyx_t_9 = NULL;
  10409. __pyx_t_10 = 0;
  10410. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
  10411. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
  10412. if (likely(__pyx_t_9)) {
  10413. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
  10414. __Pyx_INCREF(__pyx_t_9);
  10415. __Pyx_INCREF(function);
  10416. __Pyx_DECREF_SET(__pyx_t_6, function);
  10417. __pyx_t_10 = 1;
  10418. }
  10419. }
  10420. #if CYTHON_FAST_PYCALL
  10421. if (PyFunction_Check(__pyx_t_6)) {
  10422. PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_kp_u_Status_line_is_too_long, __pyx_t_7, __pyx_t_8};
  10423. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L3_error)
  10424. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10425. __Pyx_GOTREF(__pyx_t_1);
  10426. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  10427. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  10428. } else
  10429. #endif
  10430. #if CYTHON_FAST_PYCCALL
  10431. if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
  10432. PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_kp_u_Status_line_is_too_long, __pyx_t_7, __pyx_t_8};
  10433. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L3_error)
  10434. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10435. __Pyx_GOTREF(__pyx_t_1);
  10436. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  10437. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  10438. } else
  10439. #endif
  10440. {
  10441. __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 614, __pyx_L3_error)
  10442. __Pyx_GOTREF(__pyx_t_11);
  10443. if (__pyx_t_9) {
  10444. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
  10445. }
  10446. __Pyx_INCREF(__pyx_kp_u_Status_line_is_too_long);
  10447. __Pyx_GIVEREF(__pyx_kp_u_Status_line_is_too_long);
  10448. PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_kp_u_Status_line_is_too_long);
  10449. __Pyx_GIVEREF(__pyx_t_7);
  10450. PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
  10451. __Pyx_GIVEREF(__pyx_t_8);
  10452. PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_8);
  10453. __pyx_t_7 = 0;
  10454. __pyx_t_8 = 0;
  10455. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 614, __pyx_L3_error)
  10456. __Pyx_GOTREF(__pyx_t_1);
  10457. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10458. }
  10459. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10460. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  10461. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10462. __PYX_ERR(0, 614, __pyx_L3_error)
  10463. /* "aiohttp/_http_parser.pyx":613
  10464. * cdef str reason
  10465. * try:
  10466. * if length > pyparser._max_line_size: # <<<<<<<<<<<<<<
  10467. * raise LineTooLong(
  10468. * 'Status line is too long', pyparser._max_line_size, length)
  10469. */
  10470. }
  10471. /* "aiohttp/_http_parser.pyx":616
  10472. * raise LineTooLong(
  10473. * 'Status line is too long', pyparser._max_line_size, length)
  10474. * extend(pyparser._buf, at, length) # <<<<<<<<<<<<<<
  10475. * except BaseException as ex:
  10476. * pyparser._last_error = ex
  10477. */
  10478. __pyx_t_1 = __pyx_v_pyparser->_buf;
  10479. __Pyx_INCREF(__pyx_t_1);
  10480. __pyx_t_6 = __pyx_f_7aiohttp_12_http_parser_extend(__pyx_t_1, __pyx_v_at, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 616, __pyx_L3_error)
  10481. __Pyx_GOTREF(__pyx_t_6);
  10482. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10483. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10484. /* "aiohttp/_http_parser.pyx":612
  10485. * cdef HttpParser pyparser = <HttpParser>parser.data
  10486. * cdef str reason
  10487. * try: # <<<<<<<<<<<<<<
  10488. * if length > pyparser._max_line_size:
  10489. * raise LineTooLong(
  10490. */
  10491. }
  10492. /* "aiohttp/_http_parser.pyx":621
  10493. * return -1
  10494. * else:
  10495. * return 0 # <<<<<<<<<<<<<<
  10496. *
  10497. *
  10498. */
  10499. /*else:*/ {
  10500. __pyx_r = 0;
  10501. goto __pyx_L6_except_return;
  10502. }
  10503. __pyx_L3_error:;
  10504. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10505. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  10506. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  10507. __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
  10508. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  10509. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  10510. /* "aiohttp/_http_parser.pyx":617
  10511. * 'Status line is too long', pyparser._max_line_size, length)
  10512. * extend(pyparser._buf, at, length)
  10513. * except BaseException as ex: # <<<<<<<<<<<<<<
  10514. * pyparser._last_error = ex
  10515. * return -1
  10516. */
  10517. __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  10518. if (__pyx_t_10) {
  10519. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10520. if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_11) < 0) __PYX_ERR(0, 617, __pyx_L5_except_error)
  10521. __Pyx_GOTREF(__pyx_t_6);
  10522. __Pyx_GOTREF(__pyx_t_1);
  10523. __Pyx_GOTREF(__pyx_t_11);
  10524. __Pyx_INCREF(__pyx_t_1);
  10525. __pyx_v_ex = __pyx_t_1;
  10526. /*try:*/ {
  10527. /* "aiohttp/_http_parser.pyx":618
  10528. * extend(pyparser._buf, at, length)
  10529. * except BaseException as ex:
  10530. * pyparser._last_error = ex # <<<<<<<<<<<<<<
  10531. * return -1
  10532. * else:
  10533. */
  10534. __Pyx_INCREF(__pyx_v_ex);
  10535. __Pyx_GIVEREF(__pyx_v_ex);
  10536. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  10537. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  10538. __pyx_v_pyparser->_last_error = __pyx_v_ex;
  10539. /* "aiohttp/_http_parser.pyx":619
  10540. * except BaseException as ex:
  10541. * pyparser._last_error = ex
  10542. * return -1 # <<<<<<<<<<<<<<
  10543. * else:
  10544. * return 0
  10545. */
  10546. __pyx_r = -1;
  10547. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10548. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  10549. __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  10550. goto __pyx_L14_return;
  10551. }
  10552. /* "aiohttp/_http_parser.pyx":617
  10553. * 'Status line is too long', pyparser._max_line_size, length)
  10554. * extend(pyparser._buf, at, length)
  10555. * except BaseException as ex: # <<<<<<<<<<<<<<
  10556. * pyparser._last_error = ex
  10557. * return -1
  10558. */
  10559. /*finally:*/ {
  10560. __pyx_L14_return: {
  10561. __pyx_t_10 = __pyx_r;
  10562. __Pyx_DECREF(__pyx_v_ex);
  10563. __pyx_v_ex = NULL;
  10564. __pyx_r = __pyx_t_10;
  10565. goto __pyx_L6_except_return;
  10566. }
  10567. }
  10568. }
  10569. goto __pyx_L5_except_error;
  10570. __pyx_L5_except_error:;
  10571. /* "aiohttp/_http_parser.pyx":612
  10572. * cdef HttpParser pyparser = <HttpParser>parser.data
  10573. * cdef str reason
  10574. * try: # <<<<<<<<<<<<<<
  10575. * if length > pyparser._max_line_size:
  10576. * raise LineTooLong(
  10577. */
  10578. __Pyx_XGIVEREF(__pyx_t_2);
  10579. __Pyx_XGIVEREF(__pyx_t_3);
  10580. __Pyx_XGIVEREF(__pyx_t_4);
  10581. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  10582. goto __pyx_L1_error;
  10583. __pyx_L6_except_return:;
  10584. __Pyx_XGIVEREF(__pyx_t_2);
  10585. __Pyx_XGIVEREF(__pyx_t_3);
  10586. __Pyx_XGIVEREF(__pyx_t_4);
  10587. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  10588. goto __pyx_L0;
  10589. }
  10590. /* "aiohttp/_http_parser.pyx":608
  10591. *
  10592. *
  10593. * cdef int cb_on_status(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10594. * const char *at, size_t length) except -1:
  10595. * cdef HttpParser pyparser = <HttpParser>parser.data
  10596. */
  10597. /* function exit code */
  10598. __pyx_L1_error:;
  10599. __Pyx_XDECREF(__pyx_t_1);
  10600. __Pyx_XDECREF(__pyx_t_6);
  10601. __Pyx_XDECREF(__pyx_t_7);
  10602. __Pyx_XDECREF(__pyx_t_8);
  10603. __Pyx_XDECREF(__pyx_t_9);
  10604. __Pyx_XDECREF(__pyx_t_11);
  10605. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_status", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10606. __pyx_r = -1;
  10607. __pyx_L0:;
  10608. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  10609. __Pyx_XDECREF(__pyx_v_ex);
  10610. __Pyx_RefNannyFinishContext();
  10611. return __pyx_r;
  10612. }
  10613. /* "aiohttp/_http_parser.pyx":624
  10614. *
  10615. *
  10616. * cdef int cb_on_header_field(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10617. * const char *at, size_t length) except -1:
  10618. * cdef HttpParser pyparser = <HttpParser>parser.data
  10619. */
  10620. static int __pyx_f_7aiohttp_12_http_parser_cb_on_header_field(struct http_parser *__pyx_v_parser, char const *__pyx_v_at, size_t __pyx_v_length) {
  10621. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  10622. Py_ssize_t __pyx_v_size;
  10623. PyObject *__pyx_v_ex = NULL;
  10624. int __pyx_r;
  10625. __Pyx_RefNannyDeclarations
  10626. PyObject *__pyx_t_1 = NULL;
  10627. PyObject *__pyx_t_2 = NULL;
  10628. PyObject *__pyx_t_3 = NULL;
  10629. PyObject *__pyx_t_4 = NULL;
  10630. Py_ssize_t __pyx_t_5;
  10631. int __pyx_t_6;
  10632. PyObject *__pyx_t_7 = NULL;
  10633. PyObject *__pyx_t_8 = NULL;
  10634. PyObject *__pyx_t_9 = NULL;
  10635. PyObject *__pyx_t_10 = NULL;
  10636. int __pyx_t_11;
  10637. PyObject *__pyx_t_12 = NULL;
  10638. __Pyx_RefNannySetupContext("cb_on_header_field", 0);
  10639. /* "aiohttp/_http_parser.pyx":626
  10640. * cdef int cb_on_header_field(cparser.http_parser* parser,
  10641. * const char *at, size_t length) except -1:
  10642. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  10643. * cdef Py_ssize_t size
  10644. * try:
  10645. */
  10646. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  10647. __Pyx_INCREF(__pyx_t_1);
  10648. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  10649. __pyx_t_1 = 0;
  10650. /* "aiohttp/_http_parser.pyx":628
  10651. * cdef HttpParser pyparser = <HttpParser>parser.data
  10652. * cdef Py_ssize_t size
  10653. * try: # <<<<<<<<<<<<<<
  10654. * pyparser._on_status_complete()
  10655. * size = len(pyparser._raw_name) + length
  10656. */
  10657. {
  10658. __Pyx_PyThreadState_declare
  10659. __Pyx_PyThreadState_assign
  10660. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  10661. __Pyx_XGOTREF(__pyx_t_2);
  10662. __Pyx_XGOTREF(__pyx_t_3);
  10663. __Pyx_XGOTREF(__pyx_t_4);
  10664. /*try:*/ {
  10665. /* "aiohttp/_http_parser.pyx":629
  10666. * cdef Py_ssize_t size
  10667. * try:
  10668. * pyparser._on_status_complete() # <<<<<<<<<<<<<<
  10669. * size = len(pyparser._raw_name) + length
  10670. * if size > pyparser._max_field_size:
  10671. */
  10672. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_status_complete(__pyx_v_pyparser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L3_error)
  10673. __Pyx_GOTREF(__pyx_t_1);
  10674. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10675. /* "aiohttp/_http_parser.pyx":630
  10676. * try:
  10677. * pyparser._on_status_complete()
  10678. * size = len(pyparser._raw_name) + length # <<<<<<<<<<<<<<
  10679. * if size > pyparser._max_field_size:
  10680. * raise LineTooLong(
  10681. */
  10682. __pyx_t_1 = __pyx_v_pyparser->_raw_name;
  10683. __Pyx_INCREF(__pyx_t_1);
  10684. if (unlikely(__pyx_t_1 == Py_None)) {
  10685. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  10686. __PYX_ERR(0, 630, __pyx_L3_error)
  10687. }
  10688. __pyx_t_5 = PyByteArray_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 630, __pyx_L3_error)
  10689. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10690. __pyx_v_size = (__pyx_t_5 + __pyx_v_length);
  10691. /* "aiohttp/_http_parser.pyx":631
  10692. * pyparser._on_status_complete()
  10693. * size = len(pyparser._raw_name) + length
  10694. * if size > pyparser._max_field_size: # <<<<<<<<<<<<<<
  10695. * raise LineTooLong(
  10696. * 'Header name is too long', pyparser._max_field_size, size)
  10697. */
  10698. __pyx_t_6 = ((__pyx_v_size > __pyx_v_pyparser->_max_field_size) != 0);
  10699. if (unlikely(__pyx_t_6)) {
  10700. /* "aiohttp/_http_parser.pyx":632
  10701. * size = len(pyparser._raw_name) + length
  10702. * if size > pyparser._max_field_size:
  10703. * raise LineTooLong( # <<<<<<<<<<<<<<
  10704. * 'Header name is too long', pyparser._max_field_size, size)
  10705. * pyparser._on_header_field(at, length)
  10706. */
  10707. __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_LineTooLong); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 632, __pyx_L3_error)
  10708. __Pyx_GOTREF(__pyx_t_7);
  10709. /* "aiohttp/_http_parser.pyx":633
  10710. * if size > pyparser._max_field_size:
  10711. * raise LineTooLong(
  10712. * 'Header name is too long', pyparser._max_field_size, size) # <<<<<<<<<<<<<<
  10713. * pyparser._on_header_field(at, length)
  10714. * except BaseException as ex:
  10715. */
  10716. __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_pyparser->_max_field_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 633, __pyx_L3_error)
  10717. __Pyx_GOTREF(__pyx_t_8);
  10718. __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 633, __pyx_L3_error)
  10719. __Pyx_GOTREF(__pyx_t_9);
  10720. __pyx_t_10 = NULL;
  10721. __pyx_t_11 = 0;
  10722. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  10723. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
  10724. if (likely(__pyx_t_10)) {
  10725. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  10726. __Pyx_INCREF(__pyx_t_10);
  10727. __Pyx_INCREF(function);
  10728. __Pyx_DECREF_SET(__pyx_t_7, function);
  10729. __pyx_t_11 = 1;
  10730. }
  10731. }
  10732. #if CYTHON_FAST_PYCALL
  10733. if (PyFunction_Check(__pyx_t_7)) {
  10734. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_Header_name_is_too_long, __pyx_t_8, __pyx_t_9};
  10735. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L3_error)
  10736. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  10737. __Pyx_GOTREF(__pyx_t_1);
  10738. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  10739. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  10740. } else
  10741. #endif
  10742. #if CYTHON_FAST_PYCCALL
  10743. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  10744. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_Header_name_is_too_long, __pyx_t_8, __pyx_t_9};
  10745. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L3_error)
  10746. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  10747. __Pyx_GOTREF(__pyx_t_1);
  10748. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  10749. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  10750. } else
  10751. #endif
  10752. {
  10753. __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 632, __pyx_L3_error)
  10754. __Pyx_GOTREF(__pyx_t_12);
  10755. if (__pyx_t_10) {
  10756. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
  10757. }
  10758. __Pyx_INCREF(__pyx_kp_u_Header_name_is_too_long);
  10759. __Pyx_GIVEREF(__pyx_kp_u_Header_name_is_too_long);
  10760. PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_kp_u_Header_name_is_too_long);
  10761. __Pyx_GIVEREF(__pyx_t_8);
  10762. PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_8);
  10763. __Pyx_GIVEREF(__pyx_t_9);
  10764. PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_9);
  10765. __pyx_t_8 = 0;
  10766. __pyx_t_9 = 0;
  10767. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 632, __pyx_L3_error)
  10768. __Pyx_GOTREF(__pyx_t_1);
  10769. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  10770. }
  10771. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  10772. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  10773. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10774. __PYX_ERR(0, 632, __pyx_L3_error)
  10775. /* "aiohttp/_http_parser.pyx":631
  10776. * pyparser._on_status_complete()
  10777. * size = len(pyparser._raw_name) + length
  10778. * if size > pyparser._max_field_size: # <<<<<<<<<<<<<<
  10779. * raise LineTooLong(
  10780. * 'Header name is too long', pyparser._max_field_size, size)
  10781. */
  10782. }
  10783. /* "aiohttp/_http_parser.pyx":634
  10784. * raise LineTooLong(
  10785. * 'Header name is too long', pyparser._max_field_size, size)
  10786. * pyparser._on_header_field(at, length) # <<<<<<<<<<<<<<
  10787. * except BaseException as ex:
  10788. * pyparser._last_error = ex
  10789. */
  10790. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_header_field(__pyx_v_pyparser, __pyx_v_at, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L3_error)
  10791. __Pyx_GOTREF(__pyx_t_1);
  10792. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10793. /* "aiohttp/_http_parser.pyx":628
  10794. * cdef HttpParser pyparser = <HttpParser>parser.data
  10795. * cdef Py_ssize_t size
  10796. * try: # <<<<<<<<<<<<<<
  10797. * pyparser._on_status_complete()
  10798. * size = len(pyparser._raw_name) + length
  10799. */
  10800. }
  10801. /* "aiohttp/_http_parser.pyx":639
  10802. * return -1
  10803. * else:
  10804. * return 0 # <<<<<<<<<<<<<<
  10805. *
  10806. *
  10807. */
  10808. /*else:*/ {
  10809. __pyx_r = 0;
  10810. goto __pyx_L6_except_return;
  10811. }
  10812. __pyx_L3_error:;
  10813. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  10814. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  10815. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  10816. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  10817. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  10818. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  10819. /* "aiohttp/_http_parser.pyx":635
  10820. * 'Header name is too long', pyparser._max_field_size, size)
  10821. * pyparser._on_header_field(at, length)
  10822. * except BaseException as ex: # <<<<<<<<<<<<<<
  10823. * pyparser._last_error = ex
  10824. * return -1
  10825. */
  10826. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  10827. if (__pyx_t_11) {
  10828. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_header_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10829. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_12) < 0) __PYX_ERR(0, 635, __pyx_L5_except_error)
  10830. __Pyx_GOTREF(__pyx_t_1);
  10831. __Pyx_GOTREF(__pyx_t_7);
  10832. __Pyx_GOTREF(__pyx_t_12);
  10833. __Pyx_INCREF(__pyx_t_7);
  10834. __pyx_v_ex = __pyx_t_7;
  10835. /*try:*/ {
  10836. /* "aiohttp/_http_parser.pyx":636
  10837. * pyparser._on_header_field(at, length)
  10838. * except BaseException as ex:
  10839. * pyparser._last_error = ex # <<<<<<<<<<<<<<
  10840. * return -1
  10841. * else:
  10842. */
  10843. __Pyx_INCREF(__pyx_v_ex);
  10844. __Pyx_GIVEREF(__pyx_v_ex);
  10845. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  10846. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  10847. __pyx_v_pyparser->_last_error = __pyx_v_ex;
  10848. /* "aiohttp/_http_parser.pyx":637
  10849. * except BaseException as ex:
  10850. * pyparser._last_error = ex
  10851. * return -1 # <<<<<<<<<<<<<<
  10852. * else:
  10853. * return 0
  10854. */
  10855. __pyx_r = -1;
  10856. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10857. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  10858. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  10859. goto __pyx_L14_return;
  10860. }
  10861. /* "aiohttp/_http_parser.pyx":635
  10862. * 'Header name is too long', pyparser._max_field_size, size)
  10863. * pyparser._on_header_field(at, length)
  10864. * except BaseException as ex: # <<<<<<<<<<<<<<
  10865. * pyparser._last_error = ex
  10866. * return -1
  10867. */
  10868. /*finally:*/ {
  10869. __pyx_L14_return: {
  10870. __pyx_t_11 = __pyx_r;
  10871. __Pyx_DECREF(__pyx_v_ex);
  10872. __pyx_v_ex = NULL;
  10873. __pyx_r = __pyx_t_11;
  10874. goto __pyx_L6_except_return;
  10875. }
  10876. }
  10877. }
  10878. goto __pyx_L5_except_error;
  10879. __pyx_L5_except_error:;
  10880. /* "aiohttp/_http_parser.pyx":628
  10881. * cdef HttpParser pyparser = <HttpParser>parser.data
  10882. * cdef Py_ssize_t size
  10883. * try: # <<<<<<<<<<<<<<
  10884. * pyparser._on_status_complete()
  10885. * size = len(pyparser._raw_name) + length
  10886. */
  10887. __Pyx_XGIVEREF(__pyx_t_2);
  10888. __Pyx_XGIVEREF(__pyx_t_3);
  10889. __Pyx_XGIVEREF(__pyx_t_4);
  10890. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  10891. goto __pyx_L1_error;
  10892. __pyx_L6_except_return:;
  10893. __Pyx_XGIVEREF(__pyx_t_2);
  10894. __Pyx_XGIVEREF(__pyx_t_3);
  10895. __Pyx_XGIVEREF(__pyx_t_4);
  10896. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  10897. goto __pyx_L0;
  10898. }
  10899. /* "aiohttp/_http_parser.pyx":624
  10900. *
  10901. *
  10902. * cdef int cb_on_header_field(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10903. * const char *at, size_t length) except -1:
  10904. * cdef HttpParser pyparser = <HttpParser>parser.data
  10905. */
  10906. /* function exit code */
  10907. __pyx_L1_error:;
  10908. __Pyx_XDECREF(__pyx_t_1);
  10909. __Pyx_XDECREF(__pyx_t_7);
  10910. __Pyx_XDECREF(__pyx_t_8);
  10911. __Pyx_XDECREF(__pyx_t_9);
  10912. __Pyx_XDECREF(__pyx_t_10);
  10913. __Pyx_XDECREF(__pyx_t_12);
  10914. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_header_field", __pyx_clineno, __pyx_lineno, __pyx_filename);
  10915. __pyx_r = -1;
  10916. __pyx_L0:;
  10917. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  10918. __Pyx_XDECREF(__pyx_v_ex);
  10919. __Pyx_RefNannyFinishContext();
  10920. return __pyx_r;
  10921. }
  10922. /* "aiohttp/_http_parser.pyx":642
  10923. *
  10924. *
  10925. * cdef int cb_on_header_value(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  10926. * const char *at, size_t length) except -1:
  10927. * cdef HttpParser pyparser = <HttpParser>parser.data
  10928. */
  10929. static int __pyx_f_7aiohttp_12_http_parser_cb_on_header_value(struct http_parser *__pyx_v_parser, char const *__pyx_v_at, size_t __pyx_v_length) {
  10930. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  10931. Py_ssize_t __pyx_v_size;
  10932. PyObject *__pyx_v_ex = NULL;
  10933. int __pyx_r;
  10934. __Pyx_RefNannyDeclarations
  10935. PyObject *__pyx_t_1 = NULL;
  10936. PyObject *__pyx_t_2 = NULL;
  10937. PyObject *__pyx_t_3 = NULL;
  10938. PyObject *__pyx_t_4 = NULL;
  10939. Py_ssize_t __pyx_t_5;
  10940. int __pyx_t_6;
  10941. PyObject *__pyx_t_7 = NULL;
  10942. PyObject *__pyx_t_8 = NULL;
  10943. PyObject *__pyx_t_9 = NULL;
  10944. PyObject *__pyx_t_10 = NULL;
  10945. int __pyx_t_11;
  10946. PyObject *__pyx_t_12 = NULL;
  10947. __Pyx_RefNannySetupContext("cb_on_header_value", 0);
  10948. /* "aiohttp/_http_parser.pyx":644
  10949. * cdef int cb_on_header_value(cparser.http_parser* parser,
  10950. * const char *at, size_t length) except -1:
  10951. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  10952. * cdef Py_ssize_t size
  10953. * try:
  10954. */
  10955. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  10956. __Pyx_INCREF(__pyx_t_1);
  10957. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  10958. __pyx_t_1 = 0;
  10959. /* "aiohttp/_http_parser.pyx":646
  10960. * cdef HttpParser pyparser = <HttpParser>parser.data
  10961. * cdef Py_ssize_t size
  10962. * try: # <<<<<<<<<<<<<<
  10963. * size = len(pyparser._raw_value) + length
  10964. * if size > pyparser._max_field_size:
  10965. */
  10966. {
  10967. __Pyx_PyThreadState_declare
  10968. __Pyx_PyThreadState_assign
  10969. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  10970. __Pyx_XGOTREF(__pyx_t_2);
  10971. __Pyx_XGOTREF(__pyx_t_3);
  10972. __Pyx_XGOTREF(__pyx_t_4);
  10973. /*try:*/ {
  10974. /* "aiohttp/_http_parser.pyx":647
  10975. * cdef Py_ssize_t size
  10976. * try:
  10977. * size = len(pyparser._raw_value) + length # <<<<<<<<<<<<<<
  10978. * if size > pyparser._max_field_size:
  10979. * raise LineTooLong(
  10980. */
  10981. __pyx_t_1 = __pyx_v_pyparser->_raw_value;
  10982. __Pyx_INCREF(__pyx_t_1);
  10983. if (unlikely(__pyx_t_1 == Py_None)) {
  10984. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  10985. __PYX_ERR(0, 647, __pyx_L3_error)
  10986. }
  10987. __pyx_t_5 = PyByteArray_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 647, __pyx_L3_error)
  10988. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  10989. __pyx_v_size = (__pyx_t_5 + __pyx_v_length);
  10990. /* "aiohttp/_http_parser.pyx":648
  10991. * try:
  10992. * size = len(pyparser._raw_value) + length
  10993. * if size > pyparser._max_field_size: # <<<<<<<<<<<<<<
  10994. * raise LineTooLong(
  10995. * 'Header value is too long', pyparser._max_field_size, size)
  10996. */
  10997. __pyx_t_6 = ((__pyx_v_size > __pyx_v_pyparser->_max_field_size) != 0);
  10998. if (unlikely(__pyx_t_6)) {
  10999. /* "aiohttp/_http_parser.pyx":649
  11000. * size = len(pyparser._raw_value) + length
  11001. * if size > pyparser._max_field_size:
  11002. * raise LineTooLong( # <<<<<<<<<<<<<<
  11003. * 'Header value is too long', pyparser._max_field_size, size)
  11004. * pyparser._on_header_value(at, length)
  11005. */
  11006. __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_LineTooLong); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 649, __pyx_L3_error)
  11007. __Pyx_GOTREF(__pyx_t_7);
  11008. /* "aiohttp/_http_parser.pyx":650
  11009. * if size > pyparser._max_field_size:
  11010. * raise LineTooLong(
  11011. * 'Header value is too long', pyparser._max_field_size, size) # <<<<<<<<<<<<<<
  11012. * pyparser._on_header_value(at, length)
  11013. * except BaseException as ex:
  11014. */
  11015. __pyx_t_8 = __Pyx_PyInt_FromSize_t(__pyx_v_pyparser->_max_field_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 650, __pyx_L3_error)
  11016. __Pyx_GOTREF(__pyx_t_8);
  11017. __pyx_t_9 = PyInt_FromSsize_t(__pyx_v_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 650, __pyx_L3_error)
  11018. __Pyx_GOTREF(__pyx_t_9);
  11019. __pyx_t_10 = NULL;
  11020. __pyx_t_11 = 0;
  11021. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
  11022. __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
  11023. if (likely(__pyx_t_10)) {
  11024. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  11025. __Pyx_INCREF(__pyx_t_10);
  11026. __Pyx_INCREF(function);
  11027. __Pyx_DECREF_SET(__pyx_t_7, function);
  11028. __pyx_t_11 = 1;
  11029. }
  11030. }
  11031. #if CYTHON_FAST_PYCALL
  11032. if (PyFunction_Check(__pyx_t_7)) {
  11033. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_Header_value_is_too_long, __pyx_t_8, __pyx_t_9};
  11034. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L3_error)
  11035. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  11036. __Pyx_GOTREF(__pyx_t_1);
  11037. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  11038. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11039. } else
  11040. #endif
  11041. #if CYTHON_FAST_PYCCALL
  11042. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  11043. PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_kp_u_Header_value_is_too_long, __pyx_t_8, __pyx_t_9};
  11044. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L3_error)
  11045. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  11046. __Pyx_GOTREF(__pyx_t_1);
  11047. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  11048. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11049. } else
  11050. #endif
  11051. {
  11052. __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 649, __pyx_L3_error)
  11053. __Pyx_GOTREF(__pyx_t_12);
  11054. if (__pyx_t_10) {
  11055. __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
  11056. }
  11057. __Pyx_INCREF(__pyx_kp_u_Header_value_is_too_long);
  11058. __Pyx_GIVEREF(__pyx_kp_u_Header_value_is_too_long);
  11059. PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_kp_u_Header_value_is_too_long);
  11060. __Pyx_GIVEREF(__pyx_t_8);
  11061. PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_8);
  11062. __Pyx_GIVEREF(__pyx_t_9);
  11063. PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_9);
  11064. __pyx_t_8 = 0;
  11065. __pyx_t_9 = 0;
  11066. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L3_error)
  11067. __Pyx_GOTREF(__pyx_t_1);
  11068. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  11069. }
  11070. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11071. __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  11072. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11073. __PYX_ERR(0, 649, __pyx_L3_error)
  11074. /* "aiohttp/_http_parser.pyx":648
  11075. * try:
  11076. * size = len(pyparser._raw_value) + length
  11077. * if size > pyparser._max_field_size: # <<<<<<<<<<<<<<
  11078. * raise LineTooLong(
  11079. * 'Header value is too long', pyparser._max_field_size, size)
  11080. */
  11081. }
  11082. /* "aiohttp/_http_parser.pyx":651
  11083. * raise LineTooLong(
  11084. * 'Header value is too long', pyparser._max_field_size, size)
  11085. * pyparser._on_header_value(at, length) # <<<<<<<<<<<<<<
  11086. * except BaseException as ex:
  11087. * pyparser._last_error = ex
  11088. */
  11089. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_header_value(__pyx_v_pyparser, __pyx_v_at, __pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L3_error)
  11090. __Pyx_GOTREF(__pyx_t_1);
  11091. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11092. /* "aiohttp/_http_parser.pyx":646
  11093. * cdef HttpParser pyparser = <HttpParser>parser.data
  11094. * cdef Py_ssize_t size
  11095. * try: # <<<<<<<<<<<<<<
  11096. * size = len(pyparser._raw_value) + length
  11097. * if size > pyparser._max_field_size:
  11098. */
  11099. }
  11100. /* "aiohttp/_http_parser.pyx":656
  11101. * return -1
  11102. * else:
  11103. * return 0 # <<<<<<<<<<<<<<
  11104. *
  11105. *
  11106. */
  11107. /*else:*/ {
  11108. __pyx_r = 0;
  11109. goto __pyx_L6_except_return;
  11110. }
  11111. __pyx_L3_error:;
  11112. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  11113. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  11114. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  11115. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  11116. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  11117. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  11118. /* "aiohttp/_http_parser.pyx":652
  11119. * 'Header value is too long', pyparser._max_field_size, size)
  11120. * pyparser._on_header_value(at, length)
  11121. * except BaseException as ex: # <<<<<<<<<<<<<<
  11122. * pyparser._last_error = ex
  11123. * return -1
  11124. */
  11125. __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  11126. if (__pyx_t_11) {
  11127. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_header_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11128. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_12) < 0) __PYX_ERR(0, 652, __pyx_L5_except_error)
  11129. __Pyx_GOTREF(__pyx_t_1);
  11130. __Pyx_GOTREF(__pyx_t_7);
  11131. __Pyx_GOTREF(__pyx_t_12);
  11132. __Pyx_INCREF(__pyx_t_7);
  11133. __pyx_v_ex = __pyx_t_7;
  11134. /*try:*/ {
  11135. /* "aiohttp/_http_parser.pyx":653
  11136. * pyparser._on_header_value(at, length)
  11137. * except BaseException as ex:
  11138. * pyparser._last_error = ex # <<<<<<<<<<<<<<
  11139. * return -1
  11140. * else:
  11141. */
  11142. __Pyx_INCREF(__pyx_v_ex);
  11143. __Pyx_GIVEREF(__pyx_v_ex);
  11144. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  11145. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  11146. __pyx_v_pyparser->_last_error = __pyx_v_ex;
  11147. /* "aiohttp/_http_parser.pyx":654
  11148. * except BaseException as ex:
  11149. * pyparser._last_error = ex
  11150. * return -1 # <<<<<<<<<<<<<<
  11151. * else:
  11152. * return 0
  11153. */
  11154. __pyx_r = -1;
  11155. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11156. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11157. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  11158. goto __pyx_L14_return;
  11159. }
  11160. /* "aiohttp/_http_parser.pyx":652
  11161. * 'Header value is too long', pyparser._max_field_size, size)
  11162. * pyparser._on_header_value(at, length)
  11163. * except BaseException as ex: # <<<<<<<<<<<<<<
  11164. * pyparser._last_error = ex
  11165. * return -1
  11166. */
  11167. /*finally:*/ {
  11168. __pyx_L14_return: {
  11169. __pyx_t_11 = __pyx_r;
  11170. __Pyx_DECREF(__pyx_v_ex);
  11171. __pyx_v_ex = NULL;
  11172. __pyx_r = __pyx_t_11;
  11173. goto __pyx_L6_except_return;
  11174. }
  11175. }
  11176. }
  11177. goto __pyx_L5_except_error;
  11178. __pyx_L5_except_error:;
  11179. /* "aiohttp/_http_parser.pyx":646
  11180. * cdef HttpParser pyparser = <HttpParser>parser.data
  11181. * cdef Py_ssize_t size
  11182. * try: # <<<<<<<<<<<<<<
  11183. * size = len(pyparser._raw_value) + length
  11184. * if size > pyparser._max_field_size:
  11185. */
  11186. __Pyx_XGIVEREF(__pyx_t_2);
  11187. __Pyx_XGIVEREF(__pyx_t_3);
  11188. __Pyx_XGIVEREF(__pyx_t_4);
  11189. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  11190. goto __pyx_L1_error;
  11191. __pyx_L6_except_return:;
  11192. __Pyx_XGIVEREF(__pyx_t_2);
  11193. __Pyx_XGIVEREF(__pyx_t_3);
  11194. __Pyx_XGIVEREF(__pyx_t_4);
  11195. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  11196. goto __pyx_L0;
  11197. }
  11198. /* "aiohttp/_http_parser.pyx":642
  11199. *
  11200. *
  11201. * cdef int cb_on_header_value(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  11202. * const char *at, size_t length) except -1:
  11203. * cdef HttpParser pyparser = <HttpParser>parser.data
  11204. */
  11205. /* function exit code */
  11206. __pyx_L1_error:;
  11207. __Pyx_XDECREF(__pyx_t_1);
  11208. __Pyx_XDECREF(__pyx_t_7);
  11209. __Pyx_XDECREF(__pyx_t_8);
  11210. __Pyx_XDECREF(__pyx_t_9);
  11211. __Pyx_XDECREF(__pyx_t_10);
  11212. __Pyx_XDECREF(__pyx_t_12);
  11213. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_header_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11214. __pyx_r = -1;
  11215. __pyx_L0:;
  11216. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  11217. __Pyx_XDECREF(__pyx_v_ex);
  11218. __Pyx_RefNannyFinishContext();
  11219. return __pyx_r;
  11220. }
  11221. /* "aiohttp/_http_parser.pyx":659
  11222. *
  11223. *
  11224. * cdef int cb_on_headers_complete(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  11225. * cdef HttpParser pyparser = <HttpParser>parser.data
  11226. * try:
  11227. */
  11228. static int __pyx_f_7aiohttp_12_http_parser_cb_on_headers_complete(struct http_parser *__pyx_v_parser) {
  11229. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  11230. PyObject *__pyx_v_exc = NULL;
  11231. int __pyx_r;
  11232. __Pyx_RefNannyDeclarations
  11233. PyObject *__pyx_t_1 = NULL;
  11234. PyObject *__pyx_t_2 = NULL;
  11235. PyObject *__pyx_t_3 = NULL;
  11236. PyObject *__pyx_t_4 = NULL;
  11237. int __pyx_t_5;
  11238. int __pyx_t_6;
  11239. int __pyx_t_7;
  11240. PyObject *__pyx_t_8 = NULL;
  11241. PyObject *__pyx_t_9 = NULL;
  11242. __Pyx_RefNannySetupContext("cb_on_headers_complete", 0);
  11243. /* "aiohttp/_http_parser.pyx":660
  11244. *
  11245. * cdef int cb_on_headers_complete(cparser.http_parser* parser) except -1:
  11246. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  11247. * try:
  11248. * pyparser._on_status_complete()
  11249. */
  11250. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  11251. __Pyx_INCREF(__pyx_t_1);
  11252. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  11253. __pyx_t_1 = 0;
  11254. /* "aiohttp/_http_parser.pyx":661
  11255. * cdef int cb_on_headers_complete(cparser.http_parser* parser) except -1:
  11256. * cdef HttpParser pyparser = <HttpParser>parser.data
  11257. * try: # <<<<<<<<<<<<<<
  11258. * pyparser._on_status_complete()
  11259. * pyparser._on_headers_complete()
  11260. */
  11261. {
  11262. __Pyx_PyThreadState_declare
  11263. __Pyx_PyThreadState_assign
  11264. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  11265. __Pyx_XGOTREF(__pyx_t_2);
  11266. __Pyx_XGOTREF(__pyx_t_3);
  11267. __Pyx_XGOTREF(__pyx_t_4);
  11268. /*try:*/ {
  11269. /* "aiohttp/_http_parser.pyx":662
  11270. * cdef HttpParser pyparser = <HttpParser>parser.data
  11271. * try:
  11272. * pyparser._on_status_complete() # <<<<<<<<<<<<<<
  11273. * pyparser._on_headers_complete()
  11274. * except BaseException as exc:
  11275. */
  11276. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_status_complete(__pyx_v_pyparser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L3_error)
  11277. __Pyx_GOTREF(__pyx_t_1);
  11278. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11279. /* "aiohttp/_http_parser.pyx":663
  11280. * try:
  11281. * pyparser._on_status_complete()
  11282. * pyparser._on_headers_complete() # <<<<<<<<<<<<<<
  11283. * except BaseException as exc:
  11284. * pyparser._last_error = exc
  11285. */
  11286. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_headers_complete(__pyx_v_pyparser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L3_error)
  11287. __Pyx_GOTREF(__pyx_t_1);
  11288. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11289. /* "aiohttp/_http_parser.pyx":661
  11290. * cdef int cb_on_headers_complete(cparser.http_parser* parser) except -1:
  11291. * cdef HttpParser pyparser = <HttpParser>parser.data
  11292. * try: # <<<<<<<<<<<<<<
  11293. * pyparser._on_status_complete()
  11294. * pyparser._on_headers_complete()
  11295. */
  11296. }
  11297. /* "aiohttp/_http_parser.pyx":668
  11298. * return -1
  11299. * else:
  11300. * if pyparser._cparser.upgrade or pyparser._cparser.method == 5: # CONNECT # <<<<<<<<<<<<<<
  11301. * return 2
  11302. * else:
  11303. */
  11304. /*else:*/ {
  11305. __pyx_t_6 = (__pyx_v_pyparser->_cparser->upgrade != 0);
  11306. if (!__pyx_t_6) {
  11307. } else {
  11308. __pyx_t_5 = __pyx_t_6;
  11309. goto __pyx_L10_bool_binop_done;
  11310. }
  11311. __pyx_t_6 = ((__pyx_v_pyparser->_cparser->method == 5) != 0);
  11312. __pyx_t_5 = __pyx_t_6;
  11313. __pyx_L10_bool_binop_done:;
  11314. if (__pyx_t_5) {
  11315. /* "aiohttp/_http_parser.pyx":669
  11316. * else:
  11317. * if pyparser._cparser.upgrade or pyparser._cparser.method == 5: # CONNECT
  11318. * return 2 # <<<<<<<<<<<<<<
  11319. * else:
  11320. * return 0
  11321. */
  11322. __pyx_r = 2;
  11323. goto __pyx_L6_except_return;
  11324. /* "aiohttp/_http_parser.pyx":668
  11325. * return -1
  11326. * else:
  11327. * if pyparser._cparser.upgrade or pyparser._cparser.method == 5: # CONNECT # <<<<<<<<<<<<<<
  11328. * return 2
  11329. * else:
  11330. */
  11331. }
  11332. /* "aiohttp/_http_parser.pyx":671
  11333. * return 2
  11334. * else:
  11335. * return 0 # <<<<<<<<<<<<<<
  11336. *
  11337. *
  11338. */
  11339. /*else*/ {
  11340. __pyx_r = 0;
  11341. goto __pyx_L6_except_return;
  11342. }
  11343. }
  11344. __pyx_L3_error:;
  11345. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  11346. /* "aiohttp/_http_parser.pyx":664
  11347. * pyparser._on_status_complete()
  11348. * pyparser._on_headers_complete()
  11349. * except BaseException as exc: # <<<<<<<<<<<<<<
  11350. * pyparser._last_error = exc
  11351. * return -1
  11352. */
  11353. __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  11354. if (__pyx_t_7) {
  11355. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_headers_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11356. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 664, __pyx_L5_except_error)
  11357. __Pyx_GOTREF(__pyx_t_1);
  11358. __Pyx_GOTREF(__pyx_t_8);
  11359. __Pyx_GOTREF(__pyx_t_9);
  11360. __Pyx_INCREF(__pyx_t_8);
  11361. __pyx_v_exc = __pyx_t_8;
  11362. /*try:*/ {
  11363. /* "aiohttp/_http_parser.pyx":665
  11364. * pyparser._on_headers_complete()
  11365. * except BaseException as exc:
  11366. * pyparser._last_error = exc # <<<<<<<<<<<<<<
  11367. * return -1
  11368. * else:
  11369. */
  11370. __Pyx_INCREF(__pyx_v_exc);
  11371. __Pyx_GIVEREF(__pyx_v_exc);
  11372. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  11373. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  11374. __pyx_v_pyparser->_last_error = __pyx_v_exc;
  11375. /* "aiohttp/_http_parser.pyx":666
  11376. * except BaseException as exc:
  11377. * pyparser._last_error = exc
  11378. * return -1 # <<<<<<<<<<<<<<
  11379. * else:
  11380. * if pyparser._cparser.upgrade or pyparser._cparser.method == 5: # CONNECT
  11381. */
  11382. __pyx_r = -1;
  11383. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11384. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  11385. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11386. goto __pyx_L16_return;
  11387. }
  11388. /* "aiohttp/_http_parser.pyx":664
  11389. * pyparser._on_status_complete()
  11390. * pyparser._on_headers_complete()
  11391. * except BaseException as exc: # <<<<<<<<<<<<<<
  11392. * pyparser._last_error = exc
  11393. * return -1
  11394. */
  11395. /*finally:*/ {
  11396. __pyx_L16_return: {
  11397. __pyx_t_7 = __pyx_r;
  11398. __Pyx_DECREF(__pyx_v_exc);
  11399. __pyx_v_exc = NULL;
  11400. __pyx_r = __pyx_t_7;
  11401. goto __pyx_L6_except_return;
  11402. }
  11403. }
  11404. }
  11405. goto __pyx_L5_except_error;
  11406. __pyx_L5_except_error:;
  11407. /* "aiohttp/_http_parser.pyx":661
  11408. * cdef int cb_on_headers_complete(cparser.http_parser* parser) except -1:
  11409. * cdef HttpParser pyparser = <HttpParser>parser.data
  11410. * try: # <<<<<<<<<<<<<<
  11411. * pyparser._on_status_complete()
  11412. * pyparser._on_headers_complete()
  11413. */
  11414. __Pyx_XGIVEREF(__pyx_t_2);
  11415. __Pyx_XGIVEREF(__pyx_t_3);
  11416. __Pyx_XGIVEREF(__pyx_t_4);
  11417. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  11418. goto __pyx_L1_error;
  11419. __pyx_L6_except_return:;
  11420. __Pyx_XGIVEREF(__pyx_t_2);
  11421. __Pyx_XGIVEREF(__pyx_t_3);
  11422. __Pyx_XGIVEREF(__pyx_t_4);
  11423. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  11424. goto __pyx_L0;
  11425. }
  11426. /* "aiohttp/_http_parser.pyx":659
  11427. *
  11428. *
  11429. * cdef int cb_on_headers_complete(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  11430. * cdef HttpParser pyparser = <HttpParser>parser.data
  11431. * try:
  11432. */
  11433. /* function exit code */
  11434. __pyx_L1_error:;
  11435. __Pyx_XDECREF(__pyx_t_1);
  11436. __Pyx_XDECREF(__pyx_t_8);
  11437. __Pyx_XDECREF(__pyx_t_9);
  11438. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_headers_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11439. __pyx_r = -1;
  11440. __pyx_L0:;
  11441. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  11442. __Pyx_XDECREF(__pyx_v_exc);
  11443. __Pyx_RefNannyFinishContext();
  11444. return __pyx_r;
  11445. }
  11446. /* "aiohttp/_http_parser.pyx":674
  11447. *
  11448. *
  11449. * cdef int cb_on_body(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  11450. * const char *at, size_t length) except -1:
  11451. * cdef HttpParser pyparser = <HttpParser>parser.data
  11452. */
  11453. static int __pyx_f_7aiohttp_12_http_parser_cb_on_body(struct http_parser *__pyx_v_parser, char const *__pyx_v_at, size_t __pyx_v_length) {
  11454. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  11455. PyObject *__pyx_v_body = 0;
  11456. PyObject *__pyx_v_exc = NULL;
  11457. int __pyx_r;
  11458. __Pyx_RefNannyDeclarations
  11459. PyObject *__pyx_t_1 = NULL;
  11460. PyObject *__pyx_t_2 = NULL;
  11461. PyObject *__pyx_t_3 = NULL;
  11462. PyObject *__pyx_t_4 = NULL;
  11463. PyObject *__pyx_t_5 = NULL;
  11464. PyObject *__pyx_t_6 = NULL;
  11465. PyObject *__pyx_t_7 = NULL;
  11466. int __pyx_t_8;
  11467. PyObject *__pyx_t_9 = NULL;
  11468. int __pyx_t_10;
  11469. int __pyx_t_11;
  11470. PyObject *__pyx_t_12 = NULL;
  11471. PyObject *__pyx_t_13 = NULL;
  11472. PyObject *__pyx_t_14 = NULL;
  11473. PyObject *__pyx_t_15 = NULL;
  11474. PyObject *__pyx_t_16 = NULL;
  11475. int __pyx_t_17;
  11476. char const *__pyx_t_18;
  11477. PyObject *__pyx_t_19 = NULL;
  11478. PyObject *__pyx_t_20 = NULL;
  11479. PyObject *__pyx_t_21 = NULL;
  11480. PyObject *__pyx_t_22 = NULL;
  11481. PyObject *__pyx_t_23 = NULL;
  11482. PyObject *__pyx_t_24 = NULL;
  11483. __Pyx_RefNannySetupContext("cb_on_body", 0);
  11484. /* "aiohttp/_http_parser.pyx":676
  11485. * cdef int cb_on_body(cparser.http_parser* parser,
  11486. * const char *at, size_t length) except -1:
  11487. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  11488. * cdef bytes body = at[:length]
  11489. * try:
  11490. */
  11491. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  11492. __Pyx_INCREF(__pyx_t_1);
  11493. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  11494. __pyx_t_1 = 0;
  11495. /* "aiohttp/_http_parser.pyx":677
  11496. * const char *at, size_t length) except -1:
  11497. * cdef HttpParser pyparser = <HttpParser>parser.data
  11498. * cdef bytes body = at[:length] # <<<<<<<<<<<<<<
  11499. * try:
  11500. * pyparser._payload.feed_data(body, length)
  11501. */
  11502. __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_at + 0, __pyx_v_length - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  11503. __Pyx_GOTREF(__pyx_t_1);
  11504. __pyx_v_body = ((PyObject*)__pyx_t_1);
  11505. __pyx_t_1 = 0;
  11506. /* "aiohttp/_http_parser.pyx":678
  11507. * cdef HttpParser pyparser = <HttpParser>parser.data
  11508. * cdef bytes body = at[:length]
  11509. * try: # <<<<<<<<<<<<<<
  11510. * pyparser._payload.feed_data(body, length)
  11511. * except BaseException as exc:
  11512. */
  11513. {
  11514. __Pyx_PyThreadState_declare
  11515. __Pyx_PyThreadState_assign
  11516. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  11517. __Pyx_XGOTREF(__pyx_t_2);
  11518. __Pyx_XGOTREF(__pyx_t_3);
  11519. __Pyx_XGOTREF(__pyx_t_4);
  11520. /*try:*/ {
  11521. /* "aiohttp/_http_parser.pyx":679
  11522. * cdef bytes body = at[:length]
  11523. * try:
  11524. * pyparser._payload.feed_data(body, length) # <<<<<<<<<<<<<<
  11525. * except BaseException as exc:
  11526. * if pyparser._payload_exception is not None:
  11527. */
  11528. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyparser->_payload, __pyx_n_s_feed_data); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 679, __pyx_L3_error)
  11529. __Pyx_GOTREF(__pyx_t_5);
  11530. __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L3_error)
  11531. __Pyx_GOTREF(__pyx_t_6);
  11532. __pyx_t_7 = NULL;
  11533. __pyx_t_8 = 0;
  11534. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
  11535. __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
  11536. if (likely(__pyx_t_7)) {
  11537. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
  11538. __Pyx_INCREF(__pyx_t_7);
  11539. __Pyx_INCREF(function);
  11540. __Pyx_DECREF_SET(__pyx_t_5, function);
  11541. __pyx_t_8 = 1;
  11542. }
  11543. }
  11544. #if CYTHON_FAST_PYCALL
  11545. if (PyFunction_Check(__pyx_t_5)) {
  11546. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_body, __pyx_t_6};
  11547. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L3_error)
  11548. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  11549. __Pyx_GOTREF(__pyx_t_1);
  11550. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  11551. } else
  11552. #endif
  11553. #if CYTHON_FAST_PYCCALL
  11554. if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
  11555. PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_body, __pyx_t_6};
  11556. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L3_error)
  11557. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  11558. __Pyx_GOTREF(__pyx_t_1);
  11559. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  11560. } else
  11561. #endif
  11562. {
  11563. __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 679, __pyx_L3_error)
  11564. __Pyx_GOTREF(__pyx_t_9);
  11565. if (__pyx_t_7) {
  11566. __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  11567. }
  11568. __Pyx_INCREF(__pyx_v_body);
  11569. __Pyx_GIVEREF(__pyx_v_body);
  11570. PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_body);
  11571. __Pyx_GIVEREF(__pyx_t_6);
  11572. PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_6);
  11573. __pyx_t_6 = 0;
  11574. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L3_error)
  11575. __Pyx_GOTREF(__pyx_t_1);
  11576. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11577. }
  11578. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  11579. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11580. /* "aiohttp/_http_parser.pyx":678
  11581. * cdef HttpParser pyparser = <HttpParser>parser.data
  11582. * cdef bytes body = at[:length]
  11583. * try: # <<<<<<<<<<<<<<
  11584. * pyparser._payload.feed_data(body, length)
  11585. * except BaseException as exc:
  11586. */
  11587. }
  11588. /* "aiohttp/_http_parser.pyx":688
  11589. * return -1
  11590. * else:
  11591. * return 0 # <<<<<<<<<<<<<<
  11592. *
  11593. *
  11594. */
  11595. /*else:*/ {
  11596. __pyx_r = 0;
  11597. goto __pyx_L6_except_return;
  11598. }
  11599. __pyx_L3_error:;
  11600. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  11601. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  11602. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  11603. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  11604. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  11605. /* "aiohttp/_http_parser.pyx":680
  11606. * try:
  11607. * pyparser._payload.feed_data(body, length)
  11608. * except BaseException as exc: # <<<<<<<<<<<<<<
  11609. * if pyparser._payload_exception is not None:
  11610. * pyparser._payload.set_exception(pyparser._payload_exception(str(exc)))
  11611. */
  11612. __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  11613. if (__pyx_t_8) {
  11614. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_body", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11615. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9) < 0) __PYX_ERR(0, 680, __pyx_L5_except_error)
  11616. __Pyx_GOTREF(__pyx_t_1);
  11617. __Pyx_GOTREF(__pyx_t_5);
  11618. __Pyx_GOTREF(__pyx_t_9);
  11619. __Pyx_INCREF(__pyx_t_5);
  11620. __pyx_v_exc = __pyx_t_5;
  11621. /*try:*/ {
  11622. /* "aiohttp/_http_parser.pyx":681
  11623. * pyparser._payload.feed_data(body, length)
  11624. * except BaseException as exc:
  11625. * if pyparser._payload_exception is not None: # <<<<<<<<<<<<<<
  11626. * pyparser._payload.set_exception(pyparser._payload_exception(str(exc)))
  11627. * else:
  11628. */
  11629. __pyx_t_10 = (__pyx_v_pyparser->_payload_exception != Py_None);
  11630. __pyx_t_11 = (__pyx_t_10 != 0);
  11631. if (__pyx_t_11) {
  11632. /* "aiohttp/_http_parser.pyx":682
  11633. * except BaseException as exc:
  11634. * if pyparser._payload_exception is not None:
  11635. * pyparser._payload.set_exception(pyparser._payload_exception(str(exc))) # <<<<<<<<<<<<<<
  11636. * else:
  11637. * pyparser._payload.set_exception(exc)
  11638. */
  11639. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyparser->_payload, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 682, __pyx_L14_error)
  11640. __Pyx_GOTREF(__pyx_t_7);
  11641. __pyx_t_13 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_exc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 682, __pyx_L14_error)
  11642. __Pyx_GOTREF(__pyx_t_13);
  11643. __Pyx_INCREF(__pyx_v_pyparser->_payload_exception);
  11644. __pyx_t_14 = __pyx_v_pyparser->_payload_exception; __pyx_t_15 = NULL;
  11645. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
  11646. __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
  11647. if (likely(__pyx_t_15)) {
  11648. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
  11649. __Pyx_INCREF(__pyx_t_15);
  11650. __Pyx_INCREF(function);
  11651. __Pyx_DECREF_SET(__pyx_t_14, function);
  11652. }
  11653. }
  11654. if (!__pyx_t_15) {
  11655. __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 682, __pyx_L14_error)
  11656. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  11657. __Pyx_GOTREF(__pyx_t_12);
  11658. } else {
  11659. #if CYTHON_FAST_PYCALL
  11660. if (PyFunction_Check(__pyx_t_14)) {
  11661. PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_t_13};
  11662. __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 682, __pyx_L14_error)
  11663. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  11664. __Pyx_GOTREF(__pyx_t_12);
  11665. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  11666. } else
  11667. #endif
  11668. #if CYTHON_FAST_PYCCALL
  11669. if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
  11670. PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_t_13};
  11671. __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 682, __pyx_L14_error)
  11672. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  11673. __Pyx_GOTREF(__pyx_t_12);
  11674. __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  11675. } else
  11676. #endif
  11677. {
  11678. __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 682, __pyx_L14_error)
  11679. __Pyx_GOTREF(__pyx_t_16);
  11680. __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
  11681. __Pyx_GIVEREF(__pyx_t_13);
  11682. PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_13);
  11683. __pyx_t_13 = 0;
  11684. __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 682, __pyx_L14_error)
  11685. __Pyx_GOTREF(__pyx_t_12);
  11686. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  11687. }
  11688. }
  11689. __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  11690. __pyx_t_14 = NULL;
  11691. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  11692. __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7);
  11693. if (likely(__pyx_t_14)) {
  11694. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  11695. __Pyx_INCREF(__pyx_t_14);
  11696. __Pyx_INCREF(function);
  11697. __Pyx_DECREF_SET(__pyx_t_7, function);
  11698. }
  11699. }
  11700. if (!__pyx_t_14) {
  11701. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L14_error)
  11702. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  11703. __Pyx_GOTREF(__pyx_t_6);
  11704. } else {
  11705. #if CYTHON_FAST_PYCALL
  11706. if (PyFunction_Check(__pyx_t_7)) {
  11707. PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_12};
  11708. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L14_error)
  11709. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  11710. __Pyx_GOTREF(__pyx_t_6);
  11711. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  11712. } else
  11713. #endif
  11714. #if CYTHON_FAST_PYCCALL
  11715. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  11716. PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_12};
  11717. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L14_error)
  11718. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  11719. __Pyx_GOTREF(__pyx_t_6);
  11720. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  11721. } else
  11722. #endif
  11723. {
  11724. __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 682, __pyx_L14_error)
  11725. __Pyx_GOTREF(__pyx_t_16);
  11726. __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_14); __pyx_t_14 = NULL;
  11727. __Pyx_GIVEREF(__pyx_t_12);
  11728. PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_12);
  11729. __pyx_t_12 = 0;
  11730. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_16, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 682, __pyx_L14_error)
  11731. __Pyx_GOTREF(__pyx_t_6);
  11732. __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  11733. }
  11734. }
  11735. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11736. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  11737. /* "aiohttp/_http_parser.pyx":681
  11738. * pyparser._payload.feed_data(body, length)
  11739. * except BaseException as exc:
  11740. * if pyparser._payload_exception is not None: # <<<<<<<<<<<<<<
  11741. * pyparser._payload.set_exception(pyparser._payload_exception(str(exc)))
  11742. * else:
  11743. */
  11744. goto __pyx_L16;
  11745. }
  11746. /* "aiohttp/_http_parser.pyx":684
  11747. * pyparser._payload.set_exception(pyparser._payload_exception(str(exc)))
  11748. * else:
  11749. * pyparser._payload.set_exception(exc) # <<<<<<<<<<<<<<
  11750. * pyparser._payload_error = 1
  11751. * return -1
  11752. */
  11753. /*else*/ {
  11754. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pyparser->_payload, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 684, __pyx_L14_error)
  11755. __Pyx_GOTREF(__pyx_t_7);
  11756. __pyx_t_16 = NULL;
  11757. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  11758. __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_7);
  11759. if (likely(__pyx_t_16)) {
  11760. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  11761. __Pyx_INCREF(__pyx_t_16);
  11762. __Pyx_INCREF(function);
  11763. __Pyx_DECREF_SET(__pyx_t_7, function);
  11764. }
  11765. }
  11766. if (!__pyx_t_16) {
  11767. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_exc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L14_error)
  11768. __Pyx_GOTREF(__pyx_t_6);
  11769. } else {
  11770. #if CYTHON_FAST_PYCALL
  11771. if (PyFunction_Check(__pyx_t_7)) {
  11772. PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_exc};
  11773. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L14_error)
  11774. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  11775. __Pyx_GOTREF(__pyx_t_6);
  11776. } else
  11777. #endif
  11778. #if CYTHON_FAST_PYCCALL
  11779. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  11780. PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_v_exc};
  11781. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L14_error)
  11782. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  11783. __Pyx_GOTREF(__pyx_t_6);
  11784. } else
  11785. #endif
  11786. {
  11787. __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 684, __pyx_L14_error)
  11788. __Pyx_GOTREF(__pyx_t_12);
  11789. __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_16); __pyx_t_16 = NULL;
  11790. __Pyx_INCREF(__pyx_v_exc);
  11791. __Pyx_GIVEREF(__pyx_v_exc);
  11792. PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v_exc);
  11793. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L14_error)
  11794. __Pyx_GOTREF(__pyx_t_6);
  11795. __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  11796. }
  11797. }
  11798. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  11799. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  11800. }
  11801. __pyx_L16:;
  11802. /* "aiohttp/_http_parser.pyx":685
  11803. * else:
  11804. * pyparser._payload.set_exception(exc)
  11805. * pyparser._payload_error = 1 # <<<<<<<<<<<<<<
  11806. * return -1
  11807. * else:
  11808. */
  11809. __pyx_v_pyparser->_payload_error = 1;
  11810. /* "aiohttp/_http_parser.pyx":686
  11811. * pyparser._payload.set_exception(exc)
  11812. * pyparser._payload_error = 1
  11813. * return -1 # <<<<<<<<<<<<<<
  11814. * else:
  11815. * return 0
  11816. */
  11817. __pyx_r = -1;
  11818. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11819. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  11820. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  11821. goto __pyx_L13_return;
  11822. }
  11823. /* "aiohttp/_http_parser.pyx":680
  11824. * try:
  11825. * pyparser._payload.feed_data(body, length)
  11826. * except BaseException as exc: # <<<<<<<<<<<<<<
  11827. * if pyparser._payload_exception is not None:
  11828. * pyparser._payload.set_exception(pyparser._payload_exception(str(exc)))
  11829. */
  11830. /*finally:*/ {
  11831. __pyx_L14_error:;
  11832. /*exception exit:*/{
  11833. __Pyx_PyThreadState_declare
  11834. __Pyx_PyThreadState_assign
  11835. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  11836. __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
  11837. __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
  11838. __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
  11839. __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
  11840. __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
  11841. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  11842. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  11843. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
  11844. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
  11845. __Pyx_XGOTREF(__pyx_t_19);
  11846. __Pyx_XGOTREF(__pyx_t_20);
  11847. __Pyx_XGOTREF(__pyx_t_21);
  11848. __Pyx_XGOTREF(__pyx_t_22);
  11849. __Pyx_XGOTREF(__pyx_t_23);
  11850. __Pyx_XGOTREF(__pyx_t_24);
  11851. __pyx_t_8 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
  11852. {
  11853. __Pyx_DECREF(__pyx_v_exc);
  11854. __pyx_v_exc = NULL;
  11855. }
  11856. if (PY_MAJOR_VERSION >= 3) {
  11857. __Pyx_XGIVEREF(__pyx_t_22);
  11858. __Pyx_XGIVEREF(__pyx_t_23);
  11859. __Pyx_XGIVEREF(__pyx_t_24);
  11860. __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
  11861. }
  11862. __Pyx_XGIVEREF(__pyx_t_19);
  11863. __Pyx_XGIVEREF(__pyx_t_20);
  11864. __Pyx_XGIVEREF(__pyx_t_21);
  11865. __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
  11866. __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
  11867. __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
  11868. goto __pyx_L5_except_error;
  11869. }
  11870. __pyx_L13_return: {
  11871. __pyx_t_17 = __pyx_r;
  11872. __Pyx_DECREF(__pyx_v_exc);
  11873. __pyx_v_exc = NULL;
  11874. __pyx_r = __pyx_t_17;
  11875. goto __pyx_L6_except_return;
  11876. }
  11877. }
  11878. }
  11879. goto __pyx_L5_except_error;
  11880. __pyx_L5_except_error:;
  11881. /* "aiohttp/_http_parser.pyx":678
  11882. * cdef HttpParser pyparser = <HttpParser>parser.data
  11883. * cdef bytes body = at[:length]
  11884. * try: # <<<<<<<<<<<<<<
  11885. * pyparser._payload.feed_data(body, length)
  11886. * except BaseException as exc:
  11887. */
  11888. __Pyx_XGIVEREF(__pyx_t_2);
  11889. __Pyx_XGIVEREF(__pyx_t_3);
  11890. __Pyx_XGIVEREF(__pyx_t_4);
  11891. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  11892. goto __pyx_L1_error;
  11893. __pyx_L6_except_return:;
  11894. __Pyx_XGIVEREF(__pyx_t_2);
  11895. __Pyx_XGIVEREF(__pyx_t_3);
  11896. __Pyx_XGIVEREF(__pyx_t_4);
  11897. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  11898. goto __pyx_L0;
  11899. }
  11900. /* "aiohttp/_http_parser.pyx":674
  11901. *
  11902. *
  11903. * cdef int cb_on_body(cparser.http_parser* parser, # <<<<<<<<<<<<<<
  11904. * const char *at, size_t length) except -1:
  11905. * cdef HttpParser pyparser = <HttpParser>parser.data
  11906. */
  11907. /* function exit code */
  11908. __pyx_L1_error:;
  11909. __Pyx_XDECREF(__pyx_t_1);
  11910. __Pyx_XDECREF(__pyx_t_5);
  11911. __Pyx_XDECREF(__pyx_t_6);
  11912. __Pyx_XDECREF(__pyx_t_7);
  11913. __Pyx_XDECREF(__pyx_t_9);
  11914. __Pyx_XDECREF(__pyx_t_12);
  11915. __Pyx_XDECREF(__pyx_t_13);
  11916. __Pyx_XDECREF(__pyx_t_14);
  11917. __Pyx_XDECREF(__pyx_t_15);
  11918. __Pyx_XDECREF(__pyx_t_16);
  11919. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_body", __pyx_clineno, __pyx_lineno, __pyx_filename);
  11920. __pyx_r = -1;
  11921. __pyx_L0:;
  11922. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  11923. __Pyx_XDECREF(__pyx_v_body);
  11924. __Pyx_XDECREF(__pyx_v_exc);
  11925. __Pyx_RefNannyFinishContext();
  11926. return __pyx_r;
  11927. }
  11928. /* "aiohttp/_http_parser.pyx":691
  11929. *
  11930. *
  11931. * cdef int cb_on_message_complete(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  11932. * cdef HttpParser pyparser = <HttpParser>parser.data
  11933. * try:
  11934. */
  11935. static int __pyx_f_7aiohttp_12_http_parser_cb_on_message_complete(struct http_parser *__pyx_v_parser) {
  11936. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  11937. PyObject *__pyx_v_exc = NULL;
  11938. int __pyx_r;
  11939. __Pyx_RefNannyDeclarations
  11940. PyObject *__pyx_t_1 = NULL;
  11941. PyObject *__pyx_t_2 = NULL;
  11942. PyObject *__pyx_t_3 = NULL;
  11943. PyObject *__pyx_t_4 = NULL;
  11944. int __pyx_t_5;
  11945. PyObject *__pyx_t_6 = NULL;
  11946. PyObject *__pyx_t_7 = NULL;
  11947. __Pyx_RefNannySetupContext("cb_on_message_complete", 0);
  11948. /* "aiohttp/_http_parser.pyx":692
  11949. *
  11950. * cdef int cb_on_message_complete(cparser.http_parser* parser) except -1:
  11951. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  11952. * try:
  11953. * pyparser._started = False
  11954. */
  11955. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  11956. __Pyx_INCREF(__pyx_t_1);
  11957. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  11958. __pyx_t_1 = 0;
  11959. /* "aiohttp/_http_parser.pyx":693
  11960. * cdef int cb_on_message_complete(cparser.http_parser* parser) except -1:
  11961. * cdef HttpParser pyparser = <HttpParser>parser.data
  11962. * try: # <<<<<<<<<<<<<<
  11963. * pyparser._started = False
  11964. * pyparser._on_message_complete()
  11965. */
  11966. {
  11967. __Pyx_PyThreadState_declare
  11968. __Pyx_PyThreadState_assign
  11969. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  11970. __Pyx_XGOTREF(__pyx_t_2);
  11971. __Pyx_XGOTREF(__pyx_t_3);
  11972. __Pyx_XGOTREF(__pyx_t_4);
  11973. /*try:*/ {
  11974. /* "aiohttp/_http_parser.pyx":694
  11975. * cdef HttpParser pyparser = <HttpParser>parser.data
  11976. * try:
  11977. * pyparser._started = False # <<<<<<<<<<<<<<
  11978. * pyparser._on_message_complete()
  11979. * except BaseException as exc:
  11980. */
  11981. __pyx_v_pyparser->_started = 0;
  11982. /* "aiohttp/_http_parser.pyx":695
  11983. * try:
  11984. * pyparser._started = False
  11985. * pyparser._on_message_complete() # <<<<<<<<<<<<<<
  11986. * except BaseException as exc:
  11987. * pyparser._last_error = exc
  11988. */
  11989. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_message_complete(__pyx_v_pyparser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 695, __pyx_L3_error)
  11990. __Pyx_GOTREF(__pyx_t_1);
  11991. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  11992. /* "aiohttp/_http_parser.pyx":693
  11993. * cdef int cb_on_message_complete(cparser.http_parser* parser) except -1:
  11994. * cdef HttpParser pyparser = <HttpParser>parser.data
  11995. * try: # <<<<<<<<<<<<<<
  11996. * pyparser._started = False
  11997. * pyparser._on_message_complete()
  11998. */
  11999. }
  12000. /* "aiohttp/_http_parser.pyx":700
  12001. * return -1
  12002. * else:
  12003. * return 0 # <<<<<<<<<<<<<<
  12004. *
  12005. *
  12006. */
  12007. /*else:*/ {
  12008. __pyx_r = 0;
  12009. goto __pyx_L6_except_return;
  12010. }
  12011. __pyx_L3_error:;
  12012. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  12013. /* "aiohttp/_http_parser.pyx":696
  12014. * pyparser._started = False
  12015. * pyparser._on_message_complete()
  12016. * except BaseException as exc: # <<<<<<<<<<<<<<
  12017. * pyparser._last_error = exc
  12018. * return -1
  12019. */
  12020. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  12021. if (__pyx_t_5) {
  12022. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_message_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12023. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 696, __pyx_L5_except_error)
  12024. __Pyx_GOTREF(__pyx_t_1);
  12025. __Pyx_GOTREF(__pyx_t_6);
  12026. __Pyx_GOTREF(__pyx_t_7);
  12027. __Pyx_INCREF(__pyx_t_6);
  12028. __pyx_v_exc = __pyx_t_6;
  12029. /*try:*/ {
  12030. /* "aiohttp/_http_parser.pyx":697
  12031. * pyparser._on_message_complete()
  12032. * except BaseException as exc:
  12033. * pyparser._last_error = exc # <<<<<<<<<<<<<<
  12034. * return -1
  12035. * else:
  12036. */
  12037. __Pyx_INCREF(__pyx_v_exc);
  12038. __Pyx_GIVEREF(__pyx_v_exc);
  12039. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  12040. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  12041. __pyx_v_pyparser->_last_error = __pyx_v_exc;
  12042. /* "aiohttp/_http_parser.pyx":698
  12043. * except BaseException as exc:
  12044. * pyparser._last_error = exc
  12045. * return -1 # <<<<<<<<<<<<<<
  12046. * else:
  12047. * return 0
  12048. */
  12049. __pyx_r = -1;
  12050. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12051. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12052. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  12053. goto __pyx_L13_return;
  12054. }
  12055. /* "aiohttp/_http_parser.pyx":696
  12056. * pyparser._started = False
  12057. * pyparser._on_message_complete()
  12058. * except BaseException as exc: # <<<<<<<<<<<<<<
  12059. * pyparser._last_error = exc
  12060. * return -1
  12061. */
  12062. /*finally:*/ {
  12063. __pyx_L13_return: {
  12064. __pyx_t_5 = __pyx_r;
  12065. __Pyx_DECREF(__pyx_v_exc);
  12066. __pyx_v_exc = NULL;
  12067. __pyx_r = __pyx_t_5;
  12068. goto __pyx_L6_except_return;
  12069. }
  12070. }
  12071. }
  12072. goto __pyx_L5_except_error;
  12073. __pyx_L5_except_error:;
  12074. /* "aiohttp/_http_parser.pyx":693
  12075. * cdef int cb_on_message_complete(cparser.http_parser* parser) except -1:
  12076. * cdef HttpParser pyparser = <HttpParser>parser.data
  12077. * try: # <<<<<<<<<<<<<<
  12078. * pyparser._started = False
  12079. * pyparser._on_message_complete()
  12080. */
  12081. __Pyx_XGIVEREF(__pyx_t_2);
  12082. __Pyx_XGIVEREF(__pyx_t_3);
  12083. __Pyx_XGIVEREF(__pyx_t_4);
  12084. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  12085. goto __pyx_L1_error;
  12086. __pyx_L6_except_return:;
  12087. __Pyx_XGIVEREF(__pyx_t_2);
  12088. __Pyx_XGIVEREF(__pyx_t_3);
  12089. __Pyx_XGIVEREF(__pyx_t_4);
  12090. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  12091. goto __pyx_L0;
  12092. }
  12093. /* "aiohttp/_http_parser.pyx":691
  12094. *
  12095. *
  12096. * cdef int cb_on_message_complete(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  12097. * cdef HttpParser pyparser = <HttpParser>parser.data
  12098. * try:
  12099. */
  12100. /* function exit code */
  12101. __pyx_L1_error:;
  12102. __Pyx_XDECREF(__pyx_t_1);
  12103. __Pyx_XDECREF(__pyx_t_6);
  12104. __Pyx_XDECREF(__pyx_t_7);
  12105. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_message_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12106. __pyx_r = -1;
  12107. __pyx_L0:;
  12108. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  12109. __Pyx_XDECREF(__pyx_v_exc);
  12110. __Pyx_RefNannyFinishContext();
  12111. return __pyx_r;
  12112. }
  12113. /* "aiohttp/_http_parser.pyx":703
  12114. *
  12115. *
  12116. * cdef int cb_on_chunk_header(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  12117. * cdef HttpParser pyparser = <HttpParser>parser.data
  12118. * try:
  12119. */
  12120. static int __pyx_f_7aiohttp_12_http_parser_cb_on_chunk_header(struct http_parser *__pyx_v_parser) {
  12121. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  12122. PyObject *__pyx_v_exc = NULL;
  12123. int __pyx_r;
  12124. __Pyx_RefNannyDeclarations
  12125. PyObject *__pyx_t_1 = NULL;
  12126. PyObject *__pyx_t_2 = NULL;
  12127. PyObject *__pyx_t_3 = NULL;
  12128. PyObject *__pyx_t_4 = NULL;
  12129. int __pyx_t_5;
  12130. PyObject *__pyx_t_6 = NULL;
  12131. PyObject *__pyx_t_7 = NULL;
  12132. __Pyx_RefNannySetupContext("cb_on_chunk_header", 0);
  12133. /* "aiohttp/_http_parser.pyx":704
  12134. *
  12135. * cdef int cb_on_chunk_header(cparser.http_parser* parser) except -1:
  12136. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  12137. * try:
  12138. * pyparser._on_chunk_header()
  12139. */
  12140. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  12141. __Pyx_INCREF(__pyx_t_1);
  12142. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  12143. __pyx_t_1 = 0;
  12144. /* "aiohttp/_http_parser.pyx":705
  12145. * cdef int cb_on_chunk_header(cparser.http_parser* parser) except -1:
  12146. * cdef HttpParser pyparser = <HttpParser>parser.data
  12147. * try: # <<<<<<<<<<<<<<
  12148. * pyparser._on_chunk_header()
  12149. * except BaseException as exc:
  12150. */
  12151. {
  12152. __Pyx_PyThreadState_declare
  12153. __Pyx_PyThreadState_assign
  12154. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  12155. __Pyx_XGOTREF(__pyx_t_2);
  12156. __Pyx_XGOTREF(__pyx_t_3);
  12157. __Pyx_XGOTREF(__pyx_t_4);
  12158. /*try:*/ {
  12159. /* "aiohttp/_http_parser.pyx":706
  12160. * cdef HttpParser pyparser = <HttpParser>parser.data
  12161. * try:
  12162. * pyparser._on_chunk_header() # <<<<<<<<<<<<<<
  12163. * except BaseException as exc:
  12164. * pyparser._last_error = exc
  12165. */
  12166. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_chunk_header(__pyx_v_pyparser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L3_error)
  12167. __Pyx_GOTREF(__pyx_t_1);
  12168. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12169. /* "aiohttp/_http_parser.pyx":705
  12170. * cdef int cb_on_chunk_header(cparser.http_parser* parser) except -1:
  12171. * cdef HttpParser pyparser = <HttpParser>parser.data
  12172. * try: # <<<<<<<<<<<<<<
  12173. * pyparser._on_chunk_header()
  12174. * except BaseException as exc:
  12175. */
  12176. }
  12177. /* "aiohttp/_http_parser.pyx":711
  12178. * return -1
  12179. * else:
  12180. * return 0 # <<<<<<<<<<<<<<
  12181. *
  12182. *
  12183. */
  12184. /*else:*/ {
  12185. __pyx_r = 0;
  12186. goto __pyx_L6_except_return;
  12187. }
  12188. __pyx_L3_error:;
  12189. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  12190. /* "aiohttp/_http_parser.pyx":707
  12191. * try:
  12192. * pyparser._on_chunk_header()
  12193. * except BaseException as exc: # <<<<<<<<<<<<<<
  12194. * pyparser._last_error = exc
  12195. * return -1
  12196. */
  12197. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  12198. if (__pyx_t_5) {
  12199. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_chunk_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12200. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 707, __pyx_L5_except_error)
  12201. __Pyx_GOTREF(__pyx_t_1);
  12202. __Pyx_GOTREF(__pyx_t_6);
  12203. __Pyx_GOTREF(__pyx_t_7);
  12204. __Pyx_INCREF(__pyx_t_6);
  12205. __pyx_v_exc = __pyx_t_6;
  12206. /*try:*/ {
  12207. /* "aiohttp/_http_parser.pyx":708
  12208. * pyparser._on_chunk_header()
  12209. * except BaseException as exc:
  12210. * pyparser._last_error = exc # <<<<<<<<<<<<<<
  12211. * return -1
  12212. * else:
  12213. */
  12214. __Pyx_INCREF(__pyx_v_exc);
  12215. __Pyx_GIVEREF(__pyx_v_exc);
  12216. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  12217. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  12218. __pyx_v_pyparser->_last_error = __pyx_v_exc;
  12219. /* "aiohttp/_http_parser.pyx":709
  12220. * except BaseException as exc:
  12221. * pyparser._last_error = exc
  12222. * return -1 # <<<<<<<<<<<<<<
  12223. * else:
  12224. * return 0
  12225. */
  12226. __pyx_r = -1;
  12227. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12228. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12229. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  12230. goto __pyx_L13_return;
  12231. }
  12232. /* "aiohttp/_http_parser.pyx":707
  12233. * try:
  12234. * pyparser._on_chunk_header()
  12235. * except BaseException as exc: # <<<<<<<<<<<<<<
  12236. * pyparser._last_error = exc
  12237. * return -1
  12238. */
  12239. /*finally:*/ {
  12240. __pyx_L13_return: {
  12241. __pyx_t_5 = __pyx_r;
  12242. __Pyx_DECREF(__pyx_v_exc);
  12243. __pyx_v_exc = NULL;
  12244. __pyx_r = __pyx_t_5;
  12245. goto __pyx_L6_except_return;
  12246. }
  12247. }
  12248. }
  12249. goto __pyx_L5_except_error;
  12250. __pyx_L5_except_error:;
  12251. /* "aiohttp/_http_parser.pyx":705
  12252. * cdef int cb_on_chunk_header(cparser.http_parser* parser) except -1:
  12253. * cdef HttpParser pyparser = <HttpParser>parser.data
  12254. * try: # <<<<<<<<<<<<<<
  12255. * pyparser._on_chunk_header()
  12256. * except BaseException as exc:
  12257. */
  12258. __Pyx_XGIVEREF(__pyx_t_2);
  12259. __Pyx_XGIVEREF(__pyx_t_3);
  12260. __Pyx_XGIVEREF(__pyx_t_4);
  12261. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  12262. goto __pyx_L1_error;
  12263. __pyx_L6_except_return:;
  12264. __Pyx_XGIVEREF(__pyx_t_2);
  12265. __Pyx_XGIVEREF(__pyx_t_3);
  12266. __Pyx_XGIVEREF(__pyx_t_4);
  12267. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  12268. goto __pyx_L0;
  12269. }
  12270. /* "aiohttp/_http_parser.pyx":703
  12271. *
  12272. *
  12273. * cdef int cb_on_chunk_header(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  12274. * cdef HttpParser pyparser = <HttpParser>parser.data
  12275. * try:
  12276. */
  12277. /* function exit code */
  12278. __pyx_L1_error:;
  12279. __Pyx_XDECREF(__pyx_t_1);
  12280. __Pyx_XDECREF(__pyx_t_6);
  12281. __Pyx_XDECREF(__pyx_t_7);
  12282. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_chunk_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12283. __pyx_r = -1;
  12284. __pyx_L0:;
  12285. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  12286. __Pyx_XDECREF(__pyx_v_exc);
  12287. __Pyx_RefNannyFinishContext();
  12288. return __pyx_r;
  12289. }
  12290. /* "aiohttp/_http_parser.pyx":714
  12291. *
  12292. *
  12293. * cdef int cb_on_chunk_complete(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  12294. * cdef HttpParser pyparser = <HttpParser>parser.data
  12295. * try:
  12296. */
  12297. static int __pyx_f_7aiohttp_12_http_parser_cb_on_chunk_complete(struct http_parser *__pyx_v_parser) {
  12298. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *__pyx_v_pyparser = 0;
  12299. PyObject *__pyx_v_exc = NULL;
  12300. int __pyx_r;
  12301. __Pyx_RefNannyDeclarations
  12302. PyObject *__pyx_t_1 = NULL;
  12303. PyObject *__pyx_t_2 = NULL;
  12304. PyObject *__pyx_t_3 = NULL;
  12305. PyObject *__pyx_t_4 = NULL;
  12306. int __pyx_t_5;
  12307. PyObject *__pyx_t_6 = NULL;
  12308. PyObject *__pyx_t_7 = NULL;
  12309. __Pyx_RefNannySetupContext("cb_on_chunk_complete", 0);
  12310. /* "aiohttp/_http_parser.pyx":715
  12311. *
  12312. * cdef int cb_on_chunk_complete(cparser.http_parser* parser) except -1:
  12313. * cdef HttpParser pyparser = <HttpParser>parser.data # <<<<<<<<<<<<<<
  12314. * try:
  12315. * pyparser._on_chunk_complete()
  12316. */
  12317. __pyx_t_1 = ((PyObject *)__pyx_v_parser->data);
  12318. __Pyx_INCREF(__pyx_t_1);
  12319. __pyx_v_pyparser = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)__pyx_t_1);
  12320. __pyx_t_1 = 0;
  12321. /* "aiohttp/_http_parser.pyx":716
  12322. * cdef int cb_on_chunk_complete(cparser.http_parser* parser) except -1:
  12323. * cdef HttpParser pyparser = <HttpParser>parser.data
  12324. * try: # <<<<<<<<<<<<<<
  12325. * pyparser._on_chunk_complete()
  12326. * except BaseException as exc:
  12327. */
  12328. {
  12329. __Pyx_PyThreadState_declare
  12330. __Pyx_PyThreadState_assign
  12331. __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
  12332. __Pyx_XGOTREF(__pyx_t_2);
  12333. __Pyx_XGOTREF(__pyx_t_3);
  12334. __Pyx_XGOTREF(__pyx_t_4);
  12335. /*try:*/ {
  12336. /* "aiohttp/_http_parser.pyx":717
  12337. * cdef HttpParser pyparser = <HttpParser>parser.data
  12338. * try:
  12339. * pyparser._on_chunk_complete() # <<<<<<<<<<<<<<
  12340. * except BaseException as exc:
  12341. * pyparser._last_error = exc
  12342. */
  12343. __pyx_t_1 = ((struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser *)__pyx_v_pyparser->__pyx_vtab)->_on_chunk_complete(__pyx_v_pyparser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L3_error)
  12344. __Pyx_GOTREF(__pyx_t_1);
  12345. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12346. /* "aiohttp/_http_parser.pyx":716
  12347. * cdef int cb_on_chunk_complete(cparser.http_parser* parser) except -1:
  12348. * cdef HttpParser pyparser = <HttpParser>parser.data
  12349. * try: # <<<<<<<<<<<<<<
  12350. * pyparser._on_chunk_complete()
  12351. * except BaseException as exc:
  12352. */
  12353. }
  12354. /* "aiohttp/_http_parser.pyx":722
  12355. * return -1
  12356. * else:
  12357. * return 0 # <<<<<<<<<<<<<<
  12358. *
  12359. *
  12360. */
  12361. /*else:*/ {
  12362. __pyx_r = 0;
  12363. goto __pyx_L6_except_return;
  12364. }
  12365. __pyx_L3_error:;
  12366. __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  12367. /* "aiohttp/_http_parser.pyx":718
  12368. * try:
  12369. * pyparser._on_chunk_complete()
  12370. * except BaseException as exc: # <<<<<<<<<<<<<<
  12371. * pyparser._last_error = exc
  12372. * return -1
  12373. */
  12374. __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_BaseException);
  12375. if (__pyx_t_5) {
  12376. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_chunk_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12377. if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 718, __pyx_L5_except_error)
  12378. __Pyx_GOTREF(__pyx_t_1);
  12379. __Pyx_GOTREF(__pyx_t_6);
  12380. __Pyx_GOTREF(__pyx_t_7);
  12381. __Pyx_INCREF(__pyx_t_6);
  12382. __pyx_v_exc = __pyx_t_6;
  12383. /*try:*/ {
  12384. /* "aiohttp/_http_parser.pyx":719
  12385. * pyparser._on_chunk_complete()
  12386. * except BaseException as exc:
  12387. * pyparser._last_error = exc # <<<<<<<<<<<<<<
  12388. * return -1
  12389. * else:
  12390. */
  12391. __Pyx_INCREF(__pyx_v_exc);
  12392. __Pyx_GIVEREF(__pyx_v_exc);
  12393. __Pyx_GOTREF(__pyx_v_pyparser->_last_error);
  12394. __Pyx_DECREF(__pyx_v_pyparser->_last_error);
  12395. __pyx_v_pyparser->_last_error = __pyx_v_exc;
  12396. /* "aiohttp/_http_parser.pyx":720
  12397. * except BaseException as exc:
  12398. * pyparser._last_error = exc
  12399. * return -1 # <<<<<<<<<<<<<<
  12400. * else:
  12401. * return 0
  12402. */
  12403. __pyx_r = -1;
  12404. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  12405. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  12406. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  12407. goto __pyx_L13_return;
  12408. }
  12409. /* "aiohttp/_http_parser.pyx":718
  12410. * try:
  12411. * pyparser._on_chunk_complete()
  12412. * except BaseException as exc: # <<<<<<<<<<<<<<
  12413. * pyparser._last_error = exc
  12414. * return -1
  12415. */
  12416. /*finally:*/ {
  12417. __pyx_L13_return: {
  12418. __pyx_t_5 = __pyx_r;
  12419. __Pyx_DECREF(__pyx_v_exc);
  12420. __pyx_v_exc = NULL;
  12421. __pyx_r = __pyx_t_5;
  12422. goto __pyx_L6_except_return;
  12423. }
  12424. }
  12425. }
  12426. goto __pyx_L5_except_error;
  12427. __pyx_L5_except_error:;
  12428. /* "aiohttp/_http_parser.pyx":716
  12429. * cdef int cb_on_chunk_complete(cparser.http_parser* parser) except -1:
  12430. * cdef HttpParser pyparser = <HttpParser>parser.data
  12431. * try: # <<<<<<<<<<<<<<
  12432. * pyparser._on_chunk_complete()
  12433. * except BaseException as exc:
  12434. */
  12435. __Pyx_XGIVEREF(__pyx_t_2);
  12436. __Pyx_XGIVEREF(__pyx_t_3);
  12437. __Pyx_XGIVEREF(__pyx_t_4);
  12438. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  12439. goto __pyx_L1_error;
  12440. __pyx_L6_except_return:;
  12441. __Pyx_XGIVEREF(__pyx_t_2);
  12442. __Pyx_XGIVEREF(__pyx_t_3);
  12443. __Pyx_XGIVEREF(__pyx_t_4);
  12444. __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
  12445. goto __pyx_L0;
  12446. }
  12447. /* "aiohttp/_http_parser.pyx":714
  12448. *
  12449. *
  12450. * cdef int cb_on_chunk_complete(cparser.http_parser* parser) except -1: # <<<<<<<<<<<<<<
  12451. * cdef HttpParser pyparser = <HttpParser>parser.data
  12452. * try:
  12453. */
  12454. /* function exit code */
  12455. __pyx_L1_error:;
  12456. __Pyx_XDECREF(__pyx_t_1);
  12457. __Pyx_XDECREF(__pyx_t_6);
  12458. __Pyx_XDECREF(__pyx_t_7);
  12459. __Pyx_AddTraceback("aiohttp._http_parser.cb_on_chunk_complete", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12460. __pyx_r = -1;
  12461. __pyx_L0:;
  12462. __Pyx_XDECREF((PyObject *)__pyx_v_pyparser);
  12463. __Pyx_XDECREF(__pyx_v_exc);
  12464. __Pyx_RefNannyFinishContext();
  12465. return __pyx_r;
  12466. }
  12467. /* "aiohttp/_http_parser.pyx":725
  12468. *
  12469. *
  12470. * cdef parser_error_from_errno(cparser.http_errno errno): # <<<<<<<<<<<<<<
  12471. * cdef bytes desc = cparser.http_errno_description(errno)
  12472. *
  12473. */
  12474. static PyObject *__pyx_f_7aiohttp_12_http_parser_parser_error_from_errno(enum http_errno __pyx_v_errno) {
  12475. PyObject *__pyx_v_desc = 0;
  12476. PyObject *__pyx_v_cls = NULL;
  12477. PyObject *__pyx_r = NULL;
  12478. __Pyx_RefNannyDeclarations
  12479. PyObject *__pyx_t_1 = NULL;
  12480. PyObject *__pyx_t_2 = NULL;
  12481. PyObject *__pyx_t_3 = NULL;
  12482. PyObject *__pyx_t_4 = NULL;
  12483. PyObject *__pyx_t_5 = NULL;
  12484. __Pyx_RefNannySetupContext("parser_error_from_errno", 0);
  12485. /* "aiohttp/_http_parser.pyx":726
  12486. *
  12487. * cdef parser_error_from_errno(cparser.http_errno errno):
  12488. * cdef bytes desc = cparser.http_errno_description(errno) # <<<<<<<<<<<<<<
  12489. *
  12490. * if errno in (cparser.HPE_CB_message_begin,
  12491. */
  12492. __pyx_t_1 = __Pyx_PyBytes_FromString(http_errno_description(__pyx_v_errno)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
  12493. __Pyx_GOTREF(__pyx_t_1);
  12494. __pyx_v_desc = ((PyObject*)__pyx_t_1);
  12495. __pyx_t_1 = 0;
  12496. /* "aiohttp/_http_parser.pyx":728
  12497. * cdef bytes desc = cparser.http_errno_description(errno)
  12498. *
  12499. * if errno in (cparser.HPE_CB_message_begin, # <<<<<<<<<<<<<<
  12500. * cparser.HPE_CB_url,
  12501. * cparser.HPE_CB_header_field,
  12502. */
  12503. switch (__pyx_v_errno) {
  12504. case HPE_CB_message_begin:
  12505. /* "aiohttp/_http_parser.pyx":729
  12506. *
  12507. * if errno in (cparser.HPE_CB_message_begin,
  12508. * cparser.HPE_CB_url, # <<<<<<<<<<<<<<
  12509. * cparser.HPE_CB_header_field,
  12510. * cparser.HPE_CB_header_value,
  12511. */
  12512. case HPE_CB_url:
  12513. /* "aiohttp/_http_parser.pyx":730
  12514. * if errno in (cparser.HPE_CB_message_begin,
  12515. * cparser.HPE_CB_url,
  12516. * cparser.HPE_CB_header_field, # <<<<<<<<<<<<<<
  12517. * cparser.HPE_CB_header_value,
  12518. * cparser.HPE_CB_headers_complete,
  12519. */
  12520. case HPE_CB_header_field:
  12521. /* "aiohttp/_http_parser.pyx":731
  12522. * cparser.HPE_CB_url,
  12523. * cparser.HPE_CB_header_field,
  12524. * cparser.HPE_CB_header_value, # <<<<<<<<<<<<<<
  12525. * cparser.HPE_CB_headers_complete,
  12526. * cparser.HPE_CB_body,
  12527. */
  12528. case HPE_CB_header_value:
  12529. /* "aiohttp/_http_parser.pyx":732
  12530. * cparser.HPE_CB_header_field,
  12531. * cparser.HPE_CB_header_value,
  12532. * cparser.HPE_CB_headers_complete, # <<<<<<<<<<<<<<
  12533. * cparser.HPE_CB_body,
  12534. * cparser.HPE_CB_message_complete,
  12535. */
  12536. case HPE_CB_headers_complete:
  12537. /* "aiohttp/_http_parser.pyx":733
  12538. * cparser.HPE_CB_header_value,
  12539. * cparser.HPE_CB_headers_complete,
  12540. * cparser.HPE_CB_body, # <<<<<<<<<<<<<<
  12541. * cparser.HPE_CB_message_complete,
  12542. * cparser.HPE_CB_status,
  12543. */
  12544. case HPE_CB_body:
  12545. /* "aiohttp/_http_parser.pyx":734
  12546. * cparser.HPE_CB_headers_complete,
  12547. * cparser.HPE_CB_body,
  12548. * cparser.HPE_CB_message_complete, # <<<<<<<<<<<<<<
  12549. * cparser.HPE_CB_status,
  12550. * cparser.HPE_CB_chunk_header,
  12551. */
  12552. case HPE_CB_message_complete:
  12553. /* "aiohttp/_http_parser.pyx":735
  12554. * cparser.HPE_CB_body,
  12555. * cparser.HPE_CB_message_complete,
  12556. * cparser.HPE_CB_status, # <<<<<<<<<<<<<<
  12557. * cparser.HPE_CB_chunk_header,
  12558. * cparser.HPE_CB_chunk_complete):
  12559. */
  12560. case HPE_CB_status:
  12561. /* "aiohttp/_http_parser.pyx":736
  12562. * cparser.HPE_CB_message_complete,
  12563. * cparser.HPE_CB_status,
  12564. * cparser.HPE_CB_chunk_header, # <<<<<<<<<<<<<<
  12565. * cparser.HPE_CB_chunk_complete):
  12566. * cls = BadHttpMessage
  12567. */
  12568. case HPE_CB_chunk_header:
  12569. /* "aiohttp/_http_parser.pyx":737
  12570. * cparser.HPE_CB_status,
  12571. * cparser.HPE_CB_chunk_header,
  12572. * cparser.HPE_CB_chunk_complete): # <<<<<<<<<<<<<<
  12573. * cls = BadHttpMessage
  12574. *
  12575. */
  12576. case HPE_CB_chunk_complete:
  12577. /* "aiohttp/_http_parser.pyx":738
  12578. * cparser.HPE_CB_chunk_header,
  12579. * cparser.HPE_CB_chunk_complete):
  12580. * cls = BadHttpMessage # <<<<<<<<<<<<<<
  12581. *
  12582. * elif errno == cparser.HPE_INVALID_STATUS:
  12583. */
  12584. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_BadHttpMessage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error)
  12585. __Pyx_GOTREF(__pyx_t_1);
  12586. __pyx_v_cls = __pyx_t_1;
  12587. __pyx_t_1 = 0;
  12588. /* "aiohttp/_http_parser.pyx":728
  12589. * cdef bytes desc = cparser.http_errno_description(errno)
  12590. *
  12591. * if errno in (cparser.HPE_CB_message_begin, # <<<<<<<<<<<<<<
  12592. * cparser.HPE_CB_url,
  12593. * cparser.HPE_CB_header_field,
  12594. */
  12595. break;
  12596. /* "aiohttp/_http_parser.pyx":740
  12597. * cls = BadHttpMessage
  12598. *
  12599. * elif errno == cparser.HPE_INVALID_STATUS: # <<<<<<<<<<<<<<
  12600. * cls = BadStatusLine
  12601. *
  12602. */
  12603. case HPE_INVALID_STATUS:
  12604. /* "aiohttp/_http_parser.pyx":741
  12605. *
  12606. * elif errno == cparser.HPE_INVALID_STATUS:
  12607. * cls = BadStatusLine # <<<<<<<<<<<<<<
  12608. *
  12609. * elif errno == cparser.HPE_INVALID_METHOD:
  12610. */
  12611. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_BadStatusLine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error)
  12612. __Pyx_GOTREF(__pyx_t_1);
  12613. __pyx_v_cls = __pyx_t_1;
  12614. __pyx_t_1 = 0;
  12615. /* "aiohttp/_http_parser.pyx":740
  12616. * cls = BadHttpMessage
  12617. *
  12618. * elif errno == cparser.HPE_INVALID_STATUS: # <<<<<<<<<<<<<<
  12619. * cls = BadStatusLine
  12620. *
  12621. */
  12622. break;
  12623. /* "aiohttp/_http_parser.pyx":743
  12624. * cls = BadStatusLine
  12625. *
  12626. * elif errno == cparser.HPE_INVALID_METHOD: # <<<<<<<<<<<<<<
  12627. * cls = BadStatusLine
  12628. *
  12629. */
  12630. case HPE_INVALID_METHOD:
  12631. /* "aiohttp/_http_parser.pyx":744
  12632. *
  12633. * elif errno == cparser.HPE_INVALID_METHOD:
  12634. * cls = BadStatusLine # <<<<<<<<<<<<<<
  12635. *
  12636. * elif errno == cparser.HPE_INVALID_URL:
  12637. */
  12638. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_BadStatusLine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
  12639. __Pyx_GOTREF(__pyx_t_1);
  12640. __pyx_v_cls = __pyx_t_1;
  12641. __pyx_t_1 = 0;
  12642. /* "aiohttp/_http_parser.pyx":743
  12643. * cls = BadStatusLine
  12644. *
  12645. * elif errno == cparser.HPE_INVALID_METHOD: # <<<<<<<<<<<<<<
  12646. * cls = BadStatusLine
  12647. *
  12648. */
  12649. break;
  12650. /* "aiohttp/_http_parser.pyx":746
  12651. * cls = BadStatusLine
  12652. *
  12653. * elif errno == cparser.HPE_INVALID_URL: # <<<<<<<<<<<<<<
  12654. * cls = InvalidURLError
  12655. *
  12656. */
  12657. case HPE_INVALID_URL:
  12658. /* "aiohttp/_http_parser.pyx":747
  12659. *
  12660. * elif errno == cparser.HPE_INVALID_URL:
  12661. * cls = InvalidURLError # <<<<<<<<<<<<<<
  12662. *
  12663. * else:
  12664. */
  12665. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidURLError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
  12666. __Pyx_GOTREF(__pyx_t_1);
  12667. __pyx_v_cls = __pyx_t_1;
  12668. __pyx_t_1 = 0;
  12669. /* "aiohttp/_http_parser.pyx":746
  12670. * cls = BadStatusLine
  12671. *
  12672. * elif errno == cparser.HPE_INVALID_URL: # <<<<<<<<<<<<<<
  12673. * cls = InvalidURLError
  12674. *
  12675. */
  12676. break;
  12677. default:
  12678. /* "aiohttp/_http_parser.pyx":750
  12679. *
  12680. * else:
  12681. * cls = BadHttpMessage # <<<<<<<<<<<<<<
  12682. *
  12683. * return cls(desc.decode('latin-1'))
  12684. */
  12685. __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_BadHttpMessage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error)
  12686. __Pyx_GOTREF(__pyx_t_1);
  12687. __pyx_v_cls = __pyx_t_1;
  12688. __pyx_t_1 = 0;
  12689. break;
  12690. }
  12691. /* "aiohttp/_http_parser.pyx":752
  12692. * cls = BadHttpMessage
  12693. *
  12694. * return cls(desc.decode('latin-1')) # <<<<<<<<<<<<<<
  12695. *
  12696. *
  12697. */
  12698. __Pyx_XDECREF(__pyx_r);
  12699. __pyx_t_2 = __Pyx_decode_bytes(__pyx_v_desc, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error)
  12700. __Pyx_GOTREF(__pyx_t_2);
  12701. __Pyx_INCREF(__pyx_v_cls);
  12702. __pyx_t_3 = __pyx_v_cls; __pyx_t_4 = NULL;
  12703. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  12704. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  12705. if (likely(__pyx_t_4)) {
  12706. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  12707. __Pyx_INCREF(__pyx_t_4);
  12708. __Pyx_INCREF(function);
  12709. __Pyx_DECREF_SET(__pyx_t_3, function);
  12710. }
  12711. }
  12712. if (!__pyx_t_4) {
  12713. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
  12714. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12715. __Pyx_GOTREF(__pyx_t_1);
  12716. } else {
  12717. #if CYTHON_FAST_PYCALL
  12718. if (PyFunction_Check(__pyx_t_3)) {
  12719. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
  12720. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
  12721. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  12722. __Pyx_GOTREF(__pyx_t_1);
  12723. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12724. } else
  12725. #endif
  12726. #if CYTHON_FAST_PYCCALL
  12727. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  12728. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
  12729. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
  12730. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  12731. __Pyx_GOTREF(__pyx_t_1);
  12732. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  12733. } else
  12734. #endif
  12735. {
  12736. __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 752, __pyx_L1_error)
  12737. __Pyx_GOTREF(__pyx_t_5);
  12738. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
  12739. __Pyx_GIVEREF(__pyx_t_2);
  12740. PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
  12741. __pyx_t_2 = 0;
  12742. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 752, __pyx_L1_error)
  12743. __Pyx_GOTREF(__pyx_t_1);
  12744. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  12745. }
  12746. }
  12747. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  12748. __pyx_r = __pyx_t_1;
  12749. __pyx_t_1 = 0;
  12750. goto __pyx_L0;
  12751. /* "aiohttp/_http_parser.pyx":725
  12752. *
  12753. *
  12754. * cdef parser_error_from_errno(cparser.http_errno errno): # <<<<<<<<<<<<<<
  12755. * cdef bytes desc = cparser.http_errno_description(errno)
  12756. *
  12757. */
  12758. /* function exit code */
  12759. __pyx_L1_error:;
  12760. __Pyx_XDECREF(__pyx_t_1);
  12761. __Pyx_XDECREF(__pyx_t_2);
  12762. __Pyx_XDECREF(__pyx_t_3);
  12763. __Pyx_XDECREF(__pyx_t_4);
  12764. __Pyx_XDECREF(__pyx_t_5);
  12765. __Pyx_AddTraceback("aiohttp._http_parser.parser_error_from_errno", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12766. __pyx_r = 0;
  12767. __pyx_L0:;
  12768. __Pyx_XDECREF(__pyx_v_desc);
  12769. __Pyx_XDECREF(__pyx_v_cls);
  12770. __Pyx_XGIVEREF(__pyx_r);
  12771. __Pyx_RefNannyFinishContext();
  12772. return __pyx_r;
  12773. }
  12774. /* "aiohttp/_http_parser.pyx":755
  12775. *
  12776. *
  12777. * def parse_url(url): # <<<<<<<<<<<<<<
  12778. * cdef:
  12779. * Py_buffer py_buf
  12780. */
  12781. /* Python wrapper */
  12782. static PyObject *__pyx_pw_7aiohttp_12_http_parser_1parse_url(PyObject *__pyx_self, PyObject *__pyx_v_url); /*proto*/
  12783. static PyMethodDef __pyx_mdef_7aiohttp_12_http_parser_1parse_url = {"parse_url", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_1parse_url, METH_O, 0};
  12784. static PyObject *__pyx_pw_7aiohttp_12_http_parser_1parse_url(PyObject *__pyx_self, PyObject *__pyx_v_url) {
  12785. PyObject *__pyx_r = 0;
  12786. __Pyx_RefNannyDeclarations
  12787. __Pyx_RefNannySetupContext("parse_url (wrapper)", 0);
  12788. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_parse_url(__pyx_self, ((PyObject *)__pyx_v_url));
  12789. /* function exit code */
  12790. __Pyx_RefNannyFinishContext();
  12791. return __pyx_r;
  12792. }
  12793. static PyObject *__pyx_pf_7aiohttp_12_http_parser_parse_url(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_url) {
  12794. Py_buffer __pyx_v_py_buf;
  12795. char *__pyx_v_buf_data;
  12796. PyObject *__pyx_r = NULL;
  12797. __Pyx_RefNannyDeclarations
  12798. int __pyx_t_1;
  12799. PyObject *__pyx_t_2 = NULL;
  12800. int __pyx_t_3;
  12801. char const *__pyx_t_4;
  12802. PyObject *__pyx_t_5 = NULL;
  12803. PyObject *__pyx_t_6 = NULL;
  12804. PyObject *__pyx_t_7 = NULL;
  12805. PyObject *__pyx_t_8 = NULL;
  12806. PyObject *__pyx_t_9 = NULL;
  12807. PyObject *__pyx_t_10 = NULL;
  12808. __Pyx_RefNannySetupContext("parse_url", 0);
  12809. /* "aiohttp/_http_parser.pyx":760
  12810. * char* buf_data
  12811. *
  12812. * PyObject_GetBuffer(url, &py_buf, PyBUF_SIMPLE) # <<<<<<<<<<<<<<
  12813. * try:
  12814. * buf_data = <char*>py_buf.buf
  12815. */
  12816. __pyx_t_1 = PyObject_GetBuffer(__pyx_v_url, (&__pyx_v_py_buf), PyBUF_SIMPLE); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 760, __pyx_L1_error)
  12817. /* "aiohttp/_http_parser.pyx":761
  12818. *
  12819. * PyObject_GetBuffer(url, &py_buf, PyBUF_SIMPLE)
  12820. * try: # <<<<<<<<<<<<<<
  12821. * buf_data = <char*>py_buf.buf
  12822. * return _parse_url(buf_data, py_buf.len)
  12823. */
  12824. /*try:*/ {
  12825. /* "aiohttp/_http_parser.pyx":762
  12826. * PyObject_GetBuffer(url, &py_buf, PyBUF_SIMPLE)
  12827. * try:
  12828. * buf_data = <char*>py_buf.buf # <<<<<<<<<<<<<<
  12829. * return _parse_url(buf_data, py_buf.len)
  12830. * finally:
  12831. */
  12832. __pyx_v_buf_data = ((char *)__pyx_v_py_buf.buf);
  12833. /* "aiohttp/_http_parser.pyx":763
  12834. * try:
  12835. * buf_data = <char*>py_buf.buf
  12836. * return _parse_url(buf_data, py_buf.len) # <<<<<<<<<<<<<<
  12837. * finally:
  12838. * PyBuffer_Release(&py_buf)
  12839. */
  12840. __Pyx_XDECREF(__pyx_r);
  12841. __pyx_t_2 = __pyx_f_7aiohttp_12_http_parser__parse_url(__pyx_v_buf_data, __pyx_v_py_buf.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 763, __pyx_L4_error)
  12842. __Pyx_GOTREF(__pyx_t_2);
  12843. __pyx_r = __pyx_t_2;
  12844. __pyx_t_2 = 0;
  12845. goto __pyx_L3_return;
  12846. }
  12847. /* "aiohttp/_http_parser.pyx":765
  12848. * return _parse_url(buf_data, py_buf.len)
  12849. * finally:
  12850. * PyBuffer_Release(&py_buf) # <<<<<<<<<<<<<<
  12851. *
  12852. *
  12853. */
  12854. /*finally:*/ {
  12855. __pyx_L4_error:;
  12856. /*exception exit:*/{
  12857. __Pyx_PyThreadState_declare
  12858. __Pyx_PyThreadState_assign
  12859. __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0;
  12860. __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
  12861. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
  12862. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0)) __Pyx_ErrFetch(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
  12863. __Pyx_XGOTREF(__pyx_t_5);
  12864. __Pyx_XGOTREF(__pyx_t_6);
  12865. __Pyx_XGOTREF(__pyx_t_7);
  12866. __Pyx_XGOTREF(__pyx_t_8);
  12867. __Pyx_XGOTREF(__pyx_t_9);
  12868. __Pyx_XGOTREF(__pyx_t_10);
  12869. __pyx_t_1 = __pyx_lineno; __pyx_t_3 = __pyx_clineno; __pyx_t_4 = __pyx_filename;
  12870. {
  12871. PyBuffer_Release((&__pyx_v_py_buf));
  12872. }
  12873. if (PY_MAJOR_VERSION >= 3) {
  12874. __Pyx_XGIVEREF(__pyx_t_8);
  12875. __Pyx_XGIVEREF(__pyx_t_9);
  12876. __Pyx_XGIVEREF(__pyx_t_10);
  12877. __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
  12878. }
  12879. __Pyx_XGIVEREF(__pyx_t_5);
  12880. __Pyx_XGIVEREF(__pyx_t_6);
  12881. __Pyx_XGIVEREF(__pyx_t_7);
  12882. __Pyx_ErrRestore(__pyx_t_5, __pyx_t_6, __pyx_t_7);
  12883. __pyx_t_5 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0;
  12884. __pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_3; __pyx_filename = __pyx_t_4;
  12885. goto __pyx_L1_error;
  12886. }
  12887. __pyx_L3_return: {
  12888. __pyx_t_10 = __pyx_r;
  12889. __pyx_r = 0;
  12890. PyBuffer_Release((&__pyx_v_py_buf));
  12891. __pyx_r = __pyx_t_10;
  12892. __pyx_t_10 = 0;
  12893. goto __pyx_L0;
  12894. }
  12895. }
  12896. /* "aiohttp/_http_parser.pyx":755
  12897. *
  12898. *
  12899. * def parse_url(url): # <<<<<<<<<<<<<<
  12900. * cdef:
  12901. * Py_buffer py_buf
  12902. */
  12903. /* function exit code */
  12904. __pyx_L1_error:;
  12905. __Pyx_XDECREF(__pyx_t_2);
  12906. __Pyx_AddTraceback("aiohttp._http_parser.parse_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  12907. __pyx_r = NULL;
  12908. __pyx_L0:;
  12909. __Pyx_XGIVEREF(__pyx_r);
  12910. __Pyx_RefNannyFinishContext();
  12911. return __pyx_r;
  12912. }
  12913. /* "aiohttp/_http_parser.pyx":768
  12914. *
  12915. *
  12916. * cdef _parse_url(char* buf_data, size_t length): # <<<<<<<<<<<<<<
  12917. * cdef:
  12918. * cparser.http_parser_url* parsed
  12919. */
  12920. static PyObject *__pyx_f_7aiohttp_12_http_parser__parse_url(char *__pyx_v_buf_data, size_t __pyx_v_length) {
  12921. struct http_parser_url *__pyx_v_parsed;
  12922. int __pyx_v_res;
  12923. PyObject *__pyx_v_schema = 0;
  12924. PyObject *__pyx_v_host = 0;
  12925. PyObject *__pyx_v_port = 0;
  12926. PyObject *__pyx_v_path = 0;
  12927. PyObject *__pyx_v_query = 0;
  12928. PyObject *__pyx_v_fragment = 0;
  12929. PyObject *__pyx_v_user = 0;
  12930. PyObject *__pyx_v_password = 0;
  12931. PyObject *__pyx_v_userinfo = 0;
  12932. CYTHON_UNUSED PyObject *__pyx_v_result = 0;
  12933. int __pyx_v_off;
  12934. int __pyx_v_ln;
  12935. CYTHON_UNUSED PyObject *__pyx_v_sep = NULL;
  12936. PyObject *__pyx_r = NULL;
  12937. __Pyx_RefNannyDeclarations
  12938. int __pyx_t_1;
  12939. uint16_t __pyx_t_2;
  12940. PyObject *__pyx_t_3 = NULL;
  12941. PyObject *__pyx_t_4 = NULL;
  12942. PyObject *__pyx_t_5 = NULL;
  12943. PyObject *__pyx_t_6 = NULL;
  12944. PyObject *__pyx_t_7 = NULL;
  12945. PyObject *(*__pyx_t_8)(PyObject *);
  12946. PyObject *__pyx_t_9 = NULL;
  12947. PyObject *__pyx_t_10 = NULL;
  12948. int __pyx_t_11;
  12949. int __pyx_t_12;
  12950. char const *__pyx_t_13;
  12951. PyObject *__pyx_t_14 = NULL;
  12952. PyObject *__pyx_t_15 = NULL;
  12953. PyObject *__pyx_t_16 = NULL;
  12954. PyObject *__pyx_t_17 = NULL;
  12955. PyObject *__pyx_t_18 = NULL;
  12956. PyObject *__pyx_t_19 = NULL;
  12957. __Pyx_RefNannySetupContext("_parse_url", 0);
  12958. /* "aiohttp/_http_parser.pyx":772
  12959. * cparser.http_parser_url* parsed
  12960. * int res
  12961. * str schema = None # <<<<<<<<<<<<<<
  12962. * str host = None
  12963. * object port = None
  12964. */
  12965. __Pyx_INCREF(Py_None);
  12966. __pyx_v_schema = ((PyObject*)Py_None);
  12967. /* "aiohttp/_http_parser.pyx":773
  12968. * int res
  12969. * str schema = None
  12970. * str host = None # <<<<<<<<<<<<<<
  12971. * object port = None
  12972. * str path = None
  12973. */
  12974. __Pyx_INCREF(Py_None);
  12975. __pyx_v_host = ((PyObject*)Py_None);
  12976. /* "aiohttp/_http_parser.pyx":774
  12977. * str schema = None
  12978. * str host = None
  12979. * object port = None # <<<<<<<<<<<<<<
  12980. * str path = None
  12981. * str query = None
  12982. */
  12983. __Pyx_INCREF(Py_None);
  12984. __pyx_v_port = Py_None;
  12985. /* "aiohttp/_http_parser.pyx":775
  12986. * str host = None
  12987. * object port = None
  12988. * str path = None # <<<<<<<<<<<<<<
  12989. * str query = None
  12990. * str fragment = None
  12991. */
  12992. __Pyx_INCREF(Py_None);
  12993. __pyx_v_path = ((PyObject*)Py_None);
  12994. /* "aiohttp/_http_parser.pyx":776
  12995. * object port = None
  12996. * str path = None
  12997. * str query = None # <<<<<<<<<<<<<<
  12998. * str fragment = None
  12999. * str user = None
  13000. */
  13001. __Pyx_INCREF(Py_None);
  13002. __pyx_v_query = ((PyObject*)Py_None);
  13003. /* "aiohttp/_http_parser.pyx":777
  13004. * str path = None
  13005. * str query = None
  13006. * str fragment = None # <<<<<<<<<<<<<<
  13007. * str user = None
  13008. * str password = None
  13009. */
  13010. __Pyx_INCREF(Py_None);
  13011. __pyx_v_fragment = ((PyObject*)Py_None);
  13012. /* "aiohttp/_http_parser.pyx":778
  13013. * str query = None
  13014. * str fragment = None
  13015. * str user = None # <<<<<<<<<<<<<<
  13016. * str password = None
  13017. * str userinfo = None
  13018. */
  13019. __Pyx_INCREF(Py_None);
  13020. __pyx_v_user = ((PyObject*)Py_None);
  13021. /* "aiohttp/_http_parser.pyx":779
  13022. * str fragment = None
  13023. * str user = None
  13024. * str password = None # <<<<<<<<<<<<<<
  13025. * str userinfo = None
  13026. * object result = None
  13027. */
  13028. __Pyx_INCREF(Py_None);
  13029. __pyx_v_password = ((PyObject*)Py_None);
  13030. /* "aiohttp/_http_parser.pyx":780
  13031. * str user = None
  13032. * str password = None
  13033. * str userinfo = None # <<<<<<<<<<<<<<
  13034. * object result = None
  13035. * int off
  13036. */
  13037. __Pyx_INCREF(Py_None);
  13038. __pyx_v_userinfo = ((PyObject*)Py_None);
  13039. /* "aiohttp/_http_parser.pyx":781
  13040. * str password = None
  13041. * str userinfo = None
  13042. * object result = None # <<<<<<<<<<<<<<
  13043. * int off
  13044. * int ln
  13045. */
  13046. __Pyx_INCREF(Py_None);
  13047. __pyx_v_result = Py_None;
  13048. /* "aiohttp/_http_parser.pyx":785
  13049. * int ln
  13050. *
  13051. * parsed = <cparser.http_parser_url*> \ # <<<<<<<<<<<<<<
  13052. * PyMem_Malloc(sizeof(cparser.http_parser_url))
  13053. * if parsed is NULL:
  13054. */
  13055. __pyx_v_parsed = ((struct http_parser_url *)PyMem_Malloc((sizeof(struct http_parser_url))));
  13056. /* "aiohttp/_http_parser.pyx":787
  13057. * parsed = <cparser.http_parser_url*> \
  13058. * PyMem_Malloc(sizeof(cparser.http_parser_url))
  13059. * if parsed is NULL: # <<<<<<<<<<<<<<
  13060. * raise MemoryError()
  13061. * cparser.http_parser_url_init(parsed)
  13062. */
  13063. __pyx_t_1 = ((__pyx_v_parsed == NULL) != 0);
  13064. if (unlikely(__pyx_t_1)) {
  13065. /* "aiohttp/_http_parser.pyx":788
  13066. * PyMem_Malloc(sizeof(cparser.http_parser_url))
  13067. * if parsed is NULL:
  13068. * raise MemoryError() # <<<<<<<<<<<<<<
  13069. * cparser.http_parser_url_init(parsed)
  13070. * try:
  13071. */
  13072. PyErr_NoMemory(); __PYX_ERR(0, 788, __pyx_L1_error)
  13073. /* "aiohttp/_http_parser.pyx":787
  13074. * parsed = <cparser.http_parser_url*> \
  13075. * PyMem_Malloc(sizeof(cparser.http_parser_url))
  13076. * if parsed is NULL: # <<<<<<<<<<<<<<
  13077. * raise MemoryError()
  13078. * cparser.http_parser_url_init(parsed)
  13079. */
  13080. }
  13081. /* "aiohttp/_http_parser.pyx":789
  13082. * if parsed is NULL:
  13083. * raise MemoryError()
  13084. * cparser.http_parser_url_init(parsed) # <<<<<<<<<<<<<<
  13085. * try:
  13086. * res = cparser.http_parser_parse_url(buf_data, length, 0, parsed)
  13087. */
  13088. http_parser_url_init(__pyx_v_parsed);
  13089. /* "aiohttp/_http_parser.pyx":790
  13090. * raise MemoryError()
  13091. * cparser.http_parser_url_init(parsed)
  13092. * try: # <<<<<<<<<<<<<<
  13093. * res = cparser.http_parser_parse_url(buf_data, length, 0, parsed)
  13094. *
  13095. */
  13096. /*try:*/ {
  13097. /* "aiohttp/_http_parser.pyx":791
  13098. * cparser.http_parser_url_init(parsed)
  13099. * try:
  13100. * res = cparser.http_parser_parse_url(buf_data, length, 0, parsed) # <<<<<<<<<<<<<<
  13101. *
  13102. * if res == 0:
  13103. */
  13104. __pyx_v_res = http_parser_parse_url(__pyx_v_buf_data, __pyx_v_length, 0, __pyx_v_parsed);
  13105. /* "aiohttp/_http_parser.pyx":793
  13106. * res = cparser.http_parser_parse_url(buf_data, length, 0, parsed)
  13107. *
  13108. * if res == 0: # <<<<<<<<<<<<<<
  13109. * if parsed.field_set & (1 << cparser.UF_SCHEMA):
  13110. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off
  13111. */
  13112. __pyx_t_1 = ((__pyx_v_res == 0) != 0);
  13113. if (likely(__pyx_t_1)) {
  13114. /* "aiohttp/_http_parser.pyx":794
  13115. *
  13116. * if res == 0:
  13117. * if parsed.field_set & (1 << cparser.UF_SCHEMA): # <<<<<<<<<<<<<<
  13118. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off
  13119. * ln = parsed.field_data[<int>cparser.UF_SCHEMA].len
  13120. */
  13121. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_SCHEMA)) != 0);
  13122. if (__pyx_t_1) {
  13123. /* "aiohttp/_http_parser.pyx":795
  13124. * if res == 0:
  13125. * if parsed.field_set & (1 << cparser.UF_SCHEMA):
  13126. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off # <<<<<<<<<<<<<<
  13127. * ln = parsed.field_data[<int>cparser.UF_SCHEMA].len
  13128. * schema = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13129. */
  13130. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_SCHEMA)]).off;
  13131. __pyx_v_off = __pyx_t_2;
  13132. /* "aiohttp/_http_parser.pyx":796
  13133. * if parsed.field_set & (1 << cparser.UF_SCHEMA):
  13134. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off
  13135. * ln = parsed.field_data[<int>cparser.UF_SCHEMA].len # <<<<<<<<<<<<<<
  13136. * schema = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13137. * else:
  13138. */
  13139. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_SCHEMA)]).len;
  13140. __pyx_v_ln = __pyx_t_2;
  13141. /* "aiohttp/_http_parser.pyx":797
  13142. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off
  13143. * ln = parsed.field_data[<int>cparser.UF_SCHEMA].len
  13144. * schema = buf_data[off:off+ln].decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  13145. * else:
  13146. * schema = ''
  13147. */
  13148. __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buf_data, __pyx_v_off, (__pyx_v_off + __pyx_v_ln), NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L5_error)
  13149. __Pyx_GOTREF(__pyx_t_3);
  13150. __Pyx_DECREF_SET(__pyx_v_schema, ((PyObject*)__pyx_t_3));
  13151. __pyx_t_3 = 0;
  13152. /* "aiohttp/_http_parser.pyx":794
  13153. *
  13154. * if res == 0:
  13155. * if parsed.field_set & (1 << cparser.UF_SCHEMA): # <<<<<<<<<<<<<<
  13156. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off
  13157. * ln = parsed.field_data[<int>cparser.UF_SCHEMA].len
  13158. */
  13159. goto __pyx_L8;
  13160. }
  13161. /* "aiohttp/_http_parser.pyx":799
  13162. * schema = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13163. * else:
  13164. * schema = '' # <<<<<<<<<<<<<<
  13165. *
  13166. * if parsed.field_set & (1 << cparser.UF_HOST):
  13167. */
  13168. /*else*/ {
  13169. __Pyx_INCREF(__pyx_kp_u__6);
  13170. __Pyx_DECREF_SET(__pyx_v_schema, __pyx_kp_u__6);
  13171. }
  13172. __pyx_L8:;
  13173. /* "aiohttp/_http_parser.pyx":801
  13174. * schema = ''
  13175. *
  13176. * if parsed.field_set & (1 << cparser.UF_HOST): # <<<<<<<<<<<<<<
  13177. * off = parsed.field_data[<int>cparser.UF_HOST].off
  13178. * ln = parsed.field_data[<int>cparser.UF_HOST].len
  13179. */
  13180. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_HOST)) != 0);
  13181. if (__pyx_t_1) {
  13182. /* "aiohttp/_http_parser.pyx":802
  13183. *
  13184. * if parsed.field_set & (1 << cparser.UF_HOST):
  13185. * off = parsed.field_data[<int>cparser.UF_HOST].off # <<<<<<<<<<<<<<
  13186. * ln = parsed.field_data[<int>cparser.UF_HOST].len
  13187. * host = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13188. */
  13189. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_HOST)]).off;
  13190. __pyx_v_off = __pyx_t_2;
  13191. /* "aiohttp/_http_parser.pyx":803
  13192. * if parsed.field_set & (1 << cparser.UF_HOST):
  13193. * off = parsed.field_data[<int>cparser.UF_HOST].off
  13194. * ln = parsed.field_data[<int>cparser.UF_HOST].len # <<<<<<<<<<<<<<
  13195. * host = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13196. * else:
  13197. */
  13198. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_HOST)]).len;
  13199. __pyx_v_ln = __pyx_t_2;
  13200. /* "aiohttp/_http_parser.pyx":804
  13201. * off = parsed.field_data[<int>cparser.UF_HOST].off
  13202. * ln = parsed.field_data[<int>cparser.UF_HOST].len
  13203. * host = buf_data[off:off+ln].decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  13204. * else:
  13205. * host = ''
  13206. */
  13207. __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buf_data, __pyx_v_off, (__pyx_v_off + __pyx_v_ln), NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 804, __pyx_L5_error)
  13208. __Pyx_GOTREF(__pyx_t_3);
  13209. __Pyx_DECREF_SET(__pyx_v_host, ((PyObject*)__pyx_t_3));
  13210. __pyx_t_3 = 0;
  13211. /* "aiohttp/_http_parser.pyx":801
  13212. * schema = ''
  13213. *
  13214. * if parsed.field_set & (1 << cparser.UF_HOST): # <<<<<<<<<<<<<<
  13215. * off = parsed.field_data[<int>cparser.UF_HOST].off
  13216. * ln = parsed.field_data[<int>cparser.UF_HOST].len
  13217. */
  13218. goto __pyx_L9;
  13219. }
  13220. /* "aiohttp/_http_parser.pyx":806
  13221. * host = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13222. * else:
  13223. * host = '' # <<<<<<<<<<<<<<
  13224. *
  13225. * if parsed.field_set & (1 << cparser.UF_PORT):
  13226. */
  13227. /*else*/ {
  13228. __Pyx_INCREF(__pyx_kp_u__6);
  13229. __Pyx_DECREF_SET(__pyx_v_host, __pyx_kp_u__6);
  13230. }
  13231. __pyx_L9:;
  13232. /* "aiohttp/_http_parser.pyx":808
  13233. * host = ''
  13234. *
  13235. * if parsed.field_set & (1 << cparser.UF_PORT): # <<<<<<<<<<<<<<
  13236. * port = parsed.port
  13237. *
  13238. */
  13239. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_PORT)) != 0);
  13240. if (__pyx_t_1) {
  13241. /* "aiohttp/_http_parser.pyx":809
  13242. *
  13243. * if parsed.field_set & (1 << cparser.UF_PORT):
  13244. * port = parsed.port # <<<<<<<<<<<<<<
  13245. *
  13246. * if parsed.field_set & (1 << cparser.UF_PATH):
  13247. */
  13248. __pyx_t_3 = __Pyx_PyInt_From_uint16_t(__pyx_v_parsed->port); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L5_error)
  13249. __Pyx_GOTREF(__pyx_t_3);
  13250. __Pyx_DECREF_SET(__pyx_v_port, __pyx_t_3);
  13251. __pyx_t_3 = 0;
  13252. /* "aiohttp/_http_parser.pyx":808
  13253. * host = ''
  13254. *
  13255. * if parsed.field_set & (1 << cparser.UF_PORT): # <<<<<<<<<<<<<<
  13256. * port = parsed.port
  13257. *
  13258. */
  13259. }
  13260. /* "aiohttp/_http_parser.pyx":811
  13261. * port = parsed.port
  13262. *
  13263. * if parsed.field_set & (1 << cparser.UF_PATH): # <<<<<<<<<<<<<<
  13264. * off = parsed.field_data[<int>cparser.UF_PATH].off
  13265. * ln = parsed.field_data[<int>cparser.UF_PATH].len
  13266. */
  13267. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_PATH)) != 0);
  13268. if (__pyx_t_1) {
  13269. /* "aiohttp/_http_parser.pyx":812
  13270. *
  13271. * if parsed.field_set & (1 << cparser.UF_PATH):
  13272. * off = parsed.field_data[<int>cparser.UF_PATH].off # <<<<<<<<<<<<<<
  13273. * ln = parsed.field_data[<int>cparser.UF_PATH].len
  13274. * path = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13275. */
  13276. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_PATH)]).off;
  13277. __pyx_v_off = __pyx_t_2;
  13278. /* "aiohttp/_http_parser.pyx":813
  13279. * if parsed.field_set & (1 << cparser.UF_PATH):
  13280. * off = parsed.field_data[<int>cparser.UF_PATH].off
  13281. * ln = parsed.field_data[<int>cparser.UF_PATH].len # <<<<<<<<<<<<<<
  13282. * path = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13283. * else:
  13284. */
  13285. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_PATH)]).len;
  13286. __pyx_v_ln = __pyx_t_2;
  13287. /* "aiohttp/_http_parser.pyx":814
  13288. * off = parsed.field_data[<int>cparser.UF_PATH].off
  13289. * ln = parsed.field_data[<int>cparser.UF_PATH].len
  13290. * path = buf_data[off:off+ln].decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  13291. * else:
  13292. * path = ''
  13293. */
  13294. __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buf_data, __pyx_v_off, (__pyx_v_off + __pyx_v_ln), NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 814, __pyx_L5_error)
  13295. __Pyx_GOTREF(__pyx_t_3);
  13296. __Pyx_DECREF_SET(__pyx_v_path, ((PyObject*)__pyx_t_3));
  13297. __pyx_t_3 = 0;
  13298. /* "aiohttp/_http_parser.pyx":811
  13299. * port = parsed.port
  13300. *
  13301. * if parsed.field_set & (1 << cparser.UF_PATH): # <<<<<<<<<<<<<<
  13302. * off = parsed.field_data[<int>cparser.UF_PATH].off
  13303. * ln = parsed.field_data[<int>cparser.UF_PATH].len
  13304. */
  13305. goto __pyx_L11;
  13306. }
  13307. /* "aiohttp/_http_parser.pyx":816
  13308. * path = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13309. * else:
  13310. * path = '' # <<<<<<<<<<<<<<
  13311. *
  13312. * if parsed.field_set & (1 << cparser.UF_QUERY):
  13313. */
  13314. /*else*/ {
  13315. __Pyx_INCREF(__pyx_kp_u__6);
  13316. __Pyx_DECREF_SET(__pyx_v_path, __pyx_kp_u__6);
  13317. }
  13318. __pyx_L11:;
  13319. /* "aiohttp/_http_parser.pyx":818
  13320. * path = ''
  13321. *
  13322. * if parsed.field_set & (1 << cparser.UF_QUERY): # <<<<<<<<<<<<<<
  13323. * off = parsed.field_data[<int>cparser.UF_QUERY].off
  13324. * ln = parsed.field_data[<int>cparser.UF_QUERY].len
  13325. */
  13326. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_QUERY)) != 0);
  13327. if (__pyx_t_1) {
  13328. /* "aiohttp/_http_parser.pyx":819
  13329. *
  13330. * if parsed.field_set & (1 << cparser.UF_QUERY):
  13331. * off = parsed.field_data[<int>cparser.UF_QUERY].off # <<<<<<<<<<<<<<
  13332. * ln = parsed.field_data[<int>cparser.UF_QUERY].len
  13333. * query = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13334. */
  13335. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_QUERY)]).off;
  13336. __pyx_v_off = __pyx_t_2;
  13337. /* "aiohttp/_http_parser.pyx":820
  13338. * if parsed.field_set & (1 << cparser.UF_QUERY):
  13339. * off = parsed.field_data[<int>cparser.UF_QUERY].off
  13340. * ln = parsed.field_data[<int>cparser.UF_QUERY].len # <<<<<<<<<<<<<<
  13341. * query = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13342. * else:
  13343. */
  13344. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_QUERY)]).len;
  13345. __pyx_v_ln = __pyx_t_2;
  13346. /* "aiohttp/_http_parser.pyx":821
  13347. * off = parsed.field_data[<int>cparser.UF_QUERY].off
  13348. * ln = parsed.field_data[<int>cparser.UF_QUERY].len
  13349. * query = buf_data[off:off+ln].decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  13350. * else:
  13351. * query = ''
  13352. */
  13353. __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buf_data, __pyx_v_off, (__pyx_v_off + __pyx_v_ln), NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L5_error)
  13354. __Pyx_GOTREF(__pyx_t_3);
  13355. __Pyx_DECREF_SET(__pyx_v_query, ((PyObject*)__pyx_t_3));
  13356. __pyx_t_3 = 0;
  13357. /* "aiohttp/_http_parser.pyx":818
  13358. * path = ''
  13359. *
  13360. * if parsed.field_set & (1 << cparser.UF_QUERY): # <<<<<<<<<<<<<<
  13361. * off = parsed.field_data[<int>cparser.UF_QUERY].off
  13362. * ln = parsed.field_data[<int>cparser.UF_QUERY].len
  13363. */
  13364. goto __pyx_L12;
  13365. }
  13366. /* "aiohttp/_http_parser.pyx":823
  13367. * query = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13368. * else:
  13369. * query = '' # <<<<<<<<<<<<<<
  13370. *
  13371. * if parsed.field_set & (1 << cparser.UF_FRAGMENT):
  13372. */
  13373. /*else*/ {
  13374. __Pyx_INCREF(__pyx_kp_u__6);
  13375. __Pyx_DECREF_SET(__pyx_v_query, __pyx_kp_u__6);
  13376. }
  13377. __pyx_L12:;
  13378. /* "aiohttp/_http_parser.pyx":825
  13379. * query = ''
  13380. *
  13381. * if parsed.field_set & (1 << cparser.UF_FRAGMENT): # <<<<<<<<<<<<<<
  13382. * off = parsed.field_data[<int>cparser.UF_FRAGMENT].off
  13383. * ln = parsed.field_data[<int>cparser.UF_FRAGMENT].len
  13384. */
  13385. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_FRAGMENT)) != 0);
  13386. if (__pyx_t_1) {
  13387. /* "aiohttp/_http_parser.pyx":826
  13388. *
  13389. * if parsed.field_set & (1 << cparser.UF_FRAGMENT):
  13390. * off = parsed.field_data[<int>cparser.UF_FRAGMENT].off # <<<<<<<<<<<<<<
  13391. * ln = parsed.field_data[<int>cparser.UF_FRAGMENT].len
  13392. * fragment = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13393. */
  13394. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_FRAGMENT)]).off;
  13395. __pyx_v_off = __pyx_t_2;
  13396. /* "aiohttp/_http_parser.pyx":827
  13397. * if parsed.field_set & (1 << cparser.UF_FRAGMENT):
  13398. * off = parsed.field_data[<int>cparser.UF_FRAGMENT].off
  13399. * ln = parsed.field_data[<int>cparser.UF_FRAGMENT].len # <<<<<<<<<<<<<<
  13400. * fragment = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13401. * else:
  13402. */
  13403. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_FRAGMENT)]).len;
  13404. __pyx_v_ln = __pyx_t_2;
  13405. /* "aiohttp/_http_parser.pyx":828
  13406. * off = parsed.field_data[<int>cparser.UF_FRAGMENT].off
  13407. * ln = parsed.field_data[<int>cparser.UF_FRAGMENT].len
  13408. * fragment = buf_data[off:off+ln].decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  13409. * else:
  13410. * fragment = ''
  13411. */
  13412. __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buf_data, __pyx_v_off, (__pyx_v_off + __pyx_v_ln), NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L5_error)
  13413. __Pyx_GOTREF(__pyx_t_3);
  13414. __Pyx_DECREF_SET(__pyx_v_fragment, ((PyObject*)__pyx_t_3));
  13415. __pyx_t_3 = 0;
  13416. /* "aiohttp/_http_parser.pyx":825
  13417. * query = ''
  13418. *
  13419. * if parsed.field_set & (1 << cparser.UF_FRAGMENT): # <<<<<<<<<<<<<<
  13420. * off = parsed.field_data[<int>cparser.UF_FRAGMENT].off
  13421. * ln = parsed.field_data[<int>cparser.UF_FRAGMENT].len
  13422. */
  13423. goto __pyx_L13;
  13424. }
  13425. /* "aiohttp/_http_parser.pyx":830
  13426. * fragment = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13427. * else:
  13428. * fragment = '' # <<<<<<<<<<<<<<
  13429. *
  13430. * if parsed.field_set & (1 << cparser.UF_USERINFO):
  13431. */
  13432. /*else*/ {
  13433. __Pyx_INCREF(__pyx_kp_u__6);
  13434. __Pyx_DECREF_SET(__pyx_v_fragment, __pyx_kp_u__6);
  13435. }
  13436. __pyx_L13:;
  13437. /* "aiohttp/_http_parser.pyx":832
  13438. * fragment = ''
  13439. *
  13440. * if parsed.field_set & (1 << cparser.UF_USERINFO): # <<<<<<<<<<<<<<
  13441. * off = parsed.field_data[<int>cparser.UF_USERINFO].off
  13442. * ln = parsed.field_data[<int>cparser.UF_USERINFO].len
  13443. */
  13444. __pyx_t_1 = ((__pyx_v_parsed->field_set & (1 << UF_USERINFO)) != 0);
  13445. if (__pyx_t_1) {
  13446. /* "aiohttp/_http_parser.pyx":833
  13447. *
  13448. * if parsed.field_set & (1 << cparser.UF_USERINFO):
  13449. * off = parsed.field_data[<int>cparser.UF_USERINFO].off # <<<<<<<<<<<<<<
  13450. * ln = parsed.field_data[<int>cparser.UF_USERINFO].len
  13451. * userinfo = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13452. */
  13453. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_USERINFO)]).off;
  13454. __pyx_v_off = __pyx_t_2;
  13455. /* "aiohttp/_http_parser.pyx":834
  13456. * if parsed.field_set & (1 << cparser.UF_USERINFO):
  13457. * off = parsed.field_data[<int>cparser.UF_USERINFO].off
  13458. * ln = parsed.field_data[<int>cparser.UF_USERINFO].len # <<<<<<<<<<<<<<
  13459. * userinfo = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13460. *
  13461. */
  13462. __pyx_t_2 = (__pyx_v_parsed->field_data[((int)UF_USERINFO)]).len;
  13463. __pyx_v_ln = __pyx_t_2;
  13464. /* "aiohttp/_http_parser.pyx":835
  13465. * off = parsed.field_data[<int>cparser.UF_USERINFO].off
  13466. * ln = parsed.field_data[<int>cparser.UF_USERINFO].len
  13467. * userinfo = buf_data[off:off+ln].decode('utf-8', 'surrogateescape') # <<<<<<<<<<<<<<
  13468. *
  13469. * user, sep, password = userinfo.partition(':')
  13470. */
  13471. __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_buf_data, __pyx_v_off, (__pyx_v_off + __pyx_v_ln), NULL, ((char const *)"surrogateescape"), PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 835, __pyx_L5_error)
  13472. __Pyx_GOTREF(__pyx_t_3);
  13473. __Pyx_DECREF_SET(__pyx_v_userinfo, ((PyObject*)__pyx_t_3));
  13474. __pyx_t_3 = 0;
  13475. /* "aiohttp/_http_parser.pyx":837
  13476. * userinfo = buf_data[off:off+ln].decode('utf-8', 'surrogateescape')
  13477. *
  13478. * user, sep, password = userinfo.partition(':') # <<<<<<<<<<<<<<
  13479. *
  13480. * return URL_build(scheme=schema,
  13481. */
  13482. __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_partition, __pyx_v_userinfo, __pyx_kp_u__13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 837, __pyx_L5_error)
  13483. __Pyx_GOTREF(__pyx_t_3);
  13484. if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
  13485. PyObject* sequence = __pyx_t_3;
  13486. Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
  13487. if (unlikely(size != 3)) {
  13488. if (size > 3) __Pyx_RaiseTooManyValuesError(3);
  13489. else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
  13490. __PYX_ERR(0, 837, __pyx_L5_error)
  13491. }
  13492. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  13493. if (likely(PyTuple_CheckExact(sequence))) {
  13494. __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
  13495. __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
  13496. __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
  13497. } else {
  13498. __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
  13499. __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
  13500. __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
  13501. }
  13502. __Pyx_INCREF(__pyx_t_4);
  13503. __Pyx_INCREF(__pyx_t_5);
  13504. __Pyx_INCREF(__pyx_t_6);
  13505. #else
  13506. __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L5_error)
  13507. __Pyx_GOTREF(__pyx_t_4);
  13508. __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 837, __pyx_L5_error)
  13509. __Pyx_GOTREF(__pyx_t_5);
  13510. __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 837, __pyx_L5_error)
  13511. __Pyx_GOTREF(__pyx_t_6);
  13512. #endif
  13513. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  13514. } else {
  13515. Py_ssize_t index = -1;
  13516. __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 837, __pyx_L5_error)
  13517. __Pyx_GOTREF(__pyx_t_7);
  13518. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  13519. __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
  13520. index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L15_unpacking_failed;
  13521. __Pyx_GOTREF(__pyx_t_4);
  13522. index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed;
  13523. __Pyx_GOTREF(__pyx_t_5);
  13524. index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L15_unpacking_failed;
  13525. __Pyx_GOTREF(__pyx_t_6);
  13526. if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 837, __pyx_L5_error)
  13527. __pyx_t_8 = NULL;
  13528. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  13529. goto __pyx_L16_unpacking_done;
  13530. __pyx_L15_unpacking_failed:;
  13531. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  13532. __pyx_t_8 = NULL;
  13533. if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
  13534. __PYX_ERR(0, 837, __pyx_L5_error)
  13535. __pyx_L16_unpacking_done:;
  13536. }
  13537. if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 837, __pyx_L5_error)
  13538. if (!(likely(PyUnicode_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 837, __pyx_L5_error)
  13539. __Pyx_DECREF_SET(__pyx_v_user, ((PyObject*)__pyx_t_4));
  13540. __pyx_t_4 = 0;
  13541. __pyx_v_sep = __pyx_t_5;
  13542. __pyx_t_5 = 0;
  13543. __Pyx_DECREF_SET(__pyx_v_password, ((PyObject*)__pyx_t_6));
  13544. __pyx_t_6 = 0;
  13545. /* "aiohttp/_http_parser.pyx":832
  13546. * fragment = ''
  13547. *
  13548. * if parsed.field_set & (1 << cparser.UF_USERINFO): # <<<<<<<<<<<<<<
  13549. * off = parsed.field_data[<int>cparser.UF_USERINFO].off
  13550. * ln = parsed.field_data[<int>cparser.UF_USERINFO].len
  13551. */
  13552. }
  13553. /* "aiohttp/_http_parser.pyx":839
  13554. * user, sep, password = userinfo.partition(':')
  13555. *
  13556. * return URL_build(scheme=schema, # <<<<<<<<<<<<<<
  13557. * user=user, password=password, host=host, port=port,
  13558. * path=path, query=query, fragment=fragment)
  13559. */
  13560. __Pyx_XDECREF(__pyx_r);
  13561. __pyx_t_3 = __Pyx_PyDict_NewPresized(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 839, __pyx_L5_error)
  13562. __Pyx_GOTREF(__pyx_t_3);
  13563. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_scheme, __pyx_v_schema) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13564. /* "aiohttp/_http_parser.pyx":840
  13565. *
  13566. * return URL_build(scheme=schema,
  13567. * user=user, password=password, host=host, port=port, # <<<<<<<<<<<<<<
  13568. * path=path, query=query, fragment=fragment)
  13569. * else:
  13570. */
  13571. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_user, __pyx_v_user) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13572. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_password, __pyx_v_password) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13573. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_host, __pyx_v_host) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13574. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_port, __pyx_v_port) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13575. /* "aiohttp/_http_parser.pyx":841
  13576. * return URL_build(scheme=schema,
  13577. * user=user, password=password, host=host, port=port,
  13578. * path=path, query=query, fragment=fragment) # <<<<<<<<<<<<<<
  13579. * else:
  13580. * raise InvalidURLError("invalid url {!r}".format(buf_data))
  13581. */
  13582. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_path, __pyx_v_path) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13583. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_query, __pyx_v_query) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13584. if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_fragment, __pyx_v_fragment) < 0) __PYX_ERR(0, 839, __pyx_L5_error)
  13585. /* "aiohttp/_http_parser.pyx":839
  13586. * user, sep, password = userinfo.partition(':')
  13587. *
  13588. * return URL_build(scheme=schema, # <<<<<<<<<<<<<<
  13589. * user=user, password=password, host=host, port=port,
  13590. * path=path, query=query, fragment=fragment)
  13591. */
  13592. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_v_7aiohttp_12_http_parser_URL_build, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 839, __pyx_L5_error)
  13593. __Pyx_GOTREF(__pyx_t_6);
  13594. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  13595. __pyx_r = __pyx_t_6;
  13596. __pyx_t_6 = 0;
  13597. goto __pyx_L4_return;
  13598. /* "aiohttp/_http_parser.pyx":793
  13599. * res = cparser.http_parser_parse_url(buf_data, length, 0, parsed)
  13600. *
  13601. * if res == 0: # <<<<<<<<<<<<<<
  13602. * if parsed.field_set & (1 << cparser.UF_SCHEMA):
  13603. * off = parsed.field_data[<int>cparser.UF_SCHEMA].off
  13604. */
  13605. }
  13606. /* "aiohttp/_http_parser.pyx":843
  13607. * path=path, query=query, fragment=fragment)
  13608. * else:
  13609. * raise InvalidURLError("invalid url {!r}".format(buf_data)) # <<<<<<<<<<<<<<
  13610. * finally:
  13611. * PyMem_Free(parsed)
  13612. */
  13613. /*else*/ {
  13614. __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidURLError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 843, __pyx_L5_error)
  13615. __Pyx_GOTREF(__pyx_t_3);
  13616. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_invalid_url_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L5_error)
  13617. __Pyx_GOTREF(__pyx_t_4);
  13618. __pyx_t_7 = __Pyx_PyBytes_FromString(__pyx_v_buf_data); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 843, __pyx_L5_error)
  13619. __Pyx_GOTREF(__pyx_t_7);
  13620. __pyx_t_9 = NULL;
  13621. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
  13622. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
  13623. if (likely(__pyx_t_9)) {
  13624. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
  13625. __Pyx_INCREF(__pyx_t_9);
  13626. __Pyx_INCREF(function);
  13627. __Pyx_DECREF_SET(__pyx_t_4, function);
  13628. }
  13629. }
  13630. if (!__pyx_t_9) {
  13631. __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L5_error)
  13632. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  13633. __Pyx_GOTREF(__pyx_t_5);
  13634. } else {
  13635. #if CYTHON_FAST_PYCALL
  13636. if (PyFunction_Check(__pyx_t_4)) {
  13637. PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
  13638. __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L5_error)
  13639. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  13640. __Pyx_GOTREF(__pyx_t_5);
  13641. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  13642. } else
  13643. #endif
  13644. #if CYTHON_FAST_PYCCALL
  13645. if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
  13646. PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
  13647. __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L5_error)
  13648. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  13649. __Pyx_GOTREF(__pyx_t_5);
  13650. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  13651. } else
  13652. #endif
  13653. {
  13654. __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 843, __pyx_L5_error)
  13655. __Pyx_GOTREF(__pyx_t_10);
  13656. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
  13657. __Pyx_GIVEREF(__pyx_t_7);
  13658. PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7);
  13659. __pyx_t_7 = 0;
  13660. __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L5_error)
  13661. __Pyx_GOTREF(__pyx_t_5);
  13662. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  13663. }
  13664. }
  13665. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  13666. __pyx_t_4 = NULL;
  13667. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
  13668. __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
  13669. if (likely(__pyx_t_4)) {
  13670. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
  13671. __Pyx_INCREF(__pyx_t_4);
  13672. __Pyx_INCREF(function);
  13673. __Pyx_DECREF_SET(__pyx_t_3, function);
  13674. }
  13675. }
  13676. if (!__pyx_t_4) {
  13677. __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L5_error)
  13678. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13679. __Pyx_GOTREF(__pyx_t_6);
  13680. } else {
  13681. #if CYTHON_FAST_PYCALL
  13682. if (PyFunction_Check(__pyx_t_3)) {
  13683. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
  13684. __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L5_error)
  13685. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  13686. __Pyx_GOTREF(__pyx_t_6);
  13687. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13688. } else
  13689. #endif
  13690. #if CYTHON_FAST_PYCCALL
  13691. if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
  13692. PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
  13693. __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L5_error)
  13694. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  13695. __Pyx_GOTREF(__pyx_t_6);
  13696. __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  13697. } else
  13698. #endif
  13699. {
  13700. __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 843, __pyx_L5_error)
  13701. __Pyx_GOTREF(__pyx_t_10);
  13702. __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_4); __pyx_t_4 = NULL;
  13703. __Pyx_GIVEREF(__pyx_t_5);
  13704. PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_5);
  13705. __pyx_t_5 = 0;
  13706. __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 843, __pyx_L5_error)
  13707. __Pyx_GOTREF(__pyx_t_6);
  13708. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  13709. }
  13710. }
  13711. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  13712. __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  13713. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  13714. __PYX_ERR(0, 843, __pyx_L5_error)
  13715. }
  13716. }
  13717. /* "aiohttp/_http_parser.pyx":845
  13718. * raise InvalidURLError("invalid url {!r}".format(buf_data))
  13719. * finally:
  13720. * PyMem_Free(parsed) # <<<<<<<<<<<<<<
  13721. */
  13722. /*finally:*/ {
  13723. __pyx_L5_error:;
  13724. /*exception exit:*/{
  13725. __Pyx_PyThreadState_declare
  13726. __Pyx_PyThreadState_assign
  13727. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  13728. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  13729. __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
  13730. __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  13731. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  13732. __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
  13733. __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  13734. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  13735. if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_17, &__pyx_t_18, &__pyx_t_19);
  13736. if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16) < 0)) __Pyx_ErrFetch(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
  13737. __Pyx_XGOTREF(__pyx_t_14);
  13738. __Pyx_XGOTREF(__pyx_t_15);
  13739. __Pyx_XGOTREF(__pyx_t_16);
  13740. __Pyx_XGOTREF(__pyx_t_17);
  13741. __Pyx_XGOTREF(__pyx_t_18);
  13742. __Pyx_XGOTREF(__pyx_t_19);
  13743. __pyx_t_11 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_13 = __pyx_filename;
  13744. {
  13745. PyMem_Free(__pyx_v_parsed);
  13746. }
  13747. if (PY_MAJOR_VERSION >= 3) {
  13748. __Pyx_XGIVEREF(__pyx_t_17);
  13749. __Pyx_XGIVEREF(__pyx_t_18);
  13750. __Pyx_XGIVEREF(__pyx_t_19);
  13751. __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_18, __pyx_t_19);
  13752. }
  13753. __Pyx_XGIVEREF(__pyx_t_14);
  13754. __Pyx_XGIVEREF(__pyx_t_15);
  13755. __Pyx_XGIVEREF(__pyx_t_16);
  13756. __Pyx_ErrRestore(__pyx_t_14, __pyx_t_15, __pyx_t_16);
  13757. __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0;
  13758. __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_13;
  13759. goto __pyx_L1_error;
  13760. }
  13761. __pyx_L4_return: {
  13762. __pyx_t_19 = __pyx_r;
  13763. __pyx_r = 0;
  13764. PyMem_Free(__pyx_v_parsed);
  13765. __pyx_r = __pyx_t_19;
  13766. __pyx_t_19 = 0;
  13767. goto __pyx_L0;
  13768. }
  13769. }
  13770. /* "aiohttp/_http_parser.pyx":768
  13771. *
  13772. *
  13773. * cdef _parse_url(char* buf_data, size_t length): # <<<<<<<<<<<<<<
  13774. * cdef:
  13775. * cparser.http_parser_url* parsed
  13776. */
  13777. /* function exit code */
  13778. __pyx_L1_error:;
  13779. __Pyx_XDECREF(__pyx_t_3);
  13780. __Pyx_XDECREF(__pyx_t_4);
  13781. __Pyx_XDECREF(__pyx_t_5);
  13782. __Pyx_XDECREF(__pyx_t_6);
  13783. __Pyx_XDECREF(__pyx_t_7);
  13784. __Pyx_XDECREF(__pyx_t_9);
  13785. __Pyx_XDECREF(__pyx_t_10);
  13786. __Pyx_AddTraceback("aiohttp._http_parser._parse_url", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13787. __pyx_r = 0;
  13788. __pyx_L0:;
  13789. __Pyx_XDECREF(__pyx_v_schema);
  13790. __Pyx_XDECREF(__pyx_v_host);
  13791. __Pyx_XDECREF(__pyx_v_port);
  13792. __Pyx_XDECREF(__pyx_v_path);
  13793. __Pyx_XDECREF(__pyx_v_query);
  13794. __Pyx_XDECREF(__pyx_v_fragment);
  13795. __Pyx_XDECREF(__pyx_v_user);
  13796. __Pyx_XDECREF(__pyx_v_password);
  13797. __Pyx_XDECREF(__pyx_v_userinfo);
  13798. __Pyx_XDECREF(__pyx_v_result);
  13799. __Pyx_XDECREF(__pyx_v_sep);
  13800. __Pyx_XGIVEREF(__pyx_r);
  13801. __Pyx_RefNannyFinishContext();
  13802. return __pyx_r;
  13803. }
  13804. /* "(tree fragment)":1
  13805. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  13806. * if __pyx_checksum != 0x1408252:
  13807. * from pickle import PickleError as __pyx_PickleError
  13808. */
  13809. /* Python wrapper */
  13810. static PyObject *__pyx_pw_7aiohttp_12_http_parser_3__pyx_unpickle_RawRequestMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  13811. static PyMethodDef __pyx_mdef_7aiohttp_12_http_parser_3__pyx_unpickle_RawRequestMessage = {"__pyx_unpickle_RawRequestMessage", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_3__pyx_unpickle_RawRequestMessage, METH_VARARGS|METH_KEYWORDS, 0};
  13812. static PyObject *__pyx_pw_7aiohttp_12_http_parser_3__pyx_unpickle_RawRequestMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  13813. PyObject *__pyx_v___pyx_type = 0;
  13814. long __pyx_v___pyx_checksum;
  13815. PyObject *__pyx_v___pyx_state = 0;
  13816. PyObject *__pyx_r = 0;
  13817. __Pyx_RefNannyDeclarations
  13818. __Pyx_RefNannySetupContext("__pyx_unpickle_RawRequestMessage (wrapper)", 0);
  13819. {
  13820. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
  13821. PyObject* values[3] = {0,0,0};
  13822. if (unlikely(__pyx_kwds)) {
  13823. Py_ssize_t kw_args;
  13824. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  13825. switch (pos_args) {
  13826. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  13827. CYTHON_FALLTHROUGH;
  13828. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  13829. CYTHON_FALLTHROUGH;
  13830. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13831. CYTHON_FALLTHROUGH;
  13832. case 0: break;
  13833. default: goto __pyx_L5_argtuple_error;
  13834. }
  13835. kw_args = PyDict_Size(__pyx_kwds);
  13836. switch (pos_args) {
  13837. case 0:
  13838. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
  13839. else goto __pyx_L5_argtuple_error;
  13840. CYTHON_FALLTHROUGH;
  13841. case 1:
  13842. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
  13843. else {
  13844. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RawRequestMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
  13845. }
  13846. CYTHON_FALLTHROUGH;
  13847. case 2:
  13848. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
  13849. else {
  13850. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RawRequestMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
  13851. }
  13852. }
  13853. if (unlikely(kw_args > 0)) {
  13854. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RawRequestMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
  13855. }
  13856. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  13857. goto __pyx_L5_argtuple_error;
  13858. } else {
  13859. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  13860. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  13861. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  13862. }
  13863. __pyx_v___pyx_type = values[0];
  13864. __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)
  13865. __pyx_v___pyx_state = values[2];
  13866. }
  13867. goto __pyx_L4_argument_unpacking_done;
  13868. __pyx_L5_argtuple_error:;
  13869. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RawRequestMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  13870. __pyx_L3_error:;
  13871. __Pyx_AddTraceback("aiohttp._http_parser.__pyx_unpickle_RawRequestMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  13872. __Pyx_RefNannyFinishContext();
  13873. return NULL;
  13874. __pyx_L4_argument_unpacking_done:;
  13875. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_2__pyx_unpickle_RawRequestMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
  13876. /* function exit code */
  13877. __Pyx_RefNannyFinishContext();
  13878. return __pyx_r;
  13879. }
  13880. static PyObject *__pyx_pf_7aiohttp_12_http_parser_2__pyx_unpickle_RawRequestMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  13881. PyObject *__pyx_v___pyx_PickleError = NULL;
  13882. PyObject *__pyx_v___pyx_result = NULL;
  13883. PyObject *__pyx_r = NULL;
  13884. __Pyx_RefNannyDeclarations
  13885. int __pyx_t_1;
  13886. PyObject *__pyx_t_2 = NULL;
  13887. PyObject *__pyx_t_3 = NULL;
  13888. PyObject *__pyx_t_4 = NULL;
  13889. PyObject *__pyx_t_5 = NULL;
  13890. PyObject *__pyx_t_6 = NULL;
  13891. int __pyx_t_7;
  13892. __Pyx_RefNannySetupContext("__pyx_unpickle_RawRequestMessage", 0);
  13893. /* "(tree fragment)":2
  13894. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state):
  13895. * if __pyx_checksum != 0x1408252: # <<<<<<<<<<<<<<
  13896. * from pickle import PickleError as __pyx_PickleError
  13897. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum)
  13898. */
  13899. __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x1408252) != 0);
  13900. if (__pyx_t_1) {
  13901. /* "(tree fragment)":3
  13902. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state):
  13903. * if __pyx_checksum != 0x1408252:
  13904. * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
  13905. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum)
  13906. * __pyx_result = RawRequestMessage.__new__(__pyx_type)
  13907. */
  13908. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  13909. __Pyx_GOTREF(__pyx_t_2);
  13910. __Pyx_INCREF(__pyx_n_s_PickleError);
  13911. __Pyx_GIVEREF(__pyx_n_s_PickleError);
  13912. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
  13913. __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
  13914. __Pyx_GOTREF(__pyx_t_3);
  13915. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13916. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  13917. __Pyx_GOTREF(__pyx_t_2);
  13918. __Pyx_INCREF(__pyx_t_2);
  13919. __pyx_v___pyx_PickleError = __pyx_t_2;
  13920. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13921. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  13922. /* "(tree fragment)":4
  13923. * if __pyx_checksum != 0x1408252:
  13924. * from pickle import PickleError as __pyx_PickleError
  13925. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum) # <<<<<<<<<<<<<<
  13926. * __pyx_result = RawRequestMessage.__new__(__pyx_type)
  13927. * if __pyx_state is not None:
  13928. */
  13929. __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
  13930. __Pyx_GOTREF(__pyx_t_2);
  13931. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x14, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  13932. __Pyx_GOTREF(__pyx_t_4);
  13933. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13934. __Pyx_INCREF(__pyx_v___pyx_PickleError);
  13935. __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
  13936. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  13937. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  13938. if (likely(__pyx_t_5)) {
  13939. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  13940. __Pyx_INCREF(__pyx_t_5);
  13941. __Pyx_INCREF(function);
  13942. __Pyx_DECREF_SET(__pyx_t_2, function);
  13943. }
  13944. }
  13945. if (!__pyx_t_5) {
  13946. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
  13947. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  13948. __Pyx_GOTREF(__pyx_t_3);
  13949. } else {
  13950. #if CYTHON_FAST_PYCALL
  13951. if (PyFunction_Check(__pyx_t_2)) {
  13952. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
  13953. __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)
  13954. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  13955. __Pyx_GOTREF(__pyx_t_3);
  13956. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  13957. } else
  13958. #endif
  13959. #if CYTHON_FAST_PYCCALL
  13960. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  13961. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
  13962. __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)
  13963. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  13964. __Pyx_GOTREF(__pyx_t_3);
  13965. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  13966. } else
  13967. #endif
  13968. {
  13969. __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
  13970. __Pyx_GOTREF(__pyx_t_6);
  13971. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
  13972. __Pyx_GIVEREF(__pyx_t_4);
  13973. PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
  13974. __pyx_t_4 = 0;
  13975. __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)
  13976. __Pyx_GOTREF(__pyx_t_3);
  13977. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  13978. }
  13979. }
  13980. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  13981. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  13982. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  13983. __PYX_ERR(1, 4, __pyx_L1_error)
  13984. /* "(tree fragment)":2
  13985. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state):
  13986. * if __pyx_checksum != 0x1408252: # <<<<<<<<<<<<<<
  13987. * from pickle import PickleError as __pyx_PickleError
  13988. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum)
  13989. */
  13990. }
  13991. /* "(tree fragment)":5
  13992. * from pickle import PickleError as __pyx_PickleError
  13993. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum)
  13994. * __pyx_result = RawRequestMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
  13995. * if __pyx_state is not None:
  13996. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  13997. */
  13998. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7aiohttp_12_http_parser_RawRequestMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  13999. __Pyx_GOTREF(__pyx_t_2);
  14000. __pyx_t_6 = NULL;
  14001. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  14002. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  14003. if (likely(__pyx_t_6)) {
  14004. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  14005. __Pyx_INCREF(__pyx_t_6);
  14006. __Pyx_INCREF(function);
  14007. __Pyx_DECREF_SET(__pyx_t_2, function);
  14008. }
  14009. }
  14010. if (!__pyx_t_6) {
  14011. __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)
  14012. __Pyx_GOTREF(__pyx_t_3);
  14013. } else {
  14014. #if CYTHON_FAST_PYCALL
  14015. if (PyFunction_Check(__pyx_t_2)) {
  14016. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
  14017. __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)
  14018. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  14019. __Pyx_GOTREF(__pyx_t_3);
  14020. } else
  14021. #endif
  14022. #if CYTHON_FAST_PYCCALL
  14023. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  14024. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
  14025. __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)
  14026. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  14027. __Pyx_GOTREF(__pyx_t_3);
  14028. } else
  14029. #endif
  14030. {
  14031. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  14032. __Pyx_GOTREF(__pyx_t_4);
  14033. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
  14034. __Pyx_INCREF(__pyx_v___pyx_type);
  14035. __Pyx_GIVEREF(__pyx_v___pyx_type);
  14036. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
  14037. __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)
  14038. __Pyx_GOTREF(__pyx_t_3);
  14039. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14040. }
  14041. }
  14042. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14043. __pyx_v___pyx_result = __pyx_t_3;
  14044. __pyx_t_3 = 0;
  14045. /* "(tree fragment)":6
  14046. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum)
  14047. * __pyx_result = RawRequestMessage.__new__(__pyx_type)
  14048. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  14049. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  14050. * return __pyx_result
  14051. */
  14052. __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  14053. __pyx_t_7 = (__pyx_t_1 != 0);
  14054. if (__pyx_t_7) {
  14055. /* "(tree fragment)":7
  14056. * __pyx_result = RawRequestMessage.__new__(__pyx_type)
  14057. * if __pyx_state is not None:
  14058. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
  14059. * return __pyx_result
  14060. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state):
  14061. */
  14062. 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)
  14063. __pyx_t_3 = __pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawRequestMessage__set_state(((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  14064. __Pyx_GOTREF(__pyx_t_3);
  14065. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  14066. /* "(tree fragment)":6
  14067. * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1408252 = (chunked, compression, headers, method, path, raw_headers, should_close, upgrade, url, version))" % __pyx_checksum)
  14068. * __pyx_result = RawRequestMessage.__new__(__pyx_type)
  14069. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  14070. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  14071. * return __pyx_result
  14072. */
  14073. }
  14074. /* "(tree fragment)":8
  14075. * if __pyx_state is not None:
  14076. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  14077. * return __pyx_result # <<<<<<<<<<<<<<
  14078. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state):
  14079. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  14080. */
  14081. __Pyx_XDECREF(__pyx_r);
  14082. __Pyx_INCREF(__pyx_v___pyx_result);
  14083. __pyx_r = __pyx_v___pyx_result;
  14084. goto __pyx_L0;
  14085. /* "(tree fragment)":1
  14086. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  14087. * if __pyx_checksum != 0x1408252:
  14088. * from pickle import PickleError as __pyx_PickleError
  14089. */
  14090. /* function exit code */
  14091. __pyx_L1_error:;
  14092. __Pyx_XDECREF(__pyx_t_2);
  14093. __Pyx_XDECREF(__pyx_t_3);
  14094. __Pyx_XDECREF(__pyx_t_4);
  14095. __Pyx_XDECREF(__pyx_t_5);
  14096. __Pyx_XDECREF(__pyx_t_6);
  14097. __Pyx_AddTraceback("aiohttp._http_parser.__pyx_unpickle_RawRequestMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14098. __pyx_r = NULL;
  14099. __pyx_L0:;
  14100. __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  14101. __Pyx_XDECREF(__pyx_v___pyx_result);
  14102. __Pyx_XGIVEREF(__pyx_r);
  14103. __Pyx_RefNannyFinishContext();
  14104. return __pyx_r;
  14105. }
  14106. /* "(tree fragment)":9
  14107. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  14108. * return __pyx_result
  14109. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  14110. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  14111. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
  14112. */
  14113. static PyObject *__pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawRequestMessage__set_state(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  14114. PyObject *__pyx_r = NULL;
  14115. __Pyx_RefNannyDeclarations
  14116. PyObject *__pyx_t_1 = NULL;
  14117. int __pyx_t_2;
  14118. Py_ssize_t __pyx_t_3;
  14119. int __pyx_t_4;
  14120. int __pyx_t_5;
  14121. PyObject *__pyx_t_6 = NULL;
  14122. PyObject *__pyx_t_7 = NULL;
  14123. PyObject *__pyx_t_8 = NULL;
  14124. PyObject *__pyx_t_9 = NULL;
  14125. __Pyx_RefNannySetupContext("__pyx_unpickle_RawRequestMessage__set_state", 0);
  14126. /* "(tree fragment)":10
  14127. * return __pyx_result
  14128. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state):
  14129. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9] # <<<<<<<<<<<<<<
  14130. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
  14131. * __pyx_result.__dict__.update(__pyx_state[10])
  14132. */
  14133. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14134. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14135. __PYX_ERR(1, 10, __pyx_L1_error)
  14136. }
  14137. __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)
  14138. __Pyx_GOTREF(__pyx_t_1);
  14139. __Pyx_GIVEREF(__pyx_t_1);
  14140. __Pyx_GOTREF(__pyx_v___pyx_result->chunked);
  14141. __Pyx_DECREF(__pyx_v___pyx_result->chunked);
  14142. __pyx_v___pyx_result->chunked = __pyx_t_1;
  14143. __pyx_t_1 = 0;
  14144. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14145. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14146. __PYX_ERR(1, 10, __pyx_L1_error)
  14147. }
  14148. __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)
  14149. __Pyx_GOTREF(__pyx_t_1);
  14150. __Pyx_GIVEREF(__pyx_t_1);
  14151. __Pyx_GOTREF(__pyx_v___pyx_result->compression);
  14152. __Pyx_DECREF(__pyx_v___pyx_result->compression);
  14153. __pyx_v___pyx_result->compression = __pyx_t_1;
  14154. __pyx_t_1 = 0;
  14155. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14156. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14157. __PYX_ERR(1, 10, __pyx_L1_error)
  14158. }
  14159. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14160. __Pyx_GOTREF(__pyx_t_1);
  14161. __Pyx_GIVEREF(__pyx_t_1);
  14162. __Pyx_GOTREF(__pyx_v___pyx_result->headers);
  14163. __Pyx_DECREF(__pyx_v___pyx_result->headers);
  14164. __pyx_v___pyx_result->headers = __pyx_t_1;
  14165. __pyx_t_1 = 0;
  14166. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14167. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14168. __PYX_ERR(1, 10, __pyx_L1_error)
  14169. }
  14170. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14171. __Pyx_GOTREF(__pyx_t_1);
  14172. if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 10, __pyx_L1_error)
  14173. __Pyx_GIVEREF(__pyx_t_1);
  14174. __Pyx_GOTREF(__pyx_v___pyx_result->method);
  14175. __Pyx_DECREF(__pyx_v___pyx_result->method);
  14176. __pyx_v___pyx_result->method = ((PyObject*)__pyx_t_1);
  14177. __pyx_t_1 = 0;
  14178. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14179. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14180. __PYX_ERR(1, 10, __pyx_L1_error)
  14181. }
  14182. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14183. __Pyx_GOTREF(__pyx_t_1);
  14184. if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 10, __pyx_L1_error)
  14185. __Pyx_GIVEREF(__pyx_t_1);
  14186. __Pyx_GOTREF(__pyx_v___pyx_result->path);
  14187. __Pyx_DECREF(__pyx_v___pyx_result->path);
  14188. __pyx_v___pyx_result->path = ((PyObject*)__pyx_t_1);
  14189. __pyx_t_1 = 0;
  14190. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14191. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14192. __PYX_ERR(1, 10, __pyx_L1_error)
  14193. }
  14194. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14195. __Pyx_GOTREF(__pyx_t_1);
  14196. __Pyx_GIVEREF(__pyx_t_1);
  14197. __Pyx_GOTREF(__pyx_v___pyx_result->raw_headers);
  14198. __Pyx_DECREF(__pyx_v___pyx_result->raw_headers);
  14199. __pyx_v___pyx_result->raw_headers = __pyx_t_1;
  14200. __pyx_t_1 = 0;
  14201. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14202. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14203. __PYX_ERR(1, 10, __pyx_L1_error)
  14204. }
  14205. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14206. __Pyx_GOTREF(__pyx_t_1);
  14207. __Pyx_GIVEREF(__pyx_t_1);
  14208. __Pyx_GOTREF(__pyx_v___pyx_result->should_close);
  14209. __Pyx_DECREF(__pyx_v___pyx_result->should_close);
  14210. __pyx_v___pyx_result->should_close = __pyx_t_1;
  14211. __pyx_t_1 = 0;
  14212. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14213. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14214. __PYX_ERR(1, 10, __pyx_L1_error)
  14215. }
  14216. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14217. __Pyx_GOTREF(__pyx_t_1);
  14218. __Pyx_GIVEREF(__pyx_t_1);
  14219. __Pyx_GOTREF(__pyx_v___pyx_result->upgrade);
  14220. __Pyx_DECREF(__pyx_v___pyx_result->upgrade);
  14221. __pyx_v___pyx_result->upgrade = __pyx_t_1;
  14222. __pyx_t_1 = 0;
  14223. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14224. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14225. __PYX_ERR(1, 10, __pyx_L1_error)
  14226. }
  14227. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14228. __Pyx_GOTREF(__pyx_t_1);
  14229. __Pyx_GIVEREF(__pyx_t_1);
  14230. __Pyx_GOTREF(__pyx_v___pyx_result->url);
  14231. __Pyx_DECREF(__pyx_v___pyx_result->url);
  14232. __pyx_v___pyx_result->url = __pyx_t_1;
  14233. __pyx_t_1 = 0;
  14234. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14235. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14236. __PYX_ERR(1, 10, __pyx_L1_error)
  14237. }
  14238. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14239. __Pyx_GOTREF(__pyx_t_1);
  14240. __Pyx_GIVEREF(__pyx_t_1);
  14241. __Pyx_GOTREF(__pyx_v___pyx_result->version);
  14242. __Pyx_DECREF(__pyx_v___pyx_result->version);
  14243. __pyx_v___pyx_result->version = __pyx_t_1;
  14244. __pyx_t_1 = 0;
  14245. /* "(tree fragment)":11
  14246. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state):
  14247. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  14248. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  14249. * __pyx_result.__dict__.update(__pyx_state[10])
  14250. */
  14251. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14252. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  14253. __PYX_ERR(1, 11, __pyx_L1_error)
  14254. }
  14255. __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)
  14256. __pyx_t_4 = ((__pyx_t_3 > 10) != 0);
  14257. if (__pyx_t_4) {
  14258. } else {
  14259. __pyx_t_2 = __pyx_t_4;
  14260. goto __pyx_L4_bool_binop_done;
  14261. }
  14262. __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)
  14263. __pyx_t_5 = (__pyx_t_4 != 0);
  14264. __pyx_t_2 = __pyx_t_5;
  14265. __pyx_L4_bool_binop_done:;
  14266. if (__pyx_t_2) {
  14267. /* "(tree fragment)":12
  14268. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  14269. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
  14270. * __pyx_result.__dict__.update(__pyx_state[10]) # <<<<<<<<<<<<<<
  14271. */
  14272. __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)
  14273. __Pyx_GOTREF(__pyx_t_6);
  14274. __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)
  14275. __Pyx_GOTREF(__pyx_t_7);
  14276. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14277. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14278. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14279. __PYX_ERR(1, 12, __pyx_L1_error)
  14280. }
  14281. __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 12, __pyx_L1_error)
  14282. __Pyx_GOTREF(__pyx_t_6);
  14283. __pyx_t_8 = NULL;
  14284. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
  14285. __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
  14286. if (likely(__pyx_t_8)) {
  14287. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
  14288. __Pyx_INCREF(__pyx_t_8);
  14289. __Pyx_INCREF(function);
  14290. __Pyx_DECREF_SET(__pyx_t_7, function);
  14291. }
  14292. }
  14293. if (!__pyx_t_8) {
  14294. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  14295. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14296. __Pyx_GOTREF(__pyx_t_1);
  14297. } else {
  14298. #if CYTHON_FAST_PYCALL
  14299. if (PyFunction_Check(__pyx_t_7)) {
  14300. PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
  14301. __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)
  14302. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  14303. __Pyx_GOTREF(__pyx_t_1);
  14304. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14305. } else
  14306. #endif
  14307. #if CYTHON_FAST_PYCCALL
  14308. if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
  14309. PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6};
  14310. __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)
  14311. __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
  14312. __Pyx_GOTREF(__pyx_t_1);
  14313. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14314. } else
  14315. #endif
  14316. {
  14317. __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 12, __pyx_L1_error)
  14318. __Pyx_GOTREF(__pyx_t_9);
  14319. __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
  14320. __Pyx_GIVEREF(__pyx_t_6);
  14321. PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
  14322. __pyx_t_6 = 0;
  14323. __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)
  14324. __Pyx_GOTREF(__pyx_t_1);
  14325. __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  14326. }
  14327. }
  14328. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  14329. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14330. /* "(tree fragment)":11
  14331. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state):
  14332. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  14333. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  14334. * __pyx_result.__dict__.update(__pyx_state[10])
  14335. */
  14336. }
  14337. /* "(tree fragment)":9
  14338. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  14339. * return __pyx_result
  14340. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  14341. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  14342. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
  14343. */
  14344. /* function exit code */
  14345. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14346. goto __pyx_L0;
  14347. __pyx_L1_error:;
  14348. __Pyx_XDECREF(__pyx_t_1);
  14349. __Pyx_XDECREF(__pyx_t_6);
  14350. __Pyx_XDECREF(__pyx_t_7);
  14351. __Pyx_XDECREF(__pyx_t_8);
  14352. __Pyx_XDECREF(__pyx_t_9);
  14353. __Pyx_AddTraceback("aiohttp._http_parser.__pyx_unpickle_RawRequestMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14354. __pyx_r = 0;
  14355. __pyx_L0:;
  14356. __Pyx_XGIVEREF(__pyx_r);
  14357. __Pyx_RefNannyFinishContext();
  14358. return __pyx_r;
  14359. }
  14360. /* "(tree fragment)":1
  14361. * def __pyx_unpickle_RawResponseMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  14362. * if __pyx_checksum != 0xc7706dc:
  14363. * from pickle import PickleError as __pyx_PickleError
  14364. */
  14365. /* Python wrapper */
  14366. static PyObject *__pyx_pw_7aiohttp_12_http_parser_5__pyx_unpickle_RawResponseMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
  14367. static PyMethodDef __pyx_mdef_7aiohttp_12_http_parser_5__pyx_unpickle_RawResponseMessage = {"__pyx_unpickle_RawResponseMessage", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_5__pyx_unpickle_RawResponseMessage, METH_VARARGS|METH_KEYWORDS, 0};
  14368. static PyObject *__pyx_pw_7aiohttp_12_http_parser_5__pyx_unpickle_RawResponseMessage(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  14369. PyObject *__pyx_v___pyx_type = 0;
  14370. long __pyx_v___pyx_checksum;
  14371. PyObject *__pyx_v___pyx_state = 0;
  14372. PyObject *__pyx_r = 0;
  14373. __Pyx_RefNannyDeclarations
  14374. __Pyx_RefNannySetupContext("__pyx_unpickle_RawResponseMessage (wrapper)", 0);
  14375. {
  14376. static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
  14377. PyObject* values[3] = {0,0,0};
  14378. if (unlikely(__pyx_kwds)) {
  14379. Py_ssize_t kw_args;
  14380. const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
  14381. switch (pos_args) {
  14382. case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  14383. CYTHON_FALLTHROUGH;
  14384. case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  14385. CYTHON_FALLTHROUGH;
  14386. case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14387. CYTHON_FALLTHROUGH;
  14388. case 0: break;
  14389. default: goto __pyx_L5_argtuple_error;
  14390. }
  14391. kw_args = PyDict_Size(__pyx_kwds);
  14392. switch (pos_args) {
  14393. case 0:
  14394. if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
  14395. else goto __pyx_L5_argtuple_error;
  14396. CYTHON_FALLTHROUGH;
  14397. case 1:
  14398. if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
  14399. else {
  14400. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RawResponseMessage", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
  14401. }
  14402. CYTHON_FALLTHROUGH;
  14403. case 2:
  14404. if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
  14405. else {
  14406. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RawResponseMessage", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
  14407. }
  14408. }
  14409. if (unlikely(kw_args > 0)) {
  14410. if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_RawResponseMessage") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
  14411. }
  14412. } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
  14413. goto __pyx_L5_argtuple_error;
  14414. } else {
  14415. values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
  14416. values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
  14417. values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
  14418. }
  14419. __pyx_v___pyx_type = values[0];
  14420. __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)
  14421. __pyx_v___pyx_state = values[2];
  14422. }
  14423. goto __pyx_L4_argument_unpacking_done;
  14424. __pyx_L5_argtuple_error:;
  14425. __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_RawResponseMessage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  14426. __pyx_L3_error:;
  14427. __Pyx_AddTraceback("aiohttp._http_parser.__pyx_unpickle_RawResponseMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14428. __Pyx_RefNannyFinishContext();
  14429. return NULL;
  14430. __pyx_L4_argument_unpacking_done:;
  14431. __pyx_r = __pyx_pf_7aiohttp_12_http_parser_4__pyx_unpickle_RawResponseMessage(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
  14432. /* function exit code */
  14433. __Pyx_RefNannyFinishContext();
  14434. return __pyx_r;
  14435. }
  14436. static PyObject *__pyx_pf_7aiohttp_12_http_parser_4__pyx_unpickle_RawResponseMessage(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  14437. PyObject *__pyx_v___pyx_PickleError = NULL;
  14438. PyObject *__pyx_v___pyx_result = NULL;
  14439. PyObject *__pyx_r = NULL;
  14440. __Pyx_RefNannyDeclarations
  14441. int __pyx_t_1;
  14442. PyObject *__pyx_t_2 = NULL;
  14443. PyObject *__pyx_t_3 = NULL;
  14444. PyObject *__pyx_t_4 = NULL;
  14445. PyObject *__pyx_t_5 = NULL;
  14446. PyObject *__pyx_t_6 = NULL;
  14447. int __pyx_t_7;
  14448. __Pyx_RefNannySetupContext("__pyx_unpickle_RawResponseMessage", 0);
  14449. /* "(tree fragment)":2
  14450. * def __pyx_unpickle_RawResponseMessage(__pyx_type, long __pyx_checksum, __pyx_state):
  14451. * if __pyx_checksum != 0xc7706dc: # <<<<<<<<<<<<<<
  14452. * from pickle import PickleError as __pyx_PickleError
  14453. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum)
  14454. */
  14455. __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xc7706dc) != 0);
  14456. if (__pyx_t_1) {
  14457. /* "(tree fragment)":3
  14458. * def __pyx_unpickle_RawResponseMessage(__pyx_type, long __pyx_checksum, __pyx_state):
  14459. * if __pyx_checksum != 0xc7706dc:
  14460. * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
  14461. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum)
  14462. * __pyx_result = RawResponseMessage.__new__(__pyx_type)
  14463. */
  14464. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  14465. __Pyx_GOTREF(__pyx_t_2);
  14466. __Pyx_INCREF(__pyx_n_s_PickleError);
  14467. __Pyx_GIVEREF(__pyx_n_s_PickleError);
  14468. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
  14469. __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
  14470. __Pyx_GOTREF(__pyx_t_3);
  14471. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14472. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
  14473. __Pyx_GOTREF(__pyx_t_2);
  14474. __Pyx_INCREF(__pyx_t_2);
  14475. __pyx_v___pyx_PickleError = __pyx_t_2;
  14476. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14477. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  14478. /* "(tree fragment)":4
  14479. * if __pyx_checksum != 0xc7706dc:
  14480. * from pickle import PickleError as __pyx_PickleError
  14481. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum) # <<<<<<<<<<<<<<
  14482. * __pyx_result = RawResponseMessage.__new__(__pyx_type)
  14483. * if __pyx_state is not None:
  14484. */
  14485. __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 4, __pyx_L1_error)
  14486. __Pyx_GOTREF(__pyx_t_2);
  14487. __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xc7, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 4, __pyx_L1_error)
  14488. __Pyx_GOTREF(__pyx_t_4);
  14489. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14490. __Pyx_INCREF(__pyx_v___pyx_PickleError);
  14491. __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
  14492. if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
  14493. __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
  14494. if (likely(__pyx_t_5)) {
  14495. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  14496. __Pyx_INCREF(__pyx_t_5);
  14497. __Pyx_INCREF(function);
  14498. __Pyx_DECREF_SET(__pyx_t_2, function);
  14499. }
  14500. }
  14501. if (!__pyx_t_5) {
  14502. __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 4, __pyx_L1_error)
  14503. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14504. __Pyx_GOTREF(__pyx_t_3);
  14505. } else {
  14506. #if CYTHON_FAST_PYCALL
  14507. if (PyFunction_Check(__pyx_t_2)) {
  14508. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
  14509. __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)
  14510. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  14511. __Pyx_GOTREF(__pyx_t_3);
  14512. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14513. } else
  14514. #endif
  14515. #if CYTHON_FAST_PYCCALL
  14516. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  14517. PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
  14518. __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)
  14519. __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  14520. __Pyx_GOTREF(__pyx_t_3);
  14521. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14522. } else
  14523. #endif
  14524. {
  14525. __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 4, __pyx_L1_error)
  14526. __Pyx_GOTREF(__pyx_t_6);
  14527. __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
  14528. __Pyx_GIVEREF(__pyx_t_4);
  14529. PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
  14530. __pyx_t_4 = 0;
  14531. __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)
  14532. __Pyx_GOTREF(__pyx_t_3);
  14533. __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  14534. }
  14535. }
  14536. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14537. __Pyx_Raise(__pyx_t_3, 0, 0, 0);
  14538. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  14539. __PYX_ERR(1, 4, __pyx_L1_error)
  14540. /* "(tree fragment)":2
  14541. * def __pyx_unpickle_RawResponseMessage(__pyx_type, long __pyx_checksum, __pyx_state):
  14542. * if __pyx_checksum != 0xc7706dc: # <<<<<<<<<<<<<<
  14543. * from pickle import PickleError as __pyx_PickleError
  14544. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum)
  14545. */
  14546. }
  14547. /* "(tree fragment)":5
  14548. * from pickle import PickleError as __pyx_PickleError
  14549. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum)
  14550. * __pyx_result = RawResponseMessage.__new__(__pyx_type) # <<<<<<<<<<<<<<
  14551. * if __pyx_state is not None:
  14552. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state)
  14553. */
  14554. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7aiohttp_12_http_parser_RawResponseMessage), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 5, __pyx_L1_error)
  14555. __Pyx_GOTREF(__pyx_t_2);
  14556. __pyx_t_6 = NULL;
  14557. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
  14558. __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
  14559. if (likely(__pyx_t_6)) {
  14560. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
  14561. __Pyx_INCREF(__pyx_t_6);
  14562. __Pyx_INCREF(function);
  14563. __Pyx_DECREF_SET(__pyx_t_2, function);
  14564. }
  14565. }
  14566. if (!__pyx_t_6) {
  14567. __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)
  14568. __Pyx_GOTREF(__pyx_t_3);
  14569. } else {
  14570. #if CYTHON_FAST_PYCALL
  14571. if (PyFunction_Check(__pyx_t_2)) {
  14572. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
  14573. __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)
  14574. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  14575. __Pyx_GOTREF(__pyx_t_3);
  14576. } else
  14577. #endif
  14578. #if CYTHON_FAST_PYCCALL
  14579. if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
  14580. PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type};
  14581. __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)
  14582. __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  14583. __Pyx_GOTREF(__pyx_t_3);
  14584. } else
  14585. #endif
  14586. {
  14587. __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
  14588. __Pyx_GOTREF(__pyx_t_4);
  14589. __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
  14590. __Pyx_INCREF(__pyx_v___pyx_type);
  14591. __Pyx_GIVEREF(__pyx_v___pyx_type);
  14592. PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type);
  14593. __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)
  14594. __Pyx_GOTREF(__pyx_t_3);
  14595. __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  14596. }
  14597. }
  14598. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  14599. __pyx_v___pyx_result = __pyx_t_3;
  14600. __pyx_t_3 = 0;
  14601. /* "(tree fragment)":6
  14602. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum)
  14603. * __pyx_result = RawResponseMessage.__new__(__pyx_type)
  14604. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  14605. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state)
  14606. * return __pyx_result
  14607. */
  14608. __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
  14609. __pyx_t_7 = (__pyx_t_1 != 0);
  14610. if (__pyx_t_7) {
  14611. /* "(tree fragment)":7
  14612. * __pyx_result = RawResponseMessage.__new__(__pyx_type)
  14613. * if __pyx_state is not None:
  14614. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
  14615. * return __pyx_result
  14616. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state):
  14617. */
  14618. 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)
  14619. __pyx_t_3 = __pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawResponseMessage__set_state(((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
  14620. __Pyx_GOTREF(__pyx_t_3);
  14621. __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  14622. /* "(tree fragment)":6
  14623. * raise __pyx_PickleError("Incompatible checksums (%s vs 0xc7706dc = (chunked, code, compression, headers, raw_headers, reason, should_close, upgrade, version))" % __pyx_checksum)
  14624. * __pyx_result = RawResponseMessage.__new__(__pyx_type)
  14625. * if __pyx_state is not None: # <<<<<<<<<<<<<<
  14626. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state)
  14627. * return __pyx_result
  14628. */
  14629. }
  14630. /* "(tree fragment)":8
  14631. * if __pyx_state is not None:
  14632. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state)
  14633. * return __pyx_result # <<<<<<<<<<<<<<
  14634. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state):
  14635. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8]
  14636. */
  14637. __Pyx_XDECREF(__pyx_r);
  14638. __Pyx_INCREF(__pyx_v___pyx_result);
  14639. __pyx_r = __pyx_v___pyx_result;
  14640. goto __pyx_L0;
  14641. /* "(tree fragment)":1
  14642. * def __pyx_unpickle_RawResponseMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  14643. * if __pyx_checksum != 0xc7706dc:
  14644. * from pickle import PickleError as __pyx_PickleError
  14645. */
  14646. /* function exit code */
  14647. __pyx_L1_error:;
  14648. __Pyx_XDECREF(__pyx_t_2);
  14649. __Pyx_XDECREF(__pyx_t_3);
  14650. __Pyx_XDECREF(__pyx_t_4);
  14651. __Pyx_XDECREF(__pyx_t_5);
  14652. __Pyx_XDECREF(__pyx_t_6);
  14653. __Pyx_AddTraceback("aiohttp._http_parser.__pyx_unpickle_RawResponseMessage", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14654. __pyx_r = NULL;
  14655. __pyx_L0:;
  14656. __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  14657. __Pyx_XDECREF(__pyx_v___pyx_result);
  14658. __Pyx_XGIVEREF(__pyx_r);
  14659. __Pyx_RefNannyFinishContext();
  14660. return __pyx_r;
  14661. }
  14662. /* "(tree fragment)":9
  14663. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state)
  14664. * return __pyx_result
  14665. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  14666. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8]
  14667. * if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
  14668. */
  14669. static PyObject *__pyx_f_7aiohttp_12_http_parser___pyx_unpickle_RawResponseMessage__set_state(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  14670. PyObject *__pyx_r = NULL;
  14671. __Pyx_RefNannyDeclarations
  14672. PyObject *__pyx_t_1 = NULL;
  14673. int __pyx_t_2;
  14674. int __pyx_t_3;
  14675. Py_ssize_t __pyx_t_4;
  14676. int __pyx_t_5;
  14677. int __pyx_t_6;
  14678. PyObject *__pyx_t_7 = NULL;
  14679. PyObject *__pyx_t_8 = NULL;
  14680. PyObject *__pyx_t_9 = NULL;
  14681. PyObject *__pyx_t_10 = NULL;
  14682. __Pyx_RefNannySetupContext("__pyx_unpickle_RawResponseMessage__set_state", 0);
  14683. /* "(tree fragment)":10
  14684. * return __pyx_result
  14685. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state):
  14686. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8] # <<<<<<<<<<<<<<
  14687. * if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
  14688. * __pyx_result.__dict__.update(__pyx_state[9])
  14689. */
  14690. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14691. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14692. __PYX_ERR(1, 10, __pyx_L1_error)
  14693. }
  14694. __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)
  14695. __Pyx_GOTREF(__pyx_t_1);
  14696. __Pyx_GIVEREF(__pyx_t_1);
  14697. __Pyx_GOTREF(__pyx_v___pyx_result->chunked);
  14698. __Pyx_DECREF(__pyx_v___pyx_result->chunked);
  14699. __pyx_v___pyx_result->chunked = __pyx_t_1;
  14700. __pyx_t_1 = 0;
  14701. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14702. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14703. __PYX_ERR(1, 10, __pyx_L1_error)
  14704. }
  14705. __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)
  14706. __Pyx_GOTREF(__pyx_t_1);
  14707. __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 10, __pyx_L1_error)
  14708. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14709. __pyx_v___pyx_result->code = __pyx_t_2;
  14710. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14711. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14712. __PYX_ERR(1, 10, __pyx_L1_error)
  14713. }
  14714. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14715. __Pyx_GOTREF(__pyx_t_1);
  14716. __Pyx_GIVEREF(__pyx_t_1);
  14717. __Pyx_GOTREF(__pyx_v___pyx_result->compression);
  14718. __Pyx_DECREF(__pyx_v___pyx_result->compression);
  14719. __pyx_v___pyx_result->compression = __pyx_t_1;
  14720. __pyx_t_1 = 0;
  14721. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14722. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14723. __PYX_ERR(1, 10, __pyx_L1_error)
  14724. }
  14725. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14726. __Pyx_GOTREF(__pyx_t_1);
  14727. __Pyx_GIVEREF(__pyx_t_1);
  14728. __Pyx_GOTREF(__pyx_v___pyx_result->headers);
  14729. __Pyx_DECREF(__pyx_v___pyx_result->headers);
  14730. __pyx_v___pyx_result->headers = __pyx_t_1;
  14731. __pyx_t_1 = 0;
  14732. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14733. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14734. __PYX_ERR(1, 10, __pyx_L1_error)
  14735. }
  14736. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14737. __Pyx_GOTREF(__pyx_t_1);
  14738. __Pyx_GIVEREF(__pyx_t_1);
  14739. __Pyx_GOTREF(__pyx_v___pyx_result->raw_headers);
  14740. __Pyx_DECREF(__pyx_v___pyx_result->raw_headers);
  14741. __pyx_v___pyx_result->raw_headers = __pyx_t_1;
  14742. __pyx_t_1 = 0;
  14743. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14744. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14745. __PYX_ERR(1, 10, __pyx_L1_error)
  14746. }
  14747. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14748. __Pyx_GOTREF(__pyx_t_1);
  14749. if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(1, 10, __pyx_L1_error)
  14750. __Pyx_GIVEREF(__pyx_t_1);
  14751. __Pyx_GOTREF(__pyx_v___pyx_result->reason);
  14752. __Pyx_DECREF(__pyx_v___pyx_result->reason);
  14753. __pyx_v___pyx_result->reason = ((PyObject*)__pyx_t_1);
  14754. __pyx_t_1 = 0;
  14755. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14756. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14757. __PYX_ERR(1, 10, __pyx_L1_error)
  14758. }
  14759. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14760. __Pyx_GOTREF(__pyx_t_1);
  14761. __Pyx_GIVEREF(__pyx_t_1);
  14762. __Pyx_GOTREF(__pyx_v___pyx_result->should_close);
  14763. __Pyx_DECREF(__pyx_v___pyx_result->should_close);
  14764. __pyx_v___pyx_result->should_close = __pyx_t_1;
  14765. __pyx_t_1 = 0;
  14766. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14767. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14768. __PYX_ERR(1, 10, __pyx_L1_error)
  14769. }
  14770. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14771. __Pyx_GOTREF(__pyx_t_1);
  14772. __Pyx_GIVEREF(__pyx_t_1);
  14773. __Pyx_GOTREF(__pyx_v___pyx_result->upgrade);
  14774. __Pyx_DECREF(__pyx_v___pyx_result->upgrade);
  14775. __pyx_v___pyx_result->upgrade = __pyx_t_1;
  14776. __pyx_t_1 = 0;
  14777. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14778. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14779. __PYX_ERR(1, 10, __pyx_L1_error)
  14780. }
  14781. __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 10, __pyx_L1_error)
  14782. __Pyx_GOTREF(__pyx_t_1);
  14783. __Pyx_GIVEREF(__pyx_t_1);
  14784. __Pyx_GOTREF(__pyx_v___pyx_result->version);
  14785. __Pyx_DECREF(__pyx_v___pyx_result->version);
  14786. __pyx_v___pyx_result->version = __pyx_t_1;
  14787. __pyx_t_1 = 0;
  14788. /* "(tree fragment)":11
  14789. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state):
  14790. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8]
  14791. * if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  14792. * __pyx_result.__dict__.update(__pyx_state[9])
  14793. */
  14794. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14795. PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
  14796. __PYX_ERR(1, 11, __pyx_L1_error)
  14797. }
  14798. __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(1, 11, __pyx_L1_error)
  14799. __pyx_t_5 = ((__pyx_t_4 > 9) != 0);
  14800. if (__pyx_t_5) {
  14801. } else {
  14802. __pyx_t_3 = __pyx_t_5;
  14803. goto __pyx_L4_bool_binop_done;
  14804. }
  14805. __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 11, __pyx_L1_error)
  14806. __pyx_t_6 = (__pyx_t_5 != 0);
  14807. __pyx_t_3 = __pyx_t_6;
  14808. __pyx_L4_bool_binop_done:;
  14809. if (__pyx_t_3) {
  14810. /* "(tree fragment)":12
  14811. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8]
  14812. * if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
  14813. * __pyx_result.__dict__.update(__pyx_state[9]) # <<<<<<<<<<<<<<
  14814. */
  14815. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
  14816. __Pyx_GOTREF(__pyx_t_7);
  14817. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 12, __pyx_L1_error)
  14818. __Pyx_GOTREF(__pyx_t_8);
  14819. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  14820. if (unlikely(__pyx_v___pyx_state == Py_None)) {
  14821. PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
  14822. __PYX_ERR(1, 12, __pyx_L1_error)
  14823. }
  14824. __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 12, __pyx_L1_error)
  14825. __Pyx_GOTREF(__pyx_t_7);
  14826. __pyx_t_9 = NULL;
  14827. if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
  14828. __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
  14829. if (likely(__pyx_t_9)) {
  14830. PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
  14831. __Pyx_INCREF(__pyx_t_9);
  14832. __Pyx_INCREF(function);
  14833. __Pyx_DECREF_SET(__pyx_t_8, function);
  14834. }
  14835. }
  14836. if (!__pyx_t_9) {
  14837. __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  14838. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  14839. __Pyx_GOTREF(__pyx_t_1);
  14840. } else {
  14841. #if CYTHON_FAST_PYCALL
  14842. if (PyFunction_Check(__pyx_t_8)) {
  14843. PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
  14844. __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  14845. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  14846. __Pyx_GOTREF(__pyx_t_1);
  14847. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  14848. } else
  14849. #endif
  14850. #if CYTHON_FAST_PYCCALL
  14851. if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
  14852. PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7};
  14853. __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  14854. __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  14855. __Pyx_GOTREF(__pyx_t_1);
  14856. __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  14857. } else
  14858. #endif
  14859. {
  14860. __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 12, __pyx_L1_error)
  14861. __Pyx_GOTREF(__pyx_t_10);
  14862. __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
  14863. __Pyx_GIVEREF(__pyx_t_7);
  14864. PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7);
  14865. __pyx_t_7 = 0;
  14866. __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
  14867. __Pyx_GOTREF(__pyx_t_1);
  14868. __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  14869. }
  14870. }
  14871. __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  14872. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  14873. /* "(tree fragment)":11
  14874. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state):
  14875. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8]
  14876. * if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
  14877. * __pyx_result.__dict__.update(__pyx_state[9])
  14878. */
  14879. }
  14880. /* "(tree fragment)":9
  14881. * __pyx_unpickle_RawResponseMessage__set_state(<RawResponseMessage> __pyx_result, __pyx_state)
  14882. * return __pyx_result
  14883. * cdef __pyx_unpickle_RawResponseMessage__set_state(RawResponseMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  14884. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.code = __pyx_state[1]; __pyx_result.compression = __pyx_state[2]; __pyx_result.headers = __pyx_state[3]; __pyx_result.raw_headers = __pyx_state[4]; __pyx_result.reason = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.version = __pyx_state[8]
  14885. * if len(__pyx_state) > 9 and hasattr(__pyx_result, '__dict__'):
  14886. */
  14887. /* function exit code */
  14888. __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  14889. goto __pyx_L0;
  14890. __pyx_L1_error:;
  14891. __Pyx_XDECREF(__pyx_t_1);
  14892. __Pyx_XDECREF(__pyx_t_7);
  14893. __Pyx_XDECREF(__pyx_t_8);
  14894. __Pyx_XDECREF(__pyx_t_9);
  14895. __Pyx_XDECREF(__pyx_t_10);
  14896. __Pyx_AddTraceback("aiohttp._http_parser.__pyx_unpickle_RawResponseMessage__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  14897. __pyx_r = 0;
  14898. __pyx_L0:;
  14899. __Pyx_XGIVEREF(__pyx_r);
  14900. __Pyx_RefNannyFinishContext();
  14901. return __pyx_r;
  14902. }
  14903. static struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *__pyx_freelist_7aiohttp_12_http_parser_RawRequestMessage[250];
  14904. static int __pyx_freecount_7aiohttp_12_http_parser_RawRequestMessage = 0;
  14905. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_RawRequestMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  14906. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *p;
  14907. PyObject *o;
  14908. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7aiohttp_12_http_parser_RawRequestMessage > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  14909. o = (PyObject*)__pyx_freelist_7aiohttp_12_http_parser_RawRequestMessage[--__pyx_freecount_7aiohttp_12_http_parser_RawRequestMessage];
  14910. memset(o, 0, sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage));
  14911. (void) PyObject_INIT(o, t);
  14912. PyObject_GC_Track(o);
  14913. } else {
  14914. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  14915. o = (*t->tp_alloc)(t, 0);
  14916. } else {
  14917. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  14918. }
  14919. if (unlikely(!o)) return 0;
  14920. }
  14921. p = ((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)o);
  14922. p->method = ((PyObject*)Py_None); Py_INCREF(Py_None);
  14923. p->path = ((PyObject*)Py_None); Py_INCREF(Py_None);
  14924. p->version = Py_None; Py_INCREF(Py_None);
  14925. p->headers = Py_None; Py_INCREF(Py_None);
  14926. p->raw_headers = Py_None; Py_INCREF(Py_None);
  14927. p->should_close = Py_None; Py_INCREF(Py_None);
  14928. p->compression = Py_None; Py_INCREF(Py_None);
  14929. p->upgrade = Py_None; Py_INCREF(Py_None);
  14930. p->chunked = Py_None; Py_INCREF(Py_None);
  14931. p->url = Py_None; Py_INCREF(Py_None);
  14932. return o;
  14933. }
  14934. static void __pyx_tp_dealloc_7aiohttp_12_http_parser_RawRequestMessage(PyObject *o) {
  14935. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *p = (struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)o;
  14936. #if CYTHON_USE_TP_FINALIZE
  14937. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  14938. if (PyObject_CallFinalizerFromDealloc(o)) return;
  14939. }
  14940. #endif
  14941. PyObject_GC_UnTrack(o);
  14942. Py_CLEAR(p->method);
  14943. Py_CLEAR(p->path);
  14944. Py_CLEAR(p->version);
  14945. Py_CLEAR(p->headers);
  14946. Py_CLEAR(p->raw_headers);
  14947. Py_CLEAR(p->should_close);
  14948. Py_CLEAR(p->compression);
  14949. Py_CLEAR(p->upgrade);
  14950. Py_CLEAR(p->chunked);
  14951. Py_CLEAR(p->url);
  14952. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7aiohttp_12_http_parser_RawRequestMessage < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  14953. __pyx_freelist_7aiohttp_12_http_parser_RawRequestMessage[__pyx_freecount_7aiohttp_12_http_parser_RawRequestMessage++] = ((struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)o);
  14954. } else {
  14955. (*Py_TYPE(o)->tp_free)(o);
  14956. }
  14957. }
  14958. static int __pyx_tp_traverse_7aiohttp_12_http_parser_RawRequestMessage(PyObject *o, visitproc v, void *a) {
  14959. int e;
  14960. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *p = (struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)o;
  14961. if (p->version) {
  14962. e = (*v)(p->version, a); if (e) return e;
  14963. }
  14964. if (p->headers) {
  14965. e = (*v)(p->headers, a); if (e) return e;
  14966. }
  14967. if (p->raw_headers) {
  14968. e = (*v)(p->raw_headers, a); if (e) return e;
  14969. }
  14970. if (p->should_close) {
  14971. e = (*v)(p->should_close, a); if (e) return e;
  14972. }
  14973. if (p->compression) {
  14974. e = (*v)(p->compression, a); if (e) return e;
  14975. }
  14976. if (p->upgrade) {
  14977. e = (*v)(p->upgrade, a); if (e) return e;
  14978. }
  14979. if (p->chunked) {
  14980. e = (*v)(p->chunked, a); if (e) return e;
  14981. }
  14982. if (p->url) {
  14983. e = (*v)(p->url, a); if (e) return e;
  14984. }
  14985. return 0;
  14986. }
  14987. static int __pyx_tp_clear_7aiohttp_12_http_parser_RawRequestMessage(PyObject *o) {
  14988. PyObject* tmp;
  14989. struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *p = (struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage *)o;
  14990. tmp = ((PyObject*)p->version);
  14991. p->version = Py_None; Py_INCREF(Py_None);
  14992. Py_XDECREF(tmp);
  14993. tmp = ((PyObject*)p->headers);
  14994. p->headers = Py_None; Py_INCREF(Py_None);
  14995. Py_XDECREF(tmp);
  14996. tmp = ((PyObject*)p->raw_headers);
  14997. p->raw_headers = Py_None; Py_INCREF(Py_None);
  14998. Py_XDECREF(tmp);
  14999. tmp = ((PyObject*)p->should_close);
  15000. p->should_close = Py_None; Py_INCREF(Py_None);
  15001. Py_XDECREF(tmp);
  15002. tmp = ((PyObject*)p->compression);
  15003. p->compression = Py_None; Py_INCREF(Py_None);
  15004. Py_XDECREF(tmp);
  15005. tmp = ((PyObject*)p->upgrade);
  15006. p->upgrade = Py_None; Py_INCREF(Py_None);
  15007. Py_XDECREF(tmp);
  15008. tmp = ((PyObject*)p->chunked);
  15009. p->chunked = Py_None; Py_INCREF(Py_None);
  15010. Py_XDECREF(tmp);
  15011. tmp = ((PyObject*)p->url);
  15012. p->url = Py_None; Py_INCREF(Py_None);
  15013. Py_XDECREF(tmp);
  15014. return 0;
  15015. }
  15016. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_method(PyObject *o, CYTHON_UNUSED void *x) {
  15017. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_6method_1__get__(o);
  15018. }
  15019. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_path(PyObject *o, CYTHON_UNUSED void *x) {
  15020. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_4path_1__get__(o);
  15021. }
  15022. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_version(PyObject *o, CYTHON_UNUSED void *x) {
  15023. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7version_1__get__(o);
  15024. }
  15025. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_headers(PyObject *o, CYTHON_UNUSED void *x) {
  15026. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7headers_1__get__(o);
  15027. }
  15028. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_raw_headers(PyObject *o, CYTHON_UNUSED void *x) {
  15029. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_11raw_headers_1__get__(o);
  15030. }
  15031. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_should_close(PyObject *o, CYTHON_UNUSED void *x) {
  15032. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_12should_close_1__get__(o);
  15033. }
  15034. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_compression(PyObject *o, CYTHON_UNUSED void *x) {
  15035. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_11compression_1__get__(o);
  15036. }
  15037. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_upgrade(PyObject *o, CYTHON_UNUSED void *x) {
  15038. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7upgrade_1__get__(o);
  15039. }
  15040. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_chunked(PyObject *o, CYTHON_UNUSED void *x) {
  15041. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7chunked_1__get__(o);
  15042. }
  15043. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_url(PyObject *o, CYTHON_UNUSED void *x) {
  15044. return __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_3url_1__get__(o);
  15045. }
  15046. static PyMethodDef __pyx_methods_7aiohttp_12_http_parser_RawRequestMessage[] = {
  15047. {"_replace", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_5_replace, METH_VARARGS|METH_KEYWORDS, 0},
  15048. {"__reduce_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_7__reduce_cython__, METH_NOARGS, 0},
  15049. {"__setstate_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_9__setstate_cython__, METH_O, 0},
  15050. {0, 0, 0, 0}
  15051. };
  15052. static struct PyGetSetDef __pyx_getsets_7aiohttp_12_http_parser_RawRequestMessage[] = {
  15053. {(char *)"method", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_method, 0, (char *)0, 0},
  15054. {(char *)"path", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_path, 0, (char *)0, 0},
  15055. {(char *)"version", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_version, 0, (char *)0, 0},
  15056. {(char *)"headers", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_headers, 0, (char *)0, 0},
  15057. {(char *)"raw_headers", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_raw_headers, 0, (char *)0, 0},
  15058. {(char *)"should_close", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_should_close, 0, (char *)0, 0},
  15059. {(char *)"compression", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_compression, 0, (char *)0, 0},
  15060. {(char *)"upgrade", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_upgrade, 0, (char *)0, 0},
  15061. {(char *)"chunked", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_chunked, 0, (char *)0, 0},
  15062. {(char *)"url", __pyx_getprop_7aiohttp_12_http_parser_17RawRequestMessage_url, 0, (char *)0, 0},
  15063. {0, 0, 0, 0, 0}
  15064. };
  15065. static PyTypeObject __pyx_type_7aiohttp_12_http_parser_RawRequestMessage = {
  15066. PyVarObject_HEAD_INIT(0, 0)
  15067. "aiohttp._http_parser.RawRequestMessage", /*tp_name*/
  15068. sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawRequestMessage), /*tp_basicsize*/
  15069. 0, /*tp_itemsize*/
  15070. __pyx_tp_dealloc_7aiohttp_12_http_parser_RawRequestMessage, /*tp_dealloc*/
  15071. 0, /*tp_print*/
  15072. 0, /*tp_getattr*/
  15073. 0, /*tp_setattr*/
  15074. #if PY_MAJOR_VERSION < 3
  15075. 0, /*tp_compare*/
  15076. #endif
  15077. #if PY_MAJOR_VERSION >= 3
  15078. 0, /*tp_as_async*/
  15079. #endif
  15080. __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_3__repr__, /*tp_repr*/
  15081. 0, /*tp_as_number*/
  15082. 0, /*tp_as_sequence*/
  15083. 0, /*tp_as_mapping*/
  15084. 0, /*tp_hash*/
  15085. 0, /*tp_call*/
  15086. 0, /*tp_str*/
  15087. 0, /*tp_getattro*/
  15088. 0, /*tp_setattro*/
  15089. 0, /*tp_as_buffer*/
  15090. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15091. 0, /*tp_doc*/
  15092. __pyx_tp_traverse_7aiohttp_12_http_parser_RawRequestMessage, /*tp_traverse*/
  15093. __pyx_tp_clear_7aiohttp_12_http_parser_RawRequestMessage, /*tp_clear*/
  15094. 0, /*tp_richcompare*/
  15095. 0, /*tp_weaklistoffset*/
  15096. 0, /*tp_iter*/
  15097. 0, /*tp_iternext*/
  15098. __pyx_methods_7aiohttp_12_http_parser_RawRequestMessage, /*tp_methods*/
  15099. 0, /*tp_members*/
  15100. __pyx_getsets_7aiohttp_12_http_parser_RawRequestMessage, /*tp_getset*/
  15101. 0, /*tp_base*/
  15102. 0, /*tp_dict*/
  15103. 0, /*tp_descr_get*/
  15104. 0, /*tp_descr_set*/
  15105. 0, /*tp_dictoffset*/
  15106. __pyx_pw_7aiohttp_12_http_parser_17RawRequestMessage_1__init__, /*tp_init*/
  15107. 0, /*tp_alloc*/
  15108. __pyx_tp_new_7aiohttp_12_http_parser_RawRequestMessage, /*tp_new*/
  15109. 0, /*tp_free*/
  15110. 0, /*tp_is_gc*/
  15111. 0, /*tp_bases*/
  15112. 0, /*tp_mro*/
  15113. 0, /*tp_cache*/
  15114. 0, /*tp_subclasses*/
  15115. 0, /*tp_weaklist*/
  15116. 0, /*tp_del*/
  15117. 0, /*tp_version_tag*/
  15118. #if PY_VERSION_HEX >= 0x030400a1
  15119. 0, /*tp_finalize*/
  15120. #endif
  15121. };
  15122. static struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *__pyx_freelist_7aiohttp_12_http_parser_RawResponseMessage[250];
  15123. static int __pyx_freecount_7aiohttp_12_http_parser_RawResponseMessage = 0;
  15124. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_RawResponseMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  15125. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *p;
  15126. PyObject *o;
  15127. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7aiohttp_12_http_parser_RawResponseMessage > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage)) & ((t->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  15128. o = (PyObject*)__pyx_freelist_7aiohttp_12_http_parser_RawResponseMessage[--__pyx_freecount_7aiohttp_12_http_parser_RawResponseMessage];
  15129. memset(o, 0, sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage));
  15130. (void) PyObject_INIT(o, t);
  15131. PyObject_GC_Track(o);
  15132. } else {
  15133. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  15134. o = (*t->tp_alloc)(t, 0);
  15135. } else {
  15136. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  15137. }
  15138. if (unlikely(!o)) return 0;
  15139. }
  15140. p = ((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)o);
  15141. p->version = Py_None; Py_INCREF(Py_None);
  15142. p->reason = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15143. p->headers = Py_None; Py_INCREF(Py_None);
  15144. p->raw_headers = Py_None; Py_INCREF(Py_None);
  15145. p->should_close = Py_None; Py_INCREF(Py_None);
  15146. p->compression = Py_None; Py_INCREF(Py_None);
  15147. p->upgrade = Py_None; Py_INCREF(Py_None);
  15148. p->chunked = Py_None; Py_INCREF(Py_None);
  15149. return o;
  15150. }
  15151. static void __pyx_tp_dealloc_7aiohttp_12_http_parser_RawResponseMessage(PyObject *o) {
  15152. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *p = (struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)o;
  15153. #if CYTHON_USE_TP_FINALIZE
  15154. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  15155. if (PyObject_CallFinalizerFromDealloc(o)) return;
  15156. }
  15157. #endif
  15158. PyObject_GC_UnTrack(o);
  15159. Py_CLEAR(p->version);
  15160. Py_CLEAR(p->reason);
  15161. Py_CLEAR(p->headers);
  15162. Py_CLEAR(p->raw_headers);
  15163. Py_CLEAR(p->should_close);
  15164. Py_CLEAR(p->compression);
  15165. Py_CLEAR(p->upgrade);
  15166. Py_CLEAR(p->chunked);
  15167. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7aiohttp_12_http_parser_RawResponseMessage < 250) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage)) & ((Py_TYPE(o)->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)) == 0))) {
  15168. __pyx_freelist_7aiohttp_12_http_parser_RawResponseMessage[__pyx_freecount_7aiohttp_12_http_parser_RawResponseMessage++] = ((struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)o);
  15169. } else {
  15170. (*Py_TYPE(o)->tp_free)(o);
  15171. }
  15172. }
  15173. static int __pyx_tp_traverse_7aiohttp_12_http_parser_RawResponseMessage(PyObject *o, visitproc v, void *a) {
  15174. int e;
  15175. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *p = (struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)o;
  15176. if (p->version) {
  15177. e = (*v)(p->version, a); if (e) return e;
  15178. }
  15179. if (p->headers) {
  15180. e = (*v)(p->headers, a); if (e) return e;
  15181. }
  15182. if (p->raw_headers) {
  15183. e = (*v)(p->raw_headers, a); if (e) return e;
  15184. }
  15185. if (p->should_close) {
  15186. e = (*v)(p->should_close, a); if (e) return e;
  15187. }
  15188. if (p->compression) {
  15189. e = (*v)(p->compression, a); if (e) return e;
  15190. }
  15191. if (p->upgrade) {
  15192. e = (*v)(p->upgrade, a); if (e) return e;
  15193. }
  15194. if (p->chunked) {
  15195. e = (*v)(p->chunked, a); if (e) return e;
  15196. }
  15197. return 0;
  15198. }
  15199. static int __pyx_tp_clear_7aiohttp_12_http_parser_RawResponseMessage(PyObject *o) {
  15200. PyObject* tmp;
  15201. struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *p = (struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage *)o;
  15202. tmp = ((PyObject*)p->version);
  15203. p->version = Py_None; Py_INCREF(Py_None);
  15204. Py_XDECREF(tmp);
  15205. tmp = ((PyObject*)p->headers);
  15206. p->headers = Py_None; Py_INCREF(Py_None);
  15207. Py_XDECREF(tmp);
  15208. tmp = ((PyObject*)p->raw_headers);
  15209. p->raw_headers = Py_None; Py_INCREF(Py_None);
  15210. Py_XDECREF(tmp);
  15211. tmp = ((PyObject*)p->should_close);
  15212. p->should_close = Py_None; Py_INCREF(Py_None);
  15213. Py_XDECREF(tmp);
  15214. tmp = ((PyObject*)p->compression);
  15215. p->compression = Py_None; Py_INCREF(Py_None);
  15216. Py_XDECREF(tmp);
  15217. tmp = ((PyObject*)p->upgrade);
  15218. p->upgrade = Py_None; Py_INCREF(Py_None);
  15219. Py_XDECREF(tmp);
  15220. tmp = ((PyObject*)p->chunked);
  15221. p->chunked = Py_None; Py_INCREF(Py_None);
  15222. Py_XDECREF(tmp);
  15223. return 0;
  15224. }
  15225. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_version(PyObject *o, CYTHON_UNUSED void *x) {
  15226. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7version_1__get__(o);
  15227. }
  15228. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_code(PyObject *o, CYTHON_UNUSED void *x) {
  15229. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_4code_1__get__(o);
  15230. }
  15231. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_reason(PyObject *o, CYTHON_UNUSED void *x) {
  15232. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_6reason_1__get__(o);
  15233. }
  15234. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_headers(PyObject *o, CYTHON_UNUSED void *x) {
  15235. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7headers_1__get__(o);
  15236. }
  15237. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_raw_headers(PyObject *o, CYTHON_UNUSED void *x) {
  15238. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_11raw_headers_1__get__(o);
  15239. }
  15240. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_should_close(PyObject *o, CYTHON_UNUSED void *x) {
  15241. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_12should_close_1__get__(o);
  15242. }
  15243. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_compression(PyObject *o, CYTHON_UNUSED void *x) {
  15244. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_11compression_1__get__(o);
  15245. }
  15246. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_upgrade(PyObject *o, CYTHON_UNUSED void *x) {
  15247. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7upgrade_1__get__(o);
  15248. }
  15249. static PyObject *__pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_chunked(PyObject *o, CYTHON_UNUSED void *x) {
  15250. return __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7chunked_1__get__(o);
  15251. }
  15252. static PyMethodDef __pyx_methods_7aiohttp_12_http_parser_RawResponseMessage[] = {
  15253. {"__reduce_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_5__reduce_cython__, METH_NOARGS, 0},
  15254. {"__setstate_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_7__setstate_cython__, METH_O, 0},
  15255. {0, 0, 0, 0}
  15256. };
  15257. static struct PyGetSetDef __pyx_getsets_7aiohttp_12_http_parser_RawResponseMessage[] = {
  15258. {(char *)"version", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_version, 0, (char *)0, 0},
  15259. {(char *)"code", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_code, 0, (char *)0, 0},
  15260. {(char *)"reason", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_reason, 0, (char *)0, 0},
  15261. {(char *)"headers", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_headers, 0, (char *)0, 0},
  15262. {(char *)"raw_headers", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_raw_headers, 0, (char *)0, 0},
  15263. {(char *)"should_close", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_should_close, 0, (char *)0, 0},
  15264. {(char *)"compression", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_compression, 0, (char *)0, 0},
  15265. {(char *)"upgrade", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_upgrade, 0, (char *)0, 0},
  15266. {(char *)"chunked", __pyx_getprop_7aiohttp_12_http_parser_18RawResponseMessage_chunked, 0, (char *)0, 0},
  15267. {0, 0, 0, 0, 0}
  15268. };
  15269. static PyTypeObject __pyx_type_7aiohttp_12_http_parser_RawResponseMessage = {
  15270. PyVarObject_HEAD_INIT(0, 0)
  15271. "aiohttp._http_parser.RawResponseMessage", /*tp_name*/
  15272. sizeof(struct __pyx_obj_7aiohttp_12_http_parser_RawResponseMessage), /*tp_basicsize*/
  15273. 0, /*tp_itemsize*/
  15274. __pyx_tp_dealloc_7aiohttp_12_http_parser_RawResponseMessage, /*tp_dealloc*/
  15275. 0, /*tp_print*/
  15276. 0, /*tp_getattr*/
  15277. 0, /*tp_setattr*/
  15278. #if PY_MAJOR_VERSION < 3
  15279. 0, /*tp_compare*/
  15280. #endif
  15281. #if PY_MAJOR_VERSION >= 3
  15282. 0, /*tp_as_async*/
  15283. #endif
  15284. __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_3__repr__, /*tp_repr*/
  15285. 0, /*tp_as_number*/
  15286. 0, /*tp_as_sequence*/
  15287. 0, /*tp_as_mapping*/
  15288. 0, /*tp_hash*/
  15289. 0, /*tp_call*/
  15290. 0, /*tp_str*/
  15291. 0, /*tp_getattro*/
  15292. 0, /*tp_setattro*/
  15293. 0, /*tp_as_buffer*/
  15294. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15295. 0, /*tp_doc*/
  15296. __pyx_tp_traverse_7aiohttp_12_http_parser_RawResponseMessage, /*tp_traverse*/
  15297. __pyx_tp_clear_7aiohttp_12_http_parser_RawResponseMessage, /*tp_clear*/
  15298. 0, /*tp_richcompare*/
  15299. 0, /*tp_weaklistoffset*/
  15300. 0, /*tp_iter*/
  15301. 0, /*tp_iternext*/
  15302. __pyx_methods_7aiohttp_12_http_parser_RawResponseMessage, /*tp_methods*/
  15303. 0, /*tp_members*/
  15304. __pyx_getsets_7aiohttp_12_http_parser_RawResponseMessage, /*tp_getset*/
  15305. 0, /*tp_base*/
  15306. 0, /*tp_dict*/
  15307. 0, /*tp_descr_get*/
  15308. 0, /*tp_descr_set*/
  15309. 0, /*tp_dictoffset*/
  15310. __pyx_pw_7aiohttp_12_http_parser_18RawResponseMessage_1__init__, /*tp_init*/
  15311. 0, /*tp_alloc*/
  15312. __pyx_tp_new_7aiohttp_12_http_parser_RawResponseMessage, /*tp_new*/
  15313. 0, /*tp_free*/
  15314. 0, /*tp_is_gc*/
  15315. 0, /*tp_bases*/
  15316. 0, /*tp_mro*/
  15317. 0, /*tp_cache*/
  15318. 0, /*tp_subclasses*/
  15319. 0, /*tp_weaklist*/
  15320. 0, /*tp_del*/
  15321. 0, /*tp_version_tag*/
  15322. #if PY_VERSION_HEX >= 0x030400a1
  15323. 0, /*tp_finalize*/
  15324. #endif
  15325. };
  15326. static struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser __pyx_vtable_7aiohttp_12_http_parser_HttpParser;
  15327. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_HttpParser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  15328. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *p;
  15329. PyObject *o;
  15330. if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
  15331. o = (*t->tp_alloc)(t, 0);
  15332. } else {
  15333. o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  15334. }
  15335. if (unlikely(!o)) return 0;
  15336. p = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)o);
  15337. p->__pyx_vtab = __pyx_vtabptr_7aiohttp_12_http_parser_HttpParser;
  15338. p->_raw_name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15339. p->_raw_value = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15340. p->_protocol = Py_None; Py_INCREF(Py_None);
  15341. p->_loop = Py_None; Py_INCREF(Py_None);
  15342. p->_timer = Py_None; Py_INCREF(Py_None);
  15343. p->_url = Py_None; Py_INCREF(Py_None);
  15344. p->_buf = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15345. p->_path = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15346. p->_reason = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15347. p->_headers = Py_None; Py_INCREF(Py_None);
  15348. p->_raw_headers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15349. p->_messages = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15350. p->_payload = Py_None; Py_INCREF(Py_None);
  15351. p->_payload_exception = Py_None; Py_INCREF(Py_None);
  15352. p->_last_error = Py_None; Py_INCREF(Py_None);
  15353. p->_content_encoding = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15354. p->py_buf.obj = NULL;
  15355. if (unlikely(__pyx_pw_7aiohttp_12_http_parser_10HttpParser_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  15356. return o;
  15357. bad:
  15358. Py_DECREF(o); o = 0;
  15359. return NULL;
  15360. }
  15361. static void __pyx_tp_dealloc_7aiohttp_12_http_parser_HttpParser(PyObject *o) {
  15362. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *p = (struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)o;
  15363. #if CYTHON_USE_TP_FINALIZE
  15364. if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
  15365. if (PyObject_CallFinalizerFromDealloc(o)) return;
  15366. }
  15367. #endif
  15368. PyObject_GC_UnTrack(o);
  15369. {
  15370. PyObject *etype, *eval, *etb;
  15371. PyErr_Fetch(&etype, &eval, &etb);
  15372. ++Py_REFCNT(o);
  15373. __pyx_pw_7aiohttp_12_http_parser_10HttpParser_3__dealloc__(o);
  15374. --Py_REFCNT(o);
  15375. PyErr_Restore(etype, eval, etb);
  15376. }
  15377. Py_CLEAR(p->_raw_name);
  15378. Py_CLEAR(p->_raw_value);
  15379. Py_CLEAR(p->_protocol);
  15380. Py_CLEAR(p->_loop);
  15381. Py_CLEAR(p->_timer);
  15382. Py_CLEAR(p->_url);
  15383. Py_CLEAR(p->_buf);
  15384. Py_CLEAR(p->_path);
  15385. Py_CLEAR(p->_reason);
  15386. Py_CLEAR(p->_headers);
  15387. Py_CLEAR(p->_raw_headers);
  15388. Py_CLEAR(p->_messages);
  15389. Py_CLEAR(p->_payload);
  15390. Py_CLEAR(p->_payload_exception);
  15391. Py_CLEAR(p->_last_error);
  15392. Py_CLEAR(p->_content_encoding);
  15393. (*Py_TYPE(o)->tp_free)(o);
  15394. }
  15395. static int __pyx_tp_traverse_7aiohttp_12_http_parser_HttpParser(PyObject *o, visitproc v, void *a) {
  15396. int e;
  15397. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *p = (struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)o;
  15398. if (p->_protocol) {
  15399. e = (*v)(p->_protocol, a); if (e) return e;
  15400. }
  15401. if (p->_loop) {
  15402. e = (*v)(p->_loop, a); if (e) return e;
  15403. }
  15404. if (p->_timer) {
  15405. e = (*v)(p->_timer, a); if (e) return e;
  15406. }
  15407. if (p->_url) {
  15408. e = (*v)(p->_url, a); if (e) return e;
  15409. }
  15410. if (p->_headers) {
  15411. e = (*v)(p->_headers, a); if (e) return e;
  15412. }
  15413. if (p->_raw_headers) {
  15414. e = (*v)(p->_raw_headers, a); if (e) return e;
  15415. }
  15416. if (p->_messages) {
  15417. e = (*v)(p->_messages, a); if (e) return e;
  15418. }
  15419. if (p->_payload) {
  15420. e = (*v)(p->_payload, a); if (e) return e;
  15421. }
  15422. if (p->_payload_exception) {
  15423. e = (*v)(p->_payload_exception, a); if (e) return e;
  15424. }
  15425. if (p->_last_error) {
  15426. e = (*v)(p->_last_error, a); if (e) return e;
  15427. }
  15428. if (p->py_buf.obj) {
  15429. e = (*v)(p->py_buf.obj, a); if (e) return e;
  15430. }
  15431. return 0;
  15432. }
  15433. static int __pyx_tp_clear_7aiohttp_12_http_parser_HttpParser(PyObject *o) {
  15434. PyObject* tmp;
  15435. struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *p = (struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *)o;
  15436. tmp = ((PyObject*)p->_protocol);
  15437. p->_protocol = Py_None; Py_INCREF(Py_None);
  15438. Py_XDECREF(tmp);
  15439. tmp = ((PyObject*)p->_loop);
  15440. p->_loop = Py_None; Py_INCREF(Py_None);
  15441. Py_XDECREF(tmp);
  15442. tmp = ((PyObject*)p->_timer);
  15443. p->_timer = Py_None; Py_INCREF(Py_None);
  15444. Py_XDECREF(tmp);
  15445. tmp = ((PyObject*)p->_url);
  15446. p->_url = Py_None; Py_INCREF(Py_None);
  15447. Py_XDECREF(tmp);
  15448. tmp = ((PyObject*)p->_headers);
  15449. p->_headers = Py_None; Py_INCREF(Py_None);
  15450. Py_XDECREF(tmp);
  15451. tmp = ((PyObject*)p->_raw_headers);
  15452. p->_raw_headers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15453. Py_XDECREF(tmp);
  15454. tmp = ((PyObject*)p->_messages);
  15455. p->_messages = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15456. Py_XDECREF(tmp);
  15457. tmp = ((PyObject*)p->_payload);
  15458. p->_payload = Py_None; Py_INCREF(Py_None);
  15459. Py_XDECREF(tmp);
  15460. tmp = ((PyObject*)p->_payload_exception);
  15461. p->_payload_exception = Py_None; Py_INCREF(Py_None);
  15462. Py_XDECREF(tmp);
  15463. tmp = ((PyObject*)p->_last_error);
  15464. p->_last_error = Py_None; Py_INCREF(Py_None);
  15465. Py_XDECREF(tmp);
  15466. Py_CLEAR(p->py_buf.obj);
  15467. return 0;
  15468. }
  15469. static PyMethodDef __pyx_methods_7aiohttp_12_http_parser_HttpParser[] = {
  15470. {"feed_eof", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_10HttpParser_5feed_eof, METH_NOARGS, 0},
  15471. {"feed_data", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_10HttpParser_7feed_data, METH_O, 0},
  15472. {"__reduce_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_10HttpParser_9__reduce_cython__, METH_NOARGS, 0},
  15473. {"__setstate_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_10HttpParser_11__setstate_cython__, METH_O, 0},
  15474. {0, 0, 0, 0}
  15475. };
  15476. static PyTypeObject __pyx_type_7aiohttp_12_http_parser_HttpParser = {
  15477. PyVarObject_HEAD_INIT(0, 0)
  15478. "aiohttp._http_parser.HttpParser", /*tp_name*/
  15479. sizeof(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser), /*tp_basicsize*/
  15480. 0, /*tp_itemsize*/
  15481. __pyx_tp_dealloc_7aiohttp_12_http_parser_HttpParser, /*tp_dealloc*/
  15482. 0, /*tp_print*/
  15483. 0, /*tp_getattr*/
  15484. 0, /*tp_setattr*/
  15485. #if PY_MAJOR_VERSION < 3
  15486. 0, /*tp_compare*/
  15487. #endif
  15488. #if PY_MAJOR_VERSION >= 3
  15489. 0, /*tp_as_async*/
  15490. #endif
  15491. 0, /*tp_repr*/
  15492. 0, /*tp_as_number*/
  15493. 0, /*tp_as_sequence*/
  15494. 0, /*tp_as_mapping*/
  15495. 0, /*tp_hash*/
  15496. 0, /*tp_call*/
  15497. 0, /*tp_str*/
  15498. 0, /*tp_getattro*/
  15499. 0, /*tp_setattro*/
  15500. 0, /*tp_as_buffer*/
  15501. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15502. 0, /*tp_doc*/
  15503. __pyx_tp_traverse_7aiohttp_12_http_parser_HttpParser, /*tp_traverse*/
  15504. __pyx_tp_clear_7aiohttp_12_http_parser_HttpParser, /*tp_clear*/
  15505. 0, /*tp_richcompare*/
  15506. 0, /*tp_weaklistoffset*/
  15507. 0, /*tp_iter*/
  15508. 0, /*tp_iternext*/
  15509. __pyx_methods_7aiohttp_12_http_parser_HttpParser, /*tp_methods*/
  15510. 0, /*tp_members*/
  15511. 0, /*tp_getset*/
  15512. 0, /*tp_base*/
  15513. 0, /*tp_dict*/
  15514. 0, /*tp_descr_get*/
  15515. 0, /*tp_descr_set*/
  15516. 0, /*tp_dictoffset*/
  15517. 0, /*tp_init*/
  15518. 0, /*tp_alloc*/
  15519. __pyx_tp_new_7aiohttp_12_http_parser_HttpParser, /*tp_new*/
  15520. 0, /*tp_free*/
  15521. 0, /*tp_is_gc*/
  15522. 0, /*tp_bases*/
  15523. 0, /*tp_mro*/
  15524. 0, /*tp_cache*/
  15525. 0, /*tp_subclasses*/
  15526. 0, /*tp_weaklist*/
  15527. 0, /*tp_del*/
  15528. 0, /*tp_version_tag*/
  15529. #if PY_VERSION_HEX >= 0x030400a1
  15530. 0, /*tp_finalize*/
  15531. #endif
  15532. };
  15533. static struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpRequestParser __pyx_vtable_7aiohttp_12_http_parser_HttpRequestParser;
  15534. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_HttpRequestParser(PyTypeObject *t, PyObject *a, PyObject *k) {
  15535. struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *p;
  15536. PyObject *o = __pyx_tp_new_7aiohttp_12_http_parser_HttpParser(t, a, k);
  15537. if (unlikely(!o)) return 0;
  15538. p = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser *)o);
  15539. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser*)__pyx_vtabptr_7aiohttp_12_http_parser_HttpRequestParser;
  15540. return o;
  15541. }
  15542. static PyMethodDef __pyx_methods_7aiohttp_12_http_parser_HttpRequestParser[] = {
  15543. {"__reduce_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_3__reduce_cython__, METH_NOARGS, 0},
  15544. {"__setstate_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_5__setstate_cython__, METH_O, 0},
  15545. {0, 0, 0, 0}
  15546. };
  15547. static PyTypeObject __pyx_type_7aiohttp_12_http_parser_HttpRequestParser = {
  15548. PyVarObject_HEAD_INIT(0, 0)
  15549. "aiohttp._http_parser.HttpRequestParser", /*tp_name*/
  15550. sizeof(struct __pyx_obj_7aiohttp_12_http_parser_HttpRequestParser), /*tp_basicsize*/
  15551. 0, /*tp_itemsize*/
  15552. __pyx_tp_dealloc_7aiohttp_12_http_parser_HttpParser, /*tp_dealloc*/
  15553. 0, /*tp_print*/
  15554. 0, /*tp_getattr*/
  15555. 0, /*tp_setattr*/
  15556. #if PY_MAJOR_VERSION < 3
  15557. 0, /*tp_compare*/
  15558. #endif
  15559. #if PY_MAJOR_VERSION >= 3
  15560. 0, /*tp_as_async*/
  15561. #endif
  15562. 0, /*tp_repr*/
  15563. 0, /*tp_as_number*/
  15564. 0, /*tp_as_sequence*/
  15565. 0, /*tp_as_mapping*/
  15566. 0, /*tp_hash*/
  15567. 0, /*tp_call*/
  15568. 0, /*tp_str*/
  15569. 0, /*tp_getattro*/
  15570. 0, /*tp_setattro*/
  15571. 0, /*tp_as_buffer*/
  15572. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15573. 0, /*tp_doc*/
  15574. __pyx_tp_traverse_7aiohttp_12_http_parser_HttpParser, /*tp_traverse*/
  15575. __pyx_tp_clear_7aiohttp_12_http_parser_HttpParser, /*tp_clear*/
  15576. 0, /*tp_richcompare*/
  15577. 0, /*tp_weaklistoffset*/
  15578. 0, /*tp_iter*/
  15579. 0, /*tp_iternext*/
  15580. __pyx_methods_7aiohttp_12_http_parser_HttpRequestParser, /*tp_methods*/
  15581. 0, /*tp_members*/
  15582. 0, /*tp_getset*/
  15583. 0, /*tp_base*/
  15584. 0, /*tp_dict*/
  15585. 0, /*tp_descr_get*/
  15586. 0, /*tp_descr_set*/
  15587. 0, /*tp_dictoffset*/
  15588. __pyx_pw_7aiohttp_12_http_parser_17HttpRequestParser_1__init__, /*tp_init*/
  15589. 0, /*tp_alloc*/
  15590. __pyx_tp_new_7aiohttp_12_http_parser_HttpRequestParser, /*tp_new*/
  15591. 0, /*tp_free*/
  15592. 0, /*tp_is_gc*/
  15593. 0, /*tp_bases*/
  15594. 0, /*tp_mro*/
  15595. 0, /*tp_cache*/
  15596. 0, /*tp_subclasses*/
  15597. 0, /*tp_weaklist*/
  15598. 0, /*tp_del*/
  15599. 0, /*tp_version_tag*/
  15600. #if PY_VERSION_HEX >= 0x030400a1
  15601. 0, /*tp_finalize*/
  15602. #endif
  15603. };
  15604. static struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpResponseParser __pyx_vtable_7aiohttp_12_http_parser_HttpResponseParser;
  15605. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser_HttpResponseParser(PyTypeObject *t, PyObject *a, PyObject *k) {
  15606. struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *p;
  15607. PyObject *o = __pyx_tp_new_7aiohttp_12_http_parser_HttpParser(t, a, k);
  15608. if (unlikely(!o)) return 0;
  15609. p = ((struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser *)o);
  15610. p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_7aiohttp_12_http_parser_HttpParser*)__pyx_vtabptr_7aiohttp_12_http_parser_HttpResponseParser;
  15611. return o;
  15612. }
  15613. static PyMethodDef __pyx_methods_7aiohttp_12_http_parser_HttpResponseParser[] = {
  15614. {"__reduce_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_3__reduce_cython__, METH_NOARGS, 0},
  15615. {"__setstate_cython__", (PyCFunction)__pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_5__setstate_cython__, METH_O, 0},
  15616. {0, 0, 0, 0}
  15617. };
  15618. static PyTypeObject __pyx_type_7aiohttp_12_http_parser_HttpResponseParser = {
  15619. PyVarObject_HEAD_INIT(0, 0)
  15620. "aiohttp._http_parser.HttpResponseParser", /*tp_name*/
  15621. sizeof(struct __pyx_obj_7aiohttp_12_http_parser_HttpResponseParser), /*tp_basicsize*/
  15622. 0, /*tp_itemsize*/
  15623. __pyx_tp_dealloc_7aiohttp_12_http_parser_HttpParser, /*tp_dealloc*/
  15624. 0, /*tp_print*/
  15625. 0, /*tp_getattr*/
  15626. 0, /*tp_setattr*/
  15627. #if PY_MAJOR_VERSION < 3
  15628. 0, /*tp_compare*/
  15629. #endif
  15630. #if PY_MAJOR_VERSION >= 3
  15631. 0, /*tp_as_async*/
  15632. #endif
  15633. 0, /*tp_repr*/
  15634. 0, /*tp_as_number*/
  15635. 0, /*tp_as_sequence*/
  15636. 0, /*tp_as_mapping*/
  15637. 0, /*tp_hash*/
  15638. 0, /*tp_call*/
  15639. 0, /*tp_str*/
  15640. 0, /*tp_getattro*/
  15641. 0, /*tp_setattro*/
  15642. 0, /*tp_as_buffer*/
  15643. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15644. 0, /*tp_doc*/
  15645. __pyx_tp_traverse_7aiohttp_12_http_parser_HttpParser, /*tp_traverse*/
  15646. __pyx_tp_clear_7aiohttp_12_http_parser_HttpParser, /*tp_clear*/
  15647. 0, /*tp_richcompare*/
  15648. 0, /*tp_weaklistoffset*/
  15649. 0, /*tp_iter*/
  15650. 0, /*tp_iternext*/
  15651. __pyx_methods_7aiohttp_12_http_parser_HttpResponseParser, /*tp_methods*/
  15652. 0, /*tp_members*/
  15653. 0, /*tp_getset*/
  15654. 0, /*tp_base*/
  15655. 0, /*tp_dict*/
  15656. 0, /*tp_descr_get*/
  15657. 0, /*tp_descr_set*/
  15658. 0, /*tp_dictoffset*/
  15659. __pyx_pw_7aiohttp_12_http_parser_18HttpResponseParser_1__init__, /*tp_init*/
  15660. 0, /*tp_alloc*/
  15661. __pyx_tp_new_7aiohttp_12_http_parser_HttpResponseParser, /*tp_new*/
  15662. 0, /*tp_free*/
  15663. 0, /*tp_is_gc*/
  15664. 0, /*tp_bases*/
  15665. 0, /*tp_mro*/
  15666. 0, /*tp_cache*/
  15667. 0, /*tp_subclasses*/
  15668. 0, /*tp_weaklist*/
  15669. 0, /*tp_del*/
  15670. 0, /*tp_version_tag*/
  15671. #if PY_VERSION_HEX >= 0x030400a1
  15672. 0, /*tp_finalize*/
  15673. #endif
  15674. };
  15675. static struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct____repr__[8];
  15676. static int __pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct____repr__ = 0;
  15677. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct____repr__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  15678. PyObject *o;
  15679. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct____repr__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__)))) {
  15680. o = (PyObject*)__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct____repr__[--__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct____repr__];
  15681. memset(o, 0, sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__));
  15682. (void) PyObject_INIT(o, t);
  15683. PyObject_GC_Track(o);
  15684. } else {
  15685. o = (*t->tp_alloc)(t, 0);
  15686. if (unlikely(!o)) return 0;
  15687. }
  15688. return o;
  15689. }
  15690. static void __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct____repr__(PyObject *o) {
  15691. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *)o;
  15692. PyObject_GC_UnTrack(o);
  15693. Py_CLEAR(p->__pyx_v_info);
  15694. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct____repr__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__)))) {
  15695. __pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct____repr__[__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct____repr__++] = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *)o);
  15696. } else {
  15697. (*Py_TYPE(o)->tp_free)(o);
  15698. }
  15699. }
  15700. static int __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct____repr__(PyObject *o, visitproc v, void *a) {
  15701. int e;
  15702. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *)o;
  15703. if (p->__pyx_v_info) {
  15704. e = (*v)(p->__pyx_v_info, a); if (e) return e;
  15705. }
  15706. return 0;
  15707. }
  15708. static int __pyx_tp_clear_7aiohttp_12_http_parser___pyx_scope_struct____repr__(PyObject *o) {
  15709. PyObject* tmp;
  15710. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__ *)o;
  15711. tmp = ((PyObject*)p->__pyx_v_info);
  15712. p->__pyx_v_info = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15713. Py_XDECREF(tmp);
  15714. return 0;
  15715. }
  15716. static PyTypeObject __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__ = {
  15717. PyVarObject_HEAD_INIT(0, 0)
  15718. "aiohttp._http_parser.__pyx_scope_struct____repr__", /*tp_name*/
  15719. sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct____repr__), /*tp_basicsize*/
  15720. 0, /*tp_itemsize*/
  15721. __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct____repr__, /*tp_dealloc*/
  15722. 0, /*tp_print*/
  15723. 0, /*tp_getattr*/
  15724. 0, /*tp_setattr*/
  15725. #if PY_MAJOR_VERSION < 3
  15726. 0, /*tp_compare*/
  15727. #endif
  15728. #if PY_MAJOR_VERSION >= 3
  15729. 0, /*tp_as_async*/
  15730. #endif
  15731. 0, /*tp_repr*/
  15732. 0, /*tp_as_number*/
  15733. 0, /*tp_as_sequence*/
  15734. 0, /*tp_as_mapping*/
  15735. 0, /*tp_hash*/
  15736. 0, /*tp_call*/
  15737. 0, /*tp_str*/
  15738. 0, /*tp_getattro*/
  15739. 0, /*tp_setattro*/
  15740. 0, /*tp_as_buffer*/
  15741. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15742. 0, /*tp_doc*/
  15743. __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct____repr__, /*tp_traverse*/
  15744. __pyx_tp_clear_7aiohttp_12_http_parser___pyx_scope_struct____repr__, /*tp_clear*/
  15745. 0, /*tp_richcompare*/
  15746. 0, /*tp_weaklistoffset*/
  15747. 0, /*tp_iter*/
  15748. 0, /*tp_iternext*/
  15749. 0, /*tp_methods*/
  15750. 0, /*tp_members*/
  15751. 0, /*tp_getset*/
  15752. 0, /*tp_base*/
  15753. 0, /*tp_dict*/
  15754. 0, /*tp_descr_get*/
  15755. 0, /*tp_descr_set*/
  15756. 0, /*tp_dictoffset*/
  15757. 0, /*tp_init*/
  15758. 0, /*tp_alloc*/
  15759. __pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct____repr__, /*tp_new*/
  15760. 0, /*tp_free*/
  15761. 0, /*tp_is_gc*/
  15762. 0, /*tp_bases*/
  15763. 0, /*tp_mro*/
  15764. 0, /*tp_cache*/
  15765. 0, /*tp_subclasses*/
  15766. 0, /*tp_weaklist*/
  15767. 0, /*tp_del*/
  15768. 0, /*tp_version_tag*/
  15769. #if PY_VERSION_HEX >= 0x030400a1
  15770. 0, /*tp_finalize*/
  15771. #endif
  15772. };
  15773. static struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr[8];
  15774. static int __pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr = 0;
  15775. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  15776. PyObject *o;
  15777. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr)))) {
  15778. o = (PyObject*)__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr[--__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr];
  15779. memset(o, 0, sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr));
  15780. (void) PyObject_INIT(o, t);
  15781. PyObject_GC_Track(o);
  15782. } else {
  15783. o = (*t->tp_alloc)(t, 0);
  15784. if (unlikely(!o)) return 0;
  15785. }
  15786. return o;
  15787. }
  15788. static void __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr(PyObject *o) {
  15789. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *)o;
  15790. PyObject_GC_UnTrack(o);
  15791. Py_CLEAR(p->__pyx_outer_scope);
  15792. Py_CLEAR(p->__pyx_v_name);
  15793. Py_CLEAR(p->__pyx_v_val);
  15794. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr)))) {
  15795. __pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr[__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *)o);
  15796. } else {
  15797. (*Py_TYPE(o)->tp_free)(o);
  15798. }
  15799. }
  15800. static int __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
  15801. int e;
  15802. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr *)o;
  15803. if (p->__pyx_outer_scope) {
  15804. e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  15805. }
  15806. if (p->__pyx_v_name) {
  15807. e = (*v)(p->__pyx_v_name, a); if (e) return e;
  15808. }
  15809. if (p->__pyx_v_val) {
  15810. e = (*v)(p->__pyx_v_val, a); if (e) return e;
  15811. }
  15812. return 0;
  15813. }
  15814. static PyTypeObject __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr = {
  15815. PyVarObject_HEAD_INIT(0, 0)
  15816. "aiohttp._http_parser.__pyx_scope_struct_1_genexpr", /*tp_name*/
  15817. sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
  15818. 0, /*tp_itemsize*/
  15819. __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
  15820. 0, /*tp_print*/
  15821. 0, /*tp_getattr*/
  15822. 0, /*tp_setattr*/
  15823. #if PY_MAJOR_VERSION < 3
  15824. 0, /*tp_compare*/
  15825. #endif
  15826. #if PY_MAJOR_VERSION >= 3
  15827. 0, /*tp_as_async*/
  15828. #endif
  15829. 0, /*tp_repr*/
  15830. 0, /*tp_as_number*/
  15831. 0, /*tp_as_sequence*/
  15832. 0, /*tp_as_mapping*/
  15833. 0, /*tp_hash*/
  15834. 0, /*tp_call*/
  15835. 0, /*tp_str*/
  15836. 0, /*tp_getattro*/
  15837. 0, /*tp_setattro*/
  15838. 0, /*tp_as_buffer*/
  15839. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15840. 0, /*tp_doc*/
  15841. __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr, /*tp_traverse*/
  15842. 0, /*tp_clear*/
  15843. 0, /*tp_richcompare*/
  15844. 0, /*tp_weaklistoffset*/
  15845. 0, /*tp_iter*/
  15846. 0, /*tp_iternext*/
  15847. 0, /*tp_methods*/
  15848. 0, /*tp_members*/
  15849. 0, /*tp_getset*/
  15850. 0, /*tp_base*/
  15851. 0, /*tp_dict*/
  15852. 0, /*tp_descr_get*/
  15853. 0, /*tp_descr_set*/
  15854. 0, /*tp_dictoffset*/
  15855. 0, /*tp_init*/
  15856. 0, /*tp_alloc*/
  15857. __pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr, /*tp_new*/
  15858. 0, /*tp_free*/
  15859. 0, /*tp_is_gc*/
  15860. 0, /*tp_bases*/
  15861. 0, /*tp_mro*/
  15862. 0, /*tp_cache*/
  15863. 0, /*tp_subclasses*/
  15864. 0, /*tp_weaklist*/
  15865. 0, /*tp_del*/
  15866. 0, /*tp_version_tag*/
  15867. #if PY_VERSION_HEX >= 0x030400a1
  15868. 0, /*tp_finalize*/
  15869. #endif
  15870. };
  15871. static struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__[8];
  15872. static int __pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ = 0;
  15873. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  15874. PyObject *o;
  15875. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__)))) {
  15876. o = (PyObject*)__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__[--__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__];
  15877. memset(o, 0, sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__));
  15878. (void) PyObject_INIT(o, t);
  15879. PyObject_GC_Track(o);
  15880. } else {
  15881. o = (*t->tp_alloc)(t, 0);
  15882. if (unlikely(!o)) return 0;
  15883. }
  15884. return o;
  15885. }
  15886. static void __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__(PyObject *o) {
  15887. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *)o;
  15888. PyObject_GC_UnTrack(o);
  15889. Py_CLEAR(p->__pyx_v_info);
  15890. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__)))) {
  15891. __pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__[__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__++] = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *)o);
  15892. } else {
  15893. (*Py_TYPE(o)->tp_free)(o);
  15894. }
  15895. }
  15896. static int __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__(PyObject *o, visitproc v, void *a) {
  15897. int e;
  15898. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *)o;
  15899. if (p->__pyx_v_info) {
  15900. e = (*v)(p->__pyx_v_info, a); if (e) return e;
  15901. }
  15902. return 0;
  15903. }
  15904. static int __pyx_tp_clear_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__(PyObject *o) {
  15905. PyObject* tmp;
  15906. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ *)o;
  15907. tmp = ((PyObject*)p->__pyx_v_info);
  15908. p->__pyx_v_info = ((PyObject*)Py_None); Py_INCREF(Py_None);
  15909. Py_XDECREF(tmp);
  15910. return 0;
  15911. }
  15912. static PyTypeObject __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ = {
  15913. PyVarObject_HEAD_INIT(0, 0)
  15914. "aiohttp._http_parser.__pyx_scope_struct_2___repr__", /*tp_name*/
  15915. sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__), /*tp_basicsize*/
  15916. 0, /*tp_itemsize*/
  15917. __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__, /*tp_dealloc*/
  15918. 0, /*tp_print*/
  15919. 0, /*tp_getattr*/
  15920. 0, /*tp_setattr*/
  15921. #if PY_MAJOR_VERSION < 3
  15922. 0, /*tp_compare*/
  15923. #endif
  15924. #if PY_MAJOR_VERSION >= 3
  15925. 0, /*tp_as_async*/
  15926. #endif
  15927. 0, /*tp_repr*/
  15928. 0, /*tp_as_number*/
  15929. 0, /*tp_as_sequence*/
  15930. 0, /*tp_as_mapping*/
  15931. 0, /*tp_hash*/
  15932. 0, /*tp_call*/
  15933. 0, /*tp_str*/
  15934. 0, /*tp_getattro*/
  15935. 0, /*tp_setattro*/
  15936. 0, /*tp_as_buffer*/
  15937. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  15938. 0, /*tp_doc*/
  15939. __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__, /*tp_traverse*/
  15940. __pyx_tp_clear_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__, /*tp_clear*/
  15941. 0, /*tp_richcompare*/
  15942. 0, /*tp_weaklistoffset*/
  15943. 0, /*tp_iter*/
  15944. 0, /*tp_iternext*/
  15945. 0, /*tp_methods*/
  15946. 0, /*tp_members*/
  15947. 0, /*tp_getset*/
  15948. 0, /*tp_base*/
  15949. 0, /*tp_dict*/
  15950. 0, /*tp_descr_get*/
  15951. 0, /*tp_descr_set*/
  15952. 0, /*tp_dictoffset*/
  15953. 0, /*tp_init*/
  15954. 0, /*tp_alloc*/
  15955. __pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__, /*tp_new*/
  15956. 0, /*tp_free*/
  15957. 0, /*tp_is_gc*/
  15958. 0, /*tp_bases*/
  15959. 0, /*tp_mro*/
  15960. 0, /*tp_cache*/
  15961. 0, /*tp_subclasses*/
  15962. 0, /*tp_weaklist*/
  15963. 0, /*tp_del*/
  15964. 0, /*tp_version_tag*/
  15965. #if PY_VERSION_HEX >= 0x030400a1
  15966. 0, /*tp_finalize*/
  15967. #endif
  15968. };
  15969. static struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr[8];
  15970. static int __pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr = 0;
  15971. static PyObject *__pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  15972. PyObject *o;
  15973. if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr)))) {
  15974. o = (PyObject*)__pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr[--__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr];
  15975. memset(o, 0, sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr));
  15976. (void) PyObject_INIT(o, t);
  15977. PyObject_GC_Track(o);
  15978. } else {
  15979. o = (*t->tp_alloc)(t, 0);
  15980. if (unlikely(!o)) return 0;
  15981. }
  15982. return o;
  15983. }
  15984. static void __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr(PyObject *o) {
  15985. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *)o;
  15986. PyObject_GC_UnTrack(o);
  15987. Py_CLEAR(p->__pyx_outer_scope);
  15988. Py_CLEAR(p->__pyx_v_name);
  15989. Py_CLEAR(p->__pyx_v_val);
  15990. if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr)))) {
  15991. __pyx_freelist_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr[__pyx_freecount_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *)o);
  15992. } else {
  15993. (*Py_TYPE(o)->tp_free)(o);
  15994. }
  15995. }
  15996. static int __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
  15997. int e;
  15998. struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr *)o;
  15999. if (p->__pyx_outer_scope) {
  16000. e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
  16001. }
  16002. if (p->__pyx_v_name) {
  16003. e = (*v)(p->__pyx_v_name, a); if (e) return e;
  16004. }
  16005. if (p->__pyx_v_val) {
  16006. e = (*v)(p->__pyx_v_val, a); if (e) return e;
  16007. }
  16008. return 0;
  16009. }
  16010. static PyTypeObject __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr = {
  16011. PyVarObject_HEAD_INIT(0, 0)
  16012. "aiohttp._http_parser.__pyx_scope_struct_3_genexpr", /*tp_name*/
  16013. sizeof(struct __pyx_obj_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
  16014. 0, /*tp_itemsize*/
  16015. __pyx_tp_dealloc_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
  16016. 0, /*tp_print*/
  16017. 0, /*tp_getattr*/
  16018. 0, /*tp_setattr*/
  16019. #if PY_MAJOR_VERSION < 3
  16020. 0, /*tp_compare*/
  16021. #endif
  16022. #if PY_MAJOR_VERSION >= 3
  16023. 0, /*tp_as_async*/
  16024. #endif
  16025. 0, /*tp_repr*/
  16026. 0, /*tp_as_number*/
  16027. 0, /*tp_as_sequence*/
  16028. 0, /*tp_as_mapping*/
  16029. 0, /*tp_hash*/
  16030. 0, /*tp_call*/
  16031. 0, /*tp_str*/
  16032. 0, /*tp_getattro*/
  16033. 0, /*tp_setattro*/
  16034. 0, /*tp_as_buffer*/
  16035. Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  16036. 0, /*tp_doc*/
  16037. __pyx_tp_traverse_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr, /*tp_traverse*/
  16038. 0, /*tp_clear*/
  16039. 0, /*tp_richcompare*/
  16040. 0, /*tp_weaklistoffset*/
  16041. 0, /*tp_iter*/
  16042. 0, /*tp_iternext*/
  16043. 0, /*tp_methods*/
  16044. 0, /*tp_members*/
  16045. 0, /*tp_getset*/
  16046. 0, /*tp_base*/
  16047. 0, /*tp_dict*/
  16048. 0, /*tp_descr_get*/
  16049. 0, /*tp_descr_set*/
  16050. 0, /*tp_dictoffset*/
  16051. 0, /*tp_init*/
  16052. 0, /*tp_alloc*/
  16053. __pyx_tp_new_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr, /*tp_new*/
  16054. 0, /*tp_free*/
  16055. 0, /*tp_is_gc*/
  16056. 0, /*tp_bases*/
  16057. 0, /*tp_mro*/
  16058. 0, /*tp_cache*/
  16059. 0, /*tp_subclasses*/
  16060. 0, /*tp_weaklist*/
  16061. 0, /*tp_del*/
  16062. 0, /*tp_version_tag*/
  16063. #if PY_VERSION_HEX >= 0x030400a1
  16064. 0, /*tp_finalize*/
  16065. #endif
  16066. };
  16067. static PyMethodDef __pyx_methods[] = {
  16068. {0, 0, 0, 0}
  16069. };
  16070. #if PY_MAJOR_VERSION >= 3
  16071. #if CYTHON_PEP489_MULTI_PHASE_INIT
  16072. static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
  16073. static int __pyx_pymod_exec__http_parser(PyObject* module); /*proto*/
  16074. static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  16075. {Py_mod_create, (void*)__pyx_pymod_create},
  16076. {Py_mod_exec, (void*)__pyx_pymod_exec__http_parser},
  16077. {0, NULL}
  16078. };
  16079. #endif
  16080. static struct PyModuleDef __pyx_moduledef = {
  16081. PyModuleDef_HEAD_INIT,
  16082. "_http_parser",
  16083. 0, /* m_doc */
  16084. #if CYTHON_PEP489_MULTI_PHASE_INIT
  16085. 0, /* m_size */
  16086. #else
  16087. -1, /* m_size */
  16088. #endif
  16089. __pyx_methods /* m_methods */,
  16090. #if CYTHON_PEP489_MULTI_PHASE_INIT
  16091. __pyx_moduledef_slots, /* m_slots */
  16092. #else
  16093. NULL, /* m_reload */
  16094. #endif
  16095. NULL, /* m_traverse */
  16096. NULL, /* m_clear */
  16097. NULL /* m_free */
  16098. };
  16099. #endif
  16100. static __Pyx_StringTabEntry __pyx_string_tab[] = {
  16101. {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
  16102. {&__pyx_n_s_ACCEPT, __pyx_k_ACCEPT, sizeof(__pyx_k_ACCEPT), 0, 0, 1, 1},
  16103. {&__pyx_n_s_ACCEPT_CHARSET, __pyx_k_ACCEPT_CHARSET, sizeof(__pyx_k_ACCEPT_CHARSET), 0, 0, 1, 1},
  16104. {&__pyx_n_s_ACCEPT_ENCODING, __pyx_k_ACCEPT_ENCODING, sizeof(__pyx_k_ACCEPT_ENCODING), 0, 0, 1, 1},
  16105. {&__pyx_n_s_ACCEPT_LANGUAGE, __pyx_k_ACCEPT_LANGUAGE, sizeof(__pyx_k_ACCEPT_LANGUAGE), 0, 0, 1, 1},
  16106. {&__pyx_n_s_ACCEPT_RANGES, __pyx_k_ACCEPT_RANGES, sizeof(__pyx_k_ACCEPT_RANGES), 0, 0, 1, 1},
  16107. {&__pyx_n_s_ACCESS_CONTROL_ALLOW_CREDENTIALS, __pyx_k_ACCESS_CONTROL_ALLOW_CREDENTIALS, sizeof(__pyx_k_ACCESS_CONTROL_ALLOW_CREDENTIALS), 0, 0, 1, 1},
  16108. {&__pyx_n_s_ACCESS_CONTROL_ALLOW_HEADERS, __pyx_k_ACCESS_CONTROL_ALLOW_HEADERS, sizeof(__pyx_k_ACCESS_CONTROL_ALLOW_HEADERS), 0, 0, 1, 1},
  16109. {&__pyx_n_s_ACCESS_CONTROL_ALLOW_METHODS, __pyx_k_ACCESS_CONTROL_ALLOW_METHODS, sizeof(__pyx_k_ACCESS_CONTROL_ALLOW_METHODS), 0, 0, 1, 1},
  16110. {&__pyx_n_s_ACCESS_CONTROL_ALLOW_ORIGIN, __pyx_k_ACCESS_CONTROL_ALLOW_ORIGIN, sizeof(__pyx_k_ACCESS_CONTROL_ALLOW_ORIGIN), 0, 0, 1, 1},
  16111. {&__pyx_n_s_ACCESS_CONTROL_EXPOSE_HEADERS, __pyx_k_ACCESS_CONTROL_EXPOSE_HEADERS, sizeof(__pyx_k_ACCESS_CONTROL_EXPOSE_HEADERS), 0, 0, 1, 1},
  16112. {&__pyx_n_s_ACCESS_CONTROL_MAX_AGE, __pyx_k_ACCESS_CONTROL_MAX_AGE, sizeof(__pyx_k_ACCESS_CONTROL_MAX_AGE), 0, 0, 1, 1},
  16113. {&__pyx_n_s_ACCESS_CONTROL_REQUEST_HEADERS, __pyx_k_ACCESS_CONTROL_REQUEST_HEADERS, sizeof(__pyx_k_ACCESS_CONTROL_REQUEST_HEADERS), 0, 0, 1, 1},
  16114. {&__pyx_n_s_ACCESS_CONTROL_REQUEST_METHOD, __pyx_k_ACCESS_CONTROL_REQUEST_METHOD, sizeof(__pyx_k_ACCESS_CONTROL_REQUEST_METHOD), 0, 0, 1, 1},
  16115. {&__pyx_n_s_AGE, __pyx_k_AGE, sizeof(__pyx_k_AGE), 0, 0, 1, 1},
  16116. {&__pyx_n_s_ALLOW, __pyx_k_ALLOW, sizeof(__pyx_k_ALLOW), 0, 0, 1, 1},
  16117. {&__pyx_n_s_AUTHORIZATION, __pyx_k_AUTHORIZATION, sizeof(__pyx_k_AUTHORIZATION), 0, 0, 1, 1},
  16118. {&__pyx_n_s_BadHttpMessage, __pyx_k_BadHttpMessage, sizeof(__pyx_k_BadHttpMessage), 0, 0, 1, 1},
  16119. {&__pyx_n_s_BadStatusLine, __pyx_k_BadStatusLine, sizeof(__pyx_k_BadStatusLine), 0, 0, 1, 1},
  16120. {&__pyx_n_s_BaseException, __pyx_k_BaseException, sizeof(__pyx_k_BaseException), 0, 0, 1, 1},
  16121. {&__pyx_n_s_CACHE_CONTROL, __pyx_k_CACHE_CONTROL, sizeof(__pyx_k_CACHE_CONTROL), 0, 0, 1, 1},
  16122. {&__pyx_n_s_CIMultiDict, __pyx_k_CIMultiDict, sizeof(__pyx_k_CIMultiDict), 0, 0, 1, 1},
  16123. {&__pyx_n_s_CIMultiDictProxy, __pyx_k_CIMultiDictProxy, sizeof(__pyx_k_CIMultiDictProxy), 0, 0, 1, 1},
  16124. {&__pyx_n_s_CIMultiDictProxy_2, __pyx_k_CIMultiDictProxy_2, sizeof(__pyx_k_CIMultiDictProxy_2), 0, 0, 1, 1},
  16125. {&__pyx_n_s_CIMultiDict_2, __pyx_k_CIMultiDict_2, sizeof(__pyx_k_CIMultiDict_2), 0, 0, 1, 1},
  16126. {&__pyx_n_s_CONNECTION, __pyx_k_CONNECTION, sizeof(__pyx_k_CONNECTION), 0, 0, 1, 1},
  16127. {&__pyx_n_s_CONTENT_DISPOSITION, __pyx_k_CONTENT_DISPOSITION, sizeof(__pyx_k_CONTENT_DISPOSITION), 0, 0, 1, 1},
  16128. {&__pyx_n_s_CONTENT_ENCODING, __pyx_k_CONTENT_ENCODING, sizeof(__pyx_k_CONTENT_ENCODING), 0, 0, 1, 1},
  16129. {&__pyx_n_s_CONTENT_LANGUAGE, __pyx_k_CONTENT_LANGUAGE, sizeof(__pyx_k_CONTENT_LANGUAGE), 0, 0, 1, 1},
  16130. {&__pyx_n_s_CONTENT_LENGTH, __pyx_k_CONTENT_LENGTH, sizeof(__pyx_k_CONTENT_LENGTH), 0, 0, 1, 1},
  16131. {&__pyx_n_s_CONTENT_LOCATION, __pyx_k_CONTENT_LOCATION, sizeof(__pyx_k_CONTENT_LOCATION), 0, 0, 1, 1},
  16132. {&__pyx_n_s_CONTENT_MD5, __pyx_k_CONTENT_MD5, sizeof(__pyx_k_CONTENT_MD5), 0, 0, 1, 1},
  16133. {&__pyx_n_s_CONTENT_RANGE, __pyx_k_CONTENT_RANGE, sizeof(__pyx_k_CONTENT_RANGE), 0, 0, 1, 1},
  16134. {&__pyx_n_s_CONTENT_TRANSFER_ENCODING, __pyx_k_CONTENT_TRANSFER_ENCODING, sizeof(__pyx_k_CONTENT_TRANSFER_ENCODING), 0, 0, 1, 1},
  16135. {&__pyx_n_s_CONTENT_TYPE, __pyx_k_CONTENT_TYPE, sizeof(__pyx_k_CONTENT_TYPE), 0, 0, 1, 1},
  16136. {&__pyx_n_s_COOKIE, __pyx_k_COOKIE, sizeof(__pyx_k_COOKIE), 0, 0, 1, 1},
  16137. {&__pyx_n_s_ContentLengthError, __pyx_k_ContentLengthError, sizeof(__pyx_k_ContentLengthError), 0, 0, 1, 1},
  16138. {&__pyx_n_s_DATE, __pyx_k_DATE, sizeof(__pyx_k_DATE), 0, 0, 1, 1},
  16139. {&__pyx_n_s_DESTINATION, __pyx_k_DESTINATION, sizeof(__pyx_k_DESTINATION), 0, 0, 1, 1},
  16140. {&__pyx_n_s_DIGEST, __pyx_k_DIGEST, sizeof(__pyx_k_DIGEST), 0, 0, 1, 1},
  16141. {&__pyx_n_s_DeflateBuffer, __pyx_k_DeflateBuffer, sizeof(__pyx_k_DeflateBuffer), 0, 0, 1, 1},
  16142. {&__pyx_n_s_DeflateBuffer_2, __pyx_k_DeflateBuffer_2, sizeof(__pyx_k_DeflateBuffer_2), 0, 0, 1, 1},
  16143. {&__pyx_n_s_EMPTY_PAYLOAD, __pyx_k_EMPTY_PAYLOAD, sizeof(__pyx_k_EMPTY_PAYLOAD), 0, 0, 1, 1},
  16144. {&__pyx_n_s_EMPTY_PAYLOAD_2, __pyx_k_EMPTY_PAYLOAD_2, sizeof(__pyx_k_EMPTY_PAYLOAD_2), 0, 0, 1, 1},
  16145. {&__pyx_n_s_ETAG, __pyx_k_ETAG, sizeof(__pyx_k_ETAG), 0, 0, 1, 1},
  16146. {&__pyx_n_s_EXPECT, __pyx_k_EXPECT, sizeof(__pyx_k_EXPECT), 0, 0, 1, 1},
  16147. {&__pyx_n_s_EXPIRES, __pyx_k_EXPIRES, sizeof(__pyx_k_EXPIRES), 0, 0, 1, 1},
  16148. {&__pyx_n_s_FORWARDED, __pyx_k_FORWARDED, sizeof(__pyx_k_FORWARDED), 0, 0, 1, 1},
  16149. {&__pyx_n_s_FROM, __pyx_k_FROM, sizeof(__pyx_k_FROM), 0, 0, 1, 1},
  16150. {&__pyx_n_s_HOST, __pyx_k_HOST, sizeof(__pyx_k_HOST), 0, 0, 1, 1},
  16151. {&__pyx_kp_u_Header_name_is_too_long, __pyx_k_Header_name_is_too_long, sizeof(__pyx_k_Header_name_is_too_long), 0, 1, 0, 0},
  16152. {&__pyx_kp_u_Header_value_is_too_long, __pyx_k_Header_value_is_too_long, sizeof(__pyx_k_Header_value_is_too_long), 0, 1, 0, 0},
  16153. {&__pyx_n_u_HttpRequestParser, __pyx_k_HttpRequestParser, sizeof(__pyx_k_HttpRequestParser), 0, 1, 0, 1},
  16154. {&__pyx_n_u_HttpResponseParser, __pyx_k_HttpResponseParser, sizeof(__pyx_k_HttpResponseParser), 0, 1, 0, 1},
  16155. {&__pyx_n_s_HttpVersion, __pyx_k_HttpVersion, sizeof(__pyx_k_HttpVersion), 0, 0, 1, 1},
  16156. {&__pyx_n_s_HttpVersion10, __pyx_k_HttpVersion10, sizeof(__pyx_k_HttpVersion10), 0, 0, 1, 1},
  16157. {&__pyx_n_s_HttpVersion10_2, __pyx_k_HttpVersion10_2, sizeof(__pyx_k_HttpVersion10_2), 0, 0, 1, 1},
  16158. {&__pyx_n_s_HttpVersion11, __pyx_k_HttpVersion11, sizeof(__pyx_k_HttpVersion11), 0, 0, 1, 1},
  16159. {&__pyx_n_s_HttpVersion11_2, __pyx_k_HttpVersion11_2, sizeof(__pyx_k_HttpVersion11_2), 0, 0, 1, 1},
  16160. {&__pyx_n_s_HttpVersion_2, __pyx_k_HttpVersion_2, sizeof(__pyx_k_HttpVersion_2), 0, 0, 1, 1},
  16161. {&__pyx_n_s_IF_MATCH, __pyx_k_IF_MATCH, sizeof(__pyx_k_IF_MATCH), 0, 0, 1, 1},
  16162. {&__pyx_n_s_IF_MODIFIED_SINCE, __pyx_k_IF_MODIFIED_SINCE, sizeof(__pyx_k_IF_MODIFIED_SINCE), 0, 0, 1, 1},
  16163. {&__pyx_n_s_IF_NONE_MATCH, __pyx_k_IF_NONE_MATCH, sizeof(__pyx_k_IF_NONE_MATCH), 0, 0, 1, 1},
  16164. {&__pyx_n_s_IF_RANGE, __pyx_k_IF_RANGE, sizeof(__pyx_k_IF_RANGE), 0, 0, 1, 1},
  16165. {&__pyx_n_s_IF_UNMODIFIED_SINCE, __pyx_k_IF_UNMODIFIED_SINCE, sizeof(__pyx_k_IF_UNMODIFIED_SINCE), 0, 0, 1, 1},
  16166. {&__pyx_kp_s_Incompatible_checksums_s_vs_0x14, __pyx_k_Incompatible_checksums_s_vs_0x14, sizeof(__pyx_k_Incompatible_checksums_s_vs_0x14), 0, 0, 1, 0},
  16167. {&__pyx_kp_s_Incompatible_checksums_s_vs_0xc7, __pyx_k_Incompatible_checksums_s_vs_0xc7, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xc7), 0, 0, 1, 0},
  16168. {&__pyx_n_s_InvalidHeader, __pyx_k_InvalidHeader, sizeof(__pyx_k_InvalidHeader), 0, 0, 1, 1},
  16169. {&__pyx_n_s_InvalidURLError, __pyx_k_InvalidURLError, sizeof(__pyx_k_InvalidURLError), 0, 0, 1, 1},
  16170. {&__pyx_n_s_KEEP_ALIVE, __pyx_k_KEEP_ALIVE, sizeof(__pyx_k_KEEP_ALIVE), 0, 0, 1, 1},
  16171. {&__pyx_n_s_LAST_EVENT_ID, __pyx_k_LAST_EVENT_ID, sizeof(__pyx_k_LAST_EVENT_ID), 0, 0, 1, 1},
  16172. {&__pyx_n_s_LAST_MODIFIED, __pyx_k_LAST_MODIFIED, sizeof(__pyx_k_LAST_MODIFIED), 0, 0, 1, 1},
  16173. {&__pyx_n_s_LINK, __pyx_k_LINK, sizeof(__pyx_k_LINK), 0, 0, 1, 1},
  16174. {&__pyx_n_s_LOCATION, __pyx_k_LOCATION, sizeof(__pyx_k_LOCATION), 0, 0, 1, 1},
  16175. {&__pyx_n_s_LineTooLong, __pyx_k_LineTooLong, sizeof(__pyx_k_LineTooLong), 0, 0, 1, 1},
  16176. {&__pyx_n_s_MAX_FORWARDS, __pyx_k_MAX_FORWARDS, sizeof(__pyx_k_MAX_FORWARDS), 0, 0, 1, 1},
  16177. {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  16178. {&__pyx_kp_u_Not_enough_data_for_satisfy_cont, __pyx_k_Not_enough_data_for_satisfy_cont, sizeof(__pyx_k_Not_enough_data_for_satisfy_cont), 0, 1, 0, 0},
  16179. {&__pyx_kp_u_Not_enough_data_for_satisfy_tran, __pyx_k_Not_enough_data_for_satisfy_tran, sizeof(__pyx_k_Not_enough_data_for_satisfy_tran), 0, 1, 0, 0},
  16180. {&__pyx_n_s_ORIGIN, __pyx_k_ORIGIN, sizeof(__pyx_k_ORIGIN), 0, 0, 1, 1},
  16181. {&__pyx_n_s_PRAGMA, __pyx_k_PRAGMA, sizeof(__pyx_k_PRAGMA), 0, 0, 1, 1},
  16182. {&__pyx_n_s_PROXY_AUTHENTICATE, __pyx_k_PROXY_AUTHENTICATE, sizeof(__pyx_k_PROXY_AUTHENTICATE), 0, 0, 1, 1},
  16183. {&__pyx_n_s_PROXY_AUTHORIZATION, __pyx_k_PROXY_AUTHORIZATION, sizeof(__pyx_k_PROXY_AUTHORIZATION), 0, 0, 1, 1},
  16184. {&__pyx_n_s_PayloadEncodingError, __pyx_k_PayloadEncodingError, sizeof(__pyx_k_PayloadEncodingError), 0, 0, 1, 1},
  16185. {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  16186. {&__pyx_n_s_RANGE, __pyx_k_RANGE, sizeof(__pyx_k_RANGE), 0, 0, 1, 1},
  16187. {&__pyx_n_s_REFERER, __pyx_k_REFERER, sizeof(__pyx_k_REFERER), 0, 0, 1, 1},
  16188. {&__pyx_n_s_RETRY_AFTER, __pyx_k_RETRY_AFTER, sizeof(__pyx_k_RETRY_AFTER), 0, 0, 1, 1},
  16189. {&__pyx_kp_u_RawRequestMessage, __pyx_k_RawRequestMessage, sizeof(__pyx_k_RawRequestMessage), 0, 1, 0, 0},
  16190. {&__pyx_n_u_RawRequestMessage_2, __pyx_k_RawRequestMessage_2, sizeof(__pyx_k_RawRequestMessage_2), 0, 1, 0, 1},
  16191. {&__pyx_kp_u_RawResponseMessage, __pyx_k_RawResponseMessage, sizeof(__pyx_k_RawResponseMessage), 0, 1, 0, 0},
  16192. {&__pyx_n_u_RawResponseMessage_2, __pyx_k_RawResponseMessage_2, sizeof(__pyx_k_RawResponseMessage_2), 0, 1, 0, 1},
  16193. {&__pyx_n_s_SEC_WEBSOCKET_ACCEPT, __pyx_k_SEC_WEBSOCKET_ACCEPT, sizeof(__pyx_k_SEC_WEBSOCKET_ACCEPT), 0, 0, 1, 1},
  16194. {&__pyx_n_s_SEC_WEBSOCKET_EXTENSIONS, __pyx_k_SEC_WEBSOCKET_EXTENSIONS, sizeof(__pyx_k_SEC_WEBSOCKET_EXTENSIONS), 0, 0, 1, 1},
  16195. {&__pyx_n_s_SEC_WEBSOCKET_KEY, __pyx_k_SEC_WEBSOCKET_KEY, sizeof(__pyx_k_SEC_WEBSOCKET_KEY), 0, 0, 1, 1},
  16196. {&__pyx_n_s_SEC_WEBSOCKET_KEY1, __pyx_k_SEC_WEBSOCKET_KEY1, sizeof(__pyx_k_SEC_WEBSOCKET_KEY1), 0, 0, 1, 1},
  16197. {&__pyx_n_s_SEC_WEBSOCKET_PROTOCOL, __pyx_k_SEC_WEBSOCKET_PROTOCOL, sizeof(__pyx_k_SEC_WEBSOCKET_PROTOCOL), 0, 0, 1, 1},
  16198. {&__pyx_n_s_SEC_WEBSOCKET_VERSION, __pyx_k_SEC_WEBSOCKET_VERSION, sizeof(__pyx_k_SEC_WEBSOCKET_VERSION), 0, 0, 1, 1},
  16199. {&__pyx_n_s_SERVER, __pyx_k_SERVER, sizeof(__pyx_k_SERVER), 0, 0, 1, 1},
  16200. {&__pyx_n_s_SET_COOKIE, __pyx_k_SET_COOKIE, sizeof(__pyx_k_SET_COOKIE), 0, 0, 1, 1},
  16201. {&__pyx_kp_u_Status_line_is_too_long, __pyx_k_Status_line_is_too_long, sizeof(__pyx_k_Status_line_is_too_long), 0, 1, 0, 0},
  16202. {&__pyx_n_s_StreamReader, __pyx_k_StreamReader, sizeof(__pyx_k_StreamReader), 0, 0, 1, 1},
  16203. {&__pyx_n_s_StreamReader_2, __pyx_k_StreamReader_2, sizeof(__pyx_k_StreamReader_2), 0, 0, 1, 1},
  16204. {&__pyx_n_s_TE, __pyx_k_TE, sizeof(__pyx_k_TE), 0, 0, 1, 1},
  16205. {&__pyx_n_s_TRAILER, __pyx_k_TRAILER, sizeof(__pyx_k_TRAILER), 0, 0, 1, 1},
  16206. {&__pyx_n_s_TRANSFER_ENCODING, __pyx_k_TRANSFER_ENCODING, sizeof(__pyx_k_TRANSFER_ENCODING), 0, 0, 1, 1},
  16207. {&__pyx_n_s_TransferEncodingError, __pyx_k_TransferEncodingError, sizeof(__pyx_k_TransferEncodingError), 0, 0, 1, 1},
  16208. {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  16209. {&__pyx_n_s_UPGRADE, __pyx_k_UPGRADE, sizeof(__pyx_k_UPGRADE), 0, 0, 1, 1},
  16210. {&__pyx_n_s_URI, __pyx_k_URI, sizeof(__pyx_k_URI), 0, 0, 1, 1},
  16211. {&__pyx_n_s_URL, __pyx_k_URL, sizeof(__pyx_k_URL), 0, 0, 1, 1},
  16212. {&__pyx_n_s_URL_2, __pyx_k_URL_2, sizeof(__pyx_k_URL_2), 0, 0, 1, 1},
  16213. {&__pyx_n_s_USER_AGENT, __pyx_k_USER_AGENT, sizeof(__pyx_k_USER_AGENT), 0, 0, 1, 1},
  16214. {&__pyx_n_s_VARY, __pyx_k_VARY, sizeof(__pyx_k_VARY), 0, 0, 1, 1},
  16215. {&__pyx_n_s_VIA, __pyx_k_VIA, sizeof(__pyx_k_VIA), 0, 0, 1, 1},
  16216. {&__pyx_n_s_WANT_DIGEST, __pyx_k_WANT_DIGEST, sizeof(__pyx_k_WANT_DIGEST), 0, 0, 1, 1},
  16217. {&__pyx_n_s_WARNING, __pyx_k_WARNING, sizeof(__pyx_k_WARNING), 0, 0, 1, 1},
  16218. {&__pyx_n_s_WEBSOCKET, __pyx_k_WEBSOCKET, sizeof(__pyx_k_WEBSOCKET), 0, 0, 1, 1},
  16219. {&__pyx_n_s_WWW_AUTHENTICATE, __pyx_k_WWW_AUTHENTICATE, sizeof(__pyx_k_WWW_AUTHENTICATE), 0, 0, 1, 1},
  16220. {&__pyx_n_s_X_FORWARDED_FOR, __pyx_k_X_FORWARDED_FOR, sizeof(__pyx_k_X_FORWARDED_FOR), 0, 0, 1, 1},
  16221. {&__pyx_n_s_X_FORWARDED_HOST, __pyx_k_X_FORWARDED_HOST, sizeof(__pyx_k_X_FORWARDED_HOST), 0, 0, 1, 1},
  16222. {&__pyx_n_s_X_FORWARDED_PROTO, __pyx_k_X_FORWARDED_PROTO, sizeof(__pyx_k_X_FORWARDED_PROTO), 0, 0, 1, 1},
  16223. {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
  16224. {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
  16225. {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  16226. {&__pyx_kp_b__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 0, 0},
  16227. {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
  16228. {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
  16229. {&__pyx_n_s_aiohttp, __pyx_k_aiohttp, sizeof(__pyx_k_aiohttp), 0, 0, 1, 1},
  16230. {&__pyx_n_s_aiohttp__http_parser, __pyx_k_aiohttp__http_parser, sizeof(__pyx_k_aiohttp__http_parser), 0, 0, 1, 1},
  16231. {&__pyx_kp_s_aiohttp__http_parser_pyx, __pyx_k_aiohttp__http_parser_pyx, sizeof(__pyx_k_aiohttp__http_parser_pyx), 0, 0, 1, 0},
  16232. {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
  16233. {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  16234. {&__pyx_n_s_auto_decompress, __pyx_k_auto_decompress, sizeof(__pyx_k_auto_decompress), 0, 0, 1, 1},
  16235. {&__pyx_n_s_begin_http_chunk_receiving, __pyx_k_begin_http_chunk_receiving, sizeof(__pyx_k_begin_http_chunk_receiving), 0, 0, 1, 1},
  16236. {&__pyx_n_u_br, __pyx_k_br, sizeof(__pyx_k_br), 0, 1, 0, 1},
  16237. {&__pyx_n_s_buf_data, __pyx_k_buf_data, sizeof(__pyx_k_buf_data), 0, 0, 1, 1},
  16238. {&__pyx_n_s_build, __pyx_k_build, sizeof(__pyx_k_build), 0, 0, 1, 1},
  16239. {&__pyx_n_s_chunked, __pyx_k_chunked, sizeof(__pyx_k_chunked), 0, 0, 1, 1},
  16240. {&__pyx_n_u_chunked, __pyx_k_chunked, sizeof(__pyx_k_chunked), 0, 1, 0, 1},
  16241. {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  16242. {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  16243. {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
  16244. {&__pyx_n_u_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 1, 0, 1},
  16245. {&__pyx_n_s_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 0, 1, 1},
  16246. {&__pyx_n_u_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 1, 0, 1},
  16247. {&__pyx_n_u_deflate, __pyx_k_deflate, sizeof(__pyx_k_deflate), 0, 1, 0, 1},
  16248. {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  16249. {&__pyx_n_s_end_http_chunk_receiving, __pyx_k_end_http_chunk_receiving, sizeof(__pyx_k_end_http_chunk_receiving), 0, 0, 1, 1},
  16250. {&__pyx_n_s_feed_data, __pyx_k_feed_data, sizeof(__pyx_k_feed_data), 0, 0, 1, 1},
  16251. {&__pyx_n_s_feed_eof, __pyx_k_feed_eof, sizeof(__pyx_k_feed_eof), 0, 0, 1, 1},
  16252. {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  16253. {&__pyx_n_s_fragment, __pyx_k_fragment, sizeof(__pyx_k_fragment), 0, 0, 1, 1},
  16254. {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
  16255. {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  16256. {&__pyx_n_u_gzip, __pyx_k_gzip, sizeof(__pyx_k_gzip), 0, 1, 0, 1},
  16257. {&__pyx_n_s_hdrs, __pyx_k_hdrs, sizeof(__pyx_k_hdrs), 0, 0, 1, 1},
  16258. {&__pyx_n_s_headers, __pyx_k_headers, sizeof(__pyx_k_headers), 0, 0, 1, 1},
  16259. {&__pyx_n_u_headers, __pyx_k_headers, sizeof(__pyx_k_headers), 0, 1, 0, 1},
  16260. {&__pyx_n_s_host, __pyx_k_host, sizeof(__pyx_k_host), 0, 0, 1, 1},
  16261. {&__pyx_n_s_http_exceptions, __pyx_k_http_exceptions, sizeof(__pyx_k_http_exceptions), 0, 0, 1, 1},
  16262. {&__pyx_n_s_http_parser, __pyx_k_http_parser, sizeof(__pyx_k_http_parser), 0, 0, 1, 1},
  16263. {&__pyx_n_s_http_writer, __pyx_k_http_writer, sizeof(__pyx_k_http_writer), 0, 0, 1, 1},
  16264. {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  16265. {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  16266. {&__pyx_kp_u_invalid_url_r, __pyx_k_invalid_url_r, sizeof(__pyx_k_invalid_url_r), 0, 1, 0, 0},
  16267. {&__pyx_n_s_loop, __pyx_k_loop, sizeof(__pyx_k_loop), 0, 0, 1, 1},
  16268. {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
  16269. {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  16270. {&__pyx_n_s_max_field_size, __pyx_k_max_field_size, sizeof(__pyx_k_max_field_size), 0, 0, 1, 1},
  16271. {&__pyx_n_s_max_headers, __pyx_k_max_headers, sizeof(__pyx_k_max_headers), 0, 0, 1, 1},
  16272. {&__pyx_n_s_max_line_size, __pyx_k_max_line_size, sizeof(__pyx_k_max_line_size), 0, 0, 1, 1},
  16273. {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
  16274. {&__pyx_n_u_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 1, 0, 1},
  16275. {&__pyx_n_s_multidict, __pyx_k_multidict, sizeof(__pyx_k_multidict), 0, 0, 1, 1},
  16276. {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  16277. {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  16278. {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  16279. {&__pyx_n_s_parse_url, __pyx_k_parse_url, sizeof(__pyx_k_parse_url), 0, 0, 1, 1},
  16280. {&__pyx_n_s_partition, __pyx_k_partition, sizeof(__pyx_k_partition), 0, 0, 1, 1},
  16281. {&__pyx_n_s_password, __pyx_k_password, sizeof(__pyx_k_password), 0, 0, 1, 1},
  16282. {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  16283. {&__pyx_n_u_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 1, 0, 1},
  16284. {&__pyx_n_s_payload_exception, __pyx_k_payload_exception, sizeof(__pyx_k_payload_exception), 0, 0, 1, 1},
  16285. {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  16286. {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1},
  16287. {&__pyx_n_s_protocol, __pyx_k_protocol, sizeof(__pyx_k_protocol), 0, 0, 1, 1},
  16288. {&__pyx_n_s_py_buf, __pyx_k_py_buf, sizeof(__pyx_k_py_buf), 0, 0, 1, 1},
  16289. {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  16290. {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  16291. {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  16292. {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  16293. {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  16294. {&__pyx_n_s_pyx_unpickle_RawRequestMessage, __pyx_k_pyx_unpickle_RawRequestMessage, sizeof(__pyx_k_pyx_unpickle_RawRequestMessage), 0, 0, 1, 1},
  16295. {&__pyx_n_s_pyx_unpickle_RawResponseMessag, __pyx_k_pyx_unpickle_RawResponseMessag, sizeof(__pyx_k_pyx_unpickle_RawResponseMessag), 0, 0, 1, 1},
  16296. {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  16297. {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
  16298. {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  16299. {&__pyx_n_s_raw_headers, __pyx_k_raw_headers, sizeof(__pyx_k_raw_headers), 0, 0, 1, 1},
  16300. {&__pyx_n_u_raw_headers, __pyx_k_raw_headers, sizeof(__pyx_k_raw_headers), 0, 1, 0, 1},
  16301. {&__pyx_n_s_read_until_eof, __pyx_k_read_until_eof, sizeof(__pyx_k_read_until_eof), 0, 0, 1, 1},
  16302. {&__pyx_n_s_reason, __pyx_k_reason, sizeof(__pyx_k_reason), 0, 0, 1, 1},
  16303. {&__pyx_n_u_reason, __pyx_k_reason, sizeof(__pyx_k_reason), 0, 1, 0, 1},
  16304. {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  16305. {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  16306. {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  16307. {&__pyx_n_s_repr___locals_genexpr, __pyx_k_repr___locals_genexpr, sizeof(__pyx_k_repr___locals_genexpr), 0, 0, 1, 1},
  16308. {&__pyx_n_s_response_with_body, __pyx_k_response_with_body, sizeof(__pyx_k_response_with_body), 0, 0, 1, 1},
  16309. {&__pyx_n_s_scheme, __pyx_k_scheme, sizeof(__pyx_k_scheme), 0, 0, 1, 1},
  16310. {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  16311. {&__pyx_n_s_set_exception, __pyx_k_set_exception, sizeof(__pyx_k_set_exception), 0, 0, 1, 1},
  16312. {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  16313. {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  16314. {&__pyx_n_s_should_close, __pyx_k_should_close, sizeof(__pyx_k_should_close), 0, 0, 1, 1},
  16315. {&__pyx_n_u_should_close, __pyx_k_should_close, sizeof(__pyx_k_should_close), 0, 1, 0, 1},
  16316. {&__pyx_n_s_streams, __pyx_k_streams, sizeof(__pyx_k_streams), 0, 0, 1, 1},
  16317. {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  16318. {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  16319. {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  16320. {&__pyx_n_s_timer, __pyx_k_timer, sizeof(__pyx_k_timer), 0, 0, 1, 1},
  16321. {&__pyx_kp_u_unknown, __pyx_k_unknown, sizeof(__pyx_k_unknown), 0, 1, 0, 0},
  16322. {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  16323. {&__pyx_n_s_upgrade, __pyx_k_upgrade, sizeof(__pyx_k_upgrade), 0, 0, 1, 1},
  16324. {&__pyx_n_u_upgrade, __pyx_k_upgrade, sizeof(__pyx_k_upgrade), 0, 1, 0, 1},
  16325. {&__pyx_n_s_url, __pyx_k_url, sizeof(__pyx_k_url), 0, 0, 1, 1},
  16326. {&__pyx_n_u_url, __pyx_k_url, sizeof(__pyx_k_url), 0, 1, 0, 1},
  16327. {&__pyx_n_s_user, __pyx_k_user, sizeof(__pyx_k_user), 0, 0, 1, 1},
  16328. {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
  16329. {&__pyx_n_u_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 1, 0, 1},
  16330. {&__pyx_n_s_yarl, __pyx_k_yarl, sizeof(__pyx_k_yarl), 0, 0, 1, 1},
  16331. {0, 0, 0, 0, 0, 0, 0}
  16332. };
  16333. static int __Pyx_InitCachedBuiltins(void) {
  16334. __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 70, __pyx_L1_error)
  16335. __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 297, __pyx_L1_error)
  16336. __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  16337. __pyx_builtin_BaseException = __Pyx_GetBuiltinName(__pyx_n_s_BaseException); if (!__pyx_builtin_BaseException) __PYX_ERR(0, 601, __pyx_L1_error)
  16338. return 0;
  16339. __pyx_L1_error:;
  16340. return -1;
  16341. }
  16342. static int __Pyx_InitCachedConstants(void) {
  16343. __Pyx_RefNannyDeclarations
  16344. __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  16345. /* "aiohttp/_http_parser.pyx":477
  16346. * if self._payload is not None:
  16347. * if self._cparser.flags & cparser.F_CHUNKED:
  16348. * raise TransferEncodingError( # <<<<<<<<<<<<<<
  16349. * "Not enough data for satisfy transfer length header.")
  16350. * elif self._cparser.flags & cparser.F_CONTENTLENGTH:
  16351. */
  16352. __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Not_enough_data_for_satisfy_tran); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 477, __pyx_L1_error)
  16353. __Pyx_GOTREF(__pyx_tuple__4);
  16354. __Pyx_GIVEREF(__pyx_tuple__4);
  16355. /* "aiohttp/_http_parser.pyx":480
  16356. * "Not enough data for satisfy transfer length header.")
  16357. * elif self._cparser.flags & cparser.F_CONTENTLENGTH:
  16358. * raise ContentLengthError( # <<<<<<<<<<<<<<
  16359. * "Not enough data for satisfy content length header.")
  16360. * elif self._cparser.http_errno != cparser.HPE_OK:
  16361. */
  16362. __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Not_enough_data_for_satisfy_cont); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 480, __pyx_L1_error)
  16363. __Pyx_GOTREF(__pyx_tuple__5);
  16364. __Pyx_GIVEREF(__pyx_tuple__5);
  16365. /* "(tree fragment)":2
  16366. * def __reduce_cython__(self):
  16367. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  16368. * def __setstate_cython__(self, __pyx_state):
  16369. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  16370. */
  16371. __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 2, __pyx_L1_error)
  16372. __Pyx_GOTREF(__pyx_tuple__7);
  16373. __Pyx_GIVEREF(__pyx_tuple__7);
  16374. /* "(tree fragment)":4
  16375. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  16376. * def __setstate_cython__(self, __pyx_state):
  16377. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  16378. */
  16379. __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
  16380. __Pyx_GOTREF(__pyx_tuple__8);
  16381. __Pyx_GIVEREF(__pyx_tuple__8);
  16382. /* "(tree fragment)":2
  16383. * def __reduce_cython__(self):
  16384. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  16385. * def __setstate_cython__(self, __pyx_state):
  16386. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  16387. */
  16388. __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 2, __pyx_L1_error)
  16389. __Pyx_GOTREF(__pyx_tuple__9);
  16390. __Pyx_GIVEREF(__pyx_tuple__9);
  16391. /* "(tree fragment)":4
  16392. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  16393. * def __setstate_cython__(self, __pyx_state):
  16394. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  16395. */
  16396. __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 4, __pyx_L1_error)
  16397. __Pyx_GOTREF(__pyx_tuple__10);
  16398. __Pyx_GIVEREF(__pyx_tuple__10);
  16399. /* "(tree fragment)":2
  16400. * def __reduce_cython__(self):
  16401. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  16402. * def __setstate_cython__(self, __pyx_state):
  16403. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  16404. */
  16405. __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
  16406. __Pyx_GOTREF(__pyx_tuple__11);
  16407. __Pyx_GIVEREF(__pyx_tuple__11);
  16408. /* "(tree fragment)":4
  16409. * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
  16410. * def __setstate_cython__(self, __pyx_state):
  16411. * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
  16412. */
  16413. __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
  16414. __Pyx_GOTREF(__pyx_tuple__12);
  16415. __Pyx_GIVEREF(__pyx_tuple__12);
  16416. /* "aiohttp/_http_parser.pyx":40
  16417. * char* PyByteArray_AsString(object)
  16418. *
  16419. * __all__ = ('HttpRequestParser', 'HttpResponseParser', # <<<<<<<<<<<<<<
  16420. * 'RawRequestMessage', 'RawResponseMessage')
  16421. *
  16422. */
  16423. __pyx_tuple__14 = PyTuple_Pack(4, __pyx_n_u_HttpRequestParser, __pyx_n_u_HttpResponseParser, __pyx_n_u_RawRequestMessage_2, __pyx_n_u_RawResponseMessage_2); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 40, __pyx_L1_error)
  16424. __Pyx_GOTREF(__pyx_tuple__14);
  16425. __Pyx_GIVEREF(__pyx_tuple__14);
  16426. /* "aiohttp/_http_parser.pyx":755
  16427. *
  16428. *
  16429. * def parse_url(url): # <<<<<<<<<<<<<<
  16430. * cdef:
  16431. * Py_buffer py_buf
  16432. */
  16433. __pyx_tuple__15 = PyTuple_Pack(3, __pyx_n_s_url, __pyx_n_s_py_buf, __pyx_n_s_buf_data); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 755, __pyx_L1_error)
  16434. __Pyx_GOTREF(__pyx_tuple__15);
  16435. __Pyx_GIVEREF(__pyx_tuple__15);
  16436. __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_aiohttp__http_parser_pyx, __pyx_n_s_parse_url, 755, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 755, __pyx_L1_error)
  16437. /* "(tree fragment)":1
  16438. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  16439. * if __pyx_checksum != 0x1408252:
  16440. * from pickle import PickleError as __pyx_PickleError
  16441. */
  16442. __pyx_tuple__17 = 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__17)) __PYX_ERR(1, 1, __pyx_L1_error)
  16443. __Pyx_GOTREF(__pyx_tuple__17);
  16444. __Pyx_GIVEREF(__pyx_tuple__17);
  16445. __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RawRequestMessage, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(1, 1, __pyx_L1_error)
  16446. __pyx_tuple__19 = 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__19)) __PYX_ERR(1, 1, __pyx_L1_error)
  16447. __Pyx_GOTREF(__pyx_tuple__19);
  16448. __Pyx_GIVEREF(__pyx_tuple__19);
  16449. __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_RawResponseMessag, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(1, 1, __pyx_L1_error)
  16450. __Pyx_RefNannyFinishContext();
  16451. return 0;
  16452. __pyx_L1_error:;
  16453. __Pyx_RefNannyFinishContext();
  16454. return -1;
  16455. }
  16456. static int __Pyx_InitGlobals(void) {
  16457. __pyx_umethod_PyUnicode_Type_partition.type = (PyObject*)&PyUnicode_Type;
  16458. if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  16459. __pyx_int_21004882 = PyInt_FromLong(21004882L); if (unlikely(!__pyx_int_21004882)) __PYX_ERR(0, 1, __pyx_L1_error)
  16460. __pyx_int_209127132 = PyInt_FromLong(209127132L); if (unlikely(!__pyx_int_209127132)) __PYX_ERR(0, 1, __pyx_L1_error)
  16461. return 0;
  16462. __pyx_L1_error:;
  16463. return -1;
  16464. }
  16465. static int __Pyx_modinit_global_init_code(void); /*proto*/
  16466. static int __Pyx_modinit_variable_export_code(void); /*proto*/
  16467. static int __Pyx_modinit_function_export_code(void); /*proto*/
  16468. static int __Pyx_modinit_type_init_code(void); /*proto*/
  16469. static int __Pyx_modinit_type_import_code(void); /*proto*/
  16470. static int __Pyx_modinit_variable_import_code(void); /*proto*/
  16471. static int __Pyx_modinit_function_import_code(void); /*proto*/
  16472. static int __Pyx_modinit_global_init_code(void) {
  16473. __Pyx_RefNannyDeclarations
  16474. __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  16475. /*--- Global init code ---*/
  16476. __pyx_v_7aiohttp_12_http_parser_headers = ((PyObject*)Py_None); Py_INCREF(Py_None);
  16477. __pyx_v_7aiohttp_12_http_parser_URL = Py_None; Py_INCREF(Py_None);
  16478. __pyx_v_7aiohttp_12_http_parser_URL_build = Py_None; Py_INCREF(Py_None);
  16479. __pyx_v_7aiohttp_12_http_parser_CIMultiDict = Py_None; Py_INCREF(Py_None);
  16480. __pyx_v_7aiohttp_12_http_parser_CIMultiDictProxy = Py_None; Py_INCREF(Py_None);
  16481. __pyx_v_7aiohttp_12_http_parser_HttpVersion = Py_None; Py_INCREF(Py_None);
  16482. __pyx_v_7aiohttp_12_http_parser_HttpVersion10 = Py_None; Py_INCREF(Py_None);
  16483. __pyx_v_7aiohttp_12_http_parser_HttpVersion11 = Py_None; Py_INCREF(Py_None);
  16484. __pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1 = Py_None; Py_INCREF(Py_None);
  16485. __pyx_v_7aiohttp_12_http_parser_CONTENT_ENCODING = Py_None; Py_INCREF(Py_None);
  16486. __pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD = Py_None; Py_INCREF(Py_None);
  16487. __pyx_v_7aiohttp_12_http_parser_StreamReader = Py_None; Py_INCREF(Py_None);
  16488. __pyx_v_7aiohttp_12_http_parser_DeflateBuffer = Py_None; Py_INCREF(Py_None);
  16489. __pyx_v_7aiohttp_12_http_parser__http_method = ((PyObject*)Py_None); Py_INCREF(Py_None);
  16490. __Pyx_RefNannyFinishContext();
  16491. return 0;
  16492. }
  16493. static int __Pyx_modinit_variable_export_code(void) {
  16494. __Pyx_RefNannyDeclarations
  16495. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  16496. /*--- Variable export code ---*/
  16497. __Pyx_RefNannyFinishContext();
  16498. return 0;
  16499. }
  16500. static int __Pyx_modinit_function_export_code(void) {
  16501. __Pyx_RefNannyDeclarations
  16502. __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  16503. /*--- Function export code ---*/
  16504. __Pyx_RefNannyFinishContext();
  16505. return 0;
  16506. }
  16507. static int __Pyx_modinit_type_init_code(void) {
  16508. __Pyx_RefNannyDeclarations
  16509. __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  16510. /*--- Type init code ---*/
  16511. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser_RawRequestMessage) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  16512. __pyx_type_7aiohttp_12_http_parser_RawRequestMessage.tp_print = 0;
  16513. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser_RawRequestMessage.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser_RawRequestMessage.tp_getattro == PyObject_GenericGetAttr)) {
  16514. __pyx_type_7aiohttp_12_http_parser_RawRequestMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  16515. }
  16516. if (PyObject_SetAttrString(__pyx_m, "RawRequestMessage", (PyObject *)&__pyx_type_7aiohttp_12_http_parser_RawRequestMessage) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  16517. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7aiohttp_12_http_parser_RawRequestMessage) < 0) __PYX_ERR(0, 93, __pyx_L1_error)
  16518. __pyx_ptype_7aiohttp_12_http_parser_RawRequestMessage = &__pyx_type_7aiohttp_12_http_parser_RawRequestMessage;
  16519. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser_RawResponseMessage) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  16520. __pyx_type_7aiohttp_12_http_parser_RawResponseMessage.tp_print = 0;
  16521. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser_RawResponseMessage.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser_RawResponseMessage.tp_getattro == PyObject_GenericGetAttr)) {
  16522. __pyx_type_7aiohttp_12_http_parser_RawResponseMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  16523. }
  16524. if (PyObject_SetAttrString(__pyx_m, "RawResponseMessage", (PyObject *)&__pyx_type_7aiohttp_12_http_parser_RawResponseMessage) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  16525. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7aiohttp_12_http_parser_RawResponseMessage) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
  16526. __pyx_ptype_7aiohttp_12_http_parser_RawResponseMessage = &__pyx_type_7aiohttp_12_http_parser_RawResponseMessage;
  16527. __pyx_vtabptr_7aiohttp_12_http_parser_HttpParser = &__pyx_vtable_7aiohttp_12_http_parser_HttpParser;
  16528. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._init = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *, enum http_parser_type, PyObject *, PyObject *, struct __pyx_opt_args_7aiohttp_12_http_parser_10HttpParser__init *__pyx_optional_args))__pyx_f_7aiohttp_12_http_parser_10HttpParser__init;
  16529. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._process_header = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser__process_header;
  16530. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_header_field = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *, char *, size_t))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_header_field;
  16531. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_header_value = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *, char *, size_t))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_header_value;
  16532. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_headers_complete = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_headers_complete;
  16533. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_message_complete = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_message_complete;
  16534. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_chunk_header = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_chunk_header;
  16535. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_chunk_complete = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_chunk_complete;
  16536. __pyx_vtable_7aiohttp_12_http_parser_HttpParser._on_status_complete = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser__on_status_complete;
  16537. __pyx_vtable_7aiohttp_12_http_parser_HttpParser.http_version = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_10HttpParser_http_version;
  16538. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser_HttpParser) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  16539. __pyx_type_7aiohttp_12_http_parser_HttpParser.tp_print = 0;
  16540. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser_HttpParser.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser_HttpParser.tp_getattro == PyObject_GenericGetAttr)) {
  16541. __pyx_type_7aiohttp_12_http_parser_HttpParser.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  16542. }
  16543. if (__Pyx_SetVtable(__pyx_type_7aiohttp_12_http_parser_HttpParser.tp_dict, __pyx_vtabptr_7aiohttp_12_http_parser_HttpParser) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  16544. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7aiohttp_12_http_parser_HttpParser) < 0) __PYX_ERR(0, 255, __pyx_L1_error)
  16545. __pyx_ptype_7aiohttp_12_http_parser_HttpParser = &__pyx_type_7aiohttp_12_http_parser_HttpParser;
  16546. __pyx_vtabptr_7aiohttp_12_http_parser_HttpRequestParser = &__pyx_vtable_7aiohttp_12_http_parser_HttpRequestParser;
  16547. __pyx_vtable_7aiohttp_12_http_parser_HttpRequestParser.__pyx_base = *__pyx_vtabptr_7aiohttp_12_http_parser_HttpParser;
  16548. __pyx_vtable_7aiohttp_12_http_parser_HttpRequestParser.__pyx_base._on_status_complete = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_17HttpRequestParser__on_status_complete;
  16549. __pyx_type_7aiohttp_12_http_parser_HttpRequestParser.tp_base = __pyx_ptype_7aiohttp_12_http_parser_HttpParser;
  16550. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser_HttpRequestParser) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  16551. __pyx_type_7aiohttp_12_http_parser_HttpRequestParser.tp_print = 0;
  16552. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser_HttpRequestParser.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser_HttpRequestParser.tp_getattro == PyObject_GenericGetAttr)) {
  16553. __pyx_type_7aiohttp_12_http_parser_HttpRequestParser.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  16554. }
  16555. if (__Pyx_SetVtable(__pyx_type_7aiohttp_12_http_parser_HttpRequestParser.tp_dict, __pyx_vtabptr_7aiohttp_12_http_parser_HttpRequestParser) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  16556. if (PyObject_SetAttrString(__pyx_m, "HttpRequestParser", (PyObject *)&__pyx_type_7aiohttp_12_http_parser_HttpRequestParser) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  16557. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7aiohttp_12_http_parser_HttpRequestParser) < 0) __PYX_ERR(0, 537, __pyx_L1_error)
  16558. __pyx_ptype_7aiohttp_12_http_parser_HttpRequestParser = &__pyx_type_7aiohttp_12_http_parser_HttpRequestParser;
  16559. __pyx_vtabptr_7aiohttp_12_http_parser_HttpResponseParser = &__pyx_vtable_7aiohttp_12_http_parser_HttpResponseParser;
  16560. __pyx_vtable_7aiohttp_12_http_parser_HttpResponseParser.__pyx_base = *__pyx_vtabptr_7aiohttp_12_http_parser_HttpParser;
  16561. __pyx_vtable_7aiohttp_12_http_parser_HttpResponseParser.__pyx_base._on_status_complete = (PyObject *(*)(struct __pyx_obj_7aiohttp_12_http_parser_HttpParser *))__pyx_f_7aiohttp_12_http_parser_18HttpResponseParser__on_status_complete;
  16562. __pyx_type_7aiohttp_12_http_parser_HttpResponseParser.tp_base = __pyx_ptype_7aiohttp_12_http_parser_HttpParser;
  16563. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser_HttpResponseParser) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  16564. __pyx_type_7aiohttp_12_http_parser_HttpResponseParser.tp_print = 0;
  16565. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser_HttpResponseParser.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser_HttpResponseParser.tp_getattro == PyObject_GenericGetAttr)) {
  16566. __pyx_type_7aiohttp_12_http_parser_HttpResponseParser.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  16567. }
  16568. if (__Pyx_SetVtable(__pyx_type_7aiohttp_12_http_parser_HttpResponseParser.tp_dict, __pyx_vtabptr_7aiohttp_12_http_parser_HttpResponseParser) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  16569. if (PyObject_SetAttrString(__pyx_m, "HttpResponseParser", (PyObject *)&__pyx_type_7aiohttp_12_http_parser_HttpResponseParser) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  16570. if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7aiohttp_12_http_parser_HttpResponseParser) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
  16571. __pyx_ptype_7aiohttp_12_http_parser_HttpResponseParser = &__pyx_type_7aiohttp_12_http_parser_HttpResponseParser;
  16572. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
  16573. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__.tp_print = 0;
  16574. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__.tp_getattro == PyObject_GenericGetAttr)) {
  16575. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  16576. }
  16577. __pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct____repr__ = &__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct____repr__;
  16578. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
  16579. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr.tp_print = 0;
  16580. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
  16581. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  16582. }
  16583. __pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr = &__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_1_genexpr;
  16584. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__) < 0) __PYX_ERR(0, 216, __pyx_L1_error)
  16585. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__.tp_print = 0;
  16586. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__.tp_getattro == PyObject_GenericGetAttr)) {
  16587. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  16588. }
  16589. __pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__ = &__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_2___repr__;
  16590. if (PyType_Ready(&__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
  16591. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr.tp_print = 0;
  16592. if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr.tp_dictoffset && __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
  16593. __pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  16594. }
  16595. __pyx_ptype_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr = &__pyx_type_7aiohttp_12_http_parser___pyx_scope_struct_3_genexpr;
  16596. __Pyx_RefNannyFinishContext();
  16597. return 0;
  16598. __pyx_L1_error:;
  16599. __Pyx_RefNannyFinishContext();
  16600. return -1;
  16601. }
  16602. static int __Pyx_modinit_type_import_code(void) {
  16603. __Pyx_RefNannyDeclarations
  16604. __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  16605. /*--- Type import code ---*/
  16606. __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type",
  16607. #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
  16608. sizeof(PyTypeObject),
  16609. #else
  16610. sizeof(PyHeapTypeObject),
  16611. #endif
  16612. 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(2, 9, __pyx_L1_error)
  16613. __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) __PYX_ERR(3, 8, __pyx_L1_error)
  16614. __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) __PYX_ERR(4, 15, __pyx_L1_error)
  16615. __Pyx_RefNannyFinishContext();
  16616. return 0;
  16617. __pyx_L1_error:;
  16618. __Pyx_RefNannyFinishContext();
  16619. return -1;
  16620. }
  16621. static int __Pyx_modinit_variable_import_code(void) {
  16622. __Pyx_RefNannyDeclarations
  16623. __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  16624. /*--- Variable import code ---*/
  16625. __Pyx_RefNannyFinishContext();
  16626. return 0;
  16627. }
  16628. static int __Pyx_modinit_function_import_code(void) {
  16629. __Pyx_RefNannyDeclarations
  16630. __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  16631. /*--- Function import code ---*/
  16632. __Pyx_RefNannyFinishContext();
  16633. return 0;
  16634. }
  16635. #if PY_MAJOR_VERSION < 3
  16636. #ifdef CYTHON_NO_PYINIT_EXPORT
  16637. #define __Pyx_PyMODINIT_FUNC void
  16638. #else
  16639. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  16640. #endif
  16641. #else
  16642. #ifdef CYTHON_NO_PYINIT_EXPORT
  16643. #define __Pyx_PyMODINIT_FUNC PyObject *
  16644. #else
  16645. #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
  16646. #endif
  16647. #endif
  16648. #ifndef CYTHON_SMALL_CODE
  16649. #if defined(__clang__)
  16650. #define CYTHON_SMALL_CODE
  16651. #elif defined(__GNUC__) && (!(defined(__cplusplus)) || (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)))
  16652. #define CYTHON_SMALL_CODE __attribute__((cold))
  16653. #else
  16654. #define CYTHON_SMALL_CODE
  16655. #endif
  16656. #endif
  16657. #if PY_MAJOR_VERSION < 3
  16658. __Pyx_PyMODINIT_FUNC init_http_parser(void) CYTHON_SMALL_CODE; /*proto*/
  16659. __Pyx_PyMODINIT_FUNC init_http_parser(void)
  16660. #else
  16661. __Pyx_PyMODINIT_FUNC PyInit__http_parser(void) CYTHON_SMALL_CODE; /*proto*/
  16662. __Pyx_PyMODINIT_FUNC PyInit__http_parser(void)
  16663. #if CYTHON_PEP489_MULTI_PHASE_INIT
  16664. {
  16665. return PyModuleDef_Init(&__pyx_moduledef);
  16666. }
  16667. static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
  16668. PyObject *value = PyObject_GetAttrString(spec, from_name);
  16669. int result = 0;
  16670. if (likely(value)) {
  16671. result = PyDict_SetItemString(moddict, to_name, value);
  16672. Py_DECREF(value);
  16673. } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
  16674. PyErr_Clear();
  16675. } else {
  16676. result = -1;
  16677. }
  16678. return result;
  16679. }
  16680. static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
  16681. PyObject *module = NULL, *moddict, *modname;
  16682. if (__pyx_m)
  16683. return __Pyx_NewRef(__pyx_m);
  16684. modname = PyObject_GetAttrString(spec, "name");
  16685. if (unlikely(!modname)) goto bad;
  16686. module = PyModule_NewObject(modname);
  16687. Py_DECREF(modname);
  16688. if (unlikely(!module)) goto bad;
  16689. moddict = PyModule_GetDict(module);
  16690. if (unlikely(!moddict)) goto bad;
  16691. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
  16692. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
  16693. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
  16694. if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
  16695. return module;
  16696. bad:
  16697. Py_XDECREF(module);
  16698. return NULL;
  16699. }
  16700. static int __pyx_pymod_exec__http_parser(PyObject *__pyx_pyinit_module)
  16701. #endif
  16702. #endif
  16703. {
  16704. PyObject *__pyx_t_1 = NULL;
  16705. PyObject *__pyx_t_2 = NULL;
  16706. PyObject *__pyx_t_3 = NULL;
  16707. PyObject *__pyx_t_4 = NULL;
  16708. PyObject *__pyx_t_5 = NULL;
  16709. PyObject *__pyx_t_6 = NULL;
  16710. PyObject *__pyx_t_7 = NULL;
  16711. PyObject *__pyx_t_8 = NULL;
  16712. PyObject *__pyx_t_9 = NULL;
  16713. PyObject *__pyx_t_10 = NULL;
  16714. PyObject *__pyx_t_11 = NULL;
  16715. PyObject *__pyx_t_12 = NULL;
  16716. PyObject *__pyx_t_13 = NULL;
  16717. PyObject *__pyx_t_14 = NULL;
  16718. PyObject *__pyx_t_15 = NULL;
  16719. PyObject *__pyx_t_16 = NULL;
  16720. PyObject *__pyx_t_17 = NULL;
  16721. PyObject *__pyx_t_18 = NULL;
  16722. PyObject *__pyx_t_19 = NULL;
  16723. PyObject *__pyx_t_20 = NULL;
  16724. PyObject *__pyx_t_21 = NULL;
  16725. PyObject *__pyx_t_22 = NULL;
  16726. PyObject *__pyx_t_23 = NULL;
  16727. PyObject *__pyx_t_24 = NULL;
  16728. PyObject *__pyx_t_25 = NULL;
  16729. PyObject *__pyx_t_26 = NULL;
  16730. PyObject *__pyx_t_27 = NULL;
  16731. PyObject *__pyx_t_28 = NULL;
  16732. PyObject *__pyx_t_29 = NULL;
  16733. PyObject *__pyx_t_30 = NULL;
  16734. PyObject *__pyx_t_31 = NULL;
  16735. PyObject *__pyx_t_32 = NULL;
  16736. PyObject *__pyx_t_33 = NULL;
  16737. PyObject *__pyx_t_34 = NULL;
  16738. PyObject *__pyx_t_35 = NULL;
  16739. PyObject *__pyx_t_36 = NULL;
  16740. PyObject *__pyx_t_37 = NULL;
  16741. PyObject *__pyx_t_38 = NULL;
  16742. PyObject *__pyx_t_39 = NULL;
  16743. PyObject *__pyx_t_40 = NULL;
  16744. PyObject *__pyx_t_41 = NULL;
  16745. PyObject *__pyx_t_42 = NULL;
  16746. PyObject *__pyx_t_43 = NULL;
  16747. PyObject *__pyx_t_44 = NULL;
  16748. PyObject *__pyx_t_45 = NULL;
  16749. PyObject *__pyx_t_46 = NULL;
  16750. PyObject *__pyx_t_47 = NULL;
  16751. PyObject *__pyx_t_48 = NULL;
  16752. PyObject *__pyx_t_49 = NULL;
  16753. PyObject *__pyx_t_50 = NULL;
  16754. PyObject *__pyx_t_51 = NULL;
  16755. PyObject *__pyx_t_52 = NULL;
  16756. PyObject *__pyx_t_53 = NULL;
  16757. PyObject *__pyx_t_54 = NULL;
  16758. PyObject *__pyx_t_55 = NULL;
  16759. PyObject *__pyx_t_56 = NULL;
  16760. PyObject *__pyx_t_57 = NULL;
  16761. PyObject *__pyx_t_58 = NULL;
  16762. PyObject *__pyx_t_59 = NULL;
  16763. PyObject *__pyx_t_60 = NULL;
  16764. PyObject *__pyx_t_61 = NULL;
  16765. PyObject *__pyx_t_62 = NULL;
  16766. PyObject *__pyx_t_63 = NULL;
  16767. PyObject *__pyx_t_64 = NULL;
  16768. PyObject *__pyx_t_65 = NULL;
  16769. PyObject *__pyx_t_66 = NULL;
  16770. PyObject *__pyx_t_67 = NULL;
  16771. PyObject *__pyx_t_68 = NULL;
  16772. PyObject *__pyx_t_69 = NULL;
  16773. PyObject *__pyx_t_70 = NULL;
  16774. PyObject *__pyx_t_71 = NULL;
  16775. PyObject *__pyx_t_72 = NULL;
  16776. PyObject *__pyx_t_73 = NULL;
  16777. PyObject *__pyx_t_74 = NULL;
  16778. PyObject *__pyx_t_75 = NULL;
  16779. PyObject *__pyx_t_76 = NULL;
  16780. PyObject *__pyx_t_77 = NULL;
  16781. PyObject *__pyx_t_78 = NULL;
  16782. PyObject *__pyx_t_79 = NULL;
  16783. long __pyx_t_80;
  16784. enum http_method __pyx_t_81;
  16785. char const *__pyx_t_82;
  16786. int __pyx_t_83;
  16787. __Pyx_RefNannyDeclarations
  16788. #if CYTHON_PEP489_MULTI_PHASE_INIT
  16789. if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  16790. #elif PY_MAJOR_VERSION >= 3
  16791. if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  16792. #endif
  16793. #if CYTHON_REFNANNY
  16794. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  16795. if (!__Pyx_RefNanny) {
  16796. PyErr_Clear();
  16797. __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  16798. if (!__Pyx_RefNanny)
  16799. Py_FatalError("failed to import 'refnanny' module");
  16800. }
  16801. #endif
  16802. __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__http_parser(void)", 0);
  16803. if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16804. __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  16805. __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  16806. __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  16807. #ifdef __Pyx_CyFunction_USED
  16808. if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16809. #endif
  16810. #ifdef __Pyx_FusedFunction_USED
  16811. if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16812. #endif
  16813. #ifdef __Pyx_Coroutine_USED
  16814. if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16815. #endif
  16816. #ifdef __Pyx_Generator_USED
  16817. if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16818. #endif
  16819. #ifdef __Pyx_AsyncGen_USED
  16820. if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16821. #endif
  16822. #ifdef __Pyx_StopAsyncIteration_USED
  16823. if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16824. #endif
  16825. /*--- Library function declarations ---*/
  16826. /*--- Threads initialization code ---*/
  16827. #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  16828. #ifdef WITH_THREAD /* Python build with threading support? */
  16829. PyEval_InitThreads();
  16830. #endif
  16831. #endif
  16832. /*--- Module creation code ---*/
  16833. #if CYTHON_PEP489_MULTI_PHASE_INIT
  16834. __pyx_m = __pyx_pyinit_module;
  16835. Py_INCREF(__pyx_m);
  16836. #else
  16837. #if PY_MAJOR_VERSION < 3
  16838. __pyx_m = Py_InitModule4("_http_parser", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  16839. #else
  16840. __pyx_m = PyModule_Create(&__pyx_moduledef);
  16841. #endif
  16842. if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  16843. #endif
  16844. __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  16845. Py_INCREF(__pyx_d);
  16846. __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  16847. __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  16848. #if CYTHON_COMPILING_IN_PYPY
  16849. Py_INCREF(__pyx_b);
  16850. #endif
  16851. if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  16852. /*--- Initialize various global constants etc. ---*/
  16853. if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16854. #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  16855. if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16856. #endif
  16857. if (__pyx_module_is_main_aiohttp___http_parser) {
  16858. if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16859. }
  16860. #if PY_MAJOR_VERSION >= 3
  16861. {
  16862. PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
  16863. if (!PyDict_GetItemString(modules, "aiohttp._http_parser")) {
  16864. if (unlikely(PyDict_SetItemString(modules, "aiohttp._http_parser", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  16865. }
  16866. }
  16867. #endif
  16868. /*--- Builtin init code ---*/
  16869. if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16870. /*--- Constants init code ---*/
  16871. if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16872. /*--- Global type/function init code ---*/
  16873. (void)__Pyx_modinit_global_init_code();
  16874. (void)__Pyx_modinit_variable_export_code();
  16875. (void)__Pyx_modinit_function_export_code();
  16876. if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
  16877. if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
  16878. (void)__Pyx_modinit_variable_import_code();
  16879. (void)__Pyx_modinit_function_import_code();
  16880. /*--- Execution code ---*/
  16881. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  16882. if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  16883. #endif
  16884. /* "aiohttp/_http_parser.pyx":11
  16885. * Py_buffer, PyBytes_AsString, PyBytes_AsStringAndSize)
  16886. *
  16887. * from multidict import (CIMultiDict as _CIMultiDict, # <<<<<<<<<<<<<<
  16888. * CIMultiDictProxy as _CIMultiDictProxy)
  16889. * from yarl import URL as _URL
  16890. */
  16891. __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  16892. __Pyx_GOTREF(__pyx_t_1);
  16893. __Pyx_INCREF(__pyx_n_s_CIMultiDict);
  16894. __Pyx_GIVEREF(__pyx_n_s_CIMultiDict);
  16895. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_CIMultiDict);
  16896. __Pyx_INCREF(__pyx_n_s_CIMultiDictProxy);
  16897. __Pyx_GIVEREF(__pyx_n_s_CIMultiDictProxy);
  16898. PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_CIMultiDictProxy);
  16899. __pyx_t_2 = __Pyx_Import(__pyx_n_s_multidict, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error)
  16900. __Pyx_GOTREF(__pyx_t_2);
  16901. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16902. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CIMultiDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  16903. __Pyx_GOTREF(__pyx_t_1);
  16904. if (PyDict_SetItem(__pyx_d, __pyx_n_s_CIMultiDict_2, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
  16905. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16906. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CIMultiDictProxy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error)
  16907. __Pyx_GOTREF(__pyx_t_1);
  16908. if (PyDict_SetItem(__pyx_d, __pyx_n_s_CIMultiDictProxy_2, __pyx_t_1) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  16909. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16910. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16911. /* "aiohttp/_http_parser.pyx":13
  16912. * from multidict import (CIMultiDict as _CIMultiDict,
  16913. * CIMultiDictProxy as _CIMultiDictProxy)
  16914. * from yarl import URL as _URL # <<<<<<<<<<<<<<
  16915. *
  16916. * from aiohttp import hdrs
  16917. */
  16918. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  16919. __Pyx_GOTREF(__pyx_t_2);
  16920. __Pyx_INCREF(__pyx_n_s_URL);
  16921. __Pyx_GIVEREF(__pyx_n_s_URL);
  16922. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_URL);
  16923. __pyx_t_1 = __Pyx_Import(__pyx_n_s_yarl, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
  16924. __Pyx_GOTREF(__pyx_t_1);
  16925. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16926. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_URL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  16927. __Pyx_GOTREF(__pyx_t_2);
  16928. if (PyDict_SetItem(__pyx_d, __pyx_n_s_URL_2, __pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
  16929. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16930. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16931. /* "aiohttp/_http_parser.pyx":15
  16932. * from yarl import URL as _URL
  16933. *
  16934. * from aiohttp import hdrs # <<<<<<<<<<<<<<
  16935. * from .http_exceptions import (
  16936. * BadHttpMessage, BadStatusLine, InvalidHeader, LineTooLong, InvalidURLError,
  16937. */
  16938. __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  16939. __Pyx_GOTREF(__pyx_t_1);
  16940. __Pyx_INCREF(__pyx_n_s_hdrs);
  16941. __Pyx_GIVEREF(__pyx_n_s_hdrs);
  16942. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_hdrs);
  16943. __pyx_t_2 = __Pyx_Import(__pyx_n_s_aiohttp, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
  16944. __Pyx_GOTREF(__pyx_t_2);
  16945. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16946. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_hdrs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
  16947. __Pyx_GOTREF(__pyx_t_1);
  16948. if (PyDict_SetItem(__pyx_d, __pyx_n_s_hdrs, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  16949. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  16950. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16951. /* "aiohttp/_http_parser.pyx":17
  16952. * from aiohttp import hdrs
  16953. * from .http_exceptions import (
  16954. * BadHttpMessage, BadStatusLine, InvalidHeader, LineTooLong, InvalidURLError, # <<<<<<<<<<<<<<
  16955. * PayloadEncodingError, ContentLengthError, TransferEncodingError)
  16956. * from .http_writer import (HttpVersion as _HttpVersion,
  16957. */
  16958. __pyx_t_2 = PyList_New(8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
  16959. __Pyx_GOTREF(__pyx_t_2);
  16960. __Pyx_INCREF(__pyx_n_s_BadHttpMessage);
  16961. __Pyx_GIVEREF(__pyx_n_s_BadHttpMessage);
  16962. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_BadHttpMessage);
  16963. __Pyx_INCREF(__pyx_n_s_BadStatusLine);
  16964. __Pyx_GIVEREF(__pyx_n_s_BadStatusLine);
  16965. PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_BadStatusLine);
  16966. __Pyx_INCREF(__pyx_n_s_InvalidHeader);
  16967. __Pyx_GIVEREF(__pyx_n_s_InvalidHeader);
  16968. PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_InvalidHeader);
  16969. __Pyx_INCREF(__pyx_n_s_LineTooLong);
  16970. __Pyx_GIVEREF(__pyx_n_s_LineTooLong);
  16971. PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_LineTooLong);
  16972. __Pyx_INCREF(__pyx_n_s_InvalidURLError);
  16973. __Pyx_GIVEREF(__pyx_n_s_InvalidURLError);
  16974. PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_InvalidURLError);
  16975. __Pyx_INCREF(__pyx_n_s_PayloadEncodingError);
  16976. __Pyx_GIVEREF(__pyx_n_s_PayloadEncodingError);
  16977. PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_PayloadEncodingError);
  16978. __Pyx_INCREF(__pyx_n_s_ContentLengthError);
  16979. __Pyx_GIVEREF(__pyx_n_s_ContentLengthError);
  16980. PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_ContentLengthError);
  16981. __Pyx_INCREF(__pyx_n_s_TransferEncodingError);
  16982. __Pyx_GIVEREF(__pyx_n_s_TransferEncodingError);
  16983. PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_TransferEncodingError);
  16984. /* "aiohttp/_http_parser.pyx":16
  16985. *
  16986. * from aiohttp import hdrs
  16987. * from .http_exceptions import ( # <<<<<<<<<<<<<<
  16988. * BadHttpMessage, BadStatusLine, InvalidHeader, LineTooLong, InvalidURLError,
  16989. * PayloadEncodingError, ContentLengthError, TransferEncodingError)
  16990. */
  16991. __pyx_t_1 = __Pyx_Import(__pyx_n_s_http_exceptions, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
  16992. __Pyx_GOTREF(__pyx_t_1);
  16993. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16994. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BadHttpMessage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  16995. __Pyx_GOTREF(__pyx_t_2);
  16996. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BadHttpMessage, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  16997. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  16998. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_BadStatusLine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  16999. __Pyx_GOTREF(__pyx_t_2);
  17000. if (PyDict_SetItem(__pyx_d, __pyx_n_s_BadStatusLine, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  17001. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17002. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_InvalidHeader); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  17003. __Pyx_GOTREF(__pyx_t_2);
  17004. if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidHeader, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  17005. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17006. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_LineTooLong); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  17007. __Pyx_GOTREF(__pyx_t_2);
  17008. if (PyDict_SetItem(__pyx_d, __pyx_n_s_LineTooLong, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  17009. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17010. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_InvalidURLError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  17011. __Pyx_GOTREF(__pyx_t_2);
  17012. if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidURLError, __pyx_t_2) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
  17013. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17014. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PayloadEncodingError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  17015. __Pyx_GOTREF(__pyx_t_2);
  17016. if (PyDict_SetItem(__pyx_d, __pyx_n_s_PayloadEncodingError, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  17017. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17018. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ContentLengthError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  17019. __Pyx_GOTREF(__pyx_t_2);
  17020. if (PyDict_SetItem(__pyx_d, __pyx_n_s_ContentLengthError, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  17021. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17022. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TransferEncodingError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
  17023. __Pyx_GOTREF(__pyx_t_2);
  17024. if (PyDict_SetItem(__pyx_d, __pyx_n_s_TransferEncodingError, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
  17025. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17026. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17027. /* "aiohttp/_http_parser.pyx":19
  17028. * BadHttpMessage, BadStatusLine, InvalidHeader, LineTooLong, InvalidURLError,
  17029. * PayloadEncodingError, ContentLengthError, TransferEncodingError)
  17030. * from .http_writer import (HttpVersion as _HttpVersion, # <<<<<<<<<<<<<<
  17031. * HttpVersion10 as _HttpVersion10,
  17032. * HttpVersion11 as _HttpVersion11)
  17033. */
  17034. __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  17035. __Pyx_GOTREF(__pyx_t_1);
  17036. __Pyx_INCREF(__pyx_n_s_HttpVersion);
  17037. __Pyx_GIVEREF(__pyx_n_s_HttpVersion);
  17038. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_HttpVersion);
  17039. __Pyx_INCREF(__pyx_n_s_HttpVersion10);
  17040. __Pyx_GIVEREF(__pyx_n_s_HttpVersion10);
  17041. PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_HttpVersion10);
  17042. __Pyx_INCREF(__pyx_n_s_HttpVersion11);
  17043. __Pyx_GIVEREF(__pyx_n_s_HttpVersion11);
  17044. PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_HttpVersion11);
  17045. __pyx_t_2 = __Pyx_Import(__pyx_n_s_http_writer, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  17046. __Pyx_GOTREF(__pyx_t_2);
  17047. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17048. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HttpVersion); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  17049. __Pyx_GOTREF(__pyx_t_1);
  17050. if (PyDict_SetItem(__pyx_d, __pyx_n_s_HttpVersion_2, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
  17051. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17052. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HttpVersion10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  17053. __Pyx_GOTREF(__pyx_t_1);
  17054. if (PyDict_SetItem(__pyx_d, __pyx_n_s_HttpVersion10_2, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
  17055. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17056. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_HttpVersion11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
  17057. __Pyx_GOTREF(__pyx_t_1);
  17058. if (PyDict_SetItem(__pyx_d, __pyx_n_s_HttpVersion11_2, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
  17059. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17060. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17061. /* "aiohttp/_http_parser.pyx":22
  17062. * HttpVersion10 as _HttpVersion10,
  17063. * HttpVersion11 as _HttpVersion11)
  17064. * from .http_parser import DeflateBuffer as _DeflateBuffer # <<<<<<<<<<<<<<
  17065. * from .streams import (EMPTY_PAYLOAD as _EMPTY_PAYLOAD,
  17066. * StreamReader as _StreamReader)
  17067. */
  17068. __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  17069. __Pyx_GOTREF(__pyx_t_2);
  17070. __Pyx_INCREF(__pyx_n_s_DeflateBuffer);
  17071. __Pyx_GIVEREF(__pyx_n_s_DeflateBuffer);
  17072. PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DeflateBuffer);
  17073. __pyx_t_1 = __Pyx_Import(__pyx_n_s_http_parser, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
  17074. __Pyx_GOTREF(__pyx_t_1);
  17075. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17076. __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DeflateBuffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
  17077. __Pyx_GOTREF(__pyx_t_2);
  17078. if (PyDict_SetItem(__pyx_d, __pyx_n_s_DeflateBuffer_2, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
  17079. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17080. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17081. /* "aiohttp/_http_parser.pyx":23
  17082. * HttpVersion11 as _HttpVersion11)
  17083. * from .http_parser import DeflateBuffer as _DeflateBuffer
  17084. * from .streams import (EMPTY_PAYLOAD as _EMPTY_PAYLOAD, # <<<<<<<<<<<<<<
  17085. * StreamReader as _StreamReader)
  17086. *
  17087. */
  17088. __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  17089. __Pyx_GOTREF(__pyx_t_1);
  17090. __Pyx_INCREF(__pyx_n_s_EMPTY_PAYLOAD);
  17091. __Pyx_GIVEREF(__pyx_n_s_EMPTY_PAYLOAD);
  17092. PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_EMPTY_PAYLOAD);
  17093. __Pyx_INCREF(__pyx_n_s_StreamReader);
  17094. __Pyx_GIVEREF(__pyx_n_s_StreamReader);
  17095. PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_StreamReader);
  17096. __pyx_t_2 = __Pyx_Import(__pyx_n_s_streams, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
  17097. __Pyx_GOTREF(__pyx_t_2);
  17098. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17099. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_EMPTY_PAYLOAD); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  17100. __Pyx_GOTREF(__pyx_t_1);
  17101. if (PyDict_SetItem(__pyx_d, __pyx_n_s_EMPTY_PAYLOAD_2, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
  17102. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17103. __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_StreamReader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
  17104. __Pyx_GOTREF(__pyx_t_1);
  17105. if (PyDict_SetItem(__pyx_d, __pyx_n_s_StreamReader_2, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
  17106. __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  17107. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17108. /* "aiohttp/_headers.pxi":3
  17109. * # The file is autogenerated from aiohtt/hdrs.py# Run ./tools/gen.py to update it after the origin changing.from . import hdrs
  17110. * cdef tuple headers = (
  17111. * hdrs.ACCEPT, # <<<<<<<<<<<<<<
  17112. * hdrs.ACCEPT_CHARSET,
  17113. * hdrs.ACCEPT_ENCODING,
  17114. */
  17115. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3, __pyx_L1_error)
  17116. __Pyx_GOTREF(__pyx_t_2);
  17117. __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCEPT); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 3, __pyx_L1_error)
  17118. __Pyx_GOTREF(__pyx_t_1);
  17119. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17120. /* "aiohttp/_headers.pxi":4
  17121. * cdef tuple headers = (
  17122. * hdrs.ACCEPT,
  17123. * hdrs.ACCEPT_CHARSET, # <<<<<<<<<<<<<<
  17124. * hdrs.ACCEPT_ENCODING,
  17125. * hdrs.ACCEPT_LANGUAGE,
  17126. */
  17127. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 4, __pyx_L1_error)
  17128. __Pyx_GOTREF(__pyx_t_2);
  17129. __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCEPT_CHARSET); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 4, __pyx_L1_error)
  17130. __Pyx_GOTREF(__pyx_t_3);
  17131. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17132. /* "aiohttp/_headers.pxi":5
  17133. * hdrs.ACCEPT,
  17134. * hdrs.ACCEPT_CHARSET,
  17135. * hdrs.ACCEPT_ENCODING, # <<<<<<<<<<<<<<
  17136. * hdrs.ACCEPT_LANGUAGE,
  17137. * hdrs.ACCEPT_RANGES,
  17138. */
  17139. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 5, __pyx_L1_error)
  17140. __Pyx_GOTREF(__pyx_t_2);
  17141. __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCEPT_ENCODING); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 5, __pyx_L1_error)
  17142. __Pyx_GOTREF(__pyx_t_4);
  17143. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17144. /* "aiohttp/_headers.pxi":6
  17145. * hdrs.ACCEPT_CHARSET,
  17146. * hdrs.ACCEPT_ENCODING,
  17147. * hdrs.ACCEPT_LANGUAGE, # <<<<<<<<<<<<<<
  17148. * hdrs.ACCEPT_RANGES,
  17149. * hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
  17150. */
  17151. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 6, __pyx_L1_error)
  17152. __Pyx_GOTREF(__pyx_t_2);
  17153. __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCEPT_LANGUAGE); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 6, __pyx_L1_error)
  17154. __Pyx_GOTREF(__pyx_t_5);
  17155. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17156. /* "aiohttp/_headers.pxi":7
  17157. * hdrs.ACCEPT_ENCODING,
  17158. * hdrs.ACCEPT_LANGUAGE,
  17159. * hdrs.ACCEPT_RANGES, # <<<<<<<<<<<<<<
  17160. * hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
  17161. * hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
  17162. */
  17163. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 7, __pyx_L1_error)
  17164. __Pyx_GOTREF(__pyx_t_2);
  17165. __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCEPT_RANGES); if (unlikely(!__pyx_t_6)) __PYX_ERR(5, 7, __pyx_L1_error)
  17166. __Pyx_GOTREF(__pyx_t_6);
  17167. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17168. /* "aiohttp/_headers.pxi":8
  17169. * hdrs.ACCEPT_LANGUAGE,
  17170. * hdrs.ACCEPT_RANGES,
  17171. * hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS, # <<<<<<<<<<<<<<
  17172. * hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
  17173. * hdrs.ACCESS_CONTROL_ALLOW_METHODS,
  17174. */
  17175. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 8, __pyx_L1_error)
  17176. __Pyx_GOTREF(__pyx_t_2);
  17177. __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_ALLOW_CREDENTIALS); if (unlikely(!__pyx_t_7)) __PYX_ERR(5, 8, __pyx_L1_error)
  17178. __Pyx_GOTREF(__pyx_t_7);
  17179. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17180. /* "aiohttp/_headers.pxi":9
  17181. * hdrs.ACCEPT_RANGES,
  17182. * hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
  17183. * hdrs.ACCESS_CONTROL_ALLOW_HEADERS, # <<<<<<<<<<<<<<
  17184. * hdrs.ACCESS_CONTROL_ALLOW_METHODS,
  17185. * hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
  17186. */
  17187. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 9, __pyx_L1_error)
  17188. __Pyx_GOTREF(__pyx_t_2);
  17189. __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_ALLOW_HEADERS); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 9, __pyx_L1_error)
  17190. __Pyx_GOTREF(__pyx_t_8);
  17191. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17192. /* "aiohttp/_headers.pxi":10
  17193. * hdrs.ACCESS_CONTROL_ALLOW_CREDENTIALS,
  17194. * hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
  17195. * hdrs.ACCESS_CONTROL_ALLOW_METHODS, # <<<<<<<<<<<<<<
  17196. * hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
  17197. * hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
  17198. */
  17199. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 10, __pyx_L1_error)
  17200. __Pyx_GOTREF(__pyx_t_2);
  17201. __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_ALLOW_METHODS); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 10, __pyx_L1_error)
  17202. __Pyx_GOTREF(__pyx_t_9);
  17203. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17204. /* "aiohttp/_headers.pxi":11
  17205. * hdrs.ACCESS_CONTROL_ALLOW_HEADERS,
  17206. * hdrs.ACCESS_CONTROL_ALLOW_METHODS,
  17207. * hdrs.ACCESS_CONTROL_ALLOW_ORIGIN, # <<<<<<<<<<<<<<
  17208. * hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
  17209. * hdrs.ACCESS_CONTROL_MAX_AGE,
  17210. */
  17211. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 11, __pyx_L1_error)
  17212. __Pyx_GOTREF(__pyx_t_2);
  17213. __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_ALLOW_ORIGIN); if (unlikely(!__pyx_t_10)) __PYX_ERR(5, 11, __pyx_L1_error)
  17214. __Pyx_GOTREF(__pyx_t_10);
  17215. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17216. /* "aiohttp/_headers.pxi":12
  17217. * hdrs.ACCESS_CONTROL_ALLOW_METHODS,
  17218. * hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
  17219. * hdrs.ACCESS_CONTROL_EXPOSE_HEADERS, # <<<<<<<<<<<<<<
  17220. * hdrs.ACCESS_CONTROL_MAX_AGE,
  17221. * hdrs.ACCESS_CONTROL_REQUEST_HEADERS,
  17222. */
  17223. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 12, __pyx_L1_error)
  17224. __Pyx_GOTREF(__pyx_t_2);
  17225. __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_EXPOSE_HEADERS); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 12, __pyx_L1_error)
  17226. __Pyx_GOTREF(__pyx_t_11);
  17227. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17228. /* "aiohttp/_headers.pxi":13
  17229. * hdrs.ACCESS_CONTROL_ALLOW_ORIGIN,
  17230. * hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
  17231. * hdrs.ACCESS_CONTROL_MAX_AGE, # <<<<<<<<<<<<<<
  17232. * hdrs.ACCESS_CONTROL_REQUEST_HEADERS,
  17233. * hdrs.ACCESS_CONTROL_REQUEST_METHOD,
  17234. */
  17235. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 13, __pyx_L1_error)
  17236. __Pyx_GOTREF(__pyx_t_2);
  17237. __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_MAX_AGE); if (unlikely(!__pyx_t_12)) __PYX_ERR(5, 13, __pyx_L1_error)
  17238. __Pyx_GOTREF(__pyx_t_12);
  17239. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17240. /* "aiohttp/_headers.pxi":14
  17241. * hdrs.ACCESS_CONTROL_EXPOSE_HEADERS,
  17242. * hdrs.ACCESS_CONTROL_MAX_AGE,
  17243. * hdrs.ACCESS_CONTROL_REQUEST_HEADERS, # <<<<<<<<<<<<<<
  17244. * hdrs.ACCESS_CONTROL_REQUEST_METHOD,
  17245. * hdrs.AGE,
  17246. */
  17247. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 14, __pyx_L1_error)
  17248. __Pyx_GOTREF(__pyx_t_2);
  17249. __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_REQUEST_HEADERS); if (unlikely(!__pyx_t_13)) __PYX_ERR(5, 14, __pyx_L1_error)
  17250. __Pyx_GOTREF(__pyx_t_13);
  17251. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17252. /* "aiohttp/_headers.pxi":15
  17253. * hdrs.ACCESS_CONTROL_MAX_AGE,
  17254. * hdrs.ACCESS_CONTROL_REQUEST_HEADERS,
  17255. * hdrs.ACCESS_CONTROL_REQUEST_METHOD, # <<<<<<<<<<<<<<
  17256. * hdrs.AGE,
  17257. * hdrs.ALLOW,
  17258. */
  17259. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 15, __pyx_L1_error)
  17260. __Pyx_GOTREF(__pyx_t_2);
  17261. __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ACCESS_CONTROL_REQUEST_METHOD); if (unlikely(!__pyx_t_14)) __PYX_ERR(5, 15, __pyx_L1_error)
  17262. __Pyx_GOTREF(__pyx_t_14);
  17263. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17264. /* "aiohttp/_headers.pxi":16
  17265. * hdrs.ACCESS_CONTROL_REQUEST_HEADERS,
  17266. * hdrs.ACCESS_CONTROL_REQUEST_METHOD,
  17267. * hdrs.AGE, # <<<<<<<<<<<<<<
  17268. * hdrs.ALLOW,
  17269. * hdrs.AUTHORIZATION,
  17270. */
  17271. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 16, __pyx_L1_error)
  17272. __Pyx_GOTREF(__pyx_t_2);
  17273. __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AGE); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 16, __pyx_L1_error)
  17274. __Pyx_GOTREF(__pyx_t_15);
  17275. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17276. /* "aiohttp/_headers.pxi":17
  17277. * hdrs.ACCESS_CONTROL_REQUEST_METHOD,
  17278. * hdrs.AGE,
  17279. * hdrs.ALLOW, # <<<<<<<<<<<<<<
  17280. * hdrs.AUTHORIZATION,
  17281. * hdrs.CACHE_CONTROL,
  17282. */
  17283. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 17, __pyx_L1_error)
  17284. __Pyx_GOTREF(__pyx_t_2);
  17285. __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ALLOW); if (unlikely(!__pyx_t_16)) __PYX_ERR(5, 17, __pyx_L1_error)
  17286. __Pyx_GOTREF(__pyx_t_16);
  17287. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17288. /* "aiohttp/_headers.pxi":18
  17289. * hdrs.AGE,
  17290. * hdrs.ALLOW,
  17291. * hdrs.AUTHORIZATION, # <<<<<<<<<<<<<<
  17292. * hdrs.CACHE_CONTROL,
  17293. * hdrs.CONNECTION,
  17294. */
  17295. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 18, __pyx_L1_error)
  17296. __Pyx_GOTREF(__pyx_t_2);
  17297. __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_AUTHORIZATION); if (unlikely(!__pyx_t_17)) __PYX_ERR(5, 18, __pyx_L1_error)
  17298. __Pyx_GOTREF(__pyx_t_17);
  17299. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17300. /* "aiohttp/_headers.pxi":19
  17301. * hdrs.ALLOW,
  17302. * hdrs.AUTHORIZATION,
  17303. * hdrs.CACHE_CONTROL, # <<<<<<<<<<<<<<
  17304. * hdrs.CONNECTION,
  17305. * hdrs.CONTENT_DISPOSITION,
  17306. */
  17307. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 19, __pyx_L1_error)
  17308. __Pyx_GOTREF(__pyx_t_2);
  17309. __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CACHE_CONTROL); if (unlikely(!__pyx_t_18)) __PYX_ERR(5, 19, __pyx_L1_error)
  17310. __Pyx_GOTREF(__pyx_t_18);
  17311. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17312. /* "aiohttp/_headers.pxi":20
  17313. * hdrs.AUTHORIZATION,
  17314. * hdrs.CACHE_CONTROL,
  17315. * hdrs.CONNECTION, # <<<<<<<<<<<<<<
  17316. * hdrs.CONTENT_DISPOSITION,
  17317. * hdrs.CONTENT_ENCODING,
  17318. */
  17319. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 20, __pyx_L1_error)
  17320. __Pyx_GOTREF(__pyx_t_2);
  17321. __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONNECTION); if (unlikely(!__pyx_t_19)) __PYX_ERR(5, 20, __pyx_L1_error)
  17322. __Pyx_GOTREF(__pyx_t_19);
  17323. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17324. /* "aiohttp/_headers.pxi":21
  17325. * hdrs.CACHE_CONTROL,
  17326. * hdrs.CONNECTION,
  17327. * hdrs.CONTENT_DISPOSITION, # <<<<<<<<<<<<<<
  17328. * hdrs.CONTENT_ENCODING,
  17329. * hdrs.CONTENT_LANGUAGE,
  17330. */
  17331. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 21, __pyx_L1_error)
  17332. __Pyx_GOTREF(__pyx_t_2);
  17333. __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_DISPOSITION); if (unlikely(!__pyx_t_20)) __PYX_ERR(5, 21, __pyx_L1_error)
  17334. __Pyx_GOTREF(__pyx_t_20);
  17335. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17336. /* "aiohttp/_headers.pxi":22
  17337. * hdrs.CONNECTION,
  17338. * hdrs.CONTENT_DISPOSITION,
  17339. * hdrs.CONTENT_ENCODING, # <<<<<<<<<<<<<<
  17340. * hdrs.CONTENT_LANGUAGE,
  17341. * hdrs.CONTENT_LENGTH,
  17342. */
  17343. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 22, __pyx_L1_error)
  17344. __Pyx_GOTREF(__pyx_t_2);
  17345. __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_ENCODING); if (unlikely(!__pyx_t_21)) __PYX_ERR(5, 22, __pyx_L1_error)
  17346. __Pyx_GOTREF(__pyx_t_21);
  17347. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17348. /* "aiohttp/_headers.pxi":23
  17349. * hdrs.CONTENT_DISPOSITION,
  17350. * hdrs.CONTENT_ENCODING,
  17351. * hdrs.CONTENT_LANGUAGE, # <<<<<<<<<<<<<<
  17352. * hdrs.CONTENT_LENGTH,
  17353. * hdrs.CONTENT_LOCATION,
  17354. */
  17355. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 23, __pyx_L1_error)
  17356. __Pyx_GOTREF(__pyx_t_2);
  17357. __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_LANGUAGE); if (unlikely(!__pyx_t_22)) __PYX_ERR(5, 23, __pyx_L1_error)
  17358. __Pyx_GOTREF(__pyx_t_22);
  17359. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17360. /* "aiohttp/_headers.pxi":24
  17361. * hdrs.CONTENT_ENCODING,
  17362. * hdrs.CONTENT_LANGUAGE,
  17363. * hdrs.CONTENT_LENGTH, # <<<<<<<<<<<<<<
  17364. * hdrs.CONTENT_LOCATION,
  17365. * hdrs.CONTENT_MD5,
  17366. */
  17367. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 24, __pyx_L1_error)
  17368. __Pyx_GOTREF(__pyx_t_2);
  17369. __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_LENGTH); if (unlikely(!__pyx_t_23)) __PYX_ERR(5, 24, __pyx_L1_error)
  17370. __Pyx_GOTREF(__pyx_t_23);
  17371. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17372. /* "aiohttp/_headers.pxi":25
  17373. * hdrs.CONTENT_LANGUAGE,
  17374. * hdrs.CONTENT_LENGTH,
  17375. * hdrs.CONTENT_LOCATION, # <<<<<<<<<<<<<<
  17376. * hdrs.CONTENT_MD5,
  17377. * hdrs.CONTENT_RANGE,
  17378. */
  17379. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 25, __pyx_L1_error)
  17380. __Pyx_GOTREF(__pyx_t_2);
  17381. __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_LOCATION); if (unlikely(!__pyx_t_24)) __PYX_ERR(5, 25, __pyx_L1_error)
  17382. __Pyx_GOTREF(__pyx_t_24);
  17383. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17384. /* "aiohttp/_headers.pxi":26
  17385. * hdrs.CONTENT_LENGTH,
  17386. * hdrs.CONTENT_LOCATION,
  17387. * hdrs.CONTENT_MD5, # <<<<<<<<<<<<<<
  17388. * hdrs.CONTENT_RANGE,
  17389. * hdrs.CONTENT_TRANSFER_ENCODING,
  17390. */
  17391. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 26, __pyx_L1_error)
  17392. __Pyx_GOTREF(__pyx_t_2);
  17393. __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_MD5); if (unlikely(!__pyx_t_25)) __PYX_ERR(5, 26, __pyx_L1_error)
  17394. __Pyx_GOTREF(__pyx_t_25);
  17395. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17396. /* "aiohttp/_headers.pxi":27
  17397. * hdrs.CONTENT_LOCATION,
  17398. * hdrs.CONTENT_MD5,
  17399. * hdrs.CONTENT_RANGE, # <<<<<<<<<<<<<<
  17400. * hdrs.CONTENT_TRANSFER_ENCODING,
  17401. * hdrs.CONTENT_TYPE,
  17402. */
  17403. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 27, __pyx_L1_error)
  17404. __Pyx_GOTREF(__pyx_t_2);
  17405. __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_RANGE); if (unlikely(!__pyx_t_26)) __PYX_ERR(5, 27, __pyx_L1_error)
  17406. __Pyx_GOTREF(__pyx_t_26);
  17407. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17408. /* "aiohttp/_headers.pxi":28
  17409. * hdrs.CONTENT_MD5,
  17410. * hdrs.CONTENT_RANGE,
  17411. * hdrs.CONTENT_TRANSFER_ENCODING, # <<<<<<<<<<<<<<
  17412. * hdrs.CONTENT_TYPE,
  17413. * hdrs.COOKIE,
  17414. */
  17415. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 28, __pyx_L1_error)
  17416. __Pyx_GOTREF(__pyx_t_2);
  17417. __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_TRANSFER_ENCODING); if (unlikely(!__pyx_t_27)) __PYX_ERR(5, 28, __pyx_L1_error)
  17418. __Pyx_GOTREF(__pyx_t_27);
  17419. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17420. /* "aiohttp/_headers.pxi":29
  17421. * hdrs.CONTENT_RANGE,
  17422. * hdrs.CONTENT_TRANSFER_ENCODING,
  17423. * hdrs.CONTENT_TYPE, # <<<<<<<<<<<<<<
  17424. * hdrs.COOKIE,
  17425. * hdrs.DATE,
  17426. */
  17427. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 29, __pyx_L1_error)
  17428. __Pyx_GOTREF(__pyx_t_2);
  17429. __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CONTENT_TYPE); if (unlikely(!__pyx_t_28)) __PYX_ERR(5, 29, __pyx_L1_error)
  17430. __Pyx_GOTREF(__pyx_t_28);
  17431. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17432. /* "aiohttp/_headers.pxi":30
  17433. * hdrs.CONTENT_TRANSFER_ENCODING,
  17434. * hdrs.CONTENT_TYPE,
  17435. * hdrs.COOKIE, # <<<<<<<<<<<<<<
  17436. * hdrs.DATE,
  17437. * hdrs.DESTINATION,
  17438. */
  17439. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 30, __pyx_L1_error)
  17440. __Pyx_GOTREF(__pyx_t_2);
  17441. __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_COOKIE); if (unlikely(!__pyx_t_29)) __PYX_ERR(5, 30, __pyx_L1_error)
  17442. __Pyx_GOTREF(__pyx_t_29);
  17443. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17444. /* "aiohttp/_headers.pxi":31
  17445. * hdrs.CONTENT_TYPE,
  17446. * hdrs.COOKIE,
  17447. * hdrs.DATE, # <<<<<<<<<<<<<<
  17448. * hdrs.DESTINATION,
  17449. * hdrs.DIGEST,
  17450. */
  17451. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 31, __pyx_L1_error)
  17452. __Pyx_GOTREF(__pyx_t_2);
  17453. __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DATE); if (unlikely(!__pyx_t_30)) __PYX_ERR(5, 31, __pyx_L1_error)
  17454. __Pyx_GOTREF(__pyx_t_30);
  17455. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17456. /* "aiohttp/_headers.pxi":32
  17457. * hdrs.COOKIE,
  17458. * hdrs.DATE,
  17459. * hdrs.DESTINATION, # <<<<<<<<<<<<<<
  17460. * hdrs.DIGEST,
  17461. * hdrs.ETAG,
  17462. */
  17463. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 32, __pyx_L1_error)
  17464. __Pyx_GOTREF(__pyx_t_2);
  17465. __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DESTINATION); if (unlikely(!__pyx_t_31)) __PYX_ERR(5, 32, __pyx_L1_error)
  17466. __Pyx_GOTREF(__pyx_t_31);
  17467. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17468. /* "aiohttp/_headers.pxi":33
  17469. * hdrs.DATE,
  17470. * hdrs.DESTINATION,
  17471. * hdrs.DIGEST, # <<<<<<<<<<<<<<
  17472. * hdrs.ETAG,
  17473. * hdrs.EXPECT,
  17474. */
  17475. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 33, __pyx_L1_error)
  17476. __Pyx_GOTREF(__pyx_t_2);
  17477. __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DIGEST); if (unlikely(!__pyx_t_32)) __PYX_ERR(5, 33, __pyx_L1_error)
  17478. __Pyx_GOTREF(__pyx_t_32);
  17479. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17480. /* "aiohttp/_headers.pxi":34
  17481. * hdrs.DESTINATION,
  17482. * hdrs.DIGEST,
  17483. * hdrs.ETAG, # <<<<<<<<<<<<<<
  17484. * hdrs.EXPECT,
  17485. * hdrs.EXPIRES,
  17486. */
  17487. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 34, __pyx_L1_error)
  17488. __Pyx_GOTREF(__pyx_t_2);
  17489. __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ETAG); if (unlikely(!__pyx_t_33)) __PYX_ERR(5, 34, __pyx_L1_error)
  17490. __Pyx_GOTREF(__pyx_t_33);
  17491. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17492. /* "aiohttp/_headers.pxi":35
  17493. * hdrs.DIGEST,
  17494. * hdrs.ETAG,
  17495. * hdrs.EXPECT, # <<<<<<<<<<<<<<
  17496. * hdrs.EXPIRES,
  17497. * hdrs.FORWARDED,
  17498. */
  17499. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 35, __pyx_L1_error)
  17500. __Pyx_GOTREF(__pyx_t_2);
  17501. __pyx_t_34 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_EXPECT); if (unlikely(!__pyx_t_34)) __PYX_ERR(5, 35, __pyx_L1_error)
  17502. __Pyx_GOTREF(__pyx_t_34);
  17503. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17504. /* "aiohttp/_headers.pxi":36
  17505. * hdrs.ETAG,
  17506. * hdrs.EXPECT,
  17507. * hdrs.EXPIRES, # <<<<<<<<<<<<<<
  17508. * hdrs.FORWARDED,
  17509. * hdrs.FROM,
  17510. */
  17511. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 36, __pyx_L1_error)
  17512. __Pyx_GOTREF(__pyx_t_2);
  17513. __pyx_t_35 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_EXPIRES); if (unlikely(!__pyx_t_35)) __PYX_ERR(5, 36, __pyx_L1_error)
  17514. __Pyx_GOTREF(__pyx_t_35);
  17515. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17516. /* "aiohttp/_headers.pxi":37
  17517. * hdrs.EXPECT,
  17518. * hdrs.EXPIRES,
  17519. * hdrs.FORWARDED, # <<<<<<<<<<<<<<
  17520. * hdrs.FROM,
  17521. * hdrs.HOST,
  17522. */
  17523. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 37, __pyx_L1_error)
  17524. __Pyx_GOTREF(__pyx_t_2);
  17525. __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FORWARDED); if (unlikely(!__pyx_t_36)) __PYX_ERR(5, 37, __pyx_L1_error)
  17526. __Pyx_GOTREF(__pyx_t_36);
  17527. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17528. /* "aiohttp/_headers.pxi":38
  17529. * hdrs.EXPIRES,
  17530. * hdrs.FORWARDED,
  17531. * hdrs.FROM, # <<<<<<<<<<<<<<
  17532. * hdrs.HOST,
  17533. * hdrs.IF_MATCH,
  17534. */
  17535. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 38, __pyx_L1_error)
  17536. __Pyx_GOTREF(__pyx_t_2);
  17537. __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FROM); if (unlikely(!__pyx_t_37)) __PYX_ERR(5, 38, __pyx_L1_error)
  17538. __Pyx_GOTREF(__pyx_t_37);
  17539. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17540. /* "aiohttp/_headers.pxi":39
  17541. * hdrs.FORWARDED,
  17542. * hdrs.FROM,
  17543. * hdrs.HOST, # <<<<<<<<<<<<<<
  17544. * hdrs.IF_MATCH,
  17545. * hdrs.IF_MODIFIED_SINCE,
  17546. */
  17547. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 39, __pyx_L1_error)
  17548. __Pyx_GOTREF(__pyx_t_2);
  17549. __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_HOST); if (unlikely(!__pyx_t_38)) __PYX_ERR(5, 39, __pyx_L1_error)
  17550. __Pyx_GOTREF(__pyx_t_38);
  17551. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17552. /* "aiohttp/_headers.pxi":40
  17553. * hdrs.FROM,
  17554. * hdrs.HOST,
  17555. * hdrs.IF_MATCH, # <<<<<<<<<<<<<<
  17556. * hdrs.IF_MODIFIED_SINCE,
  17557. * hdrs.IF_NONE_MATCH,
  17558. */
  17559. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 40, __pyx_L1_error)
  17560. __Pyx_GOTREF(__pyx_t_2);
  17561. __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IF_MATCH); if (unlikely(!__pyx_t_39)) __PYX_ERR(5, 40, __pyx_L1_error)
  17562. __Pyx_GOTREF(__pyx_t_39);
  17563. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17564. /* "aiohttp/_headers.pxi":41
  17565. * hdrs.HOST,
  17566. * hdrs.IF_MATCH,
  17567. * hdrs.IF_MODIFIED_SINCE, # <<<<<<<<<<<<<<
  17568. * hdrs.IF_NONE_MATCH,
  17569. * hdrs.IF_RANGE,
  17570. */
  17571. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 41, __pyx_L1_error)
  17572. __Pyx_GOTREF(__pyx_t_2);
  17573. __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IF_MODIFIED_SINCE); if (unlikely(!__pyx_t_40)) __PYX_ERR(5, 41, __pyx_L1_error)
  17574. __Pyx_GOTREF(__pyx_t_40);
  17575. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17576. /* "aiohttp/_headers.pxi":42
  17577. * hdrs.IF_MATCH,
  17578. * hdrs.IF_MODIFIED_SINCE,
  17579. * hdrs.IF_NONE_MATCH, # <<<<<<<<<<<<<<
  17580. * hdrs.IF_RANGE,
  17581. * hdrs.IF_UNMODIFIED_SINCE,
  17582. */
  17583. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 42, __pyx_L1_error)
  17584. __Pyx_GOTREF(__pyx_t_2);
  17585. __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IF_NONE_MATCH); if (unlikely(!__pyx_t_41)) __PYX_ERR(5, 42, __pyx_L1_error)
  17586. __Pyx_GOTREF(__pyx_t_41);
  17587. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17588. /* "aiohttp/_headers.pxi":43
  17589. * hdrs.IF_MODIFIED_SINCE,
  17590. * hdrs.IF_NONE_MATCH,
  17591. * hdrs.IF_RANGE, # <<<<<<<<<<<<<<
  17592. * hdrs.IF_UNMODIFIED_SINCE,
  17593. * hdrs.KEEP_ALIVE,
  17594. */
  17595. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 43, __pyx_L1_error)
  17596. __Pyx_GOTREF(__pyx_t_2);
  17597. __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IF_RANGE); if (unlikely(!__pyx_t_42)) __PYX_ERR(5, 43, __pyx_L1_error)
  17598. __Pyx_GOTREF(__pyx_t_42);
  17599. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17600. /* "aiohttp/_headers.pxi":44
  17601. * hdrs.IF_NONE_MATCH,
  17602. * hdrs.IF_RANGE,
  17603. * hdrs.IF_UNMODIFIED_SINCE, # <<<<<<<<<<<<<<
  17604. * hdrs.KEEP_ALIVE,
  17605. * hdrs.LAST_EVENT_ID,
  17606. */
  17607. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 44, __pyx_L1_error)
  17608. __Pyx_GOTREF(__pyx_t_2);
  17609. __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_IF_UNMODIFIED_SINCE); if (unlikely(!__pyx_t_43)) __PYX_ERR(5, 44, __pyx_L1_error)
  17610. __Pyx_GOTREF(__pyx_t_43);
  17611. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17612. /* "aiohttp/_headers.pxi":45
  17613. * hdrs.IF_RANGE,
  17614. * hdrs.IF_UNMODIFIED_SINCE,
  17615. * hdrs.KEEP_ALIVE, # <<<<<<<<<<<<<<
  17616. * hdrs.LAST_EVENT_ID,
  17617. * hdrs.LAST_MODIFIED,
  17618. */
  17619. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 45, __pyx_L1_error)
  17620. __Pyx_GOTREF(__pyx_t_2);
  17621. __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_KEEP_ALIVE); if (unlikely(!__pyx_t_44)) __PYX_ERR(5, 45, __pyx_L1_error)
  17622. __Pyx_GOTREF(__pyx_t_44);
  17623. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17624. /* "aiohttp/_headers.pxi":46
  17625. * hdrs.IF_UNMODIFIED_SINCE,
  17626. * hdrs.KEEP_ALIVE,
  17627. * hdrs.LAST_EVENT_ID, # <<<<<<<<<<<<<<
  17628. * hdrs.LAST_MODIFIED,
  17629. * hdrs.LINK,
  17630. */
  17631. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 46, __pyx_L1_error)
  17632. __Pyx_GOTREF(__pyx_t_2);
  17633. __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LAST_EVENT_ID); if (unlikely(!__pyx_t_45)) __PYX_ERR(5, 46, __pyx_L1_error)
  17634. __Pyx_GOTREF(__pyx_t_45);
  17635. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17636. /* "aiohttp/_headers.pxi":47
  17637. * hdrs.KEEP_ALIVE,
  17638. * hdrs.LAST_EVENT_ID,
  17639. * hdrs.LAST_MODIFIED, # <<<<<<<<<<<<<<
  17640. * hdrs.LINK,
  17641. * hdrs.LOCATION,
  17642. */
  17643. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 47, __pyx_L1_error)
  17644. __Pyx_GOTREF(__pyx_t_2);
  17645. __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LAST_MODIFIED); if (unlikely(!__pyx_t_46)) __PYX_ERR(5, 47, __pyx_L1_error)
  17646. __Pyx_GOTREF(__pyx_t_46);
  17647. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17648. /* "aiohttp/_headers.pxi":48
  17649. * hdrs.LAST_EVENT_ID,
  17650. * hdrs.LAST_MODIFIED,
  17651. * hdrs.LINK, # <<<<<<<<<<<<<<
  17652. * hdrs.LOCATION,
  17653. * hdrs.MAX_FORWARDS,
  17654. */
  17655. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 48, __pyx_L1_error)
  17656. __Pyx_GOTREF(__pyx_t_2);
  17657. __pyx_t_47 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LINK); if (unlikely(!__pyx_t_47)) __PYX_ERR(5, 48, __pyx_L1_error)
  17658. __Pyx_GOTREF(__pyx_t_47);
  17659. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17660. /* "aiohttp/_headers.pxi":49
  17661. * hdrs.LAST_MODIFIED,
  17662. * hdrs.LINK,
  17663. * hdrs.LOCATION, # <<<<<<<<<<<<<<
  17664. * hdrs.MAX_FORWARDS,
  17665. * hdrs.ORIGIN,
  17666. */
  17667. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 49, __pyx_L1_error)
  17668. __Pyx_GOTREF(__pyx_t_2);
  17669. __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_LOCATION); if (unlikely(!__pyx_t_48)) __PYX_ERR(5, 49, __pyx_L1_error)
  17670. __Pyx_GOTREF(__pyx_t_48);
  17671. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17672. /* "aiohttp/_headers.pxi":50
  17673. * hdrs.LINK,
  17674. * hdrs.LOCATION,
  17675. * hdrs.MAX_FORWARDS, # <<<<<<<<<<<<<<
  17676. * hdrs.ORIGIN,
  17677. * hdrs.PRAGMA,
  17678. */
  17679. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 50, __pyx_L1_error)
  17680. __Pyx_GOTREF(__pyx_t_2);
  17681. __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_MAX_FORWARDS); if (unlikely(!__pyx_t_49)) __PYX_ERR(5, 50, __pyx_L1_error)
  17682. __Pyx_GOTREF(__pyx_t_49);
  17683. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17684. /* "aiohttp/_headers.pxi":51
  17685. * hdrs.LOCATION,
  17686. * hdrs.MAX_FORWARDS,
  17687. * hdrs.ORIGIN, # <<<<<<<<<<<<<<
  17688. * hdrs.PRAGMA,
  17689. * hdrs.PROXY_AUTHENTICATE,
  17690. */
  17691. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 51, __pyx_L1_error)
  17692. __Pyx_GOTREF(__pyx_t_2);
  17693. __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ORIGIN); if (unlikely(!__pyx_t_50)) __PYX_ERR(5, 51, __pyx_L1_error)
  17694. __Pyx_GOTREF(__pyx_t_50);
  17695. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17696. /* "aiohttp/_headers.pxi":52
  17697. * hdrs.MAX_FORWARDS,
  17698. * hdrs.ORIGIN,
  17699. * hdrs.PRAGMA, # <<<<<<<<<<<<<<
  17700. * hdrs.PROXY_AUTHENTICATE,
  17701. * hdrs.PROXY_AUTHORIZATION,
  17702. */
  17703. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 52, __pyx_L1_error)
  17704. __Pyx_GOTREF(__pyx_t_2);
  17705. __pyx_t_51 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PRAGMA); if (unlikely(!__pyx_t_51)) __PYX_ERR(5, 52, __pyx_L1_error)
  17706. __Pyx_GOTREF(__pyx_t_51);
  17707. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17708. /* "aiohttp/_headers.pxi":53
  17709. * hdrs.ORIGIN,
  17710. * hdrs.PRAGMA,
  17711. * hdrs.PROXY_AUTHENTICATE, # <<<<<<<<<<<<<<
  17712. * hdrs.PROXY_AUTHORIZATION,
  17713. * hdrs.RANGE,
  17714. */
  17715. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 53, __pyx_L1_error)
  17716. __Pyx_GOTREF(__pyx_t_2);
  17717. __pyx_t_52 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PROXY_AUTHENTICATE); if (unlikely(!__pyx_t_52)) __PYX_ERR(5, 53, __pyx_L1_error)
  17718. __Pyx_GOTREF(__pyx_t_52);
  17719. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17720. /* "aiohttp/_headers.pxi":54
  17721. * hdrs.PRAGMA,
  17722. * hdrs.PROXY_AUTHENTICATE,
  17723. * hdrs.PROXY_AUTHORIZATION, # <<<<<<<<<<<<<<
  17724. * hdrs.RANGE,
  17725. * hdrs.REFERER,
  17726. */
  17727. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 54, __pyx_L1_error)
  17728. __Pyx_GOTREF(__pyx_t_2);
  17729. __pyx_t_53 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_PROXY_AUTHORIZATION); if (unlikely(!__pyx_t_53)) __PYX_ERR(5, 54, __pyx_L1_error)
  17730. __Pyx_GOTREF(__pyx_t_53);
  17731. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17732. /* "aiohttp/_headers.pxi":55
  17733. * hdrs.PROXY_AUTHENTICATE,
  17734. * hdrs.PROXY_AUTHORIZATION,
  17735. * hdrs.RANGE, # <<<<<<<<<<<<<<
  17736. * hdrs.REFERER,
  17737. * hdrs.RETRY_AFTER,
  17738. */
  17739. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 55, __pyx_L1_error)
  17740. __Pyx_GOTREF(__pyx_t_2);
  17741. __pyx_t_54 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RANGE); if (unlikely(!__pyx_t_54)) __PYX_ERR(5, 55, __pyx_L1_error)
  17742. __Pyx_GOTREF(__pyx_t_54);
  17743. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17744. /* "aiohttp/_headers.pxi":56
  17745. * hdrs.PROXY_AUTHORIZATION,
  17746. * hdrs.RANGE,
  17747. * hdrs.REFERER, # <<<<<<<<<<<<<<
  17748. * hdrs.RETRY_AFTER,
  17749. * hdrs.SEC_WEBSOCKET_ACCEPT,
  17750. */
  17751. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 56, __pyx_L1_error)
  17752. __Pyx_GOTREF(__pyx_t_2);
  17753. __pyx_t_55 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_REFERER); if (unlikely(!__pyx_t_55)) __PYX_ERR(5, 56, __pyx_L1_error)
  17754. __Pyx_GOTREF(__pyx_t_55);
  17755. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17756. /* "aiohttp/_headers.pxi":57
  17757. * hdrs.RANGE,
  17758. * hdrs.REFERER,
  17759. * hdrs.RETRY_AFTER, # <<<<<<<<<<<<<<
  17760. * hdrs.SEC_WEBSOCKET_ACCEPT,
  17761. * hdrs.SEC_WEBSOCKET_EXTENSIONS,
  17762. */
  17763. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 57, __pyx_L1_error)
  17764. __Pyx_GOTREF(__pyx_t_2);
  17765. __pyx_t_56 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_RETRY_AFTER); if (unlikely(!__pyx_t_56)) __PYX_ERR(5, 57, __pyx_L1_error)
  17766. __Pyx_GOTREF(__pyx_t_56);
  17767. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17768. /* "aiohttp/_headers.pxi":58
  17769. * hdrs.REFERER,
  17770. * hdrs.RETRY_AFTER,
  17771. * hdrs.SEC_WEBSOCKET_ACCEPT, # <<<<<<<<<<<<<<
  17772. * hdrs.SEC_WEBSOCKET_EXTENSIONS,
  17773. * hdrs.SEC_WEBSOCKET_KEY,
  17774. */
  17775. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 58, __pyx_L1_error)
  17776. __Pyx_GOTREF(__pyx_t_2);
  17777. __pyx_t_57 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_ACCEPT); if (unlikely(!__pyx_t_57)) __PYX_ERR(5, 58, __pyx_L1_error)
  17778. __Pyx_GOTREF(__pyx_t_57);
  17779. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17780. /* "aiohttp/_headers.pxi":59
  17781. * hdrs.RETRY_AFTER,
  17782. * hdrs.SEC_WEBSOCKET_ACCEPT,
  17783. * hdrs.SEC_WEBSOCKET_EXTENSIONS, # <<<<<<<<<<<<<<
  17784. * hdrs.SEC_WEBSOCKET_KEY,
  17785. * hdrs.SEC_WEBSOCKET_KEY1,
  17786. */
  17787. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 59, __pyx_L1_error)
  17788. __Pyx_GOTREF(__pyx_t_2);
  17789. __pyx_t_58 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_EXTENSIONS); if (unlikely(!__pyx_t_58)) __PYX_ERR(5, 59, __pyx_L1_error)
  17790. __Pyx_GOTREF(__pyx_t_58);
  17791. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17792. /* "aiohttp/_headers.pxi":60
  17793. * hdrs.SEC_WEBSOCKET_ACCEPT,
  17794. * hdrs.SEC_WEBSOCKET_EXTENSIONS,
  17795. * hdrs.SEC_WEBSOCKET_KEY, # <<<<<<<<<<<<<<
  17796. * hdrs.SEC_WEBSOCKET_KEY1,
  17797. * hdrs.SEC_WEBSOCKET_PROTOCOL,
  17798. */
  17799. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 60, __pyx_L1_error)
  17800. __Pyx_GOTREF(__pyx_t_2);
  17801. __pyx_t_59 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_KEY); if (unlikely(!__pyx_t_59)) __PYX_ERR(5, 60, __pyx_L1_error)
  17802. __Pyx_GOTREF(__pyx_t_59);
  17803. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17804. /* "aiohttp/_headers.pxi":61
  17805. * hdrs.SEC_WEBSOCKET_EXTENSIONS,
  17806. * hdrs.SEC_WEBSOCKET_KEY,
  17807. * hdrs.SEC_WEBSOCKET_KEY1, # <<<<<<<<<<<<<<
  17808. * hdrs.SEC_WEBSOCKET_PROTOCOL,
  17809. * hdrs.SEC_WEBSOCKET_VERSION,
  17810. */
  17811. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 61, __pyx_L1_error)
  17812. __Pyx_GOTREF(__pyx_t_2);
  17813. __pyx_t_60 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_KEY1); if (unlikely(!__pyx_t_60)) __PYX_ERR(5, 61, __pyx_L1_error)
  17814. __Pyx_GOTREF(__pyx_t_60);
  17815. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17816. /* "aiohttp/_headers.pxi":62
  17817. * hdrs.SEC_WEBSOCKET_KEY,
  17818. * hdrs.SEC_WEBSOCKET_KEY1,
  17819. * hdrs.SEC_WEBSOCKET_PROTOCOL, # <<<<<<<<<<<<<<
  17820. * hdrs.SEC_WEBSOCKET_VERSION,
  17821. * hdrs.SERVER,
  17822. */
  17823. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 62, __pyx_L1_error)
  17824. __Pyx_GOTREF(__pyx_t_2);
  17825. __pyx_t_61 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_PROTOCOL); if (unlikely(!__pyx_t_61)) __PYX_ERR(5, 62, __pyx_L1_error)
  17826. __Pyx_GOTREF(__pyx_t_61);
  17827. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17828. /* "aiohttp/_headers.pxi":63
  17829. * hdrs.SEC_WEBSOCKET_KEY1,
  17830. * hdrs.SEC_WEBSOCKET_PROTOCOL,
  17831. * hdrs.SEC_WEBSOCKET_VERSION, # <<<<<<<<<<<<<<
  17832. * hdrs.SERVER,
  17833. * hdrs.SET_COOKIE,
  17834. */
  17835. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 63, __pyx_L1_error)
  17836. __Pyx_GOTREF(__pyx_t_2);
  17837. __pyx_t_62 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_VERSION); if (unlikely(!__pyx_t_62)) __PYX_ERR(5, 63, __pyx_L1_error)
  17838. __Pyx_GOTREF(__pyx_t_62);
  17839. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17840. /* "aiohttp/_headers.pxi":64
  17841. * hdrs.SEC_WEBSOCKET_PROTOCOL,
  17842. * hdrs.SEC_WEBSOCKET_VERSION,
  17843. * hdrs.SERVER, # <<<<<<<<<<<<<<
  17844. * hdrs.SET_COOKIE,
  17845. * hdrs.TE,
  17846. */
  17847. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 64, __pyx_L1_error)
  17848. __Pyx_GOTREF(__pyx_t_2);
  17849. __pyx_t_63 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SERVER); if (unlikely(!__pyx_t_63)) __PYX_ERR(5, 64, __pyx_L1_error)
  17850. __Pyx_GOTREF(__pyx_t_63);
  17851. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17852. /* "aiohttp/_headers.pxi":65
  17853. * hdrs.SEC_WEBSOCKET_VERSION,
  17854. * hdrs.SERVER,
  17855. * hdrs.SET_COOKIE, # <<<<<<<<<<<<<<
  17856. * hdrs.TE,
  17857. * hdrs.TRAILER,
  17858. */
  17859. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 65, __pyx_L1_error)
  17860. __Pyx_GOTREF(__pyx_t_2);
  17861. __pyx_t_64 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SET_COOKIE); if (unlikely(!__pyx_t_64)) __PYX_ERR(5, 65, __pyx_L1_error)
  17862. __Pyx_GOTREF(__pyx_t_64);
  17863. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17864. /* "aiohttp/_headers.pxi":66
  17865. * hdrs.SERVER,
  17866. * hdrs.SET_COOKIE,
  17867. * hdrs.TE, # <<<<<<<<<<<<<<
  17868. * hdrs.TRAILER,
  17869. * hdrs.TRANSFER_ENCODING,
  17870. */
  17871. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 66, __pyx_L1_error)
  17872. __Pyx_GOTREF(__pyx_t_2);
  17873. __pyx_t_65 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TE); if (unlikely(!__pyx_t_65)) __PYX_ERR(5, 66, __pyx_L1_error)
  17874. __Pyx_GOTREF(__pyx_t_65);
  17875. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17876. /* "aiohttp/_headers.pxi":67
  17877. * hdrs.SET_COOKIE,
  17878. * hdrs.TE,
  17879. * hdrs.TRAILER, # <<<<<<<<<<<<<<
  17880. * hdrs.TRANSFER_ENCODING,
  17881. * hdrs.UPGRADE,
  17882. */
  17883. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 67, __pyx_L1_error)
  17884. __Pyx_GOTREF(__pyx_t_2);
  17885. __pyx_t_66 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TRAILER); if (unlikely(!__pyx_t_66)) __PYX_ERR(5, 67, __pyx_L1_error)
  17886. __Pyx_GOTREF(__pyx_t_66);
  17887. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17888. /* "aiohttp/_headers.pxi":68
  17889. * hdrs.TE,
  17890. * hdrs.TRAILER,
  17891. * hdrs.TRANSFER_ENCODING, # <<<<<<<<<<<<<<
  17892. * hdrs.UPGRADE,
  17893. * hdrs.URI,
  17894. */
  17895. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 68, __pyx_L1_error)
  17896. __Pyx_GOTREF(__pyx_t_2);
  17897. __pyx_t_67 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_TRANSFER_ENCODING); if (unlikely(!__pyx_t_67)) __PYX_ERR(5, 68, __pyx_L1_error)
  17898. __Pyx_GOTREF(__pyx_t_67);
  17899. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17900. /* "aiohttp/_headers.pxi":69
  17901. * hdrs.TRAILER,
  17902. * hdrs.TRANSFER_ENCODING,
  17903. * hdrs.UPGRADE, # <<<<<<<<<<<<<<
  17904. * hdrs.URI,
  17905. * hdrs.USER_AGENT,
  17906. */
  17907. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 69, __pyx_L1_error)
  17908. __Pyx_GOTREF(__pyx_t_2);
  17909. __pyx_t_68 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_UPGRADE); if (unlikely(!__pyx_t_68)) __PYX_ERR(5, 69, __pyx_L1_error)
  17910. __Pyx_GOTREF(__pyx_t_68);
  17911. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17912. /* "aiohttp/_headers.pxi":70
  17913. * hdrs.TRANSFER_ENCODING,
  17914. * hdrs.UPGRADE,
  17915. * hdrs.URI, # <<<<<<<<<<<<<<
  17916. * hdrs.USER_AGENT,
  17917. * hdrs.VARY,
  17918. */
  17919. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 70, __pyx_L1_error)
  17920. __Pyx_GOTREF(__pyx_t_2);
  17921. __pyx_t_69 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_URI); if (unlikely(!__pyx_t_69)) __PYX_ERR(5, 70, __pyx_L1_error)
  17922. __Pyx_GOTREF(__pyx_t_69);
  17923. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17924. /* "aiohttp/_headers.pxi":71
  17925. * hdrs.UPGRADE,
  17926. * hdrs.URI,
  17927. * hdrs.USER_AGENT, # <<<<<<<<<<<<<<
  17928. * hdrs.VARY,
  17929. * hdrs.VIA,
  17930. */
  17931. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 71, __pyx_L1_error)
  17932. __Pyx_GOTREF(__pyx_t_2);
  17933. __pyx_t_70 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_USER_AGENT); if (unlikely(!__pyx_t_70)) __PYX_ERR(5, 71, __pyx_L1_error)
  17934. __Pyx_GOTREF(__pyx_t_70);
  17935. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17936. /* "aiohttp/_headers.pxi":72
  17937. * hdrs.URI,
  17938. * hdrs.USER_AGENT,
  17939. * hdrs.VARY, # <<<<<<<<<<<<<<
  17940. * hdrs.VIA,
  17941. * hdrs.WANT_DIGEST,
  17942. */
  17943. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 72, __pyx_L1_error)
  17944. __Pyx_GOTREF(__pyx_t_2);
  17945. __pyx_t_71 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_VARY); if (unlikely(!__pyx_t_71)) __PYX_ERR(5, 72, __pyx_L1_error)
  17946. __Pyx_GOTREF(__pyx_t_71);
  17947. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17948. /* "aiohttp/_headers.pxi":73
  17949. * hdrs.USER_AGENT,
  17950. * hdrs.VARY,
  17951. * hdrs.VIA, # <<<<<<<<<<<<<<
  17952. * hdrs.WANT_DIGEST,
  17953. * hdrs.WARNING,
  17954. */
  17955. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 73, __pyx_L1_error)
  17956. __Pyx_GOTREF(__pyx_t_2);
  17957. __pyx_t_72 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_VIA); if (unlikely(!__pyx_t_72)) __PYX_ERR(5, 73, __pyx_L1_error)
  17958. __Pyx_GOTREF(__pyx_t_72);
  17959. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17960. /* "aiohttp/_headers.pxi":74
  17961. * hdrs.VARY,
  17962. * hdrs.VIA,
  17963. * hdrs.WANT_DIGEST, # <<<<<<<<<<<<<<
  17964. * hdrs.WARNING,
  17965. * hdrs.WEBSOCKET,
  17966. */
  17967. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 74, __pyx_L1_error)
  17968. __Pyx_GOTREF(__pyx_t_2);
  17969. __pyx_t_73 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WANT_DIGEST); if (unlikely(!__pyx_t_73)) __PYX_ERR(5, 74, __pyx_L1_error)
  17970. __Pyx_GOTREF(__pyx_t_73);
  17971. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17972. /* "aiohttp/_headers.pxi":75
  17973. * hdrs.VIA,
  17974. * hdrs.WANT_DIGEST,
  17975. * hdrs.WARNING, # <<<<<<<<<<<<<<
  17976. * hdrs.WEBSOCKET,
  17977. * hdrs.WWW_AUTHENTICATE,
  17978. */
  17979. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 75, __pyx_L1_error)
  17980. __Pyx_GOTREF(__pyx_t_2);
  17981. __pyx_t_74 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_74)) __PYX_ERR(5, 75, __pyx_L1_error)
  17982. __Pyx_GOTREF(__pyx_t_74);
  17983. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17984. /* "aiohttp/_headers.pxi":76
  17985. * hdrs.WANT_DIGEST,
  17986. * hdrs.WARNING,
  17987. * hdrs.WEBSOCKET, # <<<<<<<<<<<<<<
  17988. * hdrs.WWW_AUTHENTICATE,
  17989. * hdrs.X_FORWARDED_FOR,
  17990. */
  17991. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 76, __pyx_L1_error)
  17992. __Pyx_GOTREF(__pyx_t_2);
  17993. __pyx_t_75 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WEBSOCKET); if (unlikely(!__pyx_t_75)) __PYX_ERR(5, 76, __pyx_L1_error)
  17994. __Pyx_GOTREF(__pyx_t_75);
  17995. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  17996. /* "aiohttp/_headers.pxi":77
  17997. * hdrs.WARNING,
  17998. * hdrs.WEBSOCKET,
  17999. * hdrs.WWW_AUTHENTICATE, # <<<<<<<<<<<<<<
  18000. * hdrs.X_FORWARDED_FOR,
  18001. * hdrs.X_FORWARDED_HOST,
  18002. */
  18003. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 77, __pyx_L1_error)
  18004. __Pyx_GOTREF(__pyx_t_2);
  18005. __pyx_t_76 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WWW_AUTHENTICATE); if (unlikely(!__pyx_t_76)) __PYX_ERR(5, 77, __pyx_L1_error)
  18006. __Pyx_GOTREF(__pyx_t_76);
  18007. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18008. /* "aiohttp/_headers.pxi":78
  18009. * hdrs.WEBSOCKET,
  18010. * hdrs.WWW_AUTHENTICATE,
  18011. * hdrs.X_FORWARDED_FOR, # <<<<<<<<<<<<<<
  18012. * hdrs.X_FORWARDED_HOST,
  18013. * hdrs.X_FORWARDED_PROTO,
  18014. */
  18015. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 78, __pyx_L1_error)
  18016. __Pyx_GOTREF(__pyx_t_2);
  18017. __pyx_t_77 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_X_FORWARDED_FOR); if (unlikely(!__pyx_t_77)) __PYX_ERR(5, 78, __pyx_L1_error)
  18018. __Pyx_GOTREF(__pyx_t_77);
  18019. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18020. /* "aiohttp/_headers.pxi":79
  18021. * hdrs.WWW_AUTHENTICATE,
  18022. * hdrs.X_FORWARDED_FOR,
  18023. * hdrs.X_FORWARDED_HOST, # <<<<<<<<<<<<<<
  18024. * hdrs.X_FORWARDED_PROTO,
  18025. * )
  18026. */
  18027. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 79, __pyx_L1_error)
  18028. __Pyx_GOTREF(__pyx_t_2);
  18029. __pyx_t_78 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_X_FORWARDED_HOST); if (unlikely(!__pyx_t_78)) __PYX_ERR(5, 79, __pyx_L1_error)
  18030. __Pyx_GOTREF(__pyx_t_78);
  18031. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18032. /* "aiohttp/_headers.pxi":80
  18033. * hdrs.X_FORWARDED_FOR,
  18034. * hdrs.X_FORWARDED_HOST,
  18035. * hdrs.X_FORWARDED_PROTO, # <<<<<<<<<<<<<<
  18036. * )
  18037. */
  18038. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 80, __pyx_L1_error)
  18039. __Pyx_GOTREF(__pyx_t_2);
  18040. __pyx_t_79 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_X_FORWARDED_PROTO); if (unlikely(!__pyx_t_79)) __PYX_ERR(5, 80, __pyx_L1_error)
  18041. __Pyx_GOTREF(__pyx_t_79);
  18042. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18043. /* "aiohttp/_headers.pxi":3
  18044. * # The file is autogenerated from aiohtt/hdrs.py# Run ./tools/gen.py to update it after the origin changing.from . import hdrs
  18045. * cdef tuple headers = (
  18046. * hdrs.ACCEPT, # <<<<<<<<<<<<<<
  18047. * hdrs.ACCEPT_CHARSET,
  18048. * hdrs.ACCEPT_ENCODING,
  18049. */
  18050. __pyx_t_2 = PyTuple_New(78); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 3, __pyx_L1_error)
  18051. __Pyx_GOTREF(__pyx_t_2);
  18052. __Pyx_GIVEREF(__pyx_t_1);
  18053. PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  18054. __Pyx_GIVEREF(__pyx_t_3);
  18055. PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  18056. __Pyx_GIVEREF(__pyx_t_4);
  18057. PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
  18058. __Pyx_GIVEREF(__pyx_t_5);
  18059. PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_5);
  18060. __Pyx_GIVEREF(__pyx_t_6);
  18061. PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_6);
  18062. __Pyx_GIVEREF(__pyx_t_7);
  18063. PyTuple_SET_ITEM(__pyx_t_2, 5, __pyx_t_7);
  18064. __Pyx_GIVEREF(__pyx_t_8);
  18065. PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_t_8);
  18066. __Pyx_GIVEREF(__pyx_t_9);
  18067. PyTuple_SET_ITEM(__pyx_t_2, 7, __pyx_t_9);
  18068. __Pyx_GIVEREF(__pyx_t_10);
  18069. PyTuple_SET_ITEM(__pyx_t_2, 8, __pyx_t_10);
  18070. __Pyx_GIVEREF(__pyx_t_11);
  18071. PyTuple_SET_ITEM(__pyx_t_2, 9, __pyx_t_11);
  18072. __Pyx_GIVEREF(__pyx_t_12);
  18073. PyTuple_SET_ITEM(__pyx_t_2, 10, __pyx_t_12);
  18074. __Pyx_GIVEREF(__pyx_t_13);
  18075. PyTuple_SET_ITEM(__pyx_t_2, 11, __pyx_t_13);
  18076. __Pyx_GIVEREF(__pyx_t_14);
  18077. PyTuple_SET_ITEM(__pyx_t_2, 12, __pyx_t_14);
  18078. __Pyx_GIVEREF(__pyx_t_15);
  18079. PyTuple_SET_ITEM(__pyx_t_2, 13, __pyx_t_15);
  18080. __Pyx_GIVEREF(__pyx_t_16);
  18081. PyTuple_SET_ITEM(__pyx_t_2, 14, __pyx_t_16);
  18082. __Pyx_GIVEREF(__pyx_t_17);
  18083. PyTuple_SET_ITEM(__pyx_t_2, 15, __pyx_t_17);
  18084. __Pyx_GIVEREF(__pyx_t_18);
  18085. PyTuple_SET_ITEM(__pyx_t_2, 16, __pyx_t_18);
  18086. __Pyx_GIVEREF(__pyx_t_19);
  18087. PyTuple_SET_ITEM(__pyx_t_2, 17, __pyx_t_19);
  18088. __Pyx_GIVEREF(__pyx_t_20);
  18089. PyTuple_SET_ITEM(__pyx_t_2, 18, __pyx_t_20);
  18090. __Pyx_GIVEREF(__pyx_t_21);
  18091. PyTuple_SET_ITEM(__pyx_t_2, 19, __pyx_t_21);
  18092. __Pyx_GIVEREF(__pyx_t_22);
  18093. PyTuple_SET_ITEM(__pyx_t_2, 20, __pyx_t_22);
  18094. __Pyx_GIVEREF(__pyx_t_23);
  18095. PyTuple_SET_ITEM(__pyx_t_2, 21, __pyx_t_23);
  18096. __Pyx_GIVEREF(__pyx_t_24);
  18097. PyTuple_SET_ITEM(__pyx_t_2, 22, __pyx_t_24);
  18098. __Pyx_GIVEREF(__pyx_t_25);
  18099. PyTuple_SET_ITEM(__pyx_t_2, 23, __pyx_t_25);
  18100. __Pyx_GIVEREF(__pyx_t_26);
  18101. PyTuple_SET_ITEM(__pyx_t_2, 24, __pyx_t_26);
  18102. __Pyx_GIVEREF(__pyx_t_27);
  18103. PyTuple_SET_ITEM(__pyx_t_2, 25, __pyx_t_27);
  18104. __Pyx_GIVEREF(__pyx_t_28);
  18105. PyTuple_SET_ITEM(__pyx_t_2, 26, __pyx_t_28);
  18106. __Pyx_GIVEREF(__pyx_t_29);
  18107. PyTuple_SET_ITEM(__pyx_t_2, 27, __pyx_t_29);
  18108. __Pyx_GIVEREF(__pyx_t_30);
  18109. PyTuple_SET_ITEM(__pyx_t_2, 28, __pyx_t_30);
  18110. __Pyx_GIVEREF(__pyx_t_31);
  18111. PyTuple_SET_ITEM(__pyx_t_2, 29, __pyx_t_31);
  18112. __Pyx_GIVEREF(__pyx_t_32);
  18113. PyTuple_SET_ITEM(__pyx_t_2, 30, __pyx_t_32);
  18114. __Pyx_GIVEREF(__pyx_t_33);
  18115. PyTuple_SET_ITEM(__pyx_t_2, 31, __pyx_t_33);
  18116. __Pyx_GIVEREF(__pyx_t_34);
  18117. PyTuple_SET_ITEM(__pyx_t_2, 32, __pyx_t_34);
  18118. __Pyx_GIVEREF(__pyx_t_35);
  18119. PyTuple_SET_ITEM(__pyx_t_2, 33, __pyx_t_35);
  18120. __Pyx_GIVEREF(__pyx_t_36);
  18121. PyTuple_SET_ITEM(__pyx_t_2, 34, __pyx_t_36);
  18122. __Pyx_GIVEREF(__pyx_t_37);
  18123. PyTuple_SET_ITEM(__pyx_t_2, 35, __pyx_t_37);
  18124. __Pyx_GIVEREF(__pyx_t_38);
  18125. PyTuple_SET_ITEM(__pyx_t_2, 36, __pyx_t_38);
  18126. __Pyx_GIVEREF(__pyx_t_39);
  18127. PyTuple_SET_ITEM(__pyx_t_2, 37, __pyx_t_39);
  18128. __Pyx_GIVEREF(__pyx_t_40);
  18129. PyTuple_SET_ITEM(__pyx_t_2, 38, __pyx_t_40);
  18130. __Pyx_GIVEREF(__pyx_t_41);
  18131. PyTuple_SET_ITEM(__pyx_t_2, 39, __pyx_t_41);
  18132. __Pyx_GIVEREF(__pyx_t_42);
  18133. PyTuple_SET_ITEM(__pyx_t_2, 40, __pyx_t_42);
  18134. __Pyx_GIVEREF(__pyx_t_43);
  18135. PyTuple_SET_ITEM(__pyx_t_2, 41, __pyx_t_43);
  18136. __Pyx_GIVEREF(__pyx_t_44);
  18137. PyTuple_SET_ITEM(__pyx_t_2, 42, __pyx_t_44);
  18138. __Pyx_GIVEREF(__pyx_t_45);
  18139. PyTuple_SET_ITEM(__pyx_t_2, 43, __pyx_t_45);
  18140. __Pyx_GIVEREF(__pyx_t_46);
  18141. PyTuple_SET_ITEM(__pyx_t_2, 44, __pyx_t_46);
  18142. __Pyx_GIVEREF(__pyx_t_47);
  18143. PyTuple_SET_ITEM(__pyx_t_2, 45, __pyx_t_47);
  18144. __Pyx_GIVEREF(__pyx_t_48);
  18145. PyTuple_SET_ITEM(__pyx_t_2, 46, __pyx_t_48);
  18146. __Pyx_GIVEREF(__pyx_t_49);
  18147. PyTuple_SET_ITEM(__pyx_t_2, 47, __pyx_t_49);
  18148. __Pyx_GIVEREF(__pyx_t_50);
  18149. PyTuple_SET_ITEM(__pyx_t_2, 48, __pyx_t_50);
  18150. __Pyx_GIVEREF(__pyx_t_51);
  18151. PyTuple_SET_ITEM(__pyx_t_2, 49, __pyx_t_51);
  18152. __Pyx_GIVEREF(__pyx_t_52);
  18153. PyTuple_SET_ITEM(__pyx_t_2, 50, __pyx_t_52);
  18154. __Pyx_GIVEREF(__pyx_t_53);
  18155. PyTuple_SET_ITEM(__pyx_t_2, 51, __pyx_t_53);
  18156. __Pyx_GIVEREF(__pyx_t_54);
  18157. PyTuple_SET_ITEM(__pyx_t_2, 52, __pyx_t_54);
  18158. __Pyx_GIVEREF(__pyx_t_55);
  18159. PyTuple_SET_ITEM(__pyx_t_2, 53, __pyx_t_55);
  18160. __Pyx_GIVEREF(__pyx_t_56);
  18161. PyTuple_SET_ITEM(__pyx_t_2, 54, __pyx_t_56);
  18162. __Pyx_GIVEREF(__pyx_t_57);
  18163. PyTuple_SET_ITEM(__pyx_t_2, 55, __pyx_t_57);
  18164. __Pyx_GIVEREF(__pyx_t_58);
  18165. PyTuple_SET_ITEM(__pyx_t_2, 56, __pyx_t_58);
  18166. __Pyx_GIVEREF(__pyx_t_59);
  18167. PyTuple_SET_ITEM(__pyx_t_2, 57, __pyx_t_59);
  18168. __Pyx_GIVEREF(__pyx_t_60);
  18169. PyTuple_SET_ITEM(__pyx_t_2, 58, __pyx_t_60);
  18170. __Pyx_GIVEREF(__pyx_t_61);
  18171. PyTuple_SET_ITEM(__pyx_t_2, 59, __pyx_t_61);
  18172. __Pyx_GIVEREF(__pyx_t_62);
  18173. PyTuple_SET_ITEM(__pyx_t_2, 60, __pyx_t_62);
  18174. __Pyx_GIVEREF(__pyx_t_63);
  18175. PyTuple_SET_ITEM(__pyx_t_2, 61, __pyx_t_63);
  18176. __Pyx_GIVEREF(__pyx_t_64);
  18177. PyTuple_SET_ITEM(__pyx_t_2, 62, __pyx_t_64);
  18178. __Pyx_GIVEREF(__pyx_t_65);
  18179. PyTuple_SET_ITEM(__pyx_t_2, 63, __pyx_t_65);
  18180. __Pyx_GIVEREF(__pyx_t_66);
  18181. PyTuple_SET_ITEM(__pyx_t_2, 64, __pyx_t_66);
  18182. __Pyx_GIVEREF(__pyx_t_67);
  18183. PyTuple_SET_ITEM(__pyx_t_2, 65, __pyx_t_67);
  18184. __Pyx_GIVEREF(__pyx_t_68);
  18185. PyTuple_SET_ITEM(__pyx_t_2, 66, __pyx_t_68);
  18186. __Pyx_GIVEREF(__pyx_t_69);
  18187. PyTuple_SET_ITEM(__pyx_t_2, 67, __pyx_t_69);
  18188. __Pyx_GIVEREF(__pyx_t_70);
  18189. PyTuple_SET_ITEM(__pyx_t_2, 68, __pyx_t_70);
  18190. __Pyx_GIVEREF(__pyx_t_71);
  18191. PyTuple_SET_ITEM(__pyx_t_2, 69, __pyx_t_71);
  18192. __Pyx_GIVEREF(__pyx_t_72);
  18193. PyTuple_SET_ITEM(__pyx_t_2, 70, __pyx_t_72);
  18194. __Pyx_GIVEREF(__pyx_t_73);
  18195. PyTuple_SET_ITEM(__pyx_t_2, 71, __pyx_t_73);
  18196. __Pyx_GIVEREF(__pyx_t_74);
  18197. PyTuple_SET_ITEM(__pyx_t_2, 72, __pyx_t_74);
  18198. __Pyx_GIVEREF(__pyx_t_75);
  18199. PyTuple_SET_ITEM(__pyx_t_2, 73, __pyx_t_75);
  18200. __Pyx_GIVEREF(__pyx_t_76);
  18201. PyTuple_SET_ITEM(__pyx_t_2, 74, __pyx_t_76);
  18202. __Pyx_GIVEREF(__pyx_t_77);
  18203. PyTuple_SET_ITEM(__pyx_t_2, 75, __pyx_t_77);
  18204. __Pyx_GIVEREF(__pyx_t_78);
  18205. PyTuple_SET_ITEM(__pyx_t_2, 76, __pyx_t_78);
  18206. __Pyx_GIVEREF(__pyx_t_79);
  18207. PyTuple_SET_ITEM(__pyx_t_2, 77, __pyx_t_79);
  18208. __pyx_t_1 = 0;
  18209. __pyx_t_3 = 0;
  18210. __pyx_t_4 = 0;
  18211. __pyx_t_5 = 0;
  18212. __pyx_t_6 = 0;
  18213. __pyx_t_7 = 0;
  18214. __pyx_t_8 = 0;
  18215. __pyx_t_9 = 0;
  18216. __pyx_t_10 = 0;
  18217. __pyx_t_11 = 0;
  18218. __pyx_t_12 = 0;
  18219. __pyx_t_13 = 0;
  18220. __pyx_t_14 = 0;
  18221. __pyx_t_15 = 0;
  18222. __pyx_t_16 = 0;
  18223. __pyx_t_17 = 0;
  18224. __pyx_t_18 = 0;
  18225. __pyx_t_19 = 0;
  18226. __pyx_t_20 = 0;
  18227. __pyx_t_21 = 0;
  18228. __pyx_t_22 = 0;
  18229. __pyx_t_23 = 0;
  18230. __pyx_t_24 = 0;
  18231. __pyx_t_25 = 0;
  18232. __pyx_t_26 = 0;
  18233. __pyx_t_27 = 0;
  18234. __pyx_t_28 = 0;
  18235. __pyx_t_29 = 0;
  18236. __pyx_t_30 = 0;
  18237. __pyx_t_31 = 0;
  18238. __pyx_t_32 = 0;
  18239. __pyx_t_33 = 0;
  18240. __pyx_t_34 = 0;
  18241. __pyx_t_35 = 0;
  18242. __pyx_t_36 = 0;
  18243. __pyx_t_37 = 0;
  18244. __pyx_t_38 = 0;
  18245. __pyx_t_39 = 0;
  18246. __pyx_t_40 = 0;
  18247. __pyx_t_41 = 0;
  18248. __pyx_t_42 = 0;
  18249. __pyx_t_43 = 0;
  18250. __pyx_t_44 = 0;
  18251. __pyx_t_45 = 0;
  18252. __pyx_t_46 = 0;
  18253. __pyx_t_47 = 0;
  18254. __pyx_t_48 = 0;
  18255. __pyx_t_49 = 0;
  18256. __pyx_t_50 = 0;
  18257. __pyx_t_51 = 0;
  18258. __pyx_t_52 = 0;
  18259. __pyx_t_53 = 0;
  18260. __pyx_t_54 = 0;
  18261. __pyx_t_55 = 0;
  18262. __pyx_t_56 = 0;
  18263. __pyx_t_57 = 0;
  18264. __pyx_t_58 = 0;
  18265. __pyx_t_59 = 0;
  18266. __pyx_t_60 = 0;
  18267. __pyx_t_61 = 0;
  18268. __pyx_t_62 = 0;
  18269. __pyx_t_63 = 0;
  18270. __pyx_t_64 = 0;
  18271. __pyx_t_65 = 0;
  18272. __pyx_t_66 = 0;
  18273. __pyx_t_67 = 0;
  18274. __pyx_t_68 = 0;
  18275. __pyx_t_69 = 0;
  18276. __pyx_t_70 = 0;
  18277. __pyx_t_71 = 0;
  18278. __pyx_t_72 = 0;
  18279. __pyx_t_73 = 0;
  18280. __pyx_t_74 = 0;
  18281. __pyx_t_75 = 0;
  18282. __pyx_t_76 = 0;
  18283. __pyx_t_77 = 0;
  18284. __pyx_t_78 = 0;
  18285. __pyx_t_79 = 0;
  18286. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_headers);
  18287. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_headers, ((PyObject*)__pyx_t_2));
  18288. __Pyx_GIVEREF(__pyx_t_2);
  18289. __pyx_t_2 = 0;
  18290. /* "aiohttp/_http_parser.pyx":40
  18291. * char* PyByteArray_AsString(object)
  18292. *
  18293. * __all__ = ('HttpRequestParser', 'HttpResponseParser', # <<<<<<<<<<<<<<
  18294. * 'RawRequestMessage', 'RawResponseMessage')
  18295. *
  18296. */
  18297. if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__14) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
  18298. /* "aiohttp/_http_parser.pyx":43
  18299. * 'RawRequestMessage', 'RawResponseMessage')
  18300. *
  18301. * cdef object URL = _URL # <<<<<<<<<<<<<<
  18302. * cdef object URL_build = URL.build
  18303. * cdef object CIMultiDict = _CIMultiDict
  18304. */
  18305. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_URL_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  18306. __Pyx_GOTREF(__pyx_t_2);
  18307. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_URL);
  18308. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_URL, __pyx_t_2);
  18309. __Pyx_GIVEREF(__pyx_t_2);
  18310. __pyx_t_2 = 0;
  18311. /* "aiohttp/_http_parser.pyx":44
  18312. *
  18313. * cdef object URL = _URL
  18314. * cdef object URL_build = URL.build # <<<<<<<<<<<<<<
  18315. * cdef object CIMultiDict = _CIMultiDict
  18316. * cdef object CIMultiDictProxy = _CIMultiDictProxy
  18317. */
  18318. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_7aiohttp_12_http_parser_URL, __pyx_n_s_build); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
  18319. __Pyx_GOTREF(__pyx_t_2);
  18320. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_URL_build);
  18321. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_URL_build, __pyx_t_2);
  18322. __Pyx_GIVEREF(__pyx_t_2);
  18323. __pyx_t_2 = 0;
  18324. /* "aiohttp/_http_parser.pyx":45
  18325. * cdef object URL = _URL
  18326. * cdef object URL_build = URL.build
  18327. * cdef object CIMultiDict = _CIMultiDict # <<<<<<<<<<<<<<
  18328. * cdef object CIMultiDictProxy = _CIMultiDictProxy
  18329. * cdef object HttpVersion = _HttpVersion
  18330. */
  18331. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CIMultiDict_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
  18332. __Pyx_GOTREF(__pyx_t_2);
  18333. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_CIMultiDict);
  18334. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_CIMultiDict, __pyx_t_2);
  18335. __Pyx_GIVEREF(__pyx_t_2);
  18336. __pyx_t_2 = 0;
  18337. /* "aiohttp/_http_parser.pyx":46
  18338. * cdef object URL_build = URL.build
  18339. * cdef object CIMultiDict = _CIMultiDict
  18340. * cdef object CIMultiDictProxy = _CIMultiDictProxy # <<<<<<<<<<<<<<
  18341. * cdef object HttpVersion = _HttpVersion
  18342. * cdef object HttpVersion10 = _HttpVersion10
  18343. */
  18344. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CIMultiDictProxy_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  18345. __Pyx_GOTREF(__pyx_t_2);
  18346. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_CIMultiDictProxy);
  18347. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_CIMultiDictProxy, __pyx_t_2);
  18348. __Pyx_GIVEREF(__pyx_t_2);
  18349. __pyx_t_2 = 0;
  18350. /* "aiohttp/_http_parser.pyx":47
  18351. * cdef object CIMultiDict = _CIMultiDict
  18352. * cdef object CIMultiDictProxy = _CIMultiDictProxy
  18353. * cdef object HttpVersion = _HttpVersion # <<<<<<<<<<<<<<
  18354. * cdef object HttpVersion10 = _HttpVersion10
  18355. * cdef object HttpVersion11 = _HttpVersion11
  18356. */
  18357. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HttpVersion_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
  18358. __Pyx_GOTREF(__pyx_t_2);
  18359. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_HttpVersion);
  18360. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_HttpVersion, __pyx_t_2);
  18361. __Pyx_GIVEREF(__pyx_t_2);
  18362. __pyx_t_2 = 0;
  18363. /* "aiohttp/_http_parser.pyx":48
  18364. * cdef object CIMultiDictProxy = _CIMultiDictProxy
  18365. * cdef object HttpVersion = _HttpVersion
  18366. * cdef object HttpVersion10 = _HttpVersion10 # <<<<<<<<<<<<<<
  18367. * cdef object HttpVersion11 = _HttpVersion11
  18368. * cdef object SEC_WEBSOCKET_KEY1 = hdrs.SEC_WEBSOCKET_KEY1
  18369. */
  18370. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HttpVersion10_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  18371. __Pyx_GOTREF(__pyx_t_2);
  18372. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_HttpVersion10);
  18373. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_HttpVersion10, __pyx_t_2);
  18374. __Pyx_GIVEREF(__pyx_t_2);
  18375. __pyx_t_2 = 0;
  18376. /* "aiohttp/_http_parser.pyx":49
  18377. * cdef object HttpVersion = _HttpVersion
  18378. * cdef object HttpVersion10 = _HttpVersion10
  18379. * cdef object HttpVersion11 = _HttpVersion11 # <<<<<<<<<<<<<<
  18380. * cdef object SEC_WEBSOCKET_KEY1 = hdrs.SEC_WEBSOCKET_KEY1
  18381. * cdef object CONTENT_ENCODING = hdrs.CONTENT_ENCODING
  18382. */
  18383. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HttpVersion11_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
  18384. __Pyx_GOTREF(__pyx_t_2);
  18385. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_HttpVersion11);
  18386. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_HttpVersion11, __pyx_t_2);
  18387. __Pyx_GIVEREF(__pyx_t_2);
  18388. __pyx_t_2 = 0;
  18389. /* "aiohttp/_http_parser.pyx":50
  18390. * cdef object HttpVersion10 = _HttpVersion10
  18391. * cdef object HttpVersion11 = _HttpVersion11
  18392. * cdef object SEC_WEBSOCKET_KEY1 = hdrs.SEC_WEBSOCKET_KEY1 # <<<<<<<<<<<<<<
  18393. * cdef object CONTENT_ENCODING = hdrs.CONTENT_ENCODING
  18394. * cdef object EMPTY_PAYLOAD = _EMPTY_PAYLOAD
  18395. */
  18396. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
  18397. __Pyx_GOTREF(__pyx_t_2);
  18398. __pyx_t_79 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SEC_WEBSOCKET_KEY1); if (unlikely(!__pyx_t_79)) __PYX_ERR(0, 50, __pyx_L1_error)
  18399. __Pyx_GOTREF(__pyx_t_79);
  18400. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18401. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1);
  18402. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_SEC_WEBSOCKET_KEY1, __pyx_t_79);
  18403. __Pyx_GIVEREF(__pyx_t_79);
  18404. __pyx_t_79 = 0;
  18405. /* "aiohttp/_http_parser.pyx":51
  18406. * cdef object HttpVersion11 = _HttpVersion11
  18407. * cdef object SEC_WEBSOCKET_KEY1 = hdrs.SEC_WEBSOCKET_KEY1
  18408. * cdef object CONTENT_ENCODING = hdrs.CONTENT_ENCODING # <<<<<<<<<<<<<<
  18409. * cdef object EMPTY_PAYLOAD = _EMPTY_PAYLOAD
  18410. * cdef object StreamReader = _StreamReader
  18411. */
  18412. __pyx_t_79 = __Pyx_GetModuleGlobalName(__pyx_n_s_hdrs); if (unlikely(!__pyx_t_79)) __PYX_ERR(0, 51, __pyx_L1_error)
  18413. __Pyx_GOTREF(__pyx_t_79);
  18414. __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_79, __pyx_n_s_CONTENT_ENCODING); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
  18415. __Pyx_GOTREF(__pyx_t_2);
  18416. __Pyx_DECREF(__pyx_t_79); __pyx_t_79 = 0;
  18417. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_CONTENT_ENCODING);
  18418. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_CONTENT_ENCODING, __pyx_t_2);
  18419. __Pyx_GIVEREF(__pyx_t_2);
  18420. __pyx_t_2 = 0;
  18421. /* "aiohttp/_http_parser.pyx":52
  18422. * cdef object SEC_WEBSOCKET_KEY1 = hdrs.SEC_WEBSOCKET_KEY1
  18423. * cdef object CONTENT_ENCODING = hdrs.CONTENT_ENCODING
  18424. * cdef object EMPTY_PAYLOAD = _EMPTY_PAYLOAD # <<<<<<<<<<<<<<
  18425. * cdef object StreamReader = _StreamReader
  18426. * cdef object DeflateBuffer = _DeflateBuffer
  18427. */
  18428. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EMPTY_PAYLOAD_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
  18429. __Pyx_GOTREF(__pyx_t_2);
  18430. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD);
  18431. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_EMPTY_PAYLOAD, __pyx_t_2);
  18432. __Pyx_GIVEREF(__pyx_t_2);
  18433. __pyx_t_2 = 0;
  18434. /* "aiohttp/_http_parser.pyx":53
  18435. * cdef object CONTENT_ENCODING = hdrs.CONTENT_ENCODING
  18436. * cdef object EMPTY_PAYLOAD = _EMPTY_PAYLOAD
  18437. * cdef object StreamReader = _StreamReader # <<<<<<<<<<<<<<
  18438. * cdef object DeflateBuffer = _DeflateBuffer
  18439. *
  18440. */
  18441. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StreamReader_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  18442. __Pyx_GOTREF(__pyx_t_2);
  18443. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_StreamReader);
  18444. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_StreamReader, __pyx_t_2);
  18445. __Pyx_GIVEREF(__pyx_t_2);
  18446. __pyx_t_2 = 0;
  18447. /* "aiohttp/_http_parser.pyx":54
  18448. * cdef object EMPTY_PAYLOAD = _EMPTY_PAYLOAD
  18449. * cdef object StreamReader = _StreamReader
  18450. * cdef object DeflateBuffer = _DeflateBuffer # <<<<<<<<<<<<<<
  18451. *
  18452. *
  18453. */
  18454. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DeflateBuffer_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
  18455. __Pyx_GOTREF(__pyx_t_2);
  18456. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser_DeflateBuffer);
  18457. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser_DeflateBuffer, __pyx_t_2);
  18458. __Pyx_GIVEREF(__pyx_t_2);
  18459. __pyx_t_2 = 0;
  18460. /* "aiohttp/_http_parser.pyx":68
  18461. * DEF METHODS_COUNT = 34;
  18462. *
  18463. * cdef list _http_method = [] # <<<<<<<<<<<<<<
  18464. *
  18465. * for i in range(METHODS_COUNT):
  18466. */
  18467. __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  18468. __Pyx_GOTREF(__pyx_t_2);
  18469. __Pyx_XGOTREF(__pyx_v_7aiohttp_12_http_parser__http_method);
  18470. __Pyx_DECREF_SET(__pyx_v_7aiohttp_12_http_parser__http_method, ((PyObject*)__pyx_t_2));
  18471. __Pyx_GIVEREF(__pyx_t_2);
  18472. __pyx_t_2 = 0;
  18473. /* "aiohttp/_http_parser.pyx":70
  18474. * cdef list _http_method = []
  18475. *
  18476. * for i in range(METHODS_COUNT): # <<<<<<<<<<<<<<
  18477. * _http_method.append(
  18478. * cparser.http_method_str(<cparser.http_method> i).decode('ascii'))
  18479. */
  18480. for (__pyx_t_80 = 0; __pyx_t_80 < 34; __pyx_t_80+=1) {
  18481. __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_80); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error)
  18482. __Pyx_GOTREF(__pyx_t_2);
  18483. if (PyDict_SetItem(__pyx_d, __pyx_n_s_i, __pyx_t_2) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
  18484. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18485. /* "aiohttp/_http_parser.pyx":71
  18486. *
  18487. * for i in range(METHODS_COUNT):
  18488. * _http_method.append( # <<<<<<<<<<<<<<
  18489. * cparser.http_method_str(<cparser.http_method> i).decode('ascii'))
  18490. *
  18491. */
  18492. if (unlikely(__pyx_v_7aiohttp_12_http_parser__http_method == Py_None)) {
  18493. PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
  18494. __PYX_ERR(0, 71, __pyx_L1_error)
  18495. }
  18496. /* "aiohttp/_http_parser.pyx":72
  18497. * for i in range(METHODS_COUNT):
  18498. * _http_method.append(
  18499. * cparser.http_method_str(<cparser.http_method> i).decode('ascii')) # <<<<<<<<<<<<<<
  18500. *
  18501. *
  18502. */
  18503. __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  18504. __Pyx_GOTREF(__pyx_t_2);
  18505. __pyx_t_81 = ((enum http_method)__Pyx_PyInt_As_enum__http_method(__pyx_t_2)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L1_error)
  18506. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18507. __pyx_t_82 = http_method_str(((enum http_method)__pyx_t_81));
  18508. __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_82, 0, strlen(__pyx_t_82), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
  18509. __Pyx_GOTREF(__pyx_t_2);
  18510. /* "aiohttp/_http_parser.pyx":71
  18511. *
  18512. * for i in range(METHODS_COUNT):
  18513. * _http_method.append( # <<<<<<<<<<<<<<
  18514. * cparser.http_method_str(<cparser.http_method> i).decode('ascii'))
  18515. *
  18516. */
  18517. __pyx_t_83 = __Pyx_PyList_Append(__pyx_v_7aiohttp_12_http_parser__http_method, __pyx_t_2); if (unlikely(__pyx_t_83 == ((int)-1))) __PYX_ERR(0, 71, __pyx_L1_error)
  18518. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18519. }
  18520. /* "aiohttp/_http_parser.pyx":755
  18521. *
  18522. *
  18523. * def parse_url(url): # <<<<<<<<<<<<<<
  18524. * cdef:
  18525. * Py_buffer py_buf
  18526. */
  18527. __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7aiohttp_12_http_parser_1parse_url, NULL, __pyx_n_s_aiohttp__http_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
  18528. __Pyx_GOTREF(__pyx_t_2);
  18529. if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_url, __pyx_t_2) < 0) __PYX_ERR(0, 755, __pyx_L1_error)
  18530. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18531. /* "(tree fragment)":1
  18532. * def __pyx_unpickle_RawRequestMessage(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
  18533. * if __pyx_checksum != 0x1408252:
  18534. * from pickle import PickleError as __pyx_PickleError
  18535. */
  18536. __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7aiohttp_12_http_parser_3__pyx_unpickle_RawRequestMessage, NULL, __pyx_n_s_aiohttp__http_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  18537. __Pyx_GOTREF(__pyx_t_2);
  18538. if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RawRequestMessage, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  18539. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18540. /* "(tree fragment)":9
  18541. * __pyx_unpickle_RawRequestMessage__set_state(<RawRequestMessage> __pyx_result, __pyx_state)
  18542. * return __pyx_result
  18543. * cdef __pyx_unpickle_RawRequestMessage__set_state(RawRequestMessage __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
  18544. * __pyx_result.chunked = __pyx_state[0]; __pyx_result.compression = __pyx_state[1]; __pyx_result.headers = __pyx_state[2]; __pyx_result.method = __pyx_state[3]; __pyx_result.path = __pyx_state[4]; __pyx_result.raw_headers = __pyx_state[5]; __pyx_result.should_close = __pyx_state[6]; __pyx_result.upgrade = __pyx_state[7]; __pyx_result.url = __pyx_state[8]; __pyx_result.version = __pyx_state[9]
  18545. * if len(__pyx_state) > 10 and hasattr(__pyx_result, '__dict__'):
  18546. */
  18547. __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7aiohttp_12_http_parser_5__pyx_unpickle_RawResponseMessage, NULL, __pyx_n_s_aiohttp__http_parser); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  18548. __Pyx_GOTREF(__pyx_t_2);
  18549. if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_RawResponseMessag, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  18550. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18551. /* "aiohttp/_http_parser.pyx":1
  18552. * #cython: language_level=3 # <<<<<<<<<<<<<<
  18553. * #
  18554. * # Based on https://github.com/MagicStack/httptools
  18555. */
  18556. __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  18557. __Pyx_GOTREF(__pyx_t_2);
  18558. if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  18559. __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  18560. /*--- Wrapped vars code ---*/
  18561. goto __pyx_L0;
  18562. __pyx_L1_error:;
  18563. __Pyx_XDECREF(__pyx_t_1);
  18564. __Pyx_XDECREF(__pyx_t_2);
  18565. __Pyx_XDECREF(__pyx_t_3);
  18566. __Pyx_XDECREF(__pyx_t_4);
  18567. __Pyx_XDECREF(__pyx_t_5);
  18568. __Pyx_XDECREF(__pyx_t_6);
  18569. __Pyx_XDECREF(__pyx_t_7);
  18570. __Pyx_XDECREF(__pyx_t_8);
  18571. __Pyx_XDECREF(__pyx_t_9);
  18572. __Pyx_XDECREF(__pyx_t_10);
  18573. __Pyx_XDECREF(__pyx_t_11);
  18574. __Pyx_XDECREF(__pyx_t_12);
  18575. __Pyx_XDECREF(__pyx_t_13);
  18576. __Pyx_XDECREF(__pyx_t_14);
  18577. __Pyx_XDECREF(__pyx_t_15);
  18578. __Pyx_XDECREF(__pyx_t_16);
  18579. __Pyx_XDECREF(__pyx_t_17);
  18580. __Pyx_XDECREF(__pyx_t_18);
  18581. __Pyx_XDECREF(__pyx_t_19);
  18582. __Pyx_XDECREF(__pyx_t_20);
  18583. __Pyx_XDECREF(__pyx_t_21);
  18584. __Pyx_XDECREF(__pyx_t_22);
  18585. __Pyx_XDECREF(__pyx_t_23);
  18586. __Pyx_XDECREF(__pyx_t_24);
  18587. __Pyx_XDECREF(__pyx_t_25);
  18588. __Pyx_XDECREF(__pyx_t_26);
  18589. __Pyx_XDECREF(__pyx_t_27);
  18590. __Pyx_XDECREF(__pyx_t_28);
  18591. __Pyx_XDECREF(__pyx_t_29);
  18592. __Pyx_XDECREF(__pyx_t_30);
  18593. __Pyx_XDECREF(__pyx_t_31);
  18594. __Pyx_XDECREF(__pyx_t_32);
  18595. __Pyx_XDECREF(__pyx_t_33);
  18596. __Pyx_XDECREF(__pyx_t_34);
  18597. __Pyx_XDECREF(__pyx_t_35);
  18598. __Pyx_XDECREF(__pyx_t_36);
  18599. __Pyx_XDECREF(__pyx_t_37);
  18600. __Pyx_XDECREF(__pyx_t_38);
  18601. __Pyx_XDECREF(__pyx_t_39);
  18602. __Pyx_XDECREF(__pyx_t_40);
  18603. __Pyx_XDECREF(__pyx_t_41);
  18604. __Pyx_XDECREF(__pyx_t_42);
  18605. __Pyx_XDECREF(__pyx_t_43);
  18606. __Pyx_XDECREF(__pyx_t_44);
  18607. __Pyx_XDECREF(__pyx_t_45);
  18608. __Pyx_XDECREF(__pyx_t_46);
  18609. __Pyx_XDECREF(__pyx_t_47);
  18610. __Pyx_XDECREF(__pyx_t_48);
  18611. __Pyx_XDECREF(__pyx_t_49);
  18612. __Pyx_XDECREF(__pyx_t_50);
  18613. __Pyx_XDECREF(__pyx_t_51);
  18614. __Pyx_XDECREF(__pyx_t_52);
  18615. __Pyx_XDECREF(__pyx_t_53);
  18616. __Pyx_XDECREF(__pyx_t_54);
  18617. __Pyx_XDECREF(__pyx_t_55);
  18618. __Pyx_XDECREF(__pyx_t_56);
  18619. __Pyx_XDECREF(__pyx_t_57);
  18620. __Pyx_XDECREF(__pyx_t_58);
  18621. __Pyx_XDECREF(__pyx_t_59);
  18622. __Pyx_XDECREF(__pyx_t_60);
  18623. __Pyx_XDECREF(__pyx_t_61);
  18624. __Pyx_XDECREF(__pyx_t_62);
  18625. __Pyx_XDECREF(__pyx_t_63);
  18626. __Pyx_XDECREF(__pyx_t_64);
  18627. __Pyx_XDECREF(__pyx_t_65);
  18628. __Pyx_XDECREF(__pyx_t_66);
  18629. __Pyx_XDECREF(__pyx_t_67);
  18630. __Pyx_XDECREF(__pyx_t_68);
  18631. __Pyx_XDECREF(__pyx_t_69);
  18632. __Pyx_XDECREF(__pyx_t_70);
  18633. __Pyx_XDECREF(__pyx_t_71);
  18634. __Pyx_XDECREF(__pyx_t_72);
  18635. __Pyx_XDECREF(__pyx_t_73);
  18636. __Pyx_XDECREF(__pyx_t_74);
  18637. __Pyx_XDECREF(__pyx_t_75);
  18638. __Pyx_XDECREF(__pyx_t_76);
  18639. __Pyx_XDECREF(__pyx_t_77);
  18640. __Pyx_XDECREF(__pyx_t_78);
  18641. __Pyx_XDECREF(__pyx_t_79);
  18642. if (__pyx_m) {
  18643. if (__pyx_d) {
  18644. __Pyx_AddTraceback("init aiohttp._http_parser", 0, __pyx_lineno, __pyx_filename);
  18645. }
  18646. Py_DECREF(__pyx_m); __pyx_m = 0;
  18647. } else if (!PyErr_Occurred()) {
  18648. PyErr_SetString(PyExc_ImportError, "init aiohttp._http_parser");
  18649. }
  18650. __pyx_L0:;
  18651. __Pyx_RefNannyFinishContext();
  18652. #if CYTHON_PEP489_MULTI_PHASE_INIT
  18653. return (__pyx_m != NULL) ? 0 : -1;
  18654. #elif PY_MAJOR_VERSION >= 3
  18655. return __pyx_m;
  18656. #else
  18657. return;
  18658. #endif
  18659. }
  18660. /* --- Runtime support code --- */
  18661. /* Refnanny */
  18662. #if CYTHON_REFNANNY
  18663. static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
  18664. PyObject *m = NULL, *p = NULL;
  18665. void *r = NULL;
  18666. m = PyImport_ImportModule((char *)modname);
  18667. if (!m) goto end;
  18668. p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
  18669. if (!p) goto end;
  18670. r = PyLong_AsVoidPtr(p);
  18671. end:
  18672. Py_XDECREF(p);
  18673. Py_XDECREF(m);
  18674. return (__Pyx_RefNannyAPIStruct *)r;
  18675. }
  18676. #endif
  18677. /* PyObjectGetAttrStr */
  18678. #if CYTHON_USE_TYPE_SLOTS
  18679. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
  18680. PyTypeObject* tp = Py_TYPE(obj);
  18681. if (likely(tp->tp_getattro))
  18682. return tp->tp_getattro(obj, attr_name);
  18683. #if PY_MAJOR_VERSION < 3
  18684. if (likely(tp->tp_getattr))
  18685. return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
  18686. #endif
  18687. return PyObject_GetAttr(obj, attr_name);
  18688. }
  18689. #endif
  18690. /* GetBuiltinName */
  18691. static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
  18692. PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
  18693. if (unlikely(!result)) {
  18694. PyErr_Format(PyExc_NameError,
  18695. #if PY_MAJOR_VERSION >= 3
  18696. "name '%U' is not defined", name);
  18697. #else
  18698. "name '%.200s' is not defined", PyString_AS_STRING(name));
  18699. #endif
  18700. }
  18701. return result;
  18702. }
  18703. /* GetItemInt */
  18704. static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
  18705. PyObject *r;
  18706. if (!j) return NULL;
  18707. r = PyObject_GetItem(o, j);
  18708. Py_DECREF(j);
  18709. return r;
  18710. }
  18711. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
  18712. CYTHON_NCP_UNUSED int wraparound,
  18713. CYTHON_NCP_UNUSED int boundscheck) {
  18714. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  18715. Py_ssize_t wrapped_i = i;
  18716. if (wraparound & unlikely(i < 0)) {
  18717. wrapped_i += PyList_GET_SIZE(o);
  18718. }
  18719. if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
  18720. PyObject *r = PyList_GET_ITEM(o, wrapped_i);
  18721. Py_INCREF(r);
  18722. return r;
  18723. }
  18724. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  18725. #else
  18726. return PySequence_GetItem(o, i);
  18727. #endif
  18728. }
  18729. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
  18730. CYTHON_NCP_UNUSED int wraparound,
  18731. CYTHON_NCP_UNUSED int boundscheck) {
  18732. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  18733. Py_ssize_t wrapped_i = i;
  18734. if (wraparound & unlikely(i < 0)) {
  18735. wrapped_i += PyTuple_GET_SIZE(o);
  18736. }
  18737. if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
  18738. PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
  18739. Py_INCREF(r);
  18740. return r;
  18741. }
  18742. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  18743. #else
  18744. return PySequence_GetItem(o, i);
  18745. #endif
  18746. }
  18747. static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
  18748. CYTHON_NCP_UNUSED int wraparound,
  18749. CYTHON_NCP_UNUSED int boundscheck) {
  18750. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
  18751. if (is_list || PyList_CheckExact(o)) {
  18752. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
  18753. if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
  18754. PyObject *r = PyList_GET_ITEM(o, n);
  18755. Py_INCREF(r);
  18756. return r;
  18757. }
  18758. }
  18759. else if (PyTuple_CheckExact(o)) {
  18760. Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
  18761. if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
  18762. PyObject *r = PyTuple_GET_ITEM(o, n);
  18763. Py_INCREF(r);
  18764. return r;
  18765. }
  18766. } else {
  18767. PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
  18768. if (likely(m && m->sq_item)) {
  18769. if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
  18770. Py_ssize_t l = m->sq_length(o);
  18771. if (likely(l >= 0)) {
  18772. i += l;
  18773. } else {
  18774. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  18775. return NULL;
  18776. PyErr_Clear();
  18777. }
  18778. }
  18779. return m->sq_item(o, i);
  18780. }
  18781. }
  18782. #else
  18783. if (is_list || PySequence_Check(o)) {
  18784. return PySequence_GetItem(o, i);
  18785. }
  18786. #endif
  18787. return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
  18788. }
  18789. /* decode_c_bytes */
  18790. static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
  18791. const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop,
  18792. const char* encoding, const char* errors,
  18793. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  18794. if (unlikely((start < 0) | (stop < 0))) {
  18795. if (start < 0) {
  18796. start += length;
  18797. if (start < 0)
  18798. start = 0;
  18799. }
  18800. if (stop < 0)
  18801. stop += length;
  18802. }
  18803. if (stop > length)
  18804. stop = length;
  18805. length = stop - start;
  18806. if (unlikely(length <= 0))
  18807. return PyUnicode_FromUnicode(NULL, 0);
  18808. cstring += start;
  18809. if (decode_func) {
  18810. return decode_func(cstring, length, errors);
  18811. } else {
  18812. return PyUnicode_Decode(cstring, length, encoding, errors);
  18813. }
  18814. }
  18815. /* RaiseArgTupleInvalid */
  18816. static void __Pyx_RaiseArgtupleInvalid(
  18817. const char* func_name,
  18818. int exact,
  18819. Py_ssize_t num_min,
  18820. Py_ssize_t num_max,
  18821. Py_ssize_t num_found)
  18822. {
  18823. Py_ssize_t num_expected;
  18824. const char *more_or_less;
  18825. if (num_found < num_min) {
  18826. num_expected = num_min;
  18827. more_or_less = "at least";
  18828. } else {
  18829. num_expected = num_max;
  18830. more_or_less = "at most";
  18831. }
  18832. if (exact) {
  18833. more_or_less = "exactly";
  18834. }
  18835. PyErr_Format(PyExc_TypeError,
  18836. "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
  18837. func_name, more_or_less, num_expected,
  18838. (num_expected == 1) ? "" : "s", num_found);
  18839. }
  18840. /* RaiseDoubleKeywords */
  18841. static void __Pyx_RaiseDoubleKeywordsError(
  18842. const char* func_name,
  18843. PyObject* kw_name)
  18844. {
  18845. PyErr_Format(PyExc_TypeError,
  18846. #if PY_MAJOR_VERSION >= 3
  18847. "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
  18848. #else
  18849. "%s() got multiple values for keyword argument '%s'", func_name,
  18850. PyString_AsString(kw_name));
  18851. #endif
  18852. }
  18853. /* ParseKeywords */
  18854. static int __Pyx_ParseOptionalKeywords(
  18855. PyObject *kwds,
  18856. PyObject **argnames[],
  18857. PyObject *kwds2,
  18858. PyObject *values[],
  18859. Py_ssize_t num_pos_args,
  18860. const char* function_name)
  18861. {
  18862. PyObject *key = 0, *value = 0;
  18863. Py_ssize_t pos = 0;
  18864. PyObject*** name;
  18865. PyObject*** first_kw_arg = argnames + num_pos_args;
  18866. while (PyDict_Next(kwds, &pos, &key, &value)) {
  18867. name = first_kw_arg;
  18868. while (*name && (**name != key)) name++;
  18869. if (*name) {
  18870. values[name-argnames] = value;
  18871. continue;
  18872. }
  18873. name = first_kw_arg;
  18874. #if PY_MAJOR_VERSION < 3
  18875. if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
  18876. while (*name) {
  18877. if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
  18878. && _PyString_Eq(**name, key)) {
  18879. values[name-argnames] = value;
  18880. break;
  18881. }
  18882. name++;
  18883. }
  18884. if (*name) continue;
  18885. else {
  18886. PyObject*** argname = argnames;
  18887. while (argname != first_kw_arg) {
  18888. if ((**argname == key) || (
  18889. (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
  18890. && _PyString_Eq(**argname, key))) {
  18891. goto arg_passed_twice;
  18892. }
  18893. argname++;
  18894. }
  18895. }
  18896. } else
  18897. #endif
  18898. if (likely(PyUnicode_Check(key))) {
  18899. while (*name) {
  18900. int cmp = (**name == key) ? 0 :
  18901. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  18902. (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
  18903. #endif
  18904. PyUnicode_Compare(**name, key);
  18905. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  18906. if (cmp == 0) {
  18907. values[name-argnames] = value;
  18908. break;
  18909. }
  18910. name++;
  18911. }
  18912. if (*name) continue;
  18913. else {
  18914. PyObject*** argname = argnames;
  18915. while (argname != first_kw_arg) {
  18916. int cmp = (**argname == key) ? 0 :
  18917. #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
  18918. (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
  18919. #endif
  18920. PyUnicode_Compare(**argname, key);
  18921. if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
  18922. if (cmp == 0) goto arg_passed_twice;
  18923. argname++;
  18924. }
  18925. }
  18926. } else
  18927. goto invalid_keyword_type;
  18928. if (kwds2) {
  18929. if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
  18930. } else {
  18931. goto invalid_keyword;
  18932. }
  18933. }
  18934. return 0;
  18935. arg_passed_twice:
  18936. __Pyx_RaiseDoubleKeywordsError(function_name, key);
  18937. goto bad;
  18938. invalid_keyword_type:
  18939. PyErr_Format(PyExc_TypeError,
  18940. "%.200s() keywords must be strings", function_name);
  18941. goto bad;
  18942. invalid_keyword:
  18943. PyErr_Format(PyExc_TypeError,
  18944. #if PY_MAJOR_VERSION < 3
  18945. "%.200s() got an unexpected keyword argument '%.200s'",
  18946. function_name, PyString_AsString(key));
  18947. #else
  18948. "%s() got an unexpected keyword argument '%U'",
  18949. function_name, key);
  18950. #endif
  18951. bad:
  18952. return -1;
  18953. }
  18954. /* None */
  18955. static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
  18956. PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
  18957. }
  18958. /* RaiseTooManyValuesToUnpack */
  18959. static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
  18960. PyErr_Format(PyExc_ValueError,
  18961. "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
  18962. }
  18963. /* RaiseNeedMoreValuesToUnpack */
  18964. static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
  18965. PyErr_Format(PyExc_ValueError,
  18966. "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
  18967. index, (index == 1) ? "" : "s");
  18968. }
  18969. /* IterFinish */
  18970. static CYTHON_INLINE int __Pyx_IterFinish(void) {
  18971. #if CYTHON_FAST_THREAD_STATE
  18972. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  18973. PyObject* exc_type = tstate->curexc_type;
  18974. if (unlikely(exc_type)) {
  18975. if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
  18976. PyObject *exc_value, *exc_tb;
  18977. exc_value = tstate->curexc_value;
  18978. exc_tb = tstate->curexc_traceback;
  18979. tstate->curexc_type = 0;
  18980. tstate->curexc_value = 0;
  18981. tstate->curexc_traceback = 0;
  18982. Py_DECREF(exc_type);
  18983. Py_XDECREF(exc_value);
  18984. Py_XDECREF(exc_tb);
  18985. return 0;
  18986. } else {
  18987. return -1;
  18988. }
  18989. }
  18990. return 0;
  18991. #else
  18992. if (unlikely(PyErr_Occurred())) {
  18993. if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
  18994. PyErr_Clear();
  18995. return 0;
  18996. } else {
  18997. return -1;
  18998. }
  18999. }
  19000. return 0;
  19001. #endif
  19002. }
  19003. /* UnpackItemEndCheck */
  19004. static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
  19005. if (unlikely(retval)) {
  19006. Py_DECREF(retval);
  19007. __Pyx_RaiseTooManyValuesError(expected);
  19008. return -1;
  19009. } else {
  19010. return __Pyx_IterFinish();
  19011. }
  19012. return 0;
  19013. }
  19014. /* KeywordStringCheck */
  19015. static int __Pyx_CheckKeywordStrings(
  19016. PyObject *kwdict,
  19017. const char* function_name,
  19018. int kw_allowed)
  19019. {
  19020. PyObject* key = 0;
  19021. Py_ssize_t pos = 0;
  19022. #if CYTHON_COMPILING_IN_PYPY
  19023. if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
  19024. goto invalid_keyword;
  19025. return 1;
  19026. #else
  19027. while (PyDict_Next(kwdict, &pos, &key, 0)) {
  19028. #if PY_MAJOR_VERSION < 3
  19029. if (unlikely(!PyString_Check(key)))
  19030. #endif
  19031. if (unlikely(!PyUnicode_Check(key)))
  19032. goto invalid_keyword_type;
  19033. }
  19034. if ((!kw_allowed) && unlikely(key))
  19035. goto invalid_keyword;
  19036. return 1;
  19037. invalid_keyword_type:
  19038. PyErr_Format(PyExc_TypeError,
  19039. "%.200s() keywords must be strings", function_name);
  19040. return 0;
  19041. #endif
  19042. invalid_keyword:
  19043. PyErr_Format(PyExc_TypeError,
  19044. #if PY_MAJOR_VERSION < 3
  19045. "%.200s() got an unexpected keyword argument '%.200s'",
  19046. function_name, PyString_AsString(key));
  19047. #else
  19048. "%s() got an unexpected keyword argument '%U'",
  19049. function_name, key);
  19050. #endif
  19051. return 0;
  19052. }
  19053. /* ExtTypeTest */
  19054. static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
  19055. if (unlikely(!type)) {
  19056. PyErr_SetString(PyExc_SystemError, "Missing type object");
  19057. return 0;
  19058. }
  19059. if (likely(__Pyx_TypeCheck(obj, type)))
  19060. return 1;
  19061. PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
  19062. Py_TYPE(obj)->tp_name, type->tp_name);
  19063. return 0;
  19064. }
  19065. /* DictGetItem */
  19066. #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
  19067. static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
  19068. PyObject *value;
  19069. value = PyDict_GetItemWithError(d, key);
  19070. if (unlikely(!value)) {
  19071. if (!PyErr_Occurred()) {
  19072. PyObject* args = PyTuple_Pack(1, key);
  19073. if (likely(args))
  19074. PyErr_SetObject(PyExc_KeyError, args);
  19075. Py_XDECREF(args);
  19076. }
  19077. return NULL;
  19078. }
  19079. Py_INCREF(value);
  19080. return value;
  19081. }
  19082. #endif
  19083. /* PyErrExceptionMatches */
  19084. #if CYTHON_FAST_THREAD_STATE
  19085. static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  19086. Py_ssize_t i, n;
  19087. n = PyTuple_GET_SIZE(tuple);
  19088. #if PY_MAJOR_VERSION >= 3
  19089. for (i=0; i<n; i++) {
  19090. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  19091. }
  19092. #endif
  19093. for (i=0; i<n; i++) {
  19094. if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
  19095. }
  19096. return 0;
  19097. }
  19098. static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
  19099. PyObject *exc_type = tstate->curexc_type;
  19100. if (exc_type == err) return 1;
  19101. if (unlikely(!exc_type)) return 0;
  19102. if (unlikely(PyTuple_Check(err)))
  19103. return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
  19104. return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
  19105. }
  19106. #endif
  19107. /* PyErrFetchRestore */
  19108. #if CYTHON_FAST_THREAD_STATE
  19109. static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  19110. PyObject *tmp_type, *tmp_value, *tmp_tb;
  19111. tmp_type = tstate->curexc_type;
  19112. tmp_value = tstate->curexc_value;
  19113. tmp_tb = tstate->curexc_traceback;
  19114. tstate->curexc_type = type;
  19115. tstate->curexc_value = value;
  19116. tstate->curexc_traceback = tb;
  19117. Py_XDECREF(tmp_type);
  19118. Py_XDECREF(tmp_value);
  19119. Py_XDECREF(tmp_tb);
  19120. }
  19121. static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  19122. *type = tstate->curexc_type;
  19123. *value = tstate->curexc_value;
  19124. *tb = tstate->curexc_traceback;
  19125. tstate->curexc_type = 0;
  19126. tstate->curexc_value = 0;
  19127. tstate->curexc_traceback = 0;
  19128. }
  19129. #endif
  19130. /* GetAttr */
  19131. static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
  19132. #if CYTHON_USE_TYPE_SLOTS
  19133. #if PY_MAJOR_VERSION >= 3
  19134. if (likely(PyUnicode_Check(n)))
  19135. #else
  19136. if (likely(PyString_Check(n)))
  19137. #endif
  19138. return __Pyx_PyObject_GetAttrStr(o, n);
  19139. #endif
  19140. return PyObject_GetAttr(o, n);
  19141. }
  19142. /* GetAttr3 */
  19143. static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
  19144. __Pyx_PyThreadState_declare
  19145. __Pyx_PyThreadState_assign
  19146. if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
  19147. return NULL;
  19148. __Pyx_PyErr_Clear();
  19149. Py_INCREF(d);
  19150. return d;
  19151. }
  19152. static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
  19153. PyObject *r = __Pyx_GetAttr(o, n);
  19154. return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
  19155. }
  19156. /* GetModuleGlobalName */
  19157. static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
  19158. PyObject *result;
  19159. #if !CYTHON_AVOID_BORROWED_REFS
  19160. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
  19161. result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
  19162. if (likely(result)) {
  19163. Py_INCREF(result);
  19164. } else if (unlikely(PyErr_Occurred())) {
  19165. result = NULL;
  19166. } else {
  19167. #else
  19168. result = PyDict_GetItem(__pyx_d, name);
  19169. if (likely(result)) {
  19170. Py_INCREF(result);
  19171. } else {
  19172. #endif
  19173. #else
  19174. result = PyObject_GetItem(__pyx_d, name);
  19175. if (!result) {
  19176. PyErr_Clear();
  19177. #endif
  19178. result = __Pyx_GetBuiltinName(name);
  19179. }
  19180. return result;
  19181. }
  19182. /* PyFunctionFastCall */
  19183. #if CYTHON_FAST_PYCALL
  19184. #include "frameobject.h"
  19185. static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
  19186. PyObject *globals) {
  19187. PyFrameObject *f;
  19188. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  19189. PyObject **fastlocals;
  19190. Py_ssize_t i;
  19191. PyObject *result;
  19192. assert(globals != NULL);
  19193. /* XXX Perhaps we should create a specialized
  19194. PyFrame_New() that doesn't take locals, but does
  19195. take builtins without sanity checking them.
  19196. */
  19197. assert(tstate != NULL);
  19198. f = PyFrame_New(tstate, co, globals, NULL);
  19199. if (f == NULL) {
  19200. return NULL;
  19201. }
  19202. fastlocals = f->f_localsplus;
  19203. for (i = 0; i < na; i++) {
  19204. Py_INCREF(*args);
  19205. fastlocals[i] = *args++;
  19206. }
  19207. result = PyEval_EvalFrameEx(f,0);
  19208. ++tstate->recursion_depth;
  19209. Py_DECREF(f);
  19210. --tstate->recursion_depth;
  19211. return result;
  19212. }
  19213. #if 1 || PY_VERSION_HEX < 0x030600B1
  19214. static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
  19215. PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
  19216. PyObject *globals = PyFunction_GET_GLOBALS(func);
  19217. PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
  19218. PyObject *closure;
  19219. #if PY_MAJOR_VERSION >= 3
  19220. PyObject *kwdefs;
  19221. #endif
  19222. PyObject *kwtuple, **k;
  19223. PyObject **d;
  19224. Py_ssize_t nd;
  19225. Py_ssize_t nk;
  19226. PyObject *result;
  19227. assert(kwargs == NULL || PyDict_Check(kwargs));
  19228. nk = kwargs ? PyDict_Size(kwargs) : 0;
  19229. if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
  19230. return NULL;
  19231. }
  19232. if (
  19233. #if PY_MAJOR_VERSION >= 3
  19234. co->co_kwonlyargcount == 0 &&
  19235. #endif
  19236. likely(kwargs == NULL || nk == 0) &&
  19237. co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
  19238. if (argdefs == NULL && co->co_argcount == nargs) {
  19239. result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
  19240. goto done;
  19241. }
  19242. else if (nargs == 0 && argdefs != NULL
  19243. && co->co_argcount == Py_SIZE(argdefs)) {
  19244. /* function called with no arguments, but all parameters have
  19245. a default value: use default values as arguments .*/
  19246. args = &PyTuple_GET_ITEM(argdefs, 0);
  19247. result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
  19248. goto done;
  19249. }
  19250. }
  19251. if (kwargs != NULL) {
  19252. Py_ssize_t pos, i;
  19253. kwtuple = PyTuple_New(2 * nk);
  19254. if (kwtuple == NULL) {
  19255. result = NULL;
  19256. goto done;
  19257. }
  19258. k = &PyTuple_GET_ITEM(kwtuple, 0);
  19259. pos = i = 0;
  19260. while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
  19261. Py_INCREF(k[i]);
  19262. Py_INCREF(k[i+1]);
  19263. i += 2;
  19264. }
  19265. nk = i / 2;
  19266. }
  19267. else {
  19268. kwtuple = NULL;
  19269. k = NULL;
  19270. }
  19271. closure = PyFunction_GET_CLOSURE(func);
  19272. #if PY_MAJOR_VERSION >= 3
  19273. kwdefs = PyFunction_GET_KW_DEFAULTS(func);
  19274. #endif
  19275. if (argdefs != NULL) {
  19276. d = &PyTuple_GET_ITEM(argdefs, 0);
  19277. nd = Py_SIZE(argdefs);
  19278. }
  19279. else {
  19280. d = NULL;
  19281. nd = 0;
  19282. }
  19283. #if PY_MAJOR_VERSION >= 3
  19284. result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
  19285. args, nargs,
  19286. k, (int)nk,
  19287. d, (int)nd, kwdefs, closure);
  19288. #else
  19289. result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
  19290. args, nargs,
  19291. k, (int)nk,
  19292. d, (int)nd, closure);
  19293. #endif
  19294. Py_XDECREF(kwtuple);
  19295. done:
  19296. Py_LeaveRecursiveCall();
  19297. return result;
  19298. }
  19299. #endif
  19300. #endif
  19301. /* PyObjectCall */
  19302. #if CYTHON_COMPILING_IN_CPYTHON
  19303. static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
  19304. PyObject *result;
  19305. ternaryfunc call = func->ob_type->tp_call;
  19306. if (unlikely(!call))
  19307. return PyObject_Call(func, arg, kw);
  19308. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  19309. return NULL;
  19310. result = (*call)(func, arg, kw);
  19311. Py_LeaveRecursiveCall();
  19312. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  19313. PyErr_SetString(
  19314. PyExc_SystemError,
  19315. "NULL result without error in PyObject_Call");
  19316. }
  19317. return result;
  19318. }
  19319. #endif
  19320. /* PyObjectCallMethO */
  19321. #if CYTHON_COMPILING_IN_CPYTHON
  19322. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
  19323. PyObject *self, *result;
  19324. PyCFunction cfunc;
  19325. cfunc = PyCFunction_GET_FUNCTION(func);
  19326. self = PyCFunction_GET_SELF(func);
  19327. if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
  19328. return NULL;
  19329. result = cfunc(self, arg);
  19330. Py_LeaveRecursiveCall();
  19331. if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
  19332. PyErr_SetString(
  19333. PyExc_SystemError,
  19334. "NULL result without error in PyObject_Call");
  19335. }
  19336. return result;
  19337. }
  19338. #endif
  19339. /* PyObjectCallNoArg */
  19340. #if CYTHON_COMPILING_IN_CPYTHON
  19341. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
  19342. #if CYTHON_FAST_PYCALL
  19343. if (PyFunction_Check(func)) {
  19344. return __Pyx_PyFunction_FastCall(func, NULL, 0);
  19345. }
  19346. #endif
  19347. #ifdef __Pyx_CyFunction_USED
  19348. if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
  19349. #else
  19350. if (likely(PyCFunction_Check(func))) {
  19351. #endif
  19352. if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
  19353. return __Pyx_PyObject_CallMethO(func, NULL);
  19354. }
  19355. }
  19356. return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
  19357. }
  19358. #endif
  19359. /* PyCFunctionFastCall */
  19360. #if CYTHON_FAST_PYCCALL
  19361. static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
  19362. PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
  19363. PyCFunction meth = PyCFunction_GET_FUNCTION(func);
  19364. PyObject *self = PyCFunction_GET_SELF(func);
  19365. int flags = PyCFunction_GET_FLAGS(func);
  19366. assert(PyCFunction_Check(func));
  19367. assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
  19368. assert(nargs >= 0);
  19369. assert(nargs == 0 || args != NULL);
  19370. /* _PyCFunction_FastCallDict() must not be called with an exception set,
  19371. because it may clear it (directly or indirectly) and so the
  19372. caller loses its exception */
  19373. assert(!PyErr_Occurred());
  19374. if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
  19375. return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
  19376. } else {
  19377. return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
  19378. }
  19379. }
  19380. #endif
  19381. /* PyObjectCallOneArg */
  19382. #if CYTHON_COMPILING_IN_CPYTHON
  19383. static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  19384. PyObject *result;
  19385. PyObject *args = PyTuple_New(1);
  19386. if (unlikely(!args)) return NULL;
  19387. Py_INCREF(arg);
  19388. PyTuple_SET_ITEM(args, 0, arg);
  19389. result = __Pyx_PyObject_Call(func, args, NULL);
  19390. Py_DECREF(args);
  19391. return result;
  19392. }
  19393. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  19394. #if CYTHON_FAST_PYCALL
  19395. if (PyFunction_Check(func)) {
  19396. return __Pyx_PyFunction_FastCall(func, &arg, 1);
  19397. }
  19398. #endif
  19399. if (likely(PyCFunction_Check(func))) {
  19400. if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
  19401. return __Pyx_PyObject_CallMethO(func, arg);
  19402. #if CYTHON_FAST_PYCCALL
  19403. } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
  19404. return __Pyx_PyCFunction_FastCall(func, &arg, 1);
  19405. #endif
  19406. }
  19407. }
  19408. return __Pyx__PyObject_CallOneArg(func, arg);
  19409. }
  19410. #else
  19411. static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
  19412. PyObject *result;
  19413. PyObject *args = PyTuple_Pack(1, arg);
  19414. if (unlikely(!args)) return NULL;
  19415. result = __Pyx_PyObject_Call(func, args, NULL);
  19416. Py_DECREF(args);
  19417. return result;
  19418. }
  19419. #endif
  19420. /* RaiseException */
  19421. #if PY_MAJOR_VERSION < 3
  19422. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
  19423. CYTHON_UNUSED PyObject *cause) {
  19424. __Pyx_PyThreadState_declare
  19425. Py_XINCREF(type);
  19426. if (!value || value == Py_None)
  19427. value = NULL;
  19428. else
  19429. Py_INCREF(value);
  19430. if (!tb || tb == Py_None)
  19431. tb = NULL;
  19432. else {
  19433. Py_INCREF(tb);
  19434. if (!PyTraceBack_Check(tb)) {
  19435. PyErr_SetString(PyExc_TypeError,
  19436. "raise: arg 3 must be a traceback or None");
  19437. goto raise_error;
  19438. }
  19439. }
  19440. if (PyType_Check(type)) {
  19441. #if CYTHON_COMPILING_IN_PYPY
  19442. if (!value) {
  19443. Py_INCREF(Py_None);
  19444. value = Py_None;
  19445. }
  19446. #endif
  19447. PyErr_NormalizeException(&type, &value, &tb);
  19448. } else {
  19449. if (value) {
  19450. PyErr_SetString(PyExc_TypeError,
  19451. "instance exception may not have a separate value");
  19452. goto raise_error;
  19453. }
  19454. value = type;
  19455. type = (PyObject*) Py_TYPE(type);
  19456. Py_INCREF(type);
  19457. if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
  19458. PyErr_SetString(PyExc_TypeError,
  19459. "raise: exception class must be a subclass of BaseException");
  19460. goto raise_error;
  19461. }
  19462. }
  19463. __Pyx_PyThreadState_assign
  19464. __Pyx_ErrRestore(type, value, tb);
  19465. return;
  19466. raise_error:
  19467. Py_XDECREF(value);
  19468. Py_XDECREF(type);
  19469. Py_XDECREF(tb);
  19470. return;
  19471. }
  19472. #else
  19473. static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
  19474. PyObject* owned_instance = NULL;
  19475. if (tb == Py_None) {
  19476. tb = 0;
  19477. } else if (tb && !PyTraceBack_Check(tb)) {
  19478. PyErr_SetString(PyExc_TypeError,
  19479. "raise: arg 3 must be a traceback or None");
  19480. goto bad;
  19481. }
  19482. if (value == Py_None)
  19483. value = 0;
  19484. if (PyExceptionInstance_Check(type)) {
  19485. if (value) {
  19486. PyErr_SetString(PyExc_TypeError,
  19487. "instance exception may not have a separate value");
  19488. goto bad;
  19489. }
  19490. value = type;
  19491. type = (PyObject*) Py_TYPE(value);
  19492. } else if (PyExceptionClass_Check(type)) {
  19493. PyObject *instance_class = NULL;
  19494. if (value && PyExceptionInstance_Check(value)) {
  19495. instance_class = (PyObject*) Py_TYPE(value);
  19496. if (instance_class != type) {
  19497. int is_subclass = PyObject_IsSubclass(instance_class, type);
  19498. if (!is_subclass) {
  19499. instance_class = NULL;
  19500. } else if (unlikely(is_subclass == -1)) {
  19501. goto bad;
  19502. } else {
  19503. type = instance_class;
  19504. }
  19505. }
  19506. }
  19507. if (!instance_class) {
  19508. PyObject *args;
  19509. if (!value)
  19510. args = PyTuple_New(0);
  19511. else if (PyTuple_Check(value)) {
  19512. Py_INCREF(value);
  19513. args = value;
  19514. } else
  19515. args = PyTuple_Pack(1, value);
  19516. if (!args)
  19517. goto bad;
  19518. owned_instance = PyObject_Call(type, args, NULL);
  19519. Py_DECREF(args);
  19520. if (!owned_instance)
  19521. goto bad;
  19522. value = owned_instance;
  19523. if (!PyExceptionInstance_Check(value)) {
  19524. PyErr_Format(PyExc_TypeError,
  19525. "calling %R should have returned an instance of "
  19526. "BaseException, not %R",
  19527. type, Py_TYPE(value));
  19528. goto bad;
  19529. }
  19530. }
  19531. } else {
  19532. PyErr_SetString(PyExc_TypeError,
  19533. "raise: exception class must be a subclass of BaseException");
  19534. goto bad;
  19535. }
  19536. if (cause) {
  19537. PyObject *fixed_cause;
  19538. if (cause == Py_None) {
  19539. fixed_cause = NULL;
  19540. } else if (PyExceptionClass_Check(cause)) {
  19541. fixed_cause = PyObject_CallObject(cause, NULL);
  19542. if (fixed_cause == NULL)
  19543. goto bad;
  19544. } else if (PyExceptionInstance_Check(cause)) {
  19545. fixed_cause = cause;
  19546. Py_INCREF(fixed_cause);
  19547. } else {
  19548. PyErr_SetString(PyExc_TypeError,
  19549. "exception causes must derive from "
  19550. "BaseException");
  19551. goto bad;
  19552. }
  19553. PyException_SetCause(value, fixed_cause);
  19554. }
  19555. PyErr_SetObject(type, value);
  19556. if (tb) {
  19557. #if CYTHON_COMPILING_IN_PYPY
  19558. PyObject *tmp_type, *tmp_value, *tmp_tb;
  19559. PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
  19560. Py_INCREF(tb);
  19561. PyErr_Restore(tmp_type, tmp_value, tb);
  19562. Py_XDECREF(tmp_tb);
  19563. #else
  19564. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  19565. PyObject* tmp_tb = tstate->curexc_traceback;
  19566. if (tb != tmp_tb) {
  19567. Py_INCREF(tb);
  19568. tstate->curexc_traceback = tb;
  19569. Py_XDECREF(tmp_tb);
  19570. }
  19571. #endif
  19572. }
  19573. bad:
  19574. Py_XDECREF(owned_instance);
  19575. return;
  19576. }
  19577. #endif
  19578. /* BytesEquals */
  19579. static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
  19580. #if CYTHON_COMPILING_IN_PYPY
  19581. return PyObject_RichCompareBool(s1, s2, equals);
  19582. #else
  19583. if (s1 == s2) {
  19584. return (equals == Py_EQ);
  19585. } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
  19586. const char *ps1, *ps2;
  19587. Py_ssize_t length = PyBytes_GET_SIZE(s1);
  19588. if (length != PyBytes_GET_SIZE(s2))
  19589. return (equals == Py_NE);
  19590. ps1 = PyBytes_AS_STRING(s1);
  19591. ps2 = PyBytes_AS_STRING(s2);
  19592. if (ps1[0] != ps2[0]) {
  19593. return (equals == Py_NE);
  19594. } else if (length == 1) {
  19595. return (equals == Py_EQ);
  19596. } else {
  19597. int result;
  19598. #if CYTHON_USE_UNICODE_INTERNALS
  19599. Py_hash_t hash1, hash2;
  19600. hash1 = ((PyBytesObject*)s1)->ob_shash;
  19601. hash2 = ((PyBytesObject*)s2)->ob_shash;
  19602. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  19603. return (equals == Py_NE);
  19604. }
  19605. #endif
  19606. result = memcmp(ps1, ps2, (size_t)length);
  19607. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  19608. }
  19609. } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
  19610. return (equals == Py_NE);
  19611. } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
  19612. return (equals == Py_NE);
  19613. } else {
  19614. int result;
  19615. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  19616. if (!py_result)
  19617. return -1;
  19618. result = __Pyx_PyObject_IsTrue(py_result);
  19619. Py_DECREF(py_result);
  19620. return result;
  19621. }
  19622. #endif
  19623. }
  19624. /* UnicodeEquals */
  19625. static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
  19626. #if CYTHON_COMPILING_IN_PYPY
  19627. return PyObject_RichCompareBool(s1, s2, equals);
  19628. #else
  19629. #if PY_MAJOR_VERSION < 3
  19630. PyObject* owned_ref = NULL;
  19631. #endif
  19632. int s1_is_unicode, s2_is_unicode;
  19633. if (s1 == s2) {
  19634. goto return_eq;
  19635. }
  19636. s1_is_unicode = PyUnicode_CheckExact(s1);
  19637. s2_is_unicode = PyUnicode_CheckExact(s2);
  19638. #if PY_MAJOR_VERSION < 3
  19639. if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
  19640. owned_ref = PyUnicode_FromObject(s2);
  19641. if (unlikely(!owned_ref))
  19642. return -1;
  19643. s2 = owned_ref;
  19644. s2_is_unicode = 1;
  19645. } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
  19646. owned_ref = PyUnicode_FromObject(s1);
  19647. if (unlikely(!owned_ref))
  19648. return -1;
  19649. s1 = owned_ref;
  19650. s1_is_unicode = 1;
  19651. } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
  19652. return __Pyx_PyBytes_Equals(s1, s2, equals);
  19653. }
  19654. #endif
  19655. if (s1_is_unicode & s2_is_unicode) {
  19656. Py_ssize_t length;
  19657. int kind;
  19658. void *data1, *data2;
  19659. if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
  19660. return -1;
  19661. length = __Pyx_PyUnicode_GET_LENGTH(s1);
  19662. if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
  19663. goto return_ne;
  19664. }
  19665. #if CYTHON_USE_UNICODE_INTERNALS
  19666. {
  19667. Py_hash_t hash1, hash2;
  19668. #if CYTHON_PEP393_ENABLED
  19669. hash1 = ((PyASCIIObject*)s1)->hash;
  19670. hash2 = ((PyASCIIObject*)s2)->hash;
  19671. #else
  19672. hash1 = ((PyUnicodeObject*)s1)->hash;
  19673. hash2 = ((PyUnicodeObject*)s2)->hash;
  19674. #endif
  19675. if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
  19676. goto return_ne;
  19677. }
  19678. }
  19679. #endif
  19680. kind = __Pyx_PyUnicode_KIND(s1);
  19681. if (kind != __Pyx_PyUnicode_KIND(s2)) {
  19682. goto return_ne;
  19683. }
  19684. data1 = __Pyx_PyUnicode_DATA(s1);
  19685. data2 = __Pyx_PyUnicode_DATA(s2);
  19686. if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
  19687. goto return_ne;
  19688. } else if (length == 1) {
  19689. goto return_eq;
  19690. } else {
  19691. int result = memcmp(data1, data2, (size_t)(length * kind));
  19692. #if PY_MAJOR_VERSION < 3
  19693. Py_XDECREF(owned_ref);
  19694. #endif
  19695. return (equals == Py_EQ) ? (result == 0) : (result != 0);
  19696. }
  19697. } else if ((s1 == Py_None) & s2_is_unicode) {
  19698. goto return_ne;
  19699. } else if ((s2 == Py_None) & s1_is_unicode) {
  19700. goto return_ne;
  19701. } else {
  19702. int result;
  19703. PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
  19704. #if PY_MAJOR_VERSION < 3
  19705. Py_XDECREF(owned_ref);
  19706. #endif
  19707. if (!py_result)
  19708. return -1;
  19709. result = __Pyx_PyObject_IsTrue(py_result);
  19710. Py_DECREF(py_result);
  19711. return result;
  19712. }
  19713. return_eq:
  19714. #if PY_MAJOR_VERSION < 3
  19715. Py_XDECREF(owned_ref);
  19716. #endif
  19717. return (equals == Py_EQ);
  19718. return_ne:
  19719. #if PY_MAJOR_VERSION < 3
  19720. Py_XDECREF(owned_ref);
  19721. #endif
  19722. return (equals == Py_NE);
  19723. #endif
  19724. }
  19725. /* SliceObject */
  19726. static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
  19727. Py_ssize_t cstart, Py_ssize_t cstop,
  19728. PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
  19729. int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
  19730. #if CYTHON_USE_TYPE_SLOTS
  19731. PyMappingMethods* mp;
  19732. #if PY_MAJOR_VERSION < 3
  19733. PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
  19734. if (likely(ms && ms->sq_slice)) {
  19735. if (!has_cstart) {
  19736. if (_py_start && (*_py_start != Py_None)) {
  19737. cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
  19738. if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
  19739. } else
  19740. cstart = 0;
  19741. }
  19742. if (!has_cstop) {
  19743. if (_py_stop && (*_py_stop != Py_None)) {
  19744. cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
  19745. if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
  19746. } else
  19747. cstop = PY_SSIZE_T_MAX;
  19748. }
  19749. if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
  19750. Py_ssize_t l = ms->sq_length(obj);
  19751. if (likely(l >= 0)) {
  19752. if (cstop < 0) {
  19753. cstop += l;
  19754. if (cstop < 0) cstop = 0;
  19755. }
  19756. if (cstart < 0) {
  19757. cstart += l;
  19758. if (cstart < 0) cstart = 0;
  19759. }
  19760. } else {
  19761. if (!PyErr_ExceptionMatches(PyExc_OverflowError))
  19762. goto bad;
  19763. PyErr_Clear();
  19764. }
  19765. }
  19766. return ms->sq_slice(obj, cstart, cstop);
  19767. }
  19768. #endif
  19769. mp = Py_TYPE(obj)->tp_as_mapping;
  19770. if (likely(mp && mp->mp_subscript))
  19771. #endif
  19772. {
  19773. PyObject* result;
  19774. PyObject *py_slice, *py_start, *py_stop;
  19775. if (_py_slice) {
  19776. py_slice = *_py_slice;
  19777. } else {
  19778. PyObject* owned_start = NULL;
  19779. PyObject* owned_stop = NULL;
  19780. if (_py_start) {
  19781. py_start = *_py_start;
  19782. } else {
  19783. if (has_cstart) {
  19784. owned_start = py_start = PyInt_FromSsize_t(cstart);
  19785. if (unlikely(!py_start)) goto bad;
  19786. } else
  19787. py_start = Py_None;
  19788. }
  19789. if (_py_stop) {
  19790. py_stop = *_py_stop;
  19791. } else {
  19792. if (has_cstop) {
  19793. owned_stop = py_stop = PyInt_FromSsize_t(cstop);
  19794. if (unlikely(!py_stop)) {
  19795. Py_XDECREF(owned_start);
  19796. goto bad;
  19797. }
  19798. } else
  19799. py_stop = Py_None;
  19800. }
  19801. py_slice = PySlice_New(py_start, py_stop, Py_None);
  19802. Py_XDECREF(owned_start);
  19803. Py_XDECREF(owned_stop);
  19804. if (unlikely(!py_slice)) goto bad;
  19805. }
  19806. #if CYTHON_USE_TYPE_SLOTS
  19807. result = mp->mp_subscript(obj, py_slice);
  19808. #else
  19809. result = PyObject_GetItem(obj, py_slice);
  19810. #endif
  19811. if (!_py_slice) {
  19812. Py_DECREF(py_slice);
  19813. }
  19814. return result;
  19815. }
  19816. PyErr_Format(PyExc_TypeError,
  19817. "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
  19818. bad:
  19819. return NULL;
  19820. }
  19821. /* GetException */
  19822. #if CYTHON_FAST_THREAD_STATE
  19823. static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  19824. #else
  19825. static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
  19826. #endif
  19827. PyObject *local_type, *local_value, *local_tb;
  19828. #if CYTHON_FAST_THREAD_STATE
  19829. PyObject *tmp_type, *tmp_value, *tmp_tb;
  19830. local_type = tstate->curexc_type;
  19831. local_value = tstate->curexc_value;
  19832. local_tb = tstate->curexc_traceback;
  19833. tstate->curexc_type = 0;
  19834. tstate->curexc_value = 0;
  19835. tstate->curexc_traceback = 0;
  19836. #else
  19837. PyErr_Fetch(&local_type, &local_value, &local_tb);
  19838. #endif
  19839. PyErr_NormalizeException(&local_type, &local_value, &local_tb);
  19840. #if CYTHON_FAST_THREAD_STATE
  19841. if (unlikely(tstate->curexc_type))
  19842. #else
  19843. if (unlikely(PyErr_Occurred()))
  19844. #endif
  19845. goto bad;
  19846. #if PY_MAJOR_VERSION >= 3
  19847. if (local_tb) {
  19848. if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
  19849. goto bad;
  19850. }
  19851. #endif
  19852. Py_XINCREF(local_tb);
  19853. Py_XINCREF(local_type);
  19854. Py_XINCREF(local_value);
  19855. *type = local_type;
  19856. *value = local_value;
  19857. *tb = local_tb;
  19858. #if CYTHON_FAST_THREAD_STATE
  19859. #if PY_VERSION_HEX >= 0x030700A3
  19860. tmp_type = tstate->exc_state.exc_type;
  19861. tmp_value = tstate->exc_state.exc_value;
  19862. tmp_tb = tstate->exc_state.exc_traceback;
  19863. tstate->exc_state.exc_type = local_type;
  19864. tstate->exc_state.exc_value = local_value;
  19865. tstate->exc_state.exc_traceback = local_tb;
  19866. #else
  19867. tmp_type = tstate->exc_type;
  19868. tmp_value = tstate->exc_value;
  19869. tmp_tb = tstate->exc_traceback;
  19870. tstate->exc_type = local_type;
  19871. tstate->exc_value = local_value;
  19872. tstate->exc_traceback = local_tb;
  19873. #endif
  19874. Py_XDECREF(tmp_type);
  19875. Py_XDECREF(tmp_value);
  19876. Py_XDECREF(tmp_tb);
  19877. #else
  19878. PyErr_SetExcInfo(local_type, local_value, local_tb);
  19879. #endif
  19880. return 0;
  19881. bad:
  19882. *type = 0;
  19883. *value = 0;
  19884. *tb = 0;
  19885. Py_XDECREF(local_type);
  19886. Py_XDECREF(local_value);
  19887. Py_XDECREF(local_tb);
  19888. return -1;
  19889. }
  19890. /* SwapException */
  19891. #if CYTHON_FAST_THREAD_STATE
  19892. static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  19893. PyObject *tmp_type, *tmp_value, *tmp_tb;
  19894. #if PY_VERSION_HEX >= 0x030700A3
  19895. tmp_type = tstate->exc_state.exc_type;
  19896. tmp_value = tstate->exc_state.exc_value;
  19897. tmp_tb = tstate->exc_state.exc_traceback;
  19898. tstate->exc_state.exc_type = *type;
  19899. tstate->exc_state.exc_value = *value;
  19900. tstate->exc_state.exc_traceback = *tb;
  19901. #else
  19902. tmp_type = tstate->exc_type;
  19903. tmp_value = tstate->exc_value;
  19904. tmp_tb = tstate->exc_traceback;
  19905. tstate->exc_type = *type;
  19906. tstate->exc_value = *value;
  19907. tstate->exc_traceback = *tb;
  19908. #endif
  19909. *type = tmp_type;
  19910. *value = tmp_value;
  19911. *tb = tmp_tb;
  19912. }
  19913. #else
  19914. static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
  19915. PyObject *tmp_type, *tmp_value, *tmp_tb;
  19916. PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
  19917. PyErr_SetExcInfo(*type, *value, *tb);
  19918. *type = tmp_type;
  19919. *value = tmp_value;
  19920. *tb = tmp_tb;
  19921. }
  19922. #endif
  19923. /* SaveResetException */
  19924. #if CYTHON_FAST_THREAD_STATE
  19925. static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  19926. #if PY_VERSION_HEX >= 0x030700A3
  19927. *type = tstate->exc_state.exc_type;
  19928. *value = tstate->exc_state.exc_value;
  19929. *tb = tstate->exc_state.exc_traceback;
  19930. #else
  19931. *type = tstate->exc_type;
  19932. *value = tstate->exc_value;
  19933. *tb = tstate->exc_traceback;
  19934. #endif
  19935. Py_XINCREF(*type);
  19936. Py_XINCREF(*value);
  19937. Py_XINCREF(*tb);
  19938. }
  19939. static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  19940. PyObject *tmp_type, *tmp_value, *tmp_tb;
  19941. #if PY_VERSION_HEX >= 0x030700A3
  19942. tmp_type = tstate->exc_state.exc_type;
  19943. tmp_value = tstate->exc_state.exc_value;
  19944. tmp_tb = tstate->exc_state.exc_traceback;
  19945. tstate->exc_state.exc_type = type;
  19946. tstate->exc_state.exc_value = value;
  19947. tstate->exc_state.exc_traceback = tb;
  19948. #else
  19949. tmp_type = tstate->exc_type;
  19950. tmp_value = tstate->exc_value;
  19951. tmp_tb = tstate->exc_traceback;
  19952. tstate->exc_type = type;
  19953. tstate->exc_value = value;
  19954. tstate->exc_traceback = tb;
  19955. #endif
  19956. Py_XDECREF(tmp_type);
  19957. Py_XDECREF(tmp_value);
  19958. Py_XDECREF(tmp_tb);
  19959. }
  19960. #endif
  19961. /* decode_c_string */
  19962. static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
  19963. const char* cstring, Py_ssize_t start, Py_ssize_t stop,
  19964. const char* encoding, const char* errors,
  19965. PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
  19966. Py_ssize_t length;
  19967. if (unlikely((start < 0) | (stop < 0))) {
  19968. size_t slen = strlen(cstring);
  19969. if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
  19970. PyErr_SetString(PyExc_OverflowError,
  19971. "c-string too long to convert to Python");
  19972. return NULL;
  19973. }
  19974. length = (Py_ssize_t) slen;
  19975. if (start < 0) {
  19976. start += length;
  19977. if (start < 0)
  19978. start = 0;
  19979. }
  19980. if (stop < 0)
  19981. stop += length;
  19982. }
  19983. length = stop - start;
  19984. if (unlikely(length <= 0))
  19985. return PyUnicode_FromUnicode(NULL, 0);
  19986. cstring += start;
  19987. if (decode_func) {
  19988. return decode_func(cstring, length, errors);
  19989. } else {
  19990. return PyUnicode_Decode(cstring, length, encoding, errors);
  19991. }
  19992. }
  19993. /* UnpackUnboundCMethod */
  19994. static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
  19995. PyObject *method;
  19996. method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
  19997. if (unlikely(!method))
  19998. return -1;
  19999. target->method = method;
  20000. #if CYTHON_COMPILING_IN_CPYTHON
  20001. #if PY_MAJOR_VERSION >= 3
  20002. if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
  20003. #endif
  20004. {
  20005. PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
  20006. target->func = descr->d_method->ml_meth;
  20007. target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
  20008. }
  20009. #endif
  20010. return 0;
  20011. }
  20012. /* CallUnboundCMethod1 */
  20013. #if CYTHON_COMPILING_IN_CPYTHON
  20014. static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
  20015. if (likely(cfunc->func)) {
  20016. int flag = cfunc->flag;
  20017. if (flag == METH_O) {
  20018. return (*(cfunc->func))(self, arg);
  20019. } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
  20020. if (PY_VERSION_HEX >= 0x030700A0) {
  20021. return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, &arg, 1);
  20022. } else {
  20023. return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL);
  20024. }
  20025. } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
  20026. return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL);
  20027. }
  20028. }
  20029. return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
  20030. }
  20031. #endif
  20032. static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
  20033. PyObject *args, *result = NULL;
  20034. if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
  20035. #if CYTHON_COMPILING_IN_CPYTHON
  20036. if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
  20037. args = PyTuple_New(1);
  20038. if (unlikely(!args)) goto bad;
  20039. Py_INCREF(arg);
  20040. PyTuple_SET_ITEM(args, 0, arg);
  20041. if (cfunc->flag & METH_KEYWORDS)
  20042. result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL);
  20043. else
  20044. result = (*cfunc->func)(self, args);
  20045. } else {
  20046. args = PyTuple_New(2);
  20047. if (unlikely(!args)) goto bad;
  20048. Py_INCREF(self);
  20049. PyTuple_SET_ITEM(args, 0, self);
  20050. Py_INCREF(arg);
  20051. PyTuple_SET_ITEM(args, 1, arg);
  20052. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  20053. }
  20054. #else
  20055. args = PyTuple_Pack(2, self, arg);
  20056. if (unlikely(!args)) goto bad;
  20057. result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
  20058. #endif
  20059. bad:
  20060. Py_XDECREF(args);
  20061. return result;
  20062. }
  20063. /* Import */
  20064. static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
  20065. PyObject *empty_list = 0;
  20066. PyObject *module = 0;
  20067. PyObject *global_dict = 0;
  20068. PyObject *empty_dict = 0;
  20069. PyObject *list;
  20070. #if PY_MAJOR_VERSION < 3
  20071. PyObject *py_import;
  20072. py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
  20073. if (!py_import)
  20074. goto bad;
  20075. #endif
  20076. if (from_list)
  20077. list = from_list;
  20078. else {
  20079. empty_list = PyList_New(0);
  20080. if (!empty_list)
  20081. goto bad;
  20082. list = empty_list;
  20083. }
  20084. global_dict = PyModule_GetDict(__pyx_m);
  20085. if (!global_dict)
  20086. goto bad;
  20087. empty_dict = PyDict_New();
  20088. if (!empty_dict)
  20089. goto bad;
  20090. {
  20091. #if PY_MAJOR_VERSION >= 3
  20092. if (level == -1) {
  20093. if (strchr(__Pyx_MODULE_NAME, '.')) {
  20094. module = PyImport_ImportModuleLevelObject(
  20095. name, global_dict, empty_dict, list, 1);
  20096. if (!module) {
  20097. if (!PyErr_ExceptionMatches(PyExc_ImportError))
  20098. goto bad;
  20099. PyErr_Clear();
  20100. }
  20101. }
  20102. level = 0;
  20103. }
  20104. #endif
  20105. if (!module) {
  20106. #if PY_MAJOR_VERSION < 3
  20107. PyObject *py_level = PyInt_FromLong(level);
  20108. if (!py_level)
  20109. goto bad;
  20110. module = PyObject_CallFunctionObjArgs(py_import,
  20111. name, global_dict, empty_dict, list, py_level, NULL);
  20112. Py_DECREF(py_level);
  20113. #else
  20114. module = PyImport_ImportModuleLevelObject(
  20115. name, global_dict, empty_dict, list, level);
  20116. #endif
  20117. }
  20118. }
  20119. bad:
  20120. #if PY_MAJOR_VERSION < 3
  20121. Py_XDECREF(py_import);
  20122. #endif
  20123. Py_XDECREF(empty_list);
  20124. Py_XDECREF(empty_dict);
  20125. return module;
  20126. }
  20127. /* ImportFrom */
  20128. static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
  20129. PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
  20130. if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
  20131. PyErr_Format(PyExc_ImportError,
  20132. #if PY_MAJOR_VERSION < 3
  20133. "cannot import name %.230s", PyString_AS_STRING(name));
  20134. #else
  20135. "cannot import name %S", name);
  20136. #endif
  20137. }
  20138. return value;
  20139. }
  20140. /* HasAttr */
  20141. static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
  20142. PyObject *r;
  20143. if (unlikely(!__Pyx_PyBaseString_Check(n))) {
  20144. PyErr_SetString(PyExc_TypeError,
  20145. "hasattr(): attribute name must be string");
  20146. return -1;
  20147. }
  20148. r = __Pyx_GetAttr(o, n);
  20149. if (unlikely(!r)) {
  20150. PyErr_Clear();
  20151. return 0;
  20152. } else {
  20153. Py_DECREF(r);
  20154. return 1;
  20155. }
  20156. }
  20157. /* PyObject_GenericGetAttrNoDict */
  20158. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  20159. static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
  20160. PyErr_Format(PyExc_AttributeError,
  20161. #if PY_MAJOR_VERSION >= 3
  20162. "'%.50s' object has no attribute '%U'",
  20163. tp->tp_name, attr_name);
  20164. #else
  20165. "'%.50s' object has no attribute '%.400s'",
  20166. tp->tp_name, PyString_AS_STRING(attr_name));
  20167. #endif
  20168. return NULL;
  20169. }
  20170. static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
  20171. PyObject *descr;
  20172. PyTypeObject *tp = Py_TYPE(obj);
  20173. if (unlikely(!PyString_Check(attr_name))) {
  20174. return PyObject_GenericGetAttr(obj, attr_name);
  20175. }
  20176. assert(!tp->tp_dictoffset);
  20177. descr = _PyType_Lookup(tp, attr_name);
  20178. if (unlikely(!descr)) {
  20179. return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
  20180. }
  20181. Py_INCREF(descr);
  20182. #if PY_MAJOR_VERSION < 3
  20183. if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
  20184. #endif
  20185. {
  20186. descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
  20187. if (unlikely(f)) {
  20188. PyObject *res = f(descr, obj, (PyObject *)tp);
  20189. Py_DECREF(descr);
  20190. return res;
  20191. }
  20192. }
  20193. return descr;
  20194. }
  20195. #endif
  20196. /* PyObject_GenericGetAttr */
  20197. #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
  20198. static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
  20199. if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
  20200. return PyObject_GenericGetAttr(obj, attr_name);
  20201. }
  20202. return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
  20203. }
  20204. #endif
  20205. /* SetupReduce */
  20206. static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  20207. int ret;
  20208. PyObject *name_attr;
  20209. name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
  20210. if (likely(name_attr)) {
  20211. ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  20212. } else {
  20213. ret = -1;
  20214. }
  20215. if (unlikely(ret < 0)) {
  20216. PyErr_Clear();
  20217. ret = 0;
  20218. }
  20219. Py_XDECREF(name_attr);
  20220. return ret;
  20221. }
  20222. static int __Pyx_setup_reduce(PyObject* type_obj) {
  20223. int ret = 0;
  20224. PyObject *object_reduce = NULL;
  20225. PyObject *object_reduce_ex = NULL;
  20226. PyObject *reduce = NULL;
  20227. PyObject *reduce_ex = NULL;
  20228. PyObject *reduce_cython = NULL;
  20229. PyObject *setstate = NULL;
  20230. PyObject *setstate_cython = NULL;
  20231. #if CYTHON_USE_PYTYPE_LOOKUP
  20232. if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
  20233. #else
  20234. if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
  20235. #endif
  20236. #if CYTHON_USE_PYTYPE_LOOKUP
  20237. object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
  20238. #else
  20239. object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
  20240. #endif
  20241. reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
  20242. if (reduce_ex == object_reduce_ex) {
  20243. #if CYTHON_USE_PYTYPE_LOOKUP
  20244. object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
  20245. #else
  20246. object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
  20247. #endif
  20248. reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
  20249. if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
  20250. reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
  20251. ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
  20252. ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
  20253. setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
  20254. if (!setstate) PyErr_Clear();
  20255. if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
  20256. setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
  20257. ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
  20258. ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
  20259. }
  20260. PyType_Modified((PyTypeObject*)type_obj);
  20261. }
  20262. }
  20263. goto GOOD;
  20264. BAD:
  20265. if (!PyErr_Occurred())
  20266. PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
  20267. ret = -1;
  20268. GOOD:
  20269. #if !CYTHON_USE_PYTYPE_LOOKUP
  20270. Py_XDECREF(object_reduce);
  20271. Py_XDECREF(object_reduce_ex);
  20272. #endif
  20273. Py_XDECREF(reduce);
  20274. Py_XDECREF(reduce_ex);
  20275. Py_XDECREF(reduce_cython);
  20276. Py_XDECREF(setstate);
  20277. Py_XDECREF(setstate_cython);
  20278. return ret;
  20279. }
  20280. /* SetVTable */
  20281. static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
  20282. #if PY_VERSION_HEX >= 0x02070000
  20283. PyObject *ob = PyCapsule_New(vtable, 0, 0);
  20284. #else
  20285. PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
  20286. #endif
  20287. if (!ob)
  20288. goto bad;
  20289. if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
  20290. goto bad;
  20291. Py_DECREF(ob);
  20292. return 0;
  20293. bad:
  20294. Py_XDECREF(ob);
  20295. return -1;
  20296. }
  20297. /* CLineInTraceback */
  20298. #ifndef CYTHON_CLINE_IN_TRACEBACK
  20299. static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
  20300. PyObject *use_cline;
  20301. PyObject *ptype, *pvalue, *ptraceback;
  20302. #if CYTHON_COMPILING_IN_CPYTHON
  20303. PyObject **cython_runtime_dict;
  20304. #endif
  20305. if (unlikely(!__pyx_cython_runtime)) {
  20306. return c_line;
  20307. }
  20308. __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
  20309. #if CYTHON_COMPILING_IN_CPYTHON
  20310. cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
  20311. if (likely(cython_runtime_dict)) {
  20312. use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
  20313. } else
  20314. #endif
  20315. {
  20316. PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
  20317. if (use_cline_obj) {
  20318. use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
  20319. Py_DECREF(use_cline_obj);
  20320. } else {
  20321. PyErr_Clear();
  20322. use_cline = NULL;
  20323. }
  20324. }
  20325. if (!use_cline) {
  20326. c_line = 0;
  20327. PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
  20328. }
  20329. else if (PyObject_Not(use_cline) != 0) {
  20330. c_line = 0;
  20331. }
  20332. __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
  20333. return c_line;
  20334. }
  20335. #endif
  20336. /* CodeObjectCache */
  20337. static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
  20338. int start = 0, mid = 0, end = count - 1;
  20339. if (end >= 0 && code_line > entries[end].code_line) {
  20340. return count;
  20341. }
  20342. while (start < end) {
  20343. mid = start + (end - start) / 2;
  20344. if (code_line < entries[mid].code_line) {
  20345. end = mid;
  20346. } else if (code_line > entries[mid].code_line) {
  20347. start = mid + 1;
  20348. } else {
  20349. return mid;
  20350. }
  20351. }
  20352. if (code_line <= entries[mid].code_line) {
  20353. return mid;
  20354. } else {
  20355. return mid + 1;
  20356. }
  20357. }
  20358. static PyCodeObject *__pyx_find_code_object(int code_line) {
  20359. PyCodeObject* code_object;
  20360. int pos;
  20361. if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
  20362. return NULL;
  20363. }
  20364. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  20365. if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
  20366. return NULL;
  20367. }
  20368. code_object = __pyx_code_cache.entries[pos].code_object;
  20369. Py_INCREF(code_object);
  20370. return code_object;
  20371. }
  20372. static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
  20373. int pos, i;
  20374. __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
  20375. if (unlikely(!code_line)) {
  20376. return;
  20377. }
  20378. if (unlikely(!entries)) {
  20379. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
  20380. if (likely(entries)) {
  20381. __pyx_code_cache.entries = entries;
  20382. __pyx_code_cache.max_count = 64;
  20383. __pyx_code_cache.count = 1;
  20384. entries[0].code_line = code_line;
  20385. entries[0].code_object = code_object;
  20386. Py_INCREF(code_object);
  20387. }
  20388. return;
  20389. }
  20390. pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
  20391. if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
  20392. PyCodeObject* tmp = entries[pos].code_object;
  20393. entries[pos].code_object = code_object;
  20394. Py_DECREF(tmp);
  20395. return;
  20396. }
  20397. if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
  20398. int new_max = __pyx_code_cache.max_count + 64;
  20399. entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
  20400. __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
  20401. if (unlikely(!entries)) {
  20402. return;
  20403. }
  20404. __pyx_code_cache.entries = entries;
  20405. __pyx_code_cache.max_count = new_max;
  20406. }
  20407. for (i=__pyx_code_cache.count; i>pos; i--) {
  20408. entries[i] = entries[i-1];
  20409. }
  20410. entries[pos].code_line = code_line;
  20411. entries[pos].code_object = code_object;
  20412. __pyx_code_cache.count++;
  20413. Py_INCREF(code_object);
  20414. }
  20415. /* AddTraceback */
  20416. #include "compile.h"
  20417. #include "frameobject.h"
  20418. #include "traceback.h"
  20419. static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
  20420. const char *funcname, int c_line,
  20421. int py_line, const char *filename) {
  20422. PyCodeObject *py_code = 0;
  20423. PyObject *py_srcfile = 0;
  20424. PyObject *py_funcname = 0;
  20425. #if PY_MAJOR_VERSION < 3
  20426. py_srcfile = PyString_FromString(filename);
  20427. #else
  20428. py_srcfile = PyUnicode_FromString(filename);
  20429. #endif
  20430. if (!py_srcfile) goto bad;
  20431. if (c_line) {
  20432. #if PY_MAJOR_VERSION < 3
  20433. py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  20434. #else
  20435. py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
  20436. #endif
  20437. }
  20438. else {
  20439. #if PY_MAJOR_VERSION < 3
  20440. py_funcname = PyString_FromString(funcname);
  20441. #else
  20442. py_funcname = PyUnicode_FromString(funcname);
  20443. #endif
  20444. }
  20445. if (!py_funcname) goto bad;
  20446. py_code = __Pyx_PyCode_New(
  20447. 0,
  20448. 0,
  20449. 0,
  20450. 0,
  20451. 0,
  20452. __pyx_empty_bytes, /*PyObject *code,*/
  20453. __pyx_empty_tuple, /*PyObject *consts,*/
  20454. __pyx_empty_tuple, /*PyObject *names,*/
  20455. __pyx_empty_tuple, /*PyObject *varnames,*/
  20456. __pyx_empty_tuple, /*PyObject *freevars,*/
  20457. __pyx_empty_tuple, /*PyObject *cellvars,*/
  20458. py_srcfile, /*PyObject *filename,*/
  20459. py_funcname, /*PyObject *name,*/
  20460. py_line,
  20461. __pyx_empty_bytes /*PyObject *lnotab*/
  20462. );
  20463. Py_DECREF(py_srcfile);
  20464. Py_DECREF(py_funcname);
  20465. return py_code;
  20466. bad:
  20467. Py_XDECREF(py_srcfile);
  20468. Py_XDECREF(py_funcname);
  20469. return NULL;
  20470. }
  20471. static void __Pyx_AddTraceback(const char *funcname, int c_line,
  20472. int py_line, const char *filename) {
  20473. PyCodeObject *py_code = 0;
  20474. PyFrameObject *py_frame = 0;
  20475. PyThreadState *tstate = __Pyx_PyThreadState_Current;
  20476. if (c_line) {
  20477. c_line = __Pyx_CLineForTraceback(tstate, c_line);
  20478. }
  20479. py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
  20480. if (!py_code) {
  20481. py_code = __Pyx_CreateCodeObjectForTraceback(
  20482. funcname, c_line, py_line, filename);
  20483. if (!py_code) goto bad;
  20484. __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
  20485. }
  20486. py_frame = PyFrame_New(
  20487. tstate, /*PyThreadState *tstate,*/
  20488. py_code, /*PyCodeObject *code,*/
  20489. __pyx_d, /*PyObject *globals,*/
  20490. 0 /*PyObject *locals*/
  20491. );
  20492. if (!py_frame) goto bad;
  20493. __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
  20494. PyTraceBack_Here(py_frame);
  20495. bad:
  20496. Py_XDECREF(py_code);
  20497. Py_XDECREF(py_frame);
  20498. }
  20499. /* CIntToPy */
  20500. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
  20501. const int neg_one = (int) -1, const_zero = (int) 0;
  20502. const int is_unsigned = neg_one > const_zero;
  20503. if (is_unsigned) {
  20504. if (sizeof(int) < sizeof(long)) {
  20505. return PyInt_FromLong((long) value);
  20506. } else if (sizeof(int) <= sizeof(unsigned long)) {
  20507. return PyLong_FromUnsignedLong((unsigned long) value);
  20508. #ifdef HAVE_LONG_LONG
  20509. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  20510. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  20511. #endif
  20512. }
  20513. } else {
  20514. if (sizeof(int) <= sizeof(long)) {
  20515. return PyInt_FromLong((long) value);
  20516. #ifdef HAVE_LONG_LONG
  20517. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  20518. return PyLong_FromLongLong((PY_LONG_LONG) value);
  20519. #endif
  20520. }
  20521. }
  20522. {
  20523. int one = 1; int little = (int)*(unsigned char *)&one;
  20524. unsigned char *bytes = (unsigned char *)&value;
  20525. return _PyLong_FromByteArray(bytes, sizeof(int),
  20526. little, !is_unsigned);
  20527. }
  20528. }
  20529. /* CIntFromPyVerify */
  20530. #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
  20531. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
  20532. #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
  20533. __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
  20534. #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
  20535. {\
  20536. func_type value = func_value;\
  20537. if (sizeof(target_type) < sizeof(func_type)) {\
  20538. if (unlikely(value != (func_type) (target_type) value)) {\
  20539. func_type zero = 0;\
  20540. if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
  20541. return (target_type) -1;\
  20542. if (is_unsigned && unlikely(value < zero))\
  20543. goto raise_neg_overflow;\
  20544. else\
  20545. goto raise_overflow;\
  20546. }\
  20547. }\
  20548. return (target_type) value;\
  20549. }
  20550. /* CIntToPy */
  20551. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
  20552. const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
  20553. const int is_unsigned = neg_one > const_zero;
  20554. if (is_unsigned) {
  20555. if (sizeof(unsigned int) < sizeof(long)) {
  20556. return PyInt_FromLong((long) value);
  20557. } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
  20558. return PyLong_FromUnsignedLong((unsigned long) value);
  20559. #ifdef HAVE_LONG_LONG
  20560. } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
  20561. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  20562. #endif
  20563. }
  20564. } else {
  20565. if (sizeof(unsigned int) <= sizeof(long)) {
  20566. return PyInt_FromLong((long) value);
  20567. #ifdef HAVE_LONG_LONG
  20568. } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
  20569. return PyLong_FromLongLong((PY_LONG_LONG) value);
  20570. #endif
  20571. }
  20572. }
  20573. {
  20574. int one = 1; int little = (int)*(unsigned char *)&one;
  20575. unsigned char *bytes = (unsigned char *)&value;
  20576. return _PyLong_FromByteArray(bytes, sizeof(unsigned int),
  20577. little, !is_unsigned);
  20578. }
  20579. }
  20580. /* CIntToPy */
  20581. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value) {
  20582. const unsigned short neg_one = (unsigned short) -1, const_zero = (unsigned short) 0;
  20583. const int is_unsigned = neg_one > const_zero;
  20584. if (is_unsigned) {
  20585. if (sizeof(unsigned short) < sizeof(long)) {
  20586. return PyInt_FromLong((long) value);
  20587. } else if (sizeof(unsigned short) <= sizeof(unsigned long)) {
  20588. return PyLong_FromUnsignedLong((unsigned long) value);
  20589. #ifdef HAVE_LONG_LONG
  20590. } else if (sizeof(unsigned short) <= sizeof(unsigned PY_LONG_LONG)) {
  20591. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  20592. #endif
  20593. }
  20594. } else {
  20595. if (sizeof(unsigned short) <= sizeof(long)) {
  20596. return PyInt_FromLong((long) value);
  20597. #ifdef HAVE_LONG_LONG
  20598. } else if (sizeof(unsigned short) <= sizeof(PY_LONG_LONG)) {
  20599. return PyLong_FromLongLong((PY_LONG_LONG) value);
  20600. #endif
  20601. }
  20602. }
  20603. {
  20604. int one = 1; int little = (int)*(unsigned char *)&one;
  20605. unsigned char *bytes = (unsigned char *)&value;
  20606. return _PyLong_FromByteArray(bytes, sizeof(unsigned short),
  20607. little, !is_unsigned);
  20608. }
  20609. }
  20610. /* CIntToPy */
  20611. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
  20612. const long neg_one = (long) -1, const_zero = (long) 0;
  20613. const int is_unsigned = neg_one > const_zero;
  20614. if (is_unsigned) {
  20615. if (sizeof(long) < sizeof(long)) {
  20616. return PyInt_FromLong((long) value);
  20617. } else if (sizeof(long) <= sizeof(unsigned long)) {
  20618. return PyLong_FromUnsignedLong((unsigned long) value);
  20619. #ifdef HAVE_LONG_LONG
  20620. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  20621. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  20622. #endif
  20623. }
  20624. } else {
  20625. if (sizeof(long) <= sizeof(long)) {
  20626. return PyInt_FromLong((long) value);
  20627. #ifdef HAVE_LONG_LONG
  20628. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  20629. return PyLong_FromLongLong((PY_LONG_LONG) value);
  20630. #endif
  20631. }
  20632. }
  20633. {
  20634. int one = 1; int little = (int)*(unsigned char *)&one;
  20635. unsigned char *bytes = (unsigned char *)&value;
  20636. return _PyLong_FromByteArray(bytes, sizeof(long),
  20637. little, !is_unsigned);
  20638. }
  20639. }
  20640. /* CIntToPy */
  20641. static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint16_t(uint16_t value) {
  20642. const uint16_t neg_one = (uint16_t) -1, const_zero = (uint16_t) 0;
  20643. const int is_unsigned = neg_one > const_zero;
  20644. if (is_unsigned) {
  20645. if (sizeof(uint16_t) < sizeof(long)) {
  20646. return PyInt_FromLong((long) value);
  20647. } else if (sizeof(uint16_t) <= sizeof(unsigned long)) {
  20648. return PyLong_FromUnsignedLong((unsigned long) value);
  20649. #ifdef HAVE_LONG_LONG
  20650. } else if (sizeof(uint16_t) <= sizeof(unsigned PY_LONG_LONG)) {
  20651. return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
  20652. #endif
  20653. }
  20654. } else {
  20655. if (sizeof(uint16_t) <= sizeof(long)) {
  20656. return PyInt_FromLong((long) value);
  20657. #ifdef HAVE_LONG_LONG
  20658. } else if (sizeof(uint16_t) <= sizeof(PY_LONG_LONG)) {
  20659. return PyLong_FromLongLong((PY_LONG_LONG) value);
  20660. #endif
  20661. }
  20662. }
  20663. {
  20664. int one = 1; int little = (int)*(unsigned char *)&one;
  20665. unsigned char *bytes = (unsigned char *)&value;
  20666. return _PyLong_FromByteArray(bytes, sizeof(uint16_t),
  20667. little, !is_unsigned);
  20668. }
  20669. }
  20670. /* CIntFromPy */
  20671. static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
  20672. const int neg_one = (int) -1, const_zero = (int) 0;
  20673. const int is_unsigned = neg_one > const_zero;
  20674. #if PY_MAJOR_VERSION < 3
  20675. if (likely(PyInt_Check(x))) {
  20676. if (sizeof(int) < sizeof(long)) {
  20677. __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
  20678. } else {
  20679. long val = PyInt_AS_LONG(x);
  20680. if (is_unsigned && unlikely(val < 0)) {
  20681. goto raise_neg_overflow;
  20682. }
  20683. return (int) val;
  20684. }
  20685. } else
  20686. #endif
  20687. if (likely(PyLong_Check(x))) {
  20688. if (is_unsigned) {
  20689. #if CYTHON_USE_PYLONG_INTERNALS
  20690. const digit* digits = ((PyLongObject*)x)->ob_digit;
  20691. switch (Py_SIZE(x)) {
  20692. case 0: return (int) 0;
  20693. case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
  20694. case 2:
  20695. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  20696. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  20697. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20698. } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
  20699. return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  20700. }
  20701. }
  20702. break;
  20703. case 3:
  20704. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  20705. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  20706. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20707. } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
  20708. return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  20709. }
  20710. }
  20711. break;
  20712. case 4:
  20713. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  20714. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  20715. __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])))
  20716. } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
  20717. return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
  20718. }
  20719. }
  20720. break;
  20721. }
  20722. #endif
  20723. #if CYTHON_COMPILING_IN_CPYTHON
  20724. if (unlikely(Py_SIZE(x) < 0)) {
  20725. goto raise_neg_overflow;
  20726. }
  20727. #else
  20728. {
  20729. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  20730. if (unlikely(result < 0))
  20731. return (int) -1;
  20732. if (unlikely(result == 1))
  20733. goto raise_neg_overflow;
  20734. }
  20735. #endif
  20736. if (sizeof(int) <= sizeof(unsigned long)) {
  20737. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
  20738. #ifdef HAVE_LONG_LONG
  20739. } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
  20740. __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  20741. #endif
  20742. }
  20743. } else {
  20744. #if CYTHON_USE_PYLONG_INTERNALS
  20745. const digit* digits = ((PyLongObject*)x)->ob_digit;
  20746. switch (Py_SIZE(x)) {
  20747. case 0: return (int) 0;
  20748. case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
  20749. case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
  20750. case -2:
  20751. if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
  20752. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  20753. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20754. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  20755. return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  20756. }
  20757. }
  20758. break;
  20759. case 2:
  20760. if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
  20761. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  20762. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20763. } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  20764. return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  20765. }
  20766. }
  20767. break;
  20768. case -3:
  20769. if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
  20770. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  20771. __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20772. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  20773. return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  20774. }
  20775. }
  20776. break;
  20777. case 3:
  20778. if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
  20779. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  20780. __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20781. } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  20782. return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  20783. }
  20784. }
  20785. break;
  20786. case -4:
  20787. if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
  20788. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  20789. __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])))
  20790. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  20791. return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  20792. }
  20793. }
  20794. break;
  20795. case 4:
  20796. if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
  20797. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  20798. __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])))
  20799. } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
  20800. return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
  20801. }
  20802. }
  20803. break;
  20804. }
  20805. #endif
  20806. if (sizeof(int) <= sizeof(long)) {
  20807. __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
  20808. #ifdef HAVE_LONG_LONG
  20809. } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
  20810. __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
  20811. #endif
  20812. }
  20813. }
  20814. {
  20815. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  20816. PyErr_SetString(PyExc_RuntimeError,
  20817. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  20818. #else
  20819. int val;
  20820. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  20821. #if PY_MAJOR_VERSION < 3
  20822. if (likely(v) && !PyLong_Check(v)) {
  20823. PyObject *tmp = v;
  20824. v = PyNumber_Long(tmp);
  20825. Py_DECREF(tmp);
  20826. }
  20827. #endif
  20828. if (likely(v)) {
  20829. int one = 1; int is_little = (int)*(unsigned char *)&one;
  20830. unsigned char *bytes = (unsigned char *)&val;
  20831. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  20832. bytes, sizeof(val),
  20833. is_little, !is_unsigned);
  20834. Py_DECREF(v);
  20835. if (likely(!ret))
  20836. return val;
  20837. }
  20838. #endif
  20839. return (int) -1;
  20840. }
  20841. } else {
  20842. int val;
  20843. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  20844. if (!tmp) return (int) -1;
  20845. val = __Pyx_PyInt_As_int(tmp);
  20846. Py_DECREF(tmp);
  20847. return val;
  20848. }
  20849. raise_overflow:
  20850. PyErr_SetString(PyExc_OverflowError,
  20851. "value too large to convert to int");
  20852. return (int) -1;
  20853. raise_neg_overflow:
  20854. PyErr_SetString(PyExc_OverflowError,
  20855. "can't convert negative value to int");
  20856. return (int) -1;
  20857. }
  20858. /* CIntFromPy */
  20859. static CYTHON_INLINE enum http_method __Pyx_PyInt_As_enum__http_method(PyObject *x) {
  20860. const enum http_method neg_one = (enum http_method) -1, const_zero = (enum http_method) 0;
  20861. const int is_unsigned = neg_one > const_zero;
  20862. #if PY_MAJOR_VERSION < 3
  20863. if (likely(PyInt_Check(x))) {
  20864. if (sizeof(enum http_method) < sizeof(long)) {
  20865. __PYX_VERIFY_RETURN_INT(enum http_method, long, PyInt_AS_LONG(x))
  20866. } else {
  20867. long val = PyInt_AS_LONG(x);
  20868. if (is_unsigned && unlikely(val < 0)) {
  20869. goto raise_neg_overflow;
  20870. }
  20871. return (enum http_method) val;
  20872. }
  20873. } else
  20874. #endif
  20875. if (likely(PyLong_Check(x))) {
  20876. if (is_unsigned) {
  20877. #if CYTHON_USE_PYLONG_INTERNALS
  20878. const digit* digits = ((PyLongObject*)x)->ob_digit;
  20879. switch (Py_SIZE(x)) {
  20880. case 0: return (enum http_method) 0;
  20881. case 1: __PYX_VERIFY_RETURN_INT(enum http_method, digit, digits[0])
  20882. case 2:
  20883. if (8 * sizeof(enum http_method) > 1 * PyLong_SHIFT) {
  20884. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  20885. __PYX_VERIFY_RETURN_INT(enum http_method, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20886. } else if (8 * sizeof(enum http_method) >= 2 * PyLong_SHIFT) {
  20887. return (enum http_method) (((((enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0]));
  20888. }
  20889. }
  20890. break;
  20891. case 3:
  20892. if (8 * sizeof(enum http_method) > 2 * PyLong_SHIFT) {
  20893. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  20894. __PYX_VERIFY_RETURN_INT(enum http_method, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20895. } else if (8 * sizeof(enum http_method) >= 3 * PyLong_SHIFT) {
  20896. return (enum http_method) (((((((enum http_method)digits[2]) << PyLong_SHIFT) | (enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0]));
  20897. }
  20898. }
  20899. break;
  20900. case 4:
  20901. if (8 * sizeof(enum http_method) > 3 * PyLong_SHIFT) {
  20902. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  20903. __PYX_VERIFY_RETURN_INT(enum http_method, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20904. } else if (8 * sizeof(enum http_method) >= 4 * PyLong_SHIFT) {
  20905. return (enum http_method) (((((((((enum http_method)digits[3]) << PyLong_SHIFT) | (enum http_method)digits[2]) << PyLong_SHIFT) | (enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0]));
  20906. }
  20907. }
  20908. break;
  20909. }
  20910. #endif
  20911. #if CYTHON_COMPILING_IN_CPYTHON
  20912. if (unlikely(Py_SIZE(x) < 0)) {
  20913. goto raise_neg_overflow;
  20914. }
  20915. #else
  20916. {
  20917. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  20918. if (unlikely(result < 0))
  20919. return (enum http_method) -1;
  20920. if (unlikely(result == 1))
  20921. goto raise_neg_overflow;
  20922. }
  20923. #endif
  20924. if (sizeof(enum http_method) <= sizeof(unsigned long)) {
  20925. __PYX_VERIFY_RETURN_INT_EXC(enum http_method, unsigned long, PyLong_AsUnsignedLong(x))
  20926. #ifdef HAVE_LONG_LONG
  20927. } else if (sizeof(enum http_method) <= sizeof(unsigned PY_LONG_LONG)) {
  20928. __PYX_VERIFY_RETURN_INT_EXC(enum http_method, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  20929. #endif
  20930. }
  20931. } else {
  20932. #if CYTHON_USE_PYLONG_INTERNALS
  20933. const digit* digits = ((PyLongObject*)x)->ob_digit;
  20934. switch (Py_SIZE(x)) {
  20935. case 0: return (enum http_method) 0;
  20936. case -1: __PYX_VERIFY_RETURN_INT(enum http_method, sdigit, (sdigit) (-(sdigit)digits[0]))
  20937. case 1: __PYX_VERIFY_RETURN_INT(enum http_method, digit, +digits[0])
  20938. case -2:
  20939. if (8 * sizeof(enum http_method) - 1 > 1 * PyLong_SHIFT) {
  20940. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  20941. __PYX_VERIFY_RETURN_INT(enum http_method, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20942. } else if (8 * sizeof(enum http_method) - 1 > 2 * PyLong_SHIFT) {
  20943. return (enum http_method) (((enum http_method)-1)*(((((enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0])));
  20944. }
  20945. }
  20946. break;
  20947. case 2:
  20948. if (8 * sizeof(enum http_method) > 1 * PyLong_SHIFT) {
  20949. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  20950. __PYX_VERIFY_RETURN_INT(enum http_method, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20951. } else if (8 * sizeof(enum http_method) - 1 > 2 * PyLong_SHIFT) {
  20952. return (enum http_method) ((((((enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0])));
  20953. }
  20954. }
  20955. break;
  20956. case -3:
  20957. if (8 * sizeof(enum http_method) - 1 > 2 * PyLong_SHIFT) {
  20958. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  20959. __PYX_VERIFY_RETURN_INT(enum http_method, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20960. } else if (8 * sizeof(enum http_method) - 1 > 3 * PyLong_SHIFT) {
  20961. return (enum http_method) (((enum http_method)-1)*(((((((enum http_method)digits[2]) << PyLong_SHIFT) | (enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0])));
  20962. }
  20963. }
  20964. break;
  20965. case 3:
  20966. if (8 * sizeof(enum http_method) > 2 * PyLong_SHIFT) {
  20967. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  20968. __PYX_VERIFY_RETURN_INT(enum http_method, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20969. } else if (8 * sizeof(enum http_method) - 1 > 3 * PyLong_SHIFT) {
  20970. return (enum http_method) ((((((((enum http_method)digits[2]) << PyLong_SHIFT) | (enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0])));
  20971. }
  20972. }
  20973. break;
  20974. case -4:
  20975. if (8 * sizeof(enum http_method) - 1 > 3 * PyLong_SHIFT) {
  20976. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  20977. __PYX_VERIFY_RETURN_INT(enum http_method, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20978. } else if (8 * sizeof(enum http_method) - 1 > 4 * PyLong_SHIFT) {
  20979. return (enum http_method) (((enum http_method)-1)*(((((((((enum http_method)digits[3]) << PyLong_SHIFT) | (enum http_method)digits[2]) << PyLong_SHIFT) | (enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0])));
  20980. }
  20981. }
  20982. break;
  20983. case 4:
  20984. if (8 * sizeof(enum http_method) > 3 * PyLong_SHIFT) {
  20985. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  20986. __PYX_VERIFY_RETURN_INT(enum http_method, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  20987. } else if (8 * sizeof(enum http_method) - 1 > 4 * PyLong_SHIFT) {
  20988. return (enum http_method) ((((((((((enum http_method)digits[3]) << PyLong_SHIFT) | (enum http_method)digits[2]) << PyLong_SHIFT) | (enum http_method)digits[1]) << PyLong_SHIFT) | (enum http_method)digits[0])));
  20989. }
  20990. }
  20991. break;
  20992. }
  20993. #endif
  20994. if (sizeof(enum http_method) <= sizeof(long)) {
  20995. __PYX_VERIFY_RETURN_INT_EXC(enum http_method, long, PyLong_AsLong(x))
  20996. #ifdef HAVE_LONG_LONG
  20997. } else if (sizeof(enum http_method) <= sizeof(PY_LONG_LONG)) {
  20998. __PYX_VERIFY_RETURN_INT_EXC(enum http_method, PY_LONG_LONG, PyLong_AsLongLong(x))
  20999. #endif
  21000. }
  21001. }
  21002. {
  21003. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  21004. PyErr_SetString(PyExc_RuntimeError,
  21005. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  21006. #else
  21007. enum http_method val;
  21008. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  21009. #if PY_MAJOR_VERSION < 3
  21010. if (likely(v) && !PyLong_Check(v)) {
  21011. PyObject *tmp = v;
  21012. v = PyNumber_Long(tmp);
  21013. Py_DECREF(tmp);
  21014. }
  21015. #endif
  21016. if (likely(v)) {
  21017. int one = 1; int is_little = (int)*(unsigned char *)&one;
  21018. unsigned char *bytes = (unsigned char *)&val;
  21019. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  21020. bytes, sizeof(val),
  21021. is_little, !is_unsigned);
  21022. Py_DECREF(v);
  21023. if (likely(!ret))
  21024. return val;
  21025. }
  21026. #endif
  21027. return (enum http_method) -1;
  21028. }
  21029. } else {
  21030. enum http_method val;
  21031. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  21032. if (!tmp) return (enum http_method) -1;
  21033. val = __Pyx_PyInt_As_enum__http_method(tmp);
  21034. Py_DECREF(tmp);
  21035. return val;
  21036. }
  21037. raise_overflow:
  21038. PyErr_SetString(PyExc_OverflowError,
  21039. "value too large to convert to enum http_method");
  21040. return (enum http_method) -1;
  21041. raise_neg_overflow:
  21042. PyErr_SetString(PyExc_OverflowError,
  21043. "can't convert negative value to enum http_method");
  21044. return (enum http_method) -1;
  21045. }
  21046. /* CIntFromPy */
  21047. static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
  21048. const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
  21049. const int is_unsigned = neg_one > const_zero;
  21050. #if PY_MAJOR_VERSION < 3
  21051. if (likely(PyInt_Check(x))) {
  21052. if (sizeof(size_t) < sizeof(long)) {
  21053. __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
  21054. } else {
  21055. long val = PyInt_AS_LONG(x);
  21056. if (is_unsigned && unlikely(val < 0)) {
  21057. goto raise_neg_overflow;
  21058. }
  21059. return (size_t) val;
  21060. }
  21061. } else
  21062. #endif
  21063. if (likely(PyLong_Check(x))) {
  21064. if (is_unsigned) {
  21065. #if CYTHON_USE_PYLONG_INTERNALS
  21066. const digit* digits = ((PyLongObject*)x)->ob_digit;
  21067. switch (Py_SIZE(x)) {
  21068. case 0: return (size_t) 0;
  21069. case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
  21070. case 2:
  21071. if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
  21072. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  21073. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21074. } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
  21075. return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  21076. }
  21077. }
  21078. break;
  21079. case 3:
  21080. if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
  21081. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  21082. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21083. } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
  21084. return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  21085. }
  21086. }
  21087. break;
  21088. case 4:
  21089. if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
  21090. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  21091. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21092. } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
  21093. return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  21094. }
  21095. }
  21096. break;
  21097. }
  21098. #endif
  21099. #if CYTHON_COMPILING_IN_CPYTHON
  21100. if (unlikely(Py_SIZE(x) < 0)) {
  21101. goto raise_neg_overflow;
  21102. }
  21103. #else
  21104. {
  21105. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  21106. if (unlikely(result < 0))
  21107. return (size_t) -1;
  21108. if (unlikely(result == 1))
  21109. goto raise_neg_overflow;
  21110. }
  21111. #endif
  21112. if (sizeof(size_t) <= sizeof(unsigned long)) {
  21113. __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
  21114. #ifdef HAVE_LONG_LONG
  21115. } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
  21116. __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  21117. #endif
  21118. }
  21119. } else {
  21120. #if CYTHON_USE_PYLONG_INTERNALS
  21121. const digit* digits = ((PyLongObject*)x)->ob_digit;
  21122. switch (Py_SIZE(x)) {
  21123. case 0: return (size_t) 0;
  21124. case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
  21125. case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
  21126. case -2:
  21127. if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
  21128. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  21129. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21130. } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  21131. return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  21132. }
  21133. }
  21134. break;
  21135. case 2:
  21136. if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
  21137. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  21138. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21139. } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  21140. return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  21141. }
  21142. }
  21143. break;
  21144. case -3:
  21145. if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
  21146. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  21147. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21148. } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  21149. return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  21150. }
  21151. }
  21152. break;
  21153. case 3:
  21154. if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
  21155. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  21156. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21157. } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  21158. return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  21159. }
  21160. }
  21161. break;
  21162. case -4:
  21163. if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
  21164. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  21165. __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21166. } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
  21167. return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  21168. }
  21169. }
  21170. break;
  21171. case 4:
  21172. if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
  21173. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  21174. __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21175. } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
  21176. return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
  21177. }
  21178. }
  21179. break;
  21180. }
  21181. #endif
  21182. if (sizeof(size_t) <= sizeof(long)) {
  21183. __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
  21184. #ifdef HAVE_LONG_LONG
  21185. } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
  21186. __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
  21187. #endif
  21188. }
  21189. }
  21190. {
  21191. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  21192. PyErr_SetString(PyExc_RuntimeError,
  21193. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  21194. #else
  21195. size_t val;
  21196. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  21197. #if PY_MAJOR_VERSION < 3
  21198. if (likely(v) && !PyLong_Check(v)) {
  21199. PyObject *tmp = v;
  21200. v = PyNumber_Long(tmp);
  21201. Py_DECREF(tmp);
  21202. }
  21203. #endif
  21204. if (likely(v)) {
  21205. int one = 1; int is_little = (int)*(unsigned char *)&one;
  21206. unsigned char *bytes = (unsigned char *)&val;
  21207. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  21208. bytes, sizeof(val),
  21209. is_little, !is_unsigned);
  21210. Py_DECREF(v);
  21211. if (likely(!ret))
  21212. return val;
  21213. }
  21214. #endif
  21215. return (size_t) -1;
  21216. }
  21217. } else {
  21218. size_t val;
  21219. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  21220. if (!tmp) return (size_t) -1;
  21221. val = __Pyx_PyInt_As_size_t(tmp);
  21222. Py_DECREF(tmp);
  21223. return val;
  21224. }
  21225. raise_overflow:
  21226. PyErr_SetString(PyExc_OverflowError,
  21227. "value too large to convert to size_t");
  21228. return (size_t) -1;
  21229. raise_neg_overflow:
  21230. PyErr_SetString(PyExc_OverflowError,
  21231. "can't convert negative value to size_t");
  21232. return (size_t) -1;
  21233. }
  21234. /* CIntFromPy */
  21235. static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
  21236. const long neg_one = (long) -1, const_zero = (long) 0;
  21237. const int is_unsigned = neg_one > const_zero;
  21238. #if PY_MAJOR_VERSION < 3
  21239. if (likely(PyInt_Check(x))) {
  21240. if (sizeof(long) < sizeof(long)) {
  21241. __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
  21242. } else {
  21243. long val = PyInt_AS_LONG(x);
  21244. if (is_unsigned && unlikely(val < 0)) {
  21245. goto raise_neg_overflow;
  21246. }
  21247. return (long) val;
  21248. }
  21249. } else
  21250. #endif
  21251. if (likely(PyLong_Check(x))) {
  21252. if (is_unsigned) {
  21253. #if CYTHON_USE_PYLONG_INTERNALS
  21254. const digit* digits = ((PyLongObject*)x)->ob_digit;
  21255. switch (Py_SIZE(x)) {
  21256. case 0: return (long) 0;
  21257. case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
  21258. case 2:
  21259. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  21260. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  21261. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21262. } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
  21263. return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  21264. }
  21265. }
  21266. break;
  21267. case 3:
  21268. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  21269. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  21270. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21271. } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
  21272. return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  21273. }
  21274. }
  21275. break;
  21276. case 4:
  21277. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  21278. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  21279. __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])))
  21280. } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
  21281. return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
  21282. }
  21283. }
  21284. break;
  21285. }
  21286. #endif
  21287. #if CYTHON_COMPILING_IN_CPYTHON
  21288. if (unlikely(Py_SIZE(x) < 0)) {
  21289. goto raise_neg_overflow;
  21290. }
  21291. #else
  21292. {
  21293. int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
  21294. if (unlikely(result < 0))
  21295. return (long) -1;
  21296. if (unlikely(result == 1))
  21297. goto raise_neg_overflow;
  21298. }
  21299. #endif
  21300. if (sizeof(long) <= sizeof(unsigned long)) {
  21301. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
  21302. #ifdef HAVE_LONG_LONG
  21303. } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
  21304. __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
  21305. #endif
  21306. }
  21307. } else {
  21308. #if CYTHON_USE_PYLONG_INTERNALS
  21309. const digit* digits = ((PyLongObject*)x)->ob_digit;
  21310. switch (Py_SIZE(x)) {
  21311. case 0: return (long) 0;
  21312. case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
  21313. case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
  21314. case -2:
  21315. if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
  21316. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  21317. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21318. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  21319. return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  21320. }
  21321. }
  21322. break;
  21323. case 2:
  21324. if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
  21325. if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
  21326. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21327. } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  21328. return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  21329. }
  21330. }
  21331. break;
  21332. case -3:
  21333. if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
  21334. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  21335. __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21336. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  21337. return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  21338. }
  21339. }
  21340. break;
  21341. case 3:
  21342. if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
  21343. if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
  21344. __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
  21345. } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  21346. return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  21347. }
  21348. }
  21349. break;
  21350. case -4:
  21351. if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
  21352. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  21353. __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])))
  21354. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  21355. return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  21356. }
  21357. }
  21358. break;
  21359. case 4:
  21360. if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
  21361. if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
  21362. __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])))
  21363. } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
  21364. return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
  21365. }
  21366. }
  21367. break;
  21368. }
  21369. #endif
  21370. if (sizeof(long) <= sizeof(long)) {
  21371. __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
  21372. #ifdef HAVE_LONG_LONG
  21373. } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
  21374. __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
  21375. #endif
  21376. }
  21377. }
  21378. {
  21379. #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
  21380. PyErr_SetString(PyExc_RuntimeError,
  21381. "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
  21382. #else
  21383. long val;
  21384. PyObject *v = __Pyx_PyNumber_IntOrLong(x);
  21385. #if PY_MAJOR_VERSION < 3
  21386. if (likely(v) && !PyLong_Check(v)) {
  21387. PyObject *tmp = v;
  21388. v = PyNumber_Long(tmp);
  21389. Py_DECREF(tmp);
  21390. }
  21391. #endif
  21392. if (likely(v)) {
  21393. int one = 1; int is_little = (int)*(unsigned char *)&one;
  21394. unsigned char *bytes = (unsigned char *)&val;
  21395. int ret = _PyLong_AsByteArray((PyLongObject *)v,
  21396. bytes, sizeof(val),
  21397. is_little, !is_unsigned);
  21398. Py_DECREF(v);
  21399. if (likely(!ret))
  21400. return val;
  21401. }
  21402. #endif
  21403. return (long) -1;
  21404. }
  21405. } else {
  21406. long val;
  21407. PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
  21408. if (!tmp) return (long) -1;
  21409. val = __Pyx_PyInt_As_long(tmp);
  21410. Py_DECREF(tmp);
  21411. return val;
  21412. }
  21413. raise_overflow:
  21414. PyErr_SetString(PyExc_OverflowError,
  21415. "value too large to convert to long");
  21416. return (long) -1;
  21417. raise_neg_overflow:
  21418. PyErr_SetString(PyExc_OverflowError,
  21419. "can't convert negative value to long");
  21420. return (long) -1;
  21421. }
  21422. /* FastTypeChecks */
  21423. #if CYTHON_COMPILING_IN_CPYTHON
  21424. static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
  21425. while (a) {
  21426. a = a->tp_base;
  21427. if (a == b)
  21428. return 1;
  21429. }
  21430. return b == &PyBaseObject_Type;
  21431. }
  21432. static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
  21433. PyObject *mro;
  21434. if (a == b) return 1;
  21435. mro = a->tp_mro;
  21436. if (likely(mro)) {
  21437. Py_ssize_t i, n;
  21438. n = PyTuple_GET_SIZE(mro);
  21439. for (i = 0; i < n; i++) {
  21440. if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
  21441. return 1;
  21442. }
  21443. return 0;
  21444. }
  21445. return __Pyx_InBases(a, b);
  21446. }
  21447. #if PY_MAJOR_VERSION == 2
  21448. static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
  21449. PyObject *exception, *value, *tb;
  21450. int res;
  21451. __Pyx_PyThreadState_declare
  21452. __Pyx_PyThreadState_assign
  21453. __Pyx_ErrFetch(&exception, &value, &tb);
  21454. res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
  21455. if (unlikely(res == -1)) {
  21456. PyErr_WriteUnraisable(err);
  21457. res = 0;
  21458. }
  21459. if (!res) {
  21460. res = PyObject_IsSubclass(err, exc_type2);
  21461. if (unlikely(res == -1)) {
  21462. PyErr_WriteUnraisable(err);
  21463. res = 0;
  21464. }
  21465. }
  21466. __Pyx_ErrRestore(exception, value, tb);
  21467. return res;
  21468. }
  21469. #else
  21470. static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
  21471. int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
  21472. if (!res) {
  21473. res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
  21474. }
  21475. return res;
  21476. }
  21477. #endif
  21478. static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
  21479. Py_ssize_t i, n;
  21480. assert(PyExceptionClass_Check(exc_type));
  21481. n = PyTuple_GET_SIZE(tuple);
  21482. #if PY_MAJOR_VERSION >= 3
  21483. for (i=0; i<n; i++) {
  21484. if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
  21485. }
  21486. #endif
  21487. for (i=0; i<n; i++) {
  21488. PyObject *t = PyTuple_GET_ITEM(tuple, i);
  21489. #if PY_MAJOR_VERSION < 3
  21490. if (likely(exc_type == t)) return 1;
  21491. #endif
  21492. if (likely(PyExceptionClass_Check(t))) {
  21493. if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
  21494. } else {
  21495. }
  21496. }
  21497. return 0;
  21498. }
  21499. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
  21500. if (likely(err == exc_type)) return 1;
  21501. if (likely(PyExceptionClass_Check(err))) {
  21502. if (likely(PyExceptionClass_Check(exc_type))) {
  21503. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
  21504. } else if (likely(PyTuple_Check(exc_type))) {
  21505. return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
  21506. } else {
  21507. }
  21508. }
  21509. return PyErr_GivenExceptionMatches(err, exc_type);
  21510. }
  21511. static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
  21512. assert(PyExceptionClass_Check(exc_type1));
  21513. assert(PyExceptionClass_Check(exc_type2));
  21514. if (likely(err == exc_type1 || err == exc_type2)) return 1;
  21515. if (likely(PyExceptionClass_Check(err))) {
  21516. return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
  21517. }
  21518. return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
  21519. }
  21520. #endif
  21521. /* FetchCommonType */
  21522. static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
  21523. PyObject* fake_module;
  21524. PyTypeObject* cached_type = NULL;
  21525. fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
  21526. if (!fake_module) return NULL;
  21527. Py_INCREF(fake_module);
  21528. cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
  21529. if (cached_type) {
  21530. if (!PyType_Check((PyObject*)cached_type)) {
  21531. PyErr_Format(PyExc_TypeError,
  21532. "Shared Cython type %.200s is not a type object",
  21533. type->tp_name);
  21534. goto bad;
  21535. }
  21536. if (cached_type->tp_basicsize != type->tp_basicsize) {
  21537. PyErr_Format(PyExc_TypeError,
  21538. "Shared Cython type %.200s has the wrong size, try recompiling",
  21539. type->tp_name);
  21540. goto bad;
  21541. }
  21542. } else {
  21543. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
  21544. PyErr_Clear();
  21545. if (PyType_Ready(type) < 0) goto bad;
  21546. if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
  21547. goto bad;
  21548. Py_INCREF(type);
  21549. cached_type = type;
  21550. }
  21551. done:
  21552. Py_DECREF(fake_module);
  21553. return cached_type;
  21554. bad:
  21555. Py_XDECREF(cached_type);
  21556. cached_type = NULL;
  21557. goto done;
  21558. }
  21559. /* PyObjectCallMethod1 */
  21560. static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
  21561. PyObject *result = NULL;
  21562. #if CYTHON_UNPACK_METHODS
  21563. if (likely(PyMethod_Check(method))) {
  21564. PyObject *self = PyMethod_GET_SELF(method);
  21565. if (likely(self)) {
  21566. PyObject *args;
  21567. PyObject *function = PyMethod_GET_FUNCTION(method);
  21568. #if CYTHON_FAST_PYCALL
  21569. if (PyFunction_Check(function)) {
  21570. PyObject *args[2] = {self, arg};
  21571. result = __Pyx_PyFunction_FastCall(function, args, 2);
  21572. goto done;
  21573. }
  21574. #endif
  21575. #if CYTHON_FAST_PYCCALL
  21576. if (__Pyx_PyFastCFunction_Check(function)) {
  21577. PyObject *args[2] = {self, arg};
  21578. result = __Pyx_PyCFunction_FastCall(function, args, 2);
  21579. goto done;
  21580. }
  21581. #endif
  21582. args = PyTuple_New(2);
  21583. if (unlikely(!args)) goto done;
  21584. Py_INCREF(self);
  21585. PyTuple_SET_ITEM(args, 0, self);
  21586. Py_INCREF(arg);
  21587. PyTuple_SET_ITEM(args, 1, arg);
  21588. Py_INCREF(function);
  21589. result = __Pyx_PyObject_Call(function, args, NULL);
  21590. Py_DECREF(args);
  21591. Py_DECREF(function);
  21592. return result;
  21593. }
  21594. }
  21595. #endif
  21596. result = __Pyx_PyObject_CallOneArg(method, arg);
  21597. goto done;
  21598. done:
  21599. return result;
  21600. }
  21601. static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
  21602. PyObject *method, *result;
  21603. method = __Pyx_PyObject_GetAttrStr(obj, method_name);
  21604. if (unlikely(!method)) return NULL;
  21605. result = __Pyx__PyObject_CallMethod1(method, arg);
  21606. Py_DECREF(method);
  21607. return result;
  21608. }
  21609. /* CoroutineBase */
  21610. #include <structmember.h>
  21611. #include <frameobject.h>
  21612. #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
  21613. static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
  21614. PyObject *et, *ev, *tb;
  21615. PyObject *value = NULL;
  21616. __Pyx_ErrFetch(&et, &ev, &tb);
  21617. if (!et) {
  21618. Py_XDECREF(tb);
  21619. Py_XDECREF(ev);
  21620. Py_INCREF(Py_None);
  21621. *pvalue = Py_None;
  21622. return 0;
  21623. }
  21624. if (likely(et == PyExc_StopIteration)) {
  21625. if (!ev) {
  21626. Py_INCREF(Py_None);
  21627. value = Py_None;
  21628. }
  21629. #if PY_VERSION_HEX >= 0x030300A0
  21630. else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
  21631. value = ((PyStopIterationObject *)ev)->value;
  21632. Py_INCREF(value);
  21633. Py_DECREF(ev);
  21634. }
  21635. #endif
  21636. else if (unlikely(PyTuple_Check(ev))) {
  21637. if (PyTuple_GET_SIZE(ev) >= 1) {
  21638. #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
  21639. value = PyTuple_GET_ITEM(ev, 0);
  21640. Py_INCREF(value);
  21641. #else
  21642. value = PySequence_ITEM(ev, 0);
  21643. #endif
  21644. } else {
  21645. Py_INCREF(Py_None);
  21646. value = Py_None;
  21647. }
  21648. Py_DECREF(ev);
  21649. }
  21650. else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
  21651. value = ev;
  21652. }
  21653. if (likely(value)) {
  21654. Py_XDECREF(tb);
  21655. Py_DECREF(et);
  21656. *pvalue = value;
  21657. return 0;
  21658. }
  21659. } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
  21660. __Pyx_ErrRestore(et, ev, tb);
  21661. return -1;
  21662. }
  21663. PyErr_NormalizeException(&et, &ev, &tb);
  21664. if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
  21665. __Pyx_ErrRestore(et, ev, tb);
  21666. return -1;
  21667. }
  21668. Py_XDECREF(tb);
  21669. Py_DECREF(et);
  21670. #if PY_VERSION_HEX >= 0x030300A0
  21671. value = ((PyStopIterationObject *)ev)->value;
  21672. Py_INCREF(value);
  21673. Py_DECREF(ev);
  21674. #else
  21675. {
  21676. PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
  21677. Py_DECREF(ev);
  21678. if (likely(args)) {
  21679. value = PySequence_GetItem(args, 0);
  21680. Py_DECREF(args);
  21681. }
  21682. if (unlikely(!value)) {
  21683. __Pyx_ErrRestore(NULL, NULL, NULL);
  21684. Py_INCREF(Py_None);
  21685. value = Py_None;
  21686. }
  21687. }
  21688. #endif
  21689. *pvalue = value;
  21690. return 0;
  21691. }
  21692. static CYTHON_INLINE
  21693. void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
  21694. PyObject *exc_type = self->exc_type;
  21695. PyObject *exc_value = self->exc_value;
  21696. PyObject *exc_traceback = self->exc_traceback;
  21697. self->exc_type = NULL;
  21698. self->exc_value = NULL;
  21699. self->exc_traceback = NULL;
  21700. Py_XDECREF(exc_type);
  21701. Py_XDECREF(exc_value);
  21702. Py_XDECREF(exc_traceback);
  21703. }
  21704. #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
  21705. static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
  21706. const char *msg;
  21707. if (0) {
  21708. #ifdef __Pyx_Coroutine_USED
  21709. } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
  21710. msg = "coroutine already executing";
  21711. #endif
  21712. #ifdef __Pyx_AsyncGen_USED
  21713. } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
  21714. msg = "async generator already executing";
  21715. #endif
  21716. } else {
  21717. msg = "generator already executing";
  21718. }
  21719. PyErr_SetString(PyExc_ValueError, msg);
  21720. }
  21721. #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
  21722. static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
  21723. const char *msg;
  21724. if (0) {
  21725. #ifdef __Pyx_Coroutine_USED
  21726. } else if (__Pyx_Coroutine_Check(gen)) {
  21727. msg = "can't send non-None value to a just-started coroutine";
  21728. #endif
  21729. #ifdef __Pyx_AsyncGen_USED
  21730. } else if (__Pyx_AsyncGen_CheckExact(gen)) {
  21731. msg = "can't send non-None value to a just-started async generator";
  21732. #endif
  21733. } else {
  21734. msg = "can't send non-None value to a just-started generator";
  21735. }
  21736. PyErr_SetString(PyExc_TypeError, msg);
  21737. }
  21738. #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
  21739. static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
  21740. #ifdef __Pyx_Coroutine_USED
  21741. if (!closing && __Pyx_Coroutine_Check(gen)) {
  21742. PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
  21743. } else
  21744. #endif
  21745. if (value) {
  21746. #ifdef __Pyx_AsyncGen_USED
  21747. if (__Pyx_AsyncGen_CheckExact(gen))
  21748. PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
  21749. else
  21750. #endif
  21751. PyErr_SetNone(PyExc_StopIteration);
  21752. }
  21753. }
  21754. static
  21755. PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
  21756. __Pyx_PyThreadState_declare
  21757. PyThreadState *tstate;
  21758. PyObject *retval;
  21759. assert(!self->is_running);
  21760. if (unlikely(self->resume_label == 0)) {
  21761. if (unlikely(value && value != Py_None)) {
  21762. return __Pyx_Coroutine_NotStartedError((PyObject*)self);
  21763. }
  21764. }
  21765. if (unlikely(self->resume_label == -1)) {
  21766. return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
  21767. }
  21768. #if CYTHON_FAST_THREAD_STATE
  21769. __Pyx_PyThreadState_assign
  21770. tstate = __pyx_tstate;
  21771. #else
  21772. tstate = __Pyx_PyThreadState_Current;
  21773. #endif
  21774. if (self->exc_type) {
  21775. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  21776. #else
  21777. if (self->exc_traceback) {
  21778. PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
  21779. PyFrameObject *f = tb->tb_frame;
  21780. Py_XINCREF(tstate->frame);
  21781. assert(f->f_back == NULL);
  21782. f->f_back = tstate->frame;
  21783. }
  21784. #endif
  21785. __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
  21786. &self->exc_traceback);
  21787. } else {
  21788. __Pyx_Coroutine_ExceptionClear(self);
  21789. __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
  21790. }
  21791. self->is_running = 1;
  21792. retval = self->body((PyObject *) self, tstate, value);
  21793. self->is_running = 0;
  21794. return retval;
  21795. }
  21796. static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
  21797. if (likely(self->exc_traceback)) {
  21798. #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  21799. #else
  21800. PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
  21801. PyFrameObject *f = tb->tb_frame;
  21802. Py_CLEAR(f->f_back);
  21803. #endif
  21804. }
  21805. }
  21806. static CYTHON_INLINE
  21807. PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
  21808. if (unlikely(!retval)) {
  21809. __Pyx_PyThreadState_declare
  21810. __Pyx_PyThreadState_assign
  21811. if (!__Pyx_PyErr_Occurred()) {
  21812. PyObject *exc = PyExc_StopIteration;
  21813. #ifdef __Pyx_AsyncGen_USED
  21814. if (__Pyx_AsyncGen_CheckExact(gen))
  21815. exc = __Pyx_PyExc_StopAsyncIteration;
  21816. #endif
  21817. __Pyx_PyErr_SetNone(exc);
  21818. }
  21819. }
  21820. return retval;
  21821. }
  21822. static CYTHON_INLINE
  21823. PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
  21824. PyObject *ret;
  21825. PyObject *val = NULL;
  21826. __Pyx_Coroutine_Undelegate(gen);
  21827. __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
  21828. ret = __Pyx_Coroutine_SendEx(gen, val, 0);
  21829. Py_XDECREF(val);
  21830. return ret;
  21831. }
  21832. static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
  21833. PyObject *retval;
  21834. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
  21835. PyObject *yf = gen->yieldfrom;
  21836. if (unlikely(gen->is_running))
  21837. return __Pyx_Coroutine_AlreadyRunningError(gen);
  21838. if (yf) {
  21839. PyObject *ret;
  21840. gen->is_running = 1;
  21841. #ifdef __Pyx_Generator_USED
  21842. if (__Pyx_Generator_CheckExact(yf)) {
  21843. ret = __Pyx_Coroutine_Send(yf, value);
  21844. } else
  21845. #endif
  21846. #ifdef __Pyx_Coroutine_USED
  21847. if (__Pyx_Coroutine_Check(yf)) {
  21848. ret = __Pyx_Coroutine_Send(yf, value);
  21849. } else
  21850. #endif
  21851. #ifdef __Pyx_AsyncGen_USED
  21852. if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
  21853. ret = __Pyx_async_gen_asend_send(yf, value);
  21854. } else
  21855. #endif
  21856. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
  21857. if (PyGen_CheckExact(yf)) {
  21858. ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
  21859. } else
  21860. #endif
  21861. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
  21862. if (PyCoro_CheckExact(yf)) {
  21863. ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
  21864. } else
  21865. #endif
  21866. {
  21867. if (value == Py_None)
  21868. ret = Py_TYPE(yf)->tp_iternext(yf);
  21869. else
  21870. ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
  21871. }
  21872. gen->is_running = 0;
  21873. if (likely(ret)) {
  21874. return ret;
  21875. }
  21876. retval = __Pyx_Coroutine_FinishDelegation(gen);
  21877. } else {
  21878. retval = __Pyx_Coroutine_SendEx(gen, value, 0);
  21879. }
  21880. return __Pyx_Coroutine_MethodReturn(self, retval);
  21881. }
  21882. static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
  21883. PyObject *retval = NULL;
  21884. int err = 0;
  21885. #ifdef __Pyx_Generator_USED
  21886. if (__Pyx_Generator_CheckExact(yf)) {
  21887. retval = __Pyx_Coroutine_Close(yf);
  21888. if (!retval)
  21889. return -1;
  21890. } else
  21891. #endif
  21892. #ifdef __Pyx_Coroutine_USED
  21893. if (__Pyx_Coroutine_Check(yf)) {
  21894. retval = __Pyx_Coroutine_Close(yf);
  21895. if (!retval)
  21896. return -1;
  21897. } else
  21898. if (__Pyx_CoroutineAwait_CheckExact(yf)) {
  21899. retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
  21900. if (!retval)
  21901. return -1;
  21902. } else
  21903. #endif
  21904. #ifdef __Pyx_AsyncGen_USED
  21905. if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
  21906. retval = __Pyx_async_gen_asend_close(yf, NULL);
  21907. } else
  21908. if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
  21909. retval = __Pyx_async_gen_athrow_close(yf, NULL);
  21910. } else
  21911. #endif
  21912. {
  21913. PyObject *meth;
  21914. gen->is_running = 1;
  21915. meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
  21916. if (unlikely(!meth)) {
  21917. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
  21918. PyErr_WriteUnraisable(yf);
  21919. }
  21920. PyErr_Clear();
  21921. } else {
  21922. retval = PyObject_CallFunction(meth, NULL);
  21923. Py_DECREF(meth);
  21924. if (!retval)
  21925. err = -1;
  21926. }
  21927. gen->is_running = 0;
  21928. }
  21929. Py_XDECREF(retval);
  21930. return err;
  21931. }
  21932. static PyObject *__Pyx_Generator_Next(PyObject *self) {
  21933. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
  21934. PyObject *yf = gen->yieldfrom;
  21935. if (unlikely(gen->is_running))
  21936. return __Pyx_Coroutine_AlreadyRunningError(gen);
  21937. if (yf) {
  21938. PyObject *ret;
  21939. gen->is_running = 1;
  21940. #ifdef __Pyx_Generator_USED
  21941. if (__Pyx_Generator_CheckExact(yf)) {
  21942. ret = __Pyx_Generator_Next(yf);
  21943. } else
  21944. #endif
  21945. #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
  21946. if (PyGen_CheckExact(yf)) {
  21947. ret = _PyGen_Send((PyGenObject*)yf, NULL);
  21948. } else
  21949. #endif
  21950. #ifdef __Pyx_Coroutine_USED
  21951. if (__Pyx_Coroutine_Check(yf)) {
  21952. ret = __Pyx_Coroutine_Send(yf, Py_None);
  21953. } else
  21954. #endif
  21955. ret = Py_TYPE(yf)->tp_iternext(yf);
  21956. gen->is_running = 0;
  21957. if (likely(ret)) {
  21958. return ret;
  21959. }
  21960. return __Pyx_Coroutine_FinishDelegation(gen);
  21961. }
  21962. return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
  21963. }
  21964. static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
  21965. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  21966. PyObject *retval, *raised_exception;
  21967. PyObject *yf = gen->yieldfrom;
  21968. int err = 0;
  21969. if (unlikely(gen->is_running))
  21970. return __Pyx_Coroutine_AlreadyRunningError(gen);
  21971. if (yf) {
  21972. Py_INCREF(yf);
  21973. err = __Pyx_Coroutine_CloseIter(gen, yf);
  21974. __Pyx_Coroutine_Undelegate(gen);
  21975. Py_DECREF(yf);
  21976. }
  21977. if (err == 0)
  21978. PyErr_SetNone(PyExc_GeneratorExit);
  21979. retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
  21980. if (unlikely(retval)) {
  21981. const char *msg;
  21982. Py_DECREF(retval);
  21983. if ((0)) {
  21984. #ifdef __Pyx_Coroutine_USED
  21985. } else if (__Pyx_Coroutine_Check(self)) {
  21986. msg = "coroutine ignored GeneratorExit";
  21987. #endif
  21988. #ifdef __Pyx_AsyncGen_USED
  21989. } else if (__Pyx_AsyncGen_CheckExact(self)) {
  21990. #if PY_VERSION_HEX < 0x03060000
  21991. msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
  21992. #else
  21993. msg = "async generator ignored GeneratorExit";
  21994. #endif
  21995. #endif
  21996. } else {
  21997. msg = "generator ignored GeneratorExit";
  21998. }
  21999. PyErr_SetString(PyExc_RuntimeError, msg);
  22000. return NULL;
  22001. }
  22002. raised_exception = PyErr_Occurred();
  22003. if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
  22004. if (raised_exception) PyErr_Clear();
  22005. Py_INCREF(Py_None);
  22006. return Py_None;
  22007. }
  22008. return NULL;
  22009. }
  22010. static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
  22011. PyObject *args, int close_on_genexit) {
  22012. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  22013. PyObject *yf = gen->yieldfrom;
  22014. if (unlikely(gen->is_running))
  22015. return __Pyx_Coroutine_AlreadyRunningError(gen);
  22016. if (yf) {
  22017. PyObject *ret;
  22018. Py_INCREF(yf);
  22019. if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
  22020. int err = __Pyx_Coroutine_CloseIter(gen, yf);
  22021. Py_DECREF(yf);
  22022. __Pyx_Coroutine_Undelegate(gen);
  22023. if (err < 0)
  22024. return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
  22025. goto throw_here;
  22026. }
  22027. gen->is_running = 1;
  22028. if (0
  22029. #ifdef __Pyx_Generator_USED
  22030. || __Pyx_Generator_CheckExact(yf)
  22031. #endif
  22032. #ifdef __Pyx_Coroutine_USED
  22033. || __Pyx_Coroutine_Check(yf)
  22034. #endif
  22035. ) {
  22036. ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
  22037. #ifdef __Pyx_Coroutine_USED
  22038. } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
  22039. ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
  22040. #endif
  22041. } else {
  22042. PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
  22043. if (unlikely(!meth)) {
  22044. Py_DECREF(yf);
  22045. if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
  22046. gen->is_running = 0;
  22047. return NULL;
  22048. }
  22049. PyErr_Clear();
  22050. __Pyx_Coroutine_Undelegate(gen);
  22051. gen->is_running = 0;
  22052. goto throw_here;
  22053. }
  22054. if (likely(args)) {
  22055. ret = PyObject_CallObject(meth, args);
  22056. } else {
  22057. ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
  22058. }
  22059. Py_DECREF(meth);
  22060. }
  22061. gen->is_running = 0;
  22062. Py_DECREF(yf);
  22063. if (!ret) {
  22064. ret = __Pyx_Coroutine_FinishDelegation(gen);
  22065. }
  22066. return __Pyx_Coroutine_MethodReturn(self, ret);
  22067. }
  22068. throw_here:
  22069. __Pyx_Raise(typ, val, tb, NULL);
  22070. return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
  22071. }
  22072. static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
  22073. PyObject *typ;
  22074. PyObject *val = NULL;
  22075. PyObject *tb = NULL;
  22076. if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
  22077. return NULL;
  22078. return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
  22079. }
  22080. static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
  22081. Py_VISIT(gen->closure);
  22082. Py_VISIT(gen->classobj);
  22083. Py_VISIT(gen->yieldfrom);
  22084. Py_VISIT(gen->exc_type);
  22085. Py_VISIT(gen->exc_value);
  22086. Py_VISIT(gen->exc_traceback);
  22087. return 0;
  22088. }
  22089. static int __Pyx_Coroutine_clear(PyObject *self) {
  22090. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  22091. Py_CLEAR(gen->closure);
  22092. Py_CLEAR(gen->classobj);
  22093. Py_CLEAR(gen->yieldfrom);
  22094. Py_CLEAR(gen->exc_type);
  22095. Py_CLEAR(gen->exc_value);
  22096. Py_CLEAR(gen->exc_traceback);
  22097. #ifdef __Pyx_AsyncGen_USED
  22098. if (__Pyx_AsyncGen_CheckExact(self)) {
  22099. Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
  22100. }
  22101. #endif
  22102. Py_CLEAR(gen->gi_code);
  22103. Py_CLEAR(gen->gi_name);
  22104. Py_CLEAR(gen->gi_qualname);
  22105. Py_CLEAR(gen->gi_modulename);
  22106. return 0;
  22107. }
  22108. static void __Pyx_Coroutine_dealloc(PyObject *self) {
  22109. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  22110. PyObject_GC_UnTrack(gen);
  22111. if (gen->gi_weakreflist != NULL)
  22112. PyObject_ClearWeakRefs(self);
  22113. if (gen->resume_label >= 0) {
  22114. PyObject_GC_Track(self);
  22115. #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
  22116. if (PyObject_CallFinalizerFromDealloc(self))
  22117. #else
  22118. Py_TYPE(gen)->tp_del(self);
  22119. if (self->ob_refcnt > 0)
  22120. #endif
  22121. {
  22122. return;
  22123. }
  22124. PyObject_GC_UnTrack(self);
  22125. }
  22126. #ifdef __Pyx_AsyncGen_USED
  22127. if (__Pyx_AsyncGen_CheckExact(self)) {
  22128. /* We have to handle this case for asynchronous generators
  22129. right here, because this code has to be between UNTRACK
  22130. and GC_Del. */
  22131. Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
  22132. }
  22133. #endif
  22134. __Pyx_Coroutine_clear(self);
  22135. PyObject_GC_Del(gen);
  22136. }
  22137. static void __Pyx_Coroutine_del(PyObject *self) {
  22138. PyObject *error_type, *error_value, *error_traceback;
  22139. __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
  22140. __Pyx_PyThreadState_declare
  22141. if (gen->resume_label < 0) {
  22142. return;
  22143. }
  22144. #if !CYTHON_USE_TP_FINALIZE
  22145. assert(self->ob_refcnt == 0);
  22146. self->ob_refcnt = 1;
  22147. #endif
  22148. __Pyx_PyThreadState_assign
  22149. __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
  22150. #ifdef __Pyx_AsyncGen_USED
  22151. if (__Pyx_AsyncGen_CheckExact(self)) {
  22152. __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
  22153. PyObject *finalizer = agen->ag_finalizer;
  22154. if (finalizer && !agen->ag_closed) {
  22155. PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
  22156. if (unlikely(!res)) {
  22157. PyErr_WriteUnraisable(self);
  22158. } else {
  22159. Py_DECREF(res);
  22160. }
  22161. __Pyx_ErrRestore(error_type, error_value, error_traceback);
  22162. return;
  22163. }
  22164. }
  22165. #endif
  22166. if (unlikely(gen->resume_label == 0 && !error_value)) {
  22167. #ifdef __Pyx_Coroutine_USED
  22168. #ifdef __Pyx_Generator_USED
  22169. if (!__Pyx_Generator_CheckExact(self))
  22170. #endif
  22171. {
  22172. PyObject_GC_UnTrack(self);
  22173. #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
  22174. if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
  22175. PyErr_WriteUnraisable(self);
  22176. #else
  22177. {PyObject *msg;
  22178. char *cmsg;
  22179. #if CYTHON_COMPILING_IN_PYPY
  22180. msg = NULL;
  22181. cmsg = (char*) "coroutine was never awaited";
  22182. #else
  22183. char *cname;
  22184. PyObject *qualname;
  22185. qualname = gen->gi_qualname;
  22186. cname = PyString_AS_STRING(qualname);
  22187. msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
  22188. if (unlikely(!msg)) {
  22189. PyErr_Clear();
  22190. cmsg = (char*) "coroutine was never awaited";
  22191. } else {
  22192. cmsg = PyString_AS_STRING(msg);
  22193. }
  22194. #endif
  22195. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
  22196. PyErr_WriteUnraisable(self);
  22197. Py_XDECREF(msg);}
  22198. #endif
  22199. PyObject_GC_Track(self);
  22200. }
  22201. #endif
  22202. } else {
  22203. PyObject *res = __Pyx_Coroutine_Close(self);
  22204. if (unlikely(!res)) {
  22205. if (PyErr_Occurred())
  22206. PyErr_WriteUnraisable(self);
  22207. } else {
  22208. Py_DECREF(res);
  22209. }
  22210. }
  22211. __Pyx_ErrRestore(error_type, error_value, error_traceback);
  22212. #if !CYTHON_USE_TP_FINALIZE
  22213. assert(self->ob_refcnt > 0);
  22214. if (--self->ob_refcnt == 0) {
  22215. return;
  22216. }
  22217. {
  22218. Py_ssize_t refcnt = self->ob_refcnt;
  22219. _Py_NewReference(self);
  22220. self->ob_refcnt = refcnt;
  22221. }
  22222. #if CYTHON_COMPILING_IN_CPYTHON
  22223. assert(PyType_IS_GC(self->ob_type) &&
  22224. _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
  22225. _Py_DEC_REFTOTAL;
  22226. #endif
  22227. #ifdef COUNT_ALLOCS
  22228. --Py_TYPE(self)->tp_frees;
  22229. --Py_TYPE(self)->tp_allocs;
  22230. #endif
  22231. #endif
  22232. }
  22233. static PyObject *
  22234. __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
  22235. {
  22236. PyObject *name = self->gi_name;
  22237. if (unlikely(!name)) name = Py_None;
  22238. Py_INCREF(name);
  22239. return name;
  22240. }
  22241. static int
  22242. __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
  22243. {
  22244. PyObject *tmp;
  22245. #if PY_MAJOR_VERSION >= 3
  22246. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  22247. #else
  22248. if (unlikely(value == NULL || !PyString_Check(value))) {
  22249. #endif
  22250. PyErr_SetString(PyExc_TypeError,
  22251. "__name__ must be set to a string object");
  22252. return -1;
  22253. }
  22254. tmp = self->gi_name;
  22255. Py_INCREF(value);
  22256. self->gi_name = value;
  22257. Py_XDECREF(tmp);
  22258. return 0;
  22259. }
  22260. static PyObject *
  22261. __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
  22262. {
  22263. PyObject *name = self->gi_qualname;
  22264. if (unlikely(!name)) name = Py_None;
  22265. Py_INCREF(name);
  22266. return name;
  22267. }
  22268. static int
  22269. __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
  22270. {
  22271. PyObject *tmp;
  22272. #if PY_MAJOR_VERSION >= 3
  22273. if (unlikely(value == NULL || !PyUnicode_Check(value))) {
  22274. #else
  22275. if (unlikely(value == NULL || !PyString_Check(value))) {
  22276. #endif
  22277. PyErr_SetString(PyExc_TypeError,
  22278. "__qualname__ must be set to a string object");
  22279. return -1;
  22280. }
  22281. tmp = self->gi_qualname;
  22282. Py_INCREF(value);
  22283. self->gi_qualname = value;
  22284. Py_XDECREF(tmp);
  22285. return 0;
  22286. }
  22287. static __pyx_CoroutineObject *__Pyx__Coroutine_New(
  22288. PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  22289. PyObject *name, PyObject *qualname, PyObject *module_name) {
  22290. __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
  22291. if (unlikely(!gen))
  22292. return NULL;
  22293. return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
  22294. }
  22295. static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
  22296. __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
  22297. PyObject *name, PyObject *qualname, PyObject *module_name) {
  22298. gen->body = body;
  22299. gen->closure = closure;
  22300. Py_XINCREF(closure);
  22301. gen->is_running = 0;
  22302. gen->resume_label = 0;
  22303. gen->classobj = NULL;
  22304. gen->yieldfrom = NULL;
  22305. gen->exc_type = NULL;
  22306. gen->exc_value = NULL;
  22307. gen->exc_traceback = NULL;
  22308. gen->gi_weakreflist = NULL;
  22309. Py_XINCREF(qualname);
  22310. gen->gi_qualname = qualname;
  22311. Py_XINCREF(name);
  22312. gen->gi_name = name;
  22313. Py_XINCREF(module_name);
  22314. gen->gi_modulename = module_name;
  22315. Py_XINCREF(code);
  22316. gen->gi_code = code;
  22317. PyObject_GC_Track(gen);
  22318. return gen;
  22319. }
  22320. /* PatchModuleWithCoroutine */
  22321. static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
  22322. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  22323. int result;
  22324. PyObject *globals, *result_obj;
  22325. globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
  22326. result = PyDict_SetItemString(globals, "_cython_coroutine_type",
  22327. #ifdef __Pyx_Coroutine_USED
  22328. (PyObject*)__pyx_CoroutineType);
  22329. #else
  22330. Py_None);
  22331. #endif
  22332. if (unlikely(result < 0)) goto ignore;
  22333. result = PyDict_SetItemString(globals, "_cython_generator_type",
  22334. #ifdef __Pyx_Generator_USED
  22335. (PyObject*)__pyx_GeneratorType);
  22336. #else
  22337. Py_None);
  22338. #endif
  22339. if (unlikely(result < 0)) goto ignore;
  22340. if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
  22341. if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
  22342. result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
  22343. if (unlikely(!result_obj)) goto ignore;
  22344. Py_DECREF(result_obj);
  22345. Py_DECREF(globals);
  22346. return module;
  22347. ignore:
  22348. Py_XDECREF(globals);
  22349. PyErr_WriteUnraisable(module);
  22350. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
  22351. Py_DECREF(module);
  22352. module = NULL;
  22353. }
  22354. #else
  22355. py_code++;
  22356. #endif
  22357. return module;
  22358. }
  22359. /* PatchGeneratorABC */
  22360. #ifndef CYTHON_REGISTER_ABCS
  22361. #define CYTHON_REGISTER_ABCS 1
  22362. #endif
  22363. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  22364. static PyObject* __Pyx_patch_abc_module(PyObject *module);
  22365. static PyObject* __Pyx_patch_abc_module(PyObject *module) {
  22366. module = __Pyx_Coroutine_patch_module(
  22367. module, ""
  22368. "if _cython_generator_type is not None:\n"
  22369. " try: Generator = _module.Generator\n"
  22370. " except AttributeError: pass\n"
  22371. " else: Generator.register(_cython_generator_type)\n"
  22372. "if _cython_coroutine_type is not None:\n"
  22373. " try: Coroutine = _module.Coroutine\n"
  22374. " except AttributeError: pass\n"
  22375. " else: Coroutine.register(_cython_coroutine_type)\n"
  22376. );
  22377. return module;
  22378. }
  22379. #endif
  22380. static int __Pyx_patch_abc(void) {
  22381. #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  22382. static int abc_patched = 0;
  22383. if (CYTHON_REGISTER_ABCS && !abc_patched) {
  22384. PyObject *module;
  22385. module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
  22386. if (!module) {
  22387. PyErr_WriteUnraisable(NULL);
  22388. if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
  22389. ((PY_MAJOR_VERSION >= 3) ?
  22390. "Cython module failed to register with collections.abc module" :
  22391. "Cython module failed to register with collections module"), 1) < 0)) {
  22392. return -1;
  22393. }
  22394. } else {
  22395. module = __Pyx_patch_abc_module(module);
  22396. abc_patched = 1;
  22397. if (unlikely(!module))
  22398. return -1;
  22399. Py_DECREF(module);
  22400. }
  22401. module = PyImport_ImportModule("backports_abc");
  22402. if (module) {
  22403. module = __Pyx_patch_abc_module(module);
  22404. Py_XDECREF(module);
  22405. }
  22406. if (!module) {
  22407. PyErr_Clear();
  22408. }
  22409. }
  22410. #else
  22411. if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
  22412. #endif
  22413. return 0;
  22414. }
  22415. /* Generator */
  22416. static PyMethodDef __pyx_Generator_methods[] = {
  22417. {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
  22418. (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
  22419. {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
  22420. (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
  22421. {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
  22422. (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
  22423. {0, 0, 0, 0}
  22424. };
  22425. static PyMemberDef __pyx_Generator_memberlist[] = {
  22426. {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
  22427. {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
  22428. (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
  22429. {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
  22430. {0, 0, 0, 0, 0}
  22431. };
  22432. static PyGetSetDef __pyx_Generator_getsets[] = {
  22433. {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
  22434. (char*) PyDoc_STR("name of the generator"), 0},
  22435. {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
  22436. (char*) PyDoc_STR("qualified name of the generator"), 0},
  22437. {0, 0, 0, 0, 0}
  22438. };
  22439. static PyTypeObject __pyx_GeneratorType_type = {
  22440. PyVarObject_HEAD_INIT(0, 0)
  22441. "generator",
  22442. sizeof(__pyx_CoroutineObject),
  22443. 0,
  22444. (destructor) __Pyx_Coroutine_dealloc,
  22445. 0,
  22446. 0,
  22447. 0,
  22448. 0,
  22449. 0,
  22450. 0,
  22451. 0,
  22452. 0,
  22453. 0,
  22454. 0,
  22455. 0,
  22456. 0,
  22457. 0,
  22458. 0,
  22459. Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
  22460. 0,
  22461. (traverseproc) __Pyx_Coroutine_traverse,
  22462. 0,
  22463. 0,
  22464. offsetof(__pyx_CoroutineObject, gi_weakreflist),
  22465. 0,
  22466. (iternextfunc) __Pyx_Generator_Next,
  22467. __pyx_Generator_methods,
  22468. __pyx_Generator_memberlist,
  22469. __pyx_Generator_getsets,
  22470. 0,
  22471. 0,
  22472. 0,
  22473. 0,
  22474. 0,
  22475. 0,
  22476. 0,
  22477. 0,
  22478. 0,
  22479. 0,
  22480. 0,
  22481. 0,
  22482. 0,
  22483. 0,
  22484. 0,
  22485. #if CYTHON_USE_TP_FINALIZE
  22486. 0,
  22487. #else
  22488. __Pyx_Coroutine_del,
  22489. #endif
  22490. 0,
  22491. #if CYTHON_USE_TP_FINALIZE
  22492. __Pyx_Coroutine_del,
  22493. #elif PY_VERSION_HEX >= 0x030400a1
  22494. 0,
  22495. #endif
  22496. };
  22497. static int __pyx_Generator_init(void) {
  22498. __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  22499. __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
  22500. __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
  22501. if (unlikely(!__pyx_GeneratorType)) {
  22502. return -1;
  22503. }
  22504. return 0;
  22505. }
  22506. /* CheckBinaryVersion */
  22507. static int __Pyx_check_binary_version(void) {
  22508. char ctversion[4], rtversion[4];
  22509. PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
  22510. PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
  22511. if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
  22512. char message[200];
  22513. PyOS_snprintf(message, sizeof(message),
  22514. "compiletime version %s of module '%.100s' "
  22515. "does not match runtime version %s",
  22516. ctversion, __Pyx_MODULE_NAME, rtversion);
  22517. return PyErr_WarnEx(NULL, message, 1);
  22518. }
  22519. return 0;
  22520. }
  22521. /* ModuleImport */
  22522. #ifndef __PYX_HAVE_RT_ImportModule
  22523. #define __PYX_HAVE_RT_ImportModule
  22524. static PyObject *__Pyx_ImportModule(const char *name) {
  22525. PyObject *py_name = 0;
  22526. PyObject *py_module = 0;
  22527. py_name = __Pyx_PyIdentifier_FromString(name);
  22528. if (!py_name)
  22529. goto bad;
  22530. py_module = PyImport_Import(py_name);
  22531. Py_DECREF(py_name);
  22532. return py_module;
  22533. bad:
  22534. Py_XDECREF(py_name);
  22535. return 0;
  22536. }
  22537. #endif
  22538. /* TypeImport */
  22539. #ifndef __PYX_HAVE_RT_ImportType
  22540. #define __PYX_HAVE_RT_ImportType
  22541. static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
  22542. size_t size, int strict)
  22543. {
  22544. PyObject *py_module = 0;
  22545. PyObject *result = 0;
  22546. PyObject *py_name = 0;
  22547. char warning[200];
  22548. Py_ssize_t basicsize;
  22549. #ifdef Py_LIMITED_API
  22550. PyObject *py_basicsize;
  22551. #endif
  22552. py_module = __Pyx_ImportModule(module_name);
  22553. if (!py_module)
  22554. goto bad;
  22555. py_name = __Pyx_PyIdentifier_FromString(class_name);
  22556. if (!py_name)
  22557. goto bad;
  22558. result = PyObject_GetAttr(py_module, py_name);
  22559. Py_DECREF(py_name);
  22560. py_name = 0;
  22561. Py_DECREF(py_module);
  22562. py_module = 0;
  22563. if (!result)
  22564. goto bad;
  22565. if (!PyType_Check(result)) {
  22566. PyErr_Format(PyExc_TypeError,
  22567. "%.200s.%.200s is not a type object",
  22568. module_name, class_name);
  22569. goto bad;
  22570. }
  22571. #ifndef Py_LIMITED_API
  22572. basicsize = ((PyTypeObject *)result)->tp_basicsize;
  22573. #else
  22574. py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
  22575. if (!py_basicsize)
  22576. goto bad;
  22577. basicsize = PyLong_AsSsize_t(py_basicsize);
  22578. Py_DECREF(py_basicsize);
  22579. py_basicsize = 0;
  22580. if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
  22581. goto bad;
  22582. #endif
  22583. if (!strict && (size_t)basicsize > size) {
  22584. PyOS_snprintf(warning, sizeof(warning),
  22585. "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
  22586. module_name, class_name, basicsize, size);
  22587. if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
  22588. }
  22589. else if ((size_t)basicsize != size) {
  22590. PyErr_Format(PyExc_ValueError,
  22591. "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
  22592. module_name, class_name, basicsize, size);
  22593. goto bad;
  22594. }
  22595. return (PyTypeObject *)result;
  22596. bad:
  22597. Py_XDECREF(py_module);
  22598. Py_XDECREF(result);
  22599. return NULL;
  22600. }
  22601. #endif
  22602. /* InitStrings */
  22603. static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
  22604. while (t->p) {
  22605. #if PY_MAJOR_VERSION < 3
  22606. if (t->is_unicode) {
  22607. *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
  22608. } else if (t->intern) {
  22609. *t->p = PyString_InternFromString(t->s);
  22610. } else {
  22611. *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
  22612. }
  22613. #else
  22614. if (t->is_unicode | t->is_str) {
  22615. if (t->intern) {
  22616. *t->p = PyUnicode_InternFromString(t->s);
  22617. } else if (t->encoding) {
  22618. *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
  22619. } else {
  22620. *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
  22621. }
  22622. } else {
  22623. *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
  22624. }
  22625. #endif
  22626. if (!*t->p)
  22627. return -1;
  22628. if (PyObject_Hash(*t->p) == -1)
  22629. return -1;
  22630. ++t;
  22631. }
  22632. return 0;
  22633. }
  22634. static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
  22635. return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
  22636. }
  22637. static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
  22638. Py_ssize_t ignore;
  22639. return __Pyx_PyObject_AsStringAndSize(o, &ignore);
  22640. }
  22641. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  22642. #if !CYTHON_PEP393_ENABLED
  22643. static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  22644. char* defenc_c;
  22645. PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
  22646. if (!defenc) return NULL;
  22647. defenc_c = PyBytes_AS_STRING(defenc);
  22648. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  22649. {
  22650. char* end = defenc_c + PyBytes_GET_SIZE(defenc);
  22651. char* c;
  22652. for (c = defenc_c; c < end; c++) {
  22653. if ((unsigned char) (*c) >= 128) {
  22654. PyUnicode_AsASCIIString(o);
  22655. return NULL;
  22656. }
  22657. }
  22658. }
  22659. #endif
  22660. *length = PyBytes_GET_SIZE(defenc);
  22661. return defenc_c;
  22662. }
  22663. #else
  22664. static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  22665. if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
  22666. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  22667. if (likely(PyUnicode_IS_ASCII(o))) {
  22668. *length = PyUnicode_GET_LENGTH(o);
  22669. return PyUnicode_AsUTF8(o);
  22670. } else {
  22671. PyUnicode_AsASCIIString(o);
  22672. return NULL;
  22673. }
  22674. #else
  22675. return PyUnicode_AsUTF8AndSize(o, length);
  22676. #endif
  22677. }
  22678. #endif
  22679. #endif
  22680. static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
  22681. #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
  22682. if (
  22683. #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
  22684. __Pyx_sys_getdefaultencoding_not_ascii &&
  22685. #endif
  22686. PyUnicode_Check(o)) {
  22687. return __Pyx_PyUnicode_AsStringAndSize(o, length);
  22688. } else
  22689. #endif
  22690. #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
  22691. if (PyByteArray_Check(o)) {
  22692. *length = PyByteArray_GET_SIZE(o);
  22693. return PyByteArray_AS_STRING(o);
  22694. } else
  22695. #endif
  22696. {
  22697. char* result;
  22698. int r = PyBytes_AsStringAndSize(o, &result, length);
  22699. if (unlikely(r < 0)) {
  22700. return NULL;
  22701. } else {
  22702. return result;
  22703. }
  22704. }
  22705. }
  22706. static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
  22707. int is_true = x == Py_True;
  22708. if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
  22709. else return PyObject_IsTrue(x);
  22710. }
  22711. static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
  22712. #if PY_MAJOR_VERSION >= 3
  22713. if (PyLong_Check(result)) {
  22714. if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
  22715. "__int__ returned non-int (type %.200s). "
  22716. "The ability to return an instance of a strict subclass of int "
  22717. "is deprecated, and may be removed in a future version of Python.",
  22718. Py_TYPE(result)->tp_name)) {
  22719. Py_DECREF(result);
  22720. return NULL;
  22721. }
  22722. return result;
  22723. }
  22724. #endif
  22725. PyErr_Format(PyExc_TypeError,
  22726. "__%.4s__ returned non-%.4s (type %.200s)",
  22727. type_name, type_name, Py_TYPE(result)->tp_name);
  22728. Py_DECREF(result);
  22729. return NULL;
  22730. }
  22731. static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
  22732. #if CYTHON_USE_TYPE_SLOTS
  22733. PyNumberMethods *m;
  22734. #endif
  22735. const char *name = NULL;
  22736. PyObject *res = NULL;
  22737. #if PY_MAJOR_VERSION < 3
  22738. if (likely(PyInt_Check(x) || PyLong_Check(x)))
  22739. #else
  22740. if (likely(PyLong_Check(x)))
  22741. #endif
  22742. return __Pyx_NewRef(x);
  22743. #if CYTHON_USE_TYPE_SLOTS
  22744. m = Py_TYPE(x)->tp_as_number;
  22745. #if PY_MAJOR_VERSION < 3
  22746. if (m && m->nb_int) {
  22747. name = "int";
  22748. res = m->nb_int(x);
  22749. }
  22750. else if (m && m->nb_long) {
  22751. name = "long";
  22752. res = m->nb_long(x);
  22753. }
  22754. #else
  22755. if (likely(m && m->nb_int)) {
  22756. name = "int";
  22757. res = m->nb_int(x);
  22758. }
  22759. #endif
  22760. #else
  22761. if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
  22762. res = PyNumber_Int(x);
  22763. }
  22764. #endif
  22765. if (likely(res)) {
  22766. #if PY_MAJOR_VERSION < 3
  22767. if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
  22768. #else
  22769. if (unlikely(!PyLong_CheckExact(res))) {
  22770. #endif
  22771. return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
  22772. }
  22773. }
  22774. else if (!PyErr_Occurred()) {
  22775. PyErr_SetString(PyExc_TypeError,
  22776. "an integer is required");
  22777. }
  22778. return res;
  22779. }
  22780. static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  22781. Py_ssize_t ival;
  22782. PyObject *x;
  22783. #if PY_MAJOR_VERSION < 3
  22784. if (likely(PyInt_CheckExact(b))) {
  22785. if (sizeof(Py_ssize_t) >= sizeof(long))
  22786. return PyInt_AS_LONG(b);
  22787. else
  22788. return PyInt_AsSsize_t(x);
  22789. }
  22790. #endif
  22791. if (likely(PyLong_CheckExact(b))) {
  22792. #if CYTHON_USE_PYLONG_INTERNALS
  22793. const digit* digits = ((PyLongObject*)b)->ob_digit;
  22794. const Py_ssize_t size = Py_SIZE(b);
  22795. if (likely(__Pyx_sst_abs(size) <= 1)) {
  22796. ival = likely(size) ? digits[0] : 0;
  22797. if (size == -1) ival = -ival;
  22798. return ival;
  22799. } else {
  22800. switch (size) {
  22801. case 2:
  22802. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  22803. return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  22804. }
  22805. break;
  22806. case -2:
  22807. if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
  22808. return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  22809. }
  22810. break;
  22811. case 3:
  22812. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  22813. return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  22814. }
  22815. break;
  22816. case -3:
  22817. if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
  22818. return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
  22819. }
  22820. break;
  22821. case 4:
  22822. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  22823. 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]));
  22824. }
  22825. break;
  22826. case -4:
  22827. if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
  22828. 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]));
  22829. }
  22830. break;
  22831. }
  22832. }
  22833. #endif
  22834. return PyLong_AsSsize_t(b);
  22835. }
  22836. x = PyNumber_Index(b);
  22837. if (!x) return -1;
  22838. ival = PyInt_AsSsize_t(x);
  22839. Py_DECREF(x);
  22840. return ival;
  22841. }
  22842. static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  22843. return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
  22844. }
  22845. static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
  22846. return PyInt_FromSize_t(ival);
  22847. }
  22848. #endif /* Py_PYTHON_H */