|
|
|
|
Quelle _http_writer.c
Sprache: C
|
|
/* Generated by Cython 3.0.10 */
#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
#ifndef Py_LIMITED_API
#if CYTHON_LIMITED_API+0 > 0x03030000
#define Py_LIMITED_API CYTHON_LIMITED_API
#else
#define Py_LIMITED_API 0x03030000
#endif
#endif
#endif
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_10" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x03000AF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
#define __stdcall
#endif
#ifndef __cdecl
#define __cdecl
#endif
#ifndef __fastcall
#define __fastcall
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
#define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
#define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
/* For very preliminary testing purposes. Most variables are set the same as PyPy.
The existence of this section does not imply that anything works or is even tested */
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_LIMITED_API 0
#define CYTHON_COMPILING_IN_GRAAL 1
#define CYTHON_COMPILING_IN_NOGIL 0
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#undef CYTHON_USE_TYPE_SPECS
#define CYTHON_USE_TYPE_SPECS 0
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#if PY_VERSION_HEX < 0x03050000
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#undef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 1
#undef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 0
#undef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 0
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_GIL
#define CYTHON_FAST_GIL 0
#undef CYTHON_METH_FASTCALL
#define CYTHON_METH_FASTCALL 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#ifndef CYTHON_PEP487_INIT_SUBCLASS
#define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
#endif
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
#undef CYTHON_USE_MODULE_STATE
#define CYTHON_USE_MODULE_STATE 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
#undef CYTHON_USE_FREELISTS
#define CYTHON_USE_FREELISTS 0
#elif defined(PYPY_VERSION)
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_LIMITED_API 0
#define CYTHON_COMPILING_IN_GRAAL 0
#define CYTHON_COMPILING_IN_NOGIL 0
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#ifndef CYTHON_USE_TYPE_SPECS
#define CYTHON_USE_TYPE_SPECS 0
#endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#if PY_VERSION_HEX < 0x03050000
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#undef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 1
#undef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 0
#undef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 0
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_GIL
#define CYTHON_FAST_GIL 0
#undef CYTHON_METH_FASTCALL
#define CYTHON_METH_FASTCALL 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#ifndef CYTHON_PEP487_INIT_SUBCLASS
#define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
#endif
#if PY_VERSION_HEX < 0x03090000
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
#endif
#undef CYTHON_USE_MODULE_STATE
#define CYTHON_USE_MODULE_STATE 0
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
#undef CYTHON_USE_FREELISTS
#define CYTHON_USE_FREELISTS 0
#elif defined(CYTHON_LIMITED_API)
#ifdef Py_LIMITED_API
#undef __PYX_LIMITED_VERSION_HEX
#define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
#endif
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_LIMITED_API 1
#define CYTHON_COMPILING_IN_GRAAL 0
#define CYTHON_COMPILING_IN_NOGIL 0
#undef CYTHON_CLINE_IN_TRACEBACK
#define CYTHON_CLINE_IN_TRACEBACK 0
#undef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 0
#undef CYTHON_USE_TYPE_SPECS
#define CYTHON_USE_TYPE_SPECS 1
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#undef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#endif
#undef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#undef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 0
#undef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 0
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_GIL
#define CYTHON_FAST_GIL 0
#undef CYTHON_METH_FASTCALL
#define CYTHON_METH_FASTCALL 0
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#ifndef CYTHON_PEP487_INIT_SUBCLASS
#define CYTHON_PEP487_INIT_SUBCLASS 1
#endif
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#undef CYTHON_USE_MODULE_STATE
#define CYTHON_USE_MODULE_STATE 1
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#endif
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 0
#endif
#undef CYTHON_USE_FREELISTS
#define CYTHON_USE_FREELISTS 0
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 0
#define CYTHON_COMPILING_IN_LIMITED_API 0
#define CYTHON_COMPILING_IN_GRAAL 0
#define CYTHON_COMPILING_IN_NOGIL 1
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#ifndef CYTHON_USE_TYPE_SPECS
#define CYTHON_USE_TYPE_SPECS 0
#endif
#undef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 0
#ifndef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#ifndef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 0
#endif
#undef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 0
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#undef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 0
#undef CYTHON_FAST_GIL
#define CYTHON_FAST_GIL 0
#ifndef CYTHON_METH_FASTCALL
#define CYTHON_METH_FASTCALL 1
#endif
#undef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 0
#ifndef CYTHON_PEP487_INIT_SUBCLASS
#define CYTHON_PEP487_INIT_SUBCLASS 1
#endif
#ifndef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
#endif
#ifndef CYTHON_USE_MODULE_STATE
#define CYTHON_USE_MODULE_STATE 0
#endif
#ifndef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 1
#endif
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 1
#endif
#ifndef CYTHON_USE_FREELISTS
#define CYTHON_USE_FREELISTS 0
#endif
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#define CYTHON_COMPILING_IN_LIMITED_API 0
#define CYTHON_COMPILING_IN_GRAAL 0
#define CYTHON_COMPILING_IN_NOGIL 0
#ifndef CYTHON_USE_TYPE_SLOTS
#define CYTHON_USE_TYPE_SLOTS 1
#endif
#ifndef CYTHON_USE_TYPE_SPECS
#define CYTHON_USE_TYPE_SPECS 0
#endif
#ifndef CYTHON_USE_PYTYPE_LOOKUP
#define CYTHON_USE_PYTYPE_LOOKUP 1
#endif
#if PY_MAJOR_VERSION < 3
#undef CYTHON_USE_ASYNC_SLOTS
#define CYTHON_USE_ASYNC_SLOTS 0
#elif !defined(CYTHON_USE_ASYNC_SLOTS)
#define CYTHON_USE_ASYNC_SLOTS 1
#endif
#ifndef CYTHON_USE_PYLONG_INTERNALS
#define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#ifndef CYTHON_USE_PYLIST_INTERNALS
#define CYTHON_USE_PYLIST_INTERNALS 1
#endif
#ifndef CYTHON_USE_UNICODE_INTERNALS
#define CYTHON_USE_UNICODE_INTERNALS 1
#endif
#if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
#undef CYTHON_USE_UNICODE_WRITER
#define CYTHON_USE_UNICODE_WRITER 0
#elif !defined(CYTHON_USE_UNICODE_WRITER)
#define CYTHON_USE_UNICODE_WRITER 1
#endif
#ifndef CYTHON_AVOID_BORROWED_REFS
#define CYTHON_AVOID_BORROWED_REFS 0
#endif
#ifndef CYTHON_ASSUME_SAFE_MACROS
#define CYTHON_ASSUME_SAFE_MACROS 1
#endif
#ifndef CYTHON_UNPACK_METHODS
#define CYTHON_UNPACK_METHODS 1
#endif
#ifndef CYTHON_FAST_THREAD_STATE
#define CYTHON_FAST_THREAD_STATE 1
#endif
#ifndef CYTHON_FAST_GIL
#define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
#endif
#ifndef CYTHON_METH_FASTCALL
#define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
#endif
#ifndef CYTHON_FAST_PYCALL
#define CYTHON_FAST_PYCALL 1
#endif
#ifndef CYTHON_PEP487_INIT_SUBCLASS
#define CYTHON_PEP487_INIT_SUBCLASS 1
#endif
#if PY_VERSION_HEX < 0x03050000
#undef CYTHON_PEP489_MULTI_PHASE_INIT
#define CYTHON_PEP489_MULTI_PHASE_INIT 0
#elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
#define CYTHON_PEP489_MULTI_PHASE_INIT 1
#endif
#ifndef CYTHON_USE_MODULE_STATE
#define CYTHON_USE_MODULE_STATE 0
#endif
#if PY_VERSION_HEX < 0x030400a1
#undef CYTHON_USE_TP_FINALIZE
#define CYTHON_USE_TP_FINALIZE 0
#elif !defined(CYTHON_USE_TP_FINALIZE)
#define CYTHON_USE_TP_FINALIZE 1
#endif
#if PY_VERSION_HEX < 0x030600B1
#undef CYTHON_USE_DICT_VERSIONS
#define CYTHON_USE_DICT_VERSIONS 0
#elif !defined(CYTHON_USE_DICT_VERSIONS)
#define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
#endif
#if PY_VERSION_HEX < 0x030700A3
#undef CYTHON_USE_EXC_INFO_STACK
#define CYTHON_USE_EXC_INFO_STACK 0
#elif !defined(CYTHON_USE_EXC_INFO_STACK)
#define CYTHON_USE_EXC_INFO_STACK 1
#endif
#ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
#define CYTHON_UPDATE_DESCRIPTOR_DOC 1
#endif
#ifndef CYTHON_USE_FREELISTS
#define CYTHON_USE_FREELISTS 1
#endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
#if PY_MAJOR_VERSION < 3
#include "longintrepr.h"
#endif
#undef SHIFT
#undef BASE
#undef MASK
#ifdef SIZEOF_VOID_P
enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
#endif
#endif
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
#define CYTHON_RESTRICT __restrict__
#elif defined(_MSC_VER) && _MSC_VER >= 1400
#define CYTHON_RESTRICT __restrict
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_RESTRICT restrict
#else
#define CYTHON_RESTRICT
#endif
#endif
#ifndef CYTHON_UNUSED
#if defined(__cplusplus)
/* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
* but leads to warnings with -pedantic, since it is a C++17 feature */
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
#if __has_cpp_attribute(maybe_unused)
#define CYTHON_UNUSED [[maybe_unused]]
#endif
#endif
#endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
# define CYTHON_UNUSED __attribute__ ((__unused__))
# else
# define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
# if defined(__cplusplus)
template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
# else
# define CYTHON_UNUSED_VAR(x) (void)(x)
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
# define CYTHON_NCP_UNUSED
# else
# define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
#if defined(__cplusplus) && (\
__cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
#define CYTHON_USE_CPP_STD_MOVE 1
#else
#define CYTHON_USE_CPP_STD_MOVE 0
#endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
#ifndef _MSC_STDINT_H_
#if _MSC_VER < 1300
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
#endif
#if _MSC_VER < 1300
#ifdef _WIN64
typedef unsigned long long __pyx_uintptr_t;
#else
typedef unsigned int __pyx_uintptr_t;
#endif
#else
#ifdef _WIN64
typedef unsigned __int64 __pyx_uintptr_t;
#else
typedef unsigned __int32 __pyx_uintptr_t;
#endif
#endif
#else
#include <stdint.h>
typedef uintptr_t __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
#if defined(__cplusplus)
/* for clang __has_cpp_attribute(fallthrough) is true even before C++17
* but leads to warnings with -pedantic, since it is a C++17 feature */
#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
#if __has_cpp_attribute(fallthrough)
#define CYTHON_FALLTHROUGH [[fallthrough]]
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if __has_cpp_attribute(clang::fallthrough)
#define CYTHON_FALLTHROUGH [[clang::fallthrough]]
#elif __has_cpp_attribute(gnu::fallthrough)
#define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
#endif
#endif
#endif
#ifndef CYTHON_FALLTHROUGH
#if __has_attribute(fallthrough)
#define CYTHON_FALLTHROUGH __attribute__((fallthrough))
#else
#define CYTHON_FALLTHROUGH
#endif
#endif
#if defined(__clang__) && defined(__apple_build_version__)
#if __apple_build_version__ < 7000000
#undef CYTHON_FALLTHROUGH
#define CYTHON_FALLTHROUGH
#endif
#endif
#endif
#ifdef __cplusplus
template <typename T>
struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
#define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
#define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
#define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
#define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
#ifndef CYTHON_INLINE
#if defined(__clang__)
#define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
#elif defined(__GNUC__)
#define CYTHON_INLINE __inline__
#elif defined(_MSC_VER)
#define CYTHON_INLINE __inline
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define CYTHON_INLINE inline
#else
#define CYTHON_INLINE
#endif
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#define __Pyx_DefaultClassType PyClass_Type
#define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
#define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
PyObject *code, PyObject *c, PyObject* n, PyObject *v,
PyObject *fv, PyObject *cell, PyObject* fn,
PyObject *name, int fline, PyObject *lnos) {
PyObject *exception_table = NULL;
PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
#if __PYX_LIMITED_VERSION_HEX < 0x030B0000
PyObject *version_info;
PyObject *py_minor_version = NULL;
#endif
long minor_version = 0;
PyObject *type, *value, *traceback;
PyErr_Fetch(&type, &value, &traceback);
#if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
minor_version = 11;
#else
if (!(version_info = PySys_GetObject("version_info"))) goto end;
if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
minor_version = PyLong_AsLong(py_minor_version);
Py_DECREF(py_minor_version);
if (minor_version == -1 && PyErr_Occurred()) goto end;
#endif
if (!(types_module = PyImport_ImportModule("types"))) goto end;
if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
if (minor_version <= 7) {
(void)p;
result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
c, n, v, fn, name, fline, lnos, fv, cell);
} else if (minor_version <= 10) {
result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
c, n, v, fn, name, fline, lnos, fv, cell);
} else {
if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
}
end:
Py_XDECREF(code_type);
Py_XDECREF(exception_table);
Py_XDECREF(types_module);
if (type) {
PyErr_Restore(type, value, traceback);
}
return result;
}
#ifndef CO_OPTIMIZED
#define CO_OPTIMIZED 0x0001
#endif
#ifndef CO_NEWLOCALS
#define CO_NEWLOCALS 0x0002
#endif
#ifndef CO_VARARGS
#define CO_VARARGS 0x0004
#endif
#ifndef CO_VARKEYWORDS
#define CO_VARKEYWORDS 0x0008
#endif
#ifndef CO_ASYNC_GENERATOR
#define CO_ASYNC_GENERATOR 0x0200
#endif
#ifndef CO_GENERATOR
#define CO_GENERATOR 0x0020
#endif
#ifndef CO_COROUTINE
#define CO_COROUTINE 0x0080
#endif
#elif PY_VERSION_HEX >= 0x030B0000
static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
PyObject *code, PyObject *c, PyObject* n, PyObject *v,
PyObject *fv, PyObject *cell, PyObject* fn,
PyObject *name, int fline, PyObject *lnos) {
PyCodeObject *result;
PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
if (!empty_bytes) return NULL;
result =
#if PY_VERSION_HEX >= 0x030C0000
PyUnstable_Code_NewWithPosOnlyArgs
#else
PyCode_NewWithPosOnlyArgs
#endif
(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
Py_DECREF(empty_bytes);
return result;
}
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
#define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
#define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
#define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
#define __Pyx_Py_Is(x, y) Py_Is(x, y)
#else
#define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
#define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
#define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
#define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
#define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
#define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
#define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
#define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef CO_COROUTINE
#define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
#define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
#define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
#define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
#define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
#define Py_TPFLAGS_MAPPING 0
#endif
#ifndef METH_STACKLESS
#define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
#ifndef METH_FASTCALL
#define METH_FASTCALL 0x80
#endif
typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
Py_ssize_t nargs, PyObject *kwnames);
#else
#if PY_VERSION_HEX >= 0x030d00A4
# define __Pyx_PyCFunctionFast PyCFunctionFast
# define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
#else
# define __Pyx_PyCFunctionFast _PyCFunctionFast
# define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#endif
#if CYTHON_METH_FASTCALL
#define __Pyx_METH_FASTCALL METH_FASTCALL
#define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
#define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
#define __Pyx_METH_FASTCALL METH_VARARGS
#define __Pyx_PyCFunction_FastCall PyCFunction
#define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
#define __pyx_vectorcallfunc vectorcallfunc
#define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
#define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwnames);
#define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
#define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
#define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
#define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
#if CYTHON_COMPILING_IN_LIMITED_API
return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1
#define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
#define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
#define __Pyx_PyCMethod PyCMethod
#endif
#ifndef METH_METHOD
#define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
#define PyObject_Malloc(s) PyMem_Malloc(s)
#define PyObject_Free(p) PyMem_Free(p)
#define PyObject_Realloc(p) PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
#define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
#define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#elif PY_VERSION_HEX >= 0x03060000
#define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
#define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
#define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
void *result;
result = PyModule_GetState(op);
if (!result)
Py_FatalError("Couldn't find the module state");
return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
#define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
*key = PyThread_create_key();
return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
*key = Py_tss_NEEDS_INIT;
return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
PyThread_delete_key(*key);
*key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
#if CYTHON_COMPILING_IN_PYPY
#if PYPY_VERSION_NUM < 0x07030600
#if defined(__cplusplus) && __cplusplus >= 201402L
[[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
#elif defined(__GNUC__) || defined(__clang__)
__attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
#elif defined(_MSC_VER)
__declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
#endif
static CYTHON_INLINE int PyGILState_Check(void) {
return 0;
}
#else // PYPY_VERSION_NUM < 0x07030600
#endif // PYPY_VERSION_NUM < 0x07030600
#else
static CYTHON_INLINE int PyGILState_Check(void) {
PyThreadState * tstate = _PyThreadState_Current;
return tstate && (tstate == PyGILState_GetThisThreadState());
}
#endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n) PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
#else
#define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
if (res == NULL) PyErr_Clear();
return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
return PyDict_GetItem(dict, name);
#else
PyDictEntry *ep;
PyDictObject *mp = (PyDictObject*) dict;
long hash = ((PyStringObject *) name)->ob_shash;
assert(hash != -1);
ep = (mp->ma_lookup)(mp, name, hash);
if (ep == NULL) {
return NULL;
}
return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
#define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
#define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
#else
#define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
#define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
#define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
#define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
PyTypeObject *type = Py_TYPE((PyObject*)obj);\
assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
PyObject_GC_Del(obj);\
Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
#define CYTHON_PEP393_ENABLED 1
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
#define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
#define __Pyx_PyUnicode_DATA(u) ((void*)u)
#define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
#if PY_VERSION_HEX >= 0x030C0000
#define __Pyx_PyUnicode_READY(op) (0)
#else
#define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
0 : _PyUnicode_Ready((PyObject *)(op)))
#endif
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
#if PY_VERSION_HEX >= 0x030C0000
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
#else
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
#else
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#endif
#endif
#else
#define CYTHON_PEP393_ENABLED 0
#define PyUnicode_1BYTE_KIND 1
#define PyUnicode_2BYTE_KIND 2
#define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
#define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
#define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
#define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
#else
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
#if !defined(PyUnicode_DecodeUnicodeEscape)
#define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
#endif
#if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
#undef PyUnicode_Contains
#define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
#endif
#if !defined(PyByteArray_Check)
#define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if !defined(PyObject_Format)
#define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
#else
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
#define PyObject_ASCII(o) PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject
#define PyString_Type PyUnicode_Type
#define PyString_Check PyUnicode_Check
#define PyString_CheckExact PyUnicode_CheckExact
#ifndef PyObject_Unicode
#define PyObject_Unicode PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
#define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
#define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
#define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PySequence_ListKeepNew(obj)\
(likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
#define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
#define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
#define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
#define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
#define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
#define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
#define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
#define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
#define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
#define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
#define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
#define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
#define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
#define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
#else
#define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
#define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
#define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
#define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
#define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
#define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
#define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
#define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
#define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
#define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
PyObject *module = PyImport_AddModule(name);
Py_XINCREF(module);
return module;
}
#endif
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
#define PyInt_Check(op) PyLong_Check(op)
#define PyInt_CheckExact(op) PyLong_CheckExact(op)
#define __Pyx_Py3Int_Check(op) PyLong_Check(op)
#define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
#define PyInt_FromString PyLong_FromString
#define PyInt_FromUnicode PyLong_FromUnicode
#define PyInt_FromLong PyLong_FromLong
#define PyInt_FromSize_t PyLong_FromSize_t
#define PyInt_FromSsize_t PyLong_FromSsize_t
#define PyInt_AsLong PyLong_AsLong
#define PyInt_AS_LONG PyLong_AS_LONG
#define PyInt_AsSsize_t PyLong_AsSsize_t
#define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
#define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#define PyNumber_Int PyNumber_Long
#else
#define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
#define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#endif
#if PY_MAJOR_VERSION >= 3
#define PyBoolObject PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
#ifndef PyUnicode_InternFromString
#define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
#endif
#endif
#if PY_VERSION_HEX < 0x030200A4
typedef long Py_hash_t;
#define __Pyx_PyInt_FromHash_t PyInt_FromLong
#define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
#else
#define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
#define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#else
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#endif
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
typedef struct {
unaryfunc am_await;
unaryfunc am_aiter;
unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#endif
#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
#if !defined(_USE_MATH_DEFINES)
#define _USE_MATH_DEFINES
#endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
float value;
memset(&value, 0xFF, sizeof(value));
return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif
#define __PYX_MARK_ERR_POS(f_index, lineno) \
{ __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
{ __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
#ifdef CYTHON_EXTERN_C
#undef __PYX_EXTERN_C
#define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
#ifdef _MSC_VER
#pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
#else
#warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
#endif
#else
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#endif
#define __PYX_HAVE__aiohttp___http_writer
#define __PYX_HAVE_API__aiohttp___http_writer
/* Early includes */
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */
#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif
typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
(sizeof(type) < sizeof(Py_ssize_t)) ||\
(sizeof(type) > sizeof(Py_ssize_t) &&\
likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX) &&\
(!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
v == (type)PY_SSIZE_T_MIN))) ||\
(sizeof(type) == sizeof(Py_ssize_t) &&\
(is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
v == (type)PY_SSIZE_T_MAX))) )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
#include <cstdlib>
#define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
#define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
#define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
#define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
#define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
#define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
#define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
(likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if CYTHON_USE_PYLONG_INTERNALS
#if PY_VERSION_HEX >= 0x030C00A7
#ifndef _PyLong_SIGN_MASK
#define _PyLong_SIGN_MASK 3
#endif
#ifndef _PyLong_NON_SIZE_BITS
#define _PyLong_NON_SIZE_BITS 3
#endif
#define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
#define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
#define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
#define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
#define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
#define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
#define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
#define __Pyx_PyLong_SignedDigitCount(x)\
((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
#if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
#define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
#define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
#else
#define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
#define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
#endif
typedef Py_ssize_t __Pyx_compact_pylong;
typedef size_t __Pyx_compact_upylong;
#else
#define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
#define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
#define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
#define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
#define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
#define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
#define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
#define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
#define __Pyx_PyLong_CompactValue(x)\
((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
typedef sdigit __Pyx_compact_pylong;
typedef digit __Pyx_compact_upylong;
#endif
#if PY_VERSION_HEX >= 0x030C00A5
#define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
#else
#define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
#endif
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
PyObject* ascii_chars_u = NULL;
PyObject* ascii_chars_b = NULL;
const char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
if (strcmp(default_encoding_c, "ascii") == 0) {
__Pyx_sys_getdefaultencoding_not_ascii = 0;
} else {
char ascii_chars[128];
int c;
for (c = 0; c < 128; c++) {
ascii_chars[c] = (char) c;
}
__Pyx_sys_getdefaultencoding_not_ascii = 1;
ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
if (!ascii_chars_u) goto bad;
ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
PyErr_Format(
PyExc_ValueError,
"This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
default_encoding_c);
goto bad;
}
Py_DECREF(ascii_chars_u);
Py_DECREF(ascii_chars_b);
}
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
Py_XDECREF(ascii_chars_u);
Py_XDECREF(ascii_chars_b);
return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#include <string.h>
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
PyObject* sys;
PyObject* default_encoding = NULL;
char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
if (!default_encoding_c) goto bad;
__PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
Py_DECREF(default_encoding);
return 0;
bad:
Py_XDECREF(default_encoding);
return -1;
}
#endif
#endif
/* Test for GCC > 2.95 */
#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
#define likely(x) (x)
#define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;
/* #### Code section: filename_table ### */
static const char *__pyx_f[] = {
"aiohttp/_http_writer.pyx",
"type.pxd",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
#define __PYX_FORCE_INIT_THREADS 0
#endif
/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */
/*--- Type declarations ---*/
struct __pyx_t_7aiohttp_12_http_writer_Writer;
/* "aiohttp/_http_writer.pyx":18
* # ----------------- writer ---------------------------
*
* cdef struct Writer: # <<<<<<<<<<<<<<
* char *buf
* Py_ssize_t size
*/
struct __pyx_t_7aiohttp_12_http_writer_Writer {
char *buf;
Py_ssize_t size;
Py_ssize_t pos;
};
/* #### Code section: utility_code_proto ### */
/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
typedef struct {
void (*INCREF)(void*, PyObject*, Py_ssize_t);
void (*DECREF)(void*, PyObject*, Py_ssize_t);
void (*GOTREF)(void*, PyObject*, Py_ssize_t);
void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
void* (*SetupContext)(const char*, Py_ssize_t, const char*);
void (*FinishContext)(void**);
} __Pyx_RefNannyAPIStruct;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
if (acquire_gil) {\
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
PyGILState_Release(__pyx_gilstate_save);\
} else {\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
}
#define __Pyx_RefNannyFinishContextNogil() {\
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
__Pyx_RefNannyFinishContext();\
PyGILState_Release(__pyx_gilstate_save);\
}
#else
#define __Pyx_RefNannySetupContext(name, acquire_gil)\
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
#define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
#define __Pyx_RefNannyFinishContextNogil() {\
PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
__Pyx_RefNannyFinishContext();\
PyGILState_Release(__pyx_gilstate_save);\
}
#define __Pyx_RefNannyFinishContext()\
__Pyx_RefNanny->FinishContext(&__pyx_refnanny)
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
#define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
#define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
#define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
#define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
#define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
#define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
#define __Pyx_RefNannyDeclarations
#define __Pyx_RefNannySetupContext(name, acquire_gil)
#define __Pyx_RefNannyFinishContextNogil()
#define __Pyx_RefNannyFinishContext()
#define __Pyx_INCREF(r) Py_INCREF(r)
#define __Pyx_DECREF(r) Py_DECREF(r)
#define __Pyx_GOTREF(r)
#define __Pyx_GIVEREF(r)
#define __Pyx_XINCREF(r) Py_XINCREF(r)
#define __Pyx_XDECREF(r) Py_XDECREF(r)
#define __Pyx_XGOTREF(r)
#define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; Py_XDECREF(tmp);\
} while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_XDECREF(tmp);\
} while (0)
#define __Pyx_DECREF_SET(r, v) do {\
PyObject *tmp = (PyObject *) r;\
r = v; __Pyx_DECREF(tmp);\
} while (0)
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
#endif
/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
#endif
/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
#endif
/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
/* unicode_iter.proto */
static CYTHON_INLINE int __Pyx_init_unicode_iteration(
PyObject* ustring, Py_ssize_t *length, void** data, int *kind);
/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
__Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
(sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
#include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
#ifndef Py_BUILD_CORE
#define Py_BUILD_CORE 1
#endif
#include "internal/pycore_frame.h"
#endif
#define __Pxy_PyFrame_Initialize_Offsets()
#define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
#else
static size_t __pyx_pyframe_localsplus_offset = 0;
#include "frameobject.h"
#define __Pxy_PyFrame_Initialize_Offsets()\
((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
(void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
#define __Pyx_PyFrame_GetLocalsplus(frame)\
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif
/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif
/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif
/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
/* PyObject_Str.proto */
#define __Pyx_PyObject_Str(obj)\
(likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
/* PyUnicodeContains.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) {
int result = PyUnicode_Contains(text, substring);
return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}
/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif
/* IncludeStringH.proto */
#include <string.h>
/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
#define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#else
#define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
#endif
#if CYTHON_AVOID_BORROWED_REFS
#define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
#define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
#else
#define __Pyx_Arg_NewRef_VARARGS(arg) arg
#define __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
#define __Pyx_Arg_FASTCALL(args, i) args[i]
#define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
#define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
#else
#define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
#endif
#define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
to have the same reference counting */
#define __Pyx_Arg_XDECREF_FASTCALL(arg)
#else
#define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
#define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
#define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
#define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
#define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
#define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
#define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif
/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
PyObject **argnames[],
PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
const char* function_name);
/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
__Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif
/* ReRaiseException.proto */
static CYTHON_INLINE void __Pyx_ReraiseException(void);
/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);
/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
(likely(is_tuple || PyTuple_Check(tuple)) ?\
(likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
__Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
(__Pyx_UnpackTupleError(tuple, 2), -1)) :\
__Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);
/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif
/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif
/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
#endif
/* TypeImport.proto */
#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_10
#define __PYX_HAVE_RT_ImportType_proto_3_0_10
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#endif
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_10(s) alignof(s)
#else
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_10(s) sizeof(void*)
#endif
enum __Pyx_ImportType_CheckSize_3_0_10 {
__Pyx_ImportType_CheckSize_Error_3_0_10 = 0,
__Pyx_ImportType_CheckSize_Warn_3_0_10 = 1,
__Pyx_ImportType_CheckSize_Ignore_3_0_10 = 2
};
static PyTypeObject *__Pyx_ImportType_3_0_10(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_10 check_size);
#endif
/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
(version_var) = __PYX_GET_DICT_VERSION(dict);\
(cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
static PY_UINT64_T __pyx_dict_version = 0;\
static PyObject *__pyx_dict_cached_value = NULL;\
if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
(VAR) = __pyx_dict_cached_value;\
} else {\
(VAR) = __pyx_dict_cached_value = (LOOKUP);\
__pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
}\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict) (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
#endif
/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name) do {\
static PY_UINT64_T __pyx_dict_version = 0;\
static PyObject *__pyx_dict_cached_value = NULL;\
(var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
(likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
__Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
PY_UINT64_T __pyx_dict_version;\
PyObject *__pyx_dict_cached_value;\
(var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif
/* IncludeStructmemberH.proto */
#include <structmember.h>
/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif
/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);
/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif
/* PyMethodNew.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
CYTHON_UNUSED_VAR(typ);
if (!self)
return __Pyx_NewRef(func);
typesModule = PyImport_ImportModule("types");
if (!typesModule) return NULL;
methodType = PyObject_GetAttrString(typesModule, "MethodType");
Py_DECREF(typesModule);
if (!methodType) return NULL;
result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
Py_DECREF(methodType);
return result;
}
#elif PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
CYTHON_UNUSED_VAR(typ);
if (!self)
return __Pyx_NewRef(func);
return PyMethod_New(func, self);
}
#else
#define __Pyx_PyMethod_New PyMethod_New
#endif
/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif
/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
#define __Pyx_CYFUNCTION_CCLASS 0x04
#define __Pyx_CYFUNCTION_COROUTINE 0x08
#define __Pyx_CyFunction_GetClosure(f)\
(((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_GetClassObj(f)\
(((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
#define __Pyx_CyFunction_GetClassObj(f)\
((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
__Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
PyObject_HEAD
PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
PyCFunctionObject func;
#else
PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
__pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
PyObject *func_weakreflist;
#endif
PyObject *func_dict;
PyObject *func_name;
PyObject *func_qualname;
PyObject *func_doc;
PyObject *func_globals;
PyObject *func_code;
PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
PyObject *func_classobj;
#endif
void *defaults;
int defaults_pyobjects;
size_t defaults_size;
int flags;
PyObject *defaults_tuple;
PyObject *defaults_kwdict;
PyObject *(*defaults_getter)(PyObject *);
PyObject *func_annotations;
PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
int flags, PyObject* qualname,
PyObject *closure,
PyObject *module, PyObject *globals,
PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
size_t size,
int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif
/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
int flags, PyObject* qualname,
PyObject *closure,
PyObject *module, PyObject *globals,
PyObject* code);
/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif
/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
PyCodeObject* code_object;
int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
int count;
int max_count;
__Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif
/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename);
/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif
/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif
/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
/* CheckBinaryVersion.proto */
static unsigned long __Pyx_get_runtime_version(void);
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
/* #### Code section: module_declarations ### */
/* Module declarations from "libc.string" */
/* Module declarations from "libc.stdio" */
/* Module declarations from "__builtin__" */
/* Module declarations from "cpython.type" */
/* Module declarations from "cpython" */
/* Module declarations from "cpython.object" */
/* Module declarations from "cpython.bytes" */
/* Module declarations from "cpython.exc" */
/* Module declarations from "cpython.mem" */
/* Module declarations from "libc.stdint" */
/* Module declarations from "aiohttp._http_writer" */
static char __pyx_v_7aiohttp_12_http_writer_BUFFER[0x4000];
static PyObject *__pyx_v_7aiohttp_12_http_writer__istr = 0;
static CYTHON_INLINE void __pyx_f_7aiohttp_12_http_writer__init_writer(struct __pyx_t_7aiohttp_12_http_writer_Writer *); /*proto*/
static CYTHON_INLINE void __pyx_f_7aiohttp_12_http_writer__release_writer(struct __pyx_t_7aiohttp_12_http_writer_Writer *); /*proto*/
static CYTHON_INLINE int __pyx_f_7aiohttp_12_http_writer__write_byte(struct __pyx_t_7aiohttp_12_http_writer_Writer *, uint8_t); /*proto*/
static CYTHON_INLINE int __pyx_f_7aiohttp_12_http_writer__write_utf8(struct __pyx_t_7aiohttp_12_http_writer_Writer *, Py_UCS4); /*proto*/
static CYTHON_INLINE int __pyx_f_7aiohttp_12_http_writer__write_str(struct __pyx_t_7aiohttp_12_http_writer_Writer *, PyObject *); /*proto*/
static PyObject *__pyx_f_7aiohttp_12_http_writer_to_str(PyObject *); /*proto*/
static void __pyx_f_7aiohttp_12_http_writer__safe_header(PyObject *); /*proto*/
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "aiohttp._http_writer"
extern int __pyx_module_is_main_aiohttp___http_writer;
int __pyx_module_is_main_aiohttp___http_writer = 0;
/* Implementation of "aiohttp._http_writer" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "\r";
static const char __pyx_k__2[] = "\n";
static const char __pyx_k__4[] = ".";
static const char __pyx_k__7[] = "?";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_ret[] = "ret";
static const char __pyx_k_val[] = "val";
static const char __pyx_k_istr[] = "istr";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_writer[] = "writer";
static const char __pyx_k_headers[] = "headers";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_multidict[] = "multidict";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_status_line[] = "status_line";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_serialize_headers[] = "_serialize_headers";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_aiohttp__http_writer[] = "aiohttp._http_writer";
static const char __pyx_k_aiohttp__http_writer_pyx[] = "aiohttp/_http_writer.pyx";
static const char __pyx_k_Cannot_serialize_non_str_key_r[] = "Cannot serialize non-str key {!r}";
static const char __pyx_k_Newline_or_carriage_return_chara[] = "Newline or carriage return character detected in HTTP status message or header. This is a potential security issue.";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7aiohttp_12_http_writer__serialize_headers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_status_line, PyObject *__pyx_v_headers); /* proto */
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
PyObject *__pyx_d;
PyObject *__pyx_b;
PyObject *__pyx_cython_runtime;
PyObject *__pyx_empty_tuple;
PyObject *__pyx_empty_bytes;
PyObject *__pyx_empty_unicode;
#ifdef __Pyx_CyFunction_USED
PyTypeObject *__pyx_CyFunctionType;
#endif
#ifdef __Pyx_FusedFunction_USED
PyTypeObject *__pyx_FusedFunctionType;
#endif
#ifdef __Pyx_Generator_USED
PyTypeObject *__pyx_GeneratorType;
#endif
#ifdef __Pyx_IterableCoroutine_USED
PyTypeObject *__pyx_IterableCoroutineType;
#endif
#ifdef __Pyx_Coroutine_USED
PyTypeObject *__pyx_CoroutineAwaitType;
#endif
#ifdef __Pyx_Coroutine_USED
PyTypeObject *__pyx_CoroutineType;
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
PyTypeObject *__pyx_ptype_7cpython_4type_type;
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
PyObject *__pyx_kp_u_;
PyObject *__pyx_kp_u_Cannot_serialize_non_str_key_r;
PyObject *__pyx_kp_u_Newline_or_carriage_return_chara;
PyObject *__pyx_n_s_TypeError;
PyObject *__pyx_n_s_ValueError;
PyObject *__pyx_kp_u__2;
PyObject *__pyx_kp_u__4;
PyObject *__pyx_n_s__7;
PyObject *__pyx_n_s_aiohttp__http_writer;
PyObject *__pyx_kp_s_aiohttp__http_writer_pyx;
PyObject *__pyx_n_s_asyncio_coroutines;
PyObject *__pyx_n_s_cline_in_traceback;
PyObject *__pyx_n_s_format;
PyObject *__pyx_n_s_headers;
PyObject *__pyx_n_s_import;
PyObject *__pyx_n_s_is_coroutine;
PyObject *__pyx_n_s_istr;
PyObject *__pyx_n_s_items;
PyObject *__pyx_n_s_key;
PyObject *__pyx_n_s_main;
PyObject *__pyx_n_s_multidict;
PyObject *__pyx_n_s_name;
PyObject *__pyx_n_s_ret;
PyObject *__pyx_n_s_serialize_headers;
PyObject *__pyx_n_s_status_line;
PyObject *__pyx_n_s_test;
PyObject *__pyx_n_s_val;
PyObject *__pyx_n_s_writer;
PyObject *__pyx_tuple__3;
PyObject *__pyx_tuple__5;
PyObject *__pyx_codeobj__6;
} __pyx_mstate;
#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif
#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
{};
#else
{0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
__pyx_mstate *clear_module_state = __pyx_mstate(m);
if (!clear_module_state) return 0;
Py_CLEAR(clear_module_state->__pyx_d);
Py_CLEAR(clear_module_state->__pyx_b);
Py_CLEAR(clear_module_state->__pyx_cython_runtime);
Py_CLEAR(clear_module_state->__pyx_empty_tuple);
Py_CLEAR(clear_module_state->__pyx_empty_bytes);
Py_CLEAR(clear_module_state->__pyx_empty_unicode);
#ifdef __Pyx_CyFunction_USED
Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
#endif
#ifdef __Pyx_FusedFunction_USED
Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
#endif
Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
Py_CLEAR(clear_module_state->__pyx_kp_u_);
Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_serialize_non_str_key_r);
Py_CLEAR(clear_module_state->__pyx_kp_u_Newline_or_carriage_return_chara);
Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
Py_CLEAR(clear_module_state->__pyx_kp_u__2);
Py_CLEAR(clear_module_state->__pyx_kp_u__4);
Py_CLEAR(clear_module_state->__pyx_n_s__7);
Py_CLEAR(clear_module_state->__pyx_n_s_aiohttp__http_writer);
Py_CLEAR(clear_module_state->__pyx_kp_s_aiohttp__http_writer_pyx);
Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
Py_CLEAR(clear_module_state->__pyx_n_s_format);
Py_CLEAR(clear_module_state->__pyx_n_s_headers);
Py_CLEAR(clear_module_state->__pyx_n_s_import);
Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
Py_CLEAR(clear_module_state->__pyx_n_s_istr);
Py_CLEAR(clear_module_state->__pyx_n_s_items);
Py_CLEAR(clear_module_state->__pyx_n_s_key);
Py_CLEAR(clear_module_state->__pyx_n_s_main);
Py_CLEAR(clear_module_state->__pyx_n_s_multidict);
Py_CLEAR(clear_module_state->__pyx_n_s_name);
Py_CLEAR(clear_module_state->__pyx_n_s_ret);
Py_CLEAR(clear_module_state->__pyx_n_s_serialize_headers);
Py_CLEAR(clear_module_state->__pyx_n_s_status_line);
Py_CLEAR(clear_module_state->__pyx_n_s_test);
Py_CLEAR(clear_module_state->__pyx_n_s_val);
Py_CLEAR(clear_module_state->__pyx_n_s_writer);
Py_CLEAR(clear_module_state->__pyx_tuple__3);
Py_CLEAR(clear_module_state->__pyx_tuple__5);
Py_CLEAR(clear_module_state->__pyx_codeobj__6);
return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
__pyx_mstate *traverse_module_state = __pyx_mstate(m);
if (!traverse_module_state) return 0;
Py_VISIT(traverse_module_state->__pyx_d);
Py_VISIT(traverse_module_state->__pyx_b);
Py_VISIT(traverse_module_state->__pyx_cython_runtime);
Py_VISIT(traverse_module_state->__pyx_empty_tuple);
Py_VISIT(traverse_module_state->__pyx_empty_bytes);
Py_VISIT(traverse_module_state->__pyx_empty_unicode);
#ifdef __Pyx_CyFunction_USED
Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
#endif
#ifdef __Pyx_FusedFunction_USED
Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
#endif
Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
Py_VISIT(traverse_module_state->__pyx_kp_u_);
Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_serialize_non_str_key_r);
Py_VISIT(traverse_module_state->__pyx_kp_u_Newline_or_carriage_return_chara);
Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
Py_VISIT(traverse_module_state->__pyx_kp_u__2);
Py_VISIT(traverse_module_state->__pyx_kp_u__4);
Py_VISIT(traverse_module_state->__pyx_n_s__7);
Py_VISIT(traverse_module_state->__pyx_n_s_aiohttp__http_writer);
Py_VISIT(traverse_module_state->__pyx_kp_s_aiohttp__http_writer_pyx);
Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
Py_VISIT(traverse_module_state->__pyx_n_s_format);
Py_VISIT(traverse_module_state->__pyx_n_s_headers);
Py_VISIT(traverse_module_state->__pyx_n_s_import);
Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
Py_VISIT(traverse_module_state->__pyx_n_s_istr);
Py_VISIT(traverse_module_state->__pyx_n_s_items);
Py_VISIT(traverse_module_state->__pyx_n_s_key);
Py_VISIT(traverse_module_state->__pyx_n_s_main);
Py_VISIT(traverse_module_state->__pyx_n_s_multidict);
Py_VISIT(traverse_module_state->__pyx_n_s_name);
Py_VISIT(traverse_module_state->__pyx_n_s_ret);
Py_VISIT(traverse_module_state->__pyx_n_s_serialize_headers);
Py_VISIT(traverse_module_state->__pyx_n_s_status_line);
Py_VISIT(traverse_module_state->__pyx_n_s_test);
Py_VISIT(traverse_module_state->__pyx_n_s_val);
Py_VISIT(traverse_module_state->__pyx_n_s_writer);
Py_VISIT(traverse_module_state->__pyx_tuple__3);
Py_VISIT(traverse_module_state->__pyx_tuple__5);
Py_VISIT(traverse_module_state->__pyx_codeobj__6);
return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#if CYTHON_USE_MODULE_STATE
#endif
#define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
#define __pyx_kp_u_Cannot_serialize_non_str_key_r __pyx_mstate_global->__pyx_kp_u_Cannot_serialize_non_str_key_r
#define __pyx_kp_u_Newline_or_carriage_return_chara __pyx_mstate_global->__pyx_kp_u_Newline_or_carriage_return_chara
#define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
#define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4
#define __pyx_n_s__7 __pyx_mstate_global->__pyx_n_s__7
#define __pyx_n_s_aiohttp__http_writer __pyx_mstate_global->__pyx_n_s_aiohttp__http_writer
#define __pyx_kp_s_aiohttp__http_writer_pyx __pyx_mstate_global->__pyx_kp_s_aiohttp__http_writer_pyx
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
#define __pyx_n_s_headers __pyx_mstate_global->__pyx_n_s_headers
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_n_s_istr __pyx_mstate_global->__pyx_n_s_istr
#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_multidict __pyx_mstate_global->__pyx_n_s_multidict
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_ret __pyx_mstate_global->__pyx_n_s_ret
#define __pyx_n_s_serialize_headers __pyx_mstate_global->__pyx_n_s_serialize_headers
#define __pyx_n_s_status_line __pyx_mstate_global->__pyx_n_s_status_line
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_val __pyx_mstate_global->__pyx_n_s_val
#define __pyx_n_s_writer __pyx_mstate_global->__pyx_n_s_writer
#define __pyx_tuple__3 __pyx_mstate_global->__pyx_tuple__3
#define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
#define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
/* #### Code section: module_code ### */
/* "aiohttp/_http_writer.pyx":24
*
*
* cdef inline void _init_writer(Writer* writer): # <<<<<<<<<<<<<<
* writer.buf = &BUFFER[0]
* writer.size = BUF_SIZE
*/
static CYTHON_INLINE void __pyx_f_7aiohttp_12_http_writer__init_writer(struct __pyx_t_7aiohttp_12_http_writer_Writer *__pyx_v_writer) {
/* "aiohttp/_http_writer.pyx":25
*
* cdef inline void _init_writer(Writer* writer):
* writer.buf = &BUFFER[0] # <<<<<<<<<<<<<<
* writer.size = BUF_SIZE
* writer.pos = 0
*/
__pyx_v_writer->buf = (&(__pyx_v_7aiohttp_12_http_writer_BUFFER[0]));
/* "aiohttp/_http_writer.pyx":26
* cdef inline void _init_writer(Writer* writer):
* writer.buf = &BUFFER[0]
* writer.size = BUF_SIZE # <<<<<<<<<<<<<<
* writer.pos = 0
*
*/
__pyx_v_writer->size = 0x4000;
/* "aiohttp/_http_writer.pyx":27
* writer.buf = &BUFFER[0]
* writer.size = BUF_SIZE
* writer.pos = 0 # <<<<<<<<<<<<<<
*
*
*/
__pyx_v_writer->pos = 0;
/* "aiohttp/_http_writer.pyx":24
*
*
* cdef inline void _init_writer(Writer* writer): # <<<<<<<<<<<<<<
* writer.buf = &BUFFER[0]
* writer.size = BUF_SIZE
*/
/* function exit code */
}
/* "aiohttp/_http_writer.pyx":30
*
*
* cdef inline void _release_writer(Writer* writer): # <<<<<<<<<<<<<<
* if writer.buf != BUFFER:
* PyMem_Free(writer.buf)
*/
static CYTHON_INLINE void __pyx_f_7aiohttp_12_http_writer__release_writer(struct __pyx_t_7aiohttp_12_http_writer_Writer *__pyx_v_writer) {
int __pyx_t_1;
/* "aiohttp/_http_writer.pyx":31
*
* cdef inline void _release_writer(Writer* writer):
* if writer.buf != BUFFER: # <<<<<<<<<<<<<<
* PyMem_Free(writer.buf)
*
*/
__pyx_t_1 = (__pyx_v_writer->buf != __pyx_v_7aiohttp_12_http_writer_BUFFER);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":32
* cdef inline void _release_writer(Writer* writer):
* if writer.buf != BUFFER:
* PyMem_Free(writer.buf) # <<<<<<<<<<<<<<
*
*
*/
PyMem_Free(__pyx_v_writer->buf);
/* "aiohttp/_http_writer.pyx":31
*
* cdef inline void _release_writer(Writer* writer):
* if writer.buf != BUFFER: # <<<<<<<<<<<<<<
* PyMem_Free(writer.buf)
*
*/
}
/* "aiohttp/_http_writer.pyx":30
*
*
* cdef inline void _release_writer(Writer* writer): # <<<<<<<<<<<<<<
* if writer.buf != BUFFER:
* PyMem_Free(writer.buf)
*/
/* function exit code */
}
/* "aiohttp/_http_writer.pyx":35
*
*
* cdef inline int _write_byte(Writer* writer, uint8_t ch): # <<<<<<<<<<<<<<
* cdef char * buf
* cdef Py_ssize_t size
*/
static CYTHON_INLINE int __pyx_f_7aiohttp_12_http_writer__write_byte(struct __pyx_t_7aiohttp_12_http_writer_Writer *__pyx_v_writer, uint8_t __pyx_v_ch) {
char *__pyx_v_buf;
Py_ssize_t __pyx_v_size;
int __pyx_r;
int __pyx_t_1;
PyObject *__pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* "aiohttp/_http_writer.pyx":39
* cdef Py_ssize_t size
*
* if writer.pos == writer.size: # <<<<<<<<<<<<<<
* # reallocate
* size = writer.size + BUF_SIZE
*/
__pyx_t_1 = (__pyx_v_writer->pos == __pyx_v_writer->size);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":41
* if writer.pos == writer.size:
* # reallocate
* size = writer.size + BUF_SIZE # <<<<<<<<<<<<<<
* if writer.buf == BUFFER:
* buf = <char*>PyMem_Malloc(size)
*/
__pyx_v_size = (__pyx_v_writer->size + 0x4000);
/* "aiohttp/_http_writer.pyx":42
* # reallocate
* size = writer.size + BUF_SIZE
* if writer.buf == BUFFER: # <<<<<<<<<<<<<<
* buf = <char*>PyMem_Malloc(size)
* if buf == NULL:
*/
__pyx_t_1 = (__pyx_v_writer->buf == __pyx_v_7aiohttp_12_http_writer_BUFFER);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":43
* size = writer.size + BUF_SIZE
* if writer.buf == BUFFER:
* buf = <char*>PyMem_Malloc(size) # <<<<<<<<<<<<<<
* if buf == NULL:
* PyErr_NoMemory()
*/
__pyx_v_buf = ((char *)PyMem_Malloc(__pyx_v_size));
/* "aiohttp/_http_writer.pyx":44
* if writer.buf == BUFFER:
* buf = <char*>PyMem_Malloc(size)
* if buf == NULL: # <<<<<<<<<<<<<<
* PyErr_NoMemory()
* return -1
*/
__pyx_t_1 = (__pyx_v_buf == NULL);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":45
* buf = <char*>PyMem_Malloc(size)
* if buf == NULL:
* PyErr_NoMemory() # <<<<<<<<<<<<<<
* return -1
* memcpy(buf, writer.buf, writer.size)
*/
__pyx_t_2 = PyErr_NoMemory(); if (unlikely(__pyx_t_2 == ((PyObject *)NULL))) __PYX_ERR(0, 45, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":46
* if buf == NULL:
* PyErr_NoMemory()
* return -1 # <<<<<<<<<<<<<<
* memcpy(buf, writer.buf, writer.size)
* else:
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":44
* if writer.buf == BUFFER:
* buf = <char*>PyMem_Malloc(size)
* if buf == NULL: # <<<<<<<<<<<<<<
* PyErr_NoMemory()
* return -1
*/
}
/* "aiohttp/_http_writer.pyx":47
* PyErr_NoMemory()
* return -1
* memcpy(buf, writer.buf, writer.size) # <<<<<<<<<<<<<<
* else:
* buf = <char*>PyMem_Realloc(writer.buf, size)
*/
(void)(memcpy(__pyx_v_buf, __pyx_v_writer->buf, __pyx_v_writer->size));
/* "aiohttp/_http_writer.pyx":42
* # reallocate
* size = writer.size + BUF_SIZE
* if writer.buf == BUFFER: # <<<<<<<<<<<<<<
* buf = <char*>PyMem_Malloc(size)
* if buf == NULL:
*/
goto __pyx_L4;
}
/* "aiohttp/_http_writer.pyx":49
* memcpy(buf, writer.buf, writer.size)
* else:
* buf = <char*>PyMem_Realloc(writer.buf, size) # <<<<<<<<<<<<<<
* if buf == NULL:
* PyErr_NoMemory()
*/
/*else*/ {
__pyx_v_buf = ((char *)PyMem_Realloc(__pyx_v_writer->buf, __pyx_v_size));
/* "aiohttp/_http_writer.pyx":50
* else:
* buf = <char*>PyMem_Realloc(writer.buf, size)
* if buf == NULL: # <<<<<<<<<<<<<<
* PyErr_NoMemory()
* return -1
*/
__pyx_t_1 = (__pyx_v_buf == NULL);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":51
* buf = <char*>PyMem_Realloc(writer.buf, size)
* if buf == NULL:
* PyErr_NoMemory() # <<<<<<<<<<<<<<
* return -1
* writer.buf = buf
*/
__pyx_t_2 = PyErr_NoMemory(); if (unlikely(__pyx_t_2 == ((PyObject *)NULL))) __PYX_ERR(0, 51, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":52
* if buf == NULL:
* PyErr_NoMemory()
* return -1 # <<<<<<<<<<<<<<
* writer.buf = buf
* writer.size = size
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":50
* else:
* buf = <char*>PyMem_Realloc(writer.buf, size)
* if buf == NULL: # <<<<<<<<<<<<<<
* PyErr_NoMemory()
* return -1
*/
}
}
__pyx_L4:;
/* "aiohttp/_http_writer.pyx":53
* PyErr_NoMemory()
* return -1
* writer.buf = buf # <<<<<<<<<<<<<<
* writer.size = size
* writer.buf[writer.pos] = <char>ch
*/
__pyx_v_writer->buf = __pyx_v_buf;
/* "aiohttp/_http_writer.pyx":54
* return -1
* writer.buf = buf
* writer.size = size # <<<<<<<<<<<<<<
* writer.buf[writer.pos] = <char>ch
* writer.pos += 1
*/
__pyx_v_writer->size = __pyx_v_size;
/* "aiohttp/_http_writer.pyx":39
* cdef Py_ssize_t size
*
* if writer.pos == writer.size: # <<<<<<<<<<<<<<
* # reallocate
* size = writer.size + BUF_SIZE
*/
}
/* "aiohttp/_http_writer.pyx":55
* writer.buf = buf
* writer.size = size
* writer.buf[writer.pos] = <char>ch # <<<<<<<<<<<<<<
* writer.pos += 1
* return 0
*/
(__pyx_v_writer->buf[__pyx_v_writer->pos]) = ((char)__pyx_v_ch);
/* "aiohttp/_http_writer.pyx":56
* writer.size = size
* writer.buf[writer.pos] = <char>ch
* writer.pos += 1 # <<<<<<<<<<<<<<
* return 0
*
*/
__pyx_v_writer->pos = (__pyx_v_writer->pos + 1);
/* "aiohttp/_http_writer.pyx":57
* writer.buf[writer.pos] = <char>ch
* writer.pos += 1
* return 0 # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = 0;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":35
*
*
* cdef inline int _write_byte(Writer* writer, uint8_t ch): # <<<<<<<<<<<<<<
* cdef char * buf
* cdef Py_ssize_t size
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("aiohttp._http_writer._write_byte", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
}
/* "aiohttp/_http_writer.pyx":60
*
*
* cdef inline int _write_utf8(Writer* writer, Py_UCS4 symbol): # <<<<<<<<<<<<<<
* cdef uint64_t utf = <uint64_t> symbol
*
*/
static CYTHON_INLINE int __pyx_f_7aiohttp_12_http_writer__write_utf8(struct __pyx_t_7aiohttp_12_http_writer_Writer *__pyx_v_writer, Py_UCS4 __pyx_v_symbol) {
uint64_t __pyx_v_utf;
int __pyx_r;
int __pyx_t_1;
int __pyx_t_2;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
/* "aiohttp/_http_writer.pyx":61
*
* cdef inline int _write_utf8(Writer* writer, Py_UCS4 symbol):
* cdef uint64_t utf = <uint64_t> symbol # <<<<<<<<<<<<<<
*
* if utf < 0x80:
*/
__pyx_v_utf = ((uint64_t)__pyx_v_symbol);
/* "aiohttp/_http_writer.pyx":63
* cdef uint64_t utf = <uint64_t> symbol
*
* if utf < 0x80: # <<<<<<<<<<<<<<
* return _write_byte(writer, <uint8_t>utf)
* elif utf < 0x800:
*/
__pyx_t_1 = (__pyx_v_utf < 0x80);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":64
*
* if utf < 0x80:
* return _write_byte(writer, <uint8_t>utf) # <<<<<<<<<<<<<<
* elif utf < 0x800:
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0:
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)__pyx_v_utf)); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 64, __pyx_L1_error)
__pyx_r = __pyx_t_2;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":63
* cdef uint64_t utf = <uint64_t> symbol
*
* if utf < 0x80: # <<<<<<<<<<<<<<
* return _write_byte(writer, <uint8_t>utf)
* elif utf < 0x800:
*/
}
/* "aiohttp/_http_writer.pyx":65
* if utf < 0x80:
* return _write_byte(writer, <uint8_t>utf)
* elif utf < 0x800: # <<<<<<<<<<<<<<
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0:
* return -1
*/
__pyx_t_1 = (__pyx_v_utf < 0x800);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":66
* return _write_byte(writer, <uint8_t>utf)
* elif utf < 0x800:
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0: # <<<<<<<<<<<<<<
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0xc0 | (__pyx_v_utf >> 6)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 66, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_2 < 0);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":67
* elif utf < 0x800:
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0:
* return -1 # <<<<<<<<<<<<<<
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
* elif 0xD800 <= utf <= 0xDFFF:
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":66
* return _write_byte(writer, <uint8_t>utf)
* elif utf < 0x800:
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0: # <<<<<<<<<<<<<<
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
*/
}
/* "aiohttp/_http_writer.pyx":68
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0:
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f))) # <<<<<<<<<<<<<<
* elif 0xD800 <= utf <= 0xDFFF:
* # surogate pair, ignored
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0x80 | (__pyx_v_utf & 0x3f)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 68, __pyx_L1_error)
__pyx_r = __pyx_t_2;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":65
* if utf < 0x80:
* return _write_byte(writer, <uint8_t>utf)
* elif utf < 0x800: # <<<<<<<<<<<<<<
* if _write_byte(writer, <uint8_t>(0xc0 | (utf >> 6))) < 0:
* return -1
*/
}
/* "aiohttp/_http_writer.pyx":69
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
* elif 0xD800 <= utf <= 0xDFFF: # <<<<<<<<<<<<<<
* # surogate pair, ignored
* return 0
*/
__pyx_t_1 = (0xD800 <= __pyx_v_utf);
if (__pyx_t_1) {
__pyx_t_1 = (__pyx_v_utf <= 0xDFFF);
}
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":71
* elif 0xD800 <= utf <= 0xDFFF:
* # surogate pair, ignored
* return 0 # <<<<<<<<<<<<<<
* elif utf < 0x10000:
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0:
*/
__pyx_r = 0;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":69
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
* elif 0xD800 <= utf <= 0xDFFF: # <<<<<<<<<<<<<<
* # surogate pair, ignored
* return 0
*/
}
/* "aiohttp/_http_writer.pyx":72
* # surogate pair, ignored
* return 0
* elif utf < 0x10000: # <<<<<<<<<<<<<<
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0:
* return -1
*/
__pyx_t_1 = (__pyx_v_utf < 0x10000);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":73
* return 0
* elif utf < 0x10000:
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0: # <<<<<<<<<<<<<<
* return -1
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0xe0 | (__pyx_v_utf >> 12)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 73, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_2 < 0);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":74
* elif utf < 0x10000:
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0:
* return -1 # <<<<<<<<<<<<<<
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":73
* return 0
* elif utf < 0x10000:
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0: # <<<<<<<<<<<<<<
* return -1
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
*/
}
/* "aiohttp/_http_writer.pyx":75
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0:
* return -1
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0: # <<<<<<<<<<<<<<
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0x80 | ((__pyx_v_utf >> 6) & 0x3f)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 75, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_2 < 0);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":76
* return -1
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1 # <<<<<<<<<<<<<<
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
* elif utf > 0x10FFFF:
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":75
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0:
* return -1
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0: # <<<<<<<<<<<<<<
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
*/
}
/* "aiohttp/_http_writer.pyx":77
* if _write_byte(writer, <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f))) # <<<<<<<<<<<<<<
* elif utf > 0x10FFFF:
* # symbol is too large
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0x80 | (__pyx_v_utf & 0x3f)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 77, __pyx_L1_error)
__pyx_r = __pyx_t_2;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":72
* # surogate pair, ignored
* return 0
* elif utf < 0x10000: # <<<<<<<<<<<<<<
* if _write_byte(writer, <uint8_t>(0xe0 | (utf >> 12))) < 0:
* return -1
*/
}
/* "aiohttp/_http_writer.pyx":78
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
* elif utf > 0x10FFFF: # <<<<<<<<<<<<<<
* # symbol is too large
* return 0
*/
__pyx_t_1 = (__pyx_v_utf > 0x10FFFF);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":80
* elif utf > 0x10FFFF:
* # symbol is too large
* return 0 # <<<<<<<<<<<<<<
* else:
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0:
*/
__pyx_r = 0;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":78
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
* elif utf > 0x10FFFF: # <<<<<<<<<<<<<<
* # symbol is too large
* return 0
*/
}
/* "aiohttp/_http_writer.pyx":82
* return 0
* else:
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0: # <<<<<<<<<<<<<<
* return -1
* if _write_byte(writer,
*/
/*else*/ {
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0xf0 | (__pyx_v_utf >> 18)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 82, __pyx_L1_error)
__pyx_t_1 = (__pyx_t_2 < 0);
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":83
* else:
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0:
* return -1 # <<<<<<<<<<<<<<
* if _write_byte(writer,
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":82
* return 0
* else:
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0: # <<<<<<<<<<<<<<
* return -1
* if _write_byte(writer,
*/
}
/* "aiohttp/_http_writer.pyx":84
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0:
* return -1
* if _write_byte(writer, # <<<<<<<<<<<<<<
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0x80 | ((__pyx_v_utf >> 12) & 0x3f)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":85
* return -1
* if _write_byte(writer,
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0: # <<<<<<<<<<<<<<
* return -1
* if _write_byte(writer,
*/
__pyx_t_1 = (__pyx_t_2 < 0);
/* "aiohttp/_http_writer.pyx":84
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0:
* return -1
* if _write_byte(writer, # <<<<<<<<<<<<<<
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1
*/
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":86
* if _write_byte(writer,
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1 # <<<<<<<<<<<<<<
* if _write_byte(writer,
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":84
* if _write_byte(writer, <uint8_t>(0xf0 | (utf >> 18))) < 0:
* return -1
* if _write_byte(writer, # <<<<<<<<<<<<<<
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1
*/
}
/* "aiohttp/_http_writer.pyx":87
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1
* if _write_byte(writer, # <<<<<<<<<<<<<<
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0x80 | ((__pyx_v_utf >> 6) & 0x3f)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":88
* return -1
* if _write_byte(writer,
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0: # <<<<<<<<<<<<<<
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
*/
__pyx_t_1 = (__pyx_t_2 < 0);
/* "aiohttp/_http_writer.pyx":87
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1
* if _write_byte(writer, # <<<<<<<<<<<<<<
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1
*/
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":89
* if _write_byte(writer,
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1 # <<<<<<<<<<<<<<
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f)))
*
*/
__pyx_r = -1;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":87
* <uint8_t>(0x80 | ((utf >> 12) & 0x3f))) < 0:
* return -1
* if _write_byte(writer, # <<<<<<<<<<<<<<
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1
*/
}
/* "aiohttp/_http_writer.pyx":90
* <uint8_t>(0x80 | ((utf >> 6) & 0x3f))) < 0:
* return -1
* return _write_byte(writer, <uint8_t>(0x80 | (utf & 0x3f))) # <<<<<<<<<<<<<<
*
*
*/
__pyx_t_2 = __pyx_f_7aiohttp_12_http_writer__write_byte(__pyx_v_writer, ((uint8_t)(0x80 | (__pyx_v_utf & 0x3f)))); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 90, __pyx_L1_error)
__pyx_r = __pyx_t_2;
goto __pyx_L0;
}
/* "aiohttp/_http_writer.pyx":60
*
*
* cdef inline int _write_utf8(Writer* writer, Py_UCS4 symbol): # <<<<<<<<<<<<<<
* cdef uint64_t utf = <uint64_t> symbol
*
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_AddTraceback("aiohttp._http_writer._write_utf8", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
return __pyx_r;
}
/* "aiohttp/_http_writer.pyx":93
*
*
* cdef inline int _write_str(Writer* writer, str s): # <<<<<<<<<<<<<<
* cdef Py_UCS4 ch
* for ch in s:
*/
static CYTHON_INLINE int __pyx_f_7aiohttp_12_http_writer__write_str(struct __pyx_t_7aiohttp_12_http_writer_Writer *__pyx_v_writer, PyObject *__pyx_v_s) {
Py_UCS4 __pyx_v_ch;
int __pyx_r;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
Py_ssize_t __pyx_t_3;
void *__pyx_t_4;
int __pyx_t_5;
int __pyx_t_6;
Py_ssize_t __pyx_t_7;
int __pyx_t_8;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_write_str", 1);
/* "aiohttp/_http_writer.pyx":95
* cdef inline int _write_str(Writer* writer, str s):
* cdef Py_UCS4 ch
* for ch in s: # <<<<<<<<<<<<<<
* if _write_utf8(writer, ch) < 0:
* return -1
*/
if (unlikely(__pyx_v_s == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
__PYX_ERR(0, 95, __pyx_L1_error)
}
__Pyx_INCREF(__pyx_v_s);
__pyx_t_1 = __pyx_v_s;
__pyx_t_6 = __Pyx_init_unicode_iteration(__pyx_t_1, (&__pyx_t_3), (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 95, __pyx_L1_error)
for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_3; __pyx_t_7++) {
__pyx_t_2 = __pyx_t_7;
__pyx_v_ch = __Pyx_PyUnicode_READ(__pyx_t_5, __pyx_t_4, __pyx_t_2);
/* "aiohttp/_http_writer.pyx":96
* cdef Py_UCS4 ch
* for ch in s:
* if _write_utf8(writer, ch) < 0: # <<<<<<<<<<<<<<
* return -1
*
*/
__pyx_t_6 = __pyx_f_7aiohttp_12_http_writer__write_utf8(__pyx_v_writer, __pyx_v_ch); if (unlikely(__pyx_t_6 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 96, __pyx_L1_error)
__pyx_t_8 = (__pyx_t_6 < 0);
if (__pyx_t_8) {
/* "aiohttp/_http_writer.pyx":97
* for ch in s:
* if _write_utf8(writer, ch) < 0:
* return -1 # <<<<<<<<<<<<<<
*
*
*/
__pyx_r = -1;
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":96
* cdef Py_UCS4 ch
* for ch in s:
* if _write_utf8(writer, ch) < 0: # <<<<<<<<<<<<<<
* return -1
*
*/
}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* "aiohttp/_http_writer.pyx":93
*
*
* cdef inline int _write_str(Writer* writer, str s): # <<<<<<<<<<<<<<
* cdef Py_UCS4 ch
* for ch in s:
*/
/* function exit code */
__pyx_r = 0;
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback("aiohttp._http_writer._write_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = -1;
__pyx_L0:;
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "aiohttp/_http_writer.pyx":102
* # --------------- _serialize_headers ----------------------
*
* cdef str to_str(object s): # <<<<<<<<<<<<<<
* typ = type(s)
* if typ is str:
*/
static PyObject *__pyx_f_7aiohttp_12_http_writer_to_str(PyObject *__pyx_v_s) {
PyTypeObject *__pyx_v_typ = NULL;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
PyObject *__pyx_t_2 = NULL;
int __pyx_t_3;
PyObject *__pyx_t_4 = NULL;
PyObject *__pyx_t_5 = NULL;
int __pyx_t_6;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("to_str", 1);
/* "aiohttp/_http_writer.pyx":103
*
* cdef str to_str(object s):
* typ = type(s) # <<<<<<<<<<<<<<
* if typ is str:
* return <str>s
*/
__Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_s)));
__pyx_v_typ = ((PyTypeObject*)((PyObject *)Py_TYPE(__pyx_v_s)));
/* "aiohttp/_http_writer.pyx":104
* cdef str to_str(object s):
* typ = type(s)
* if typ is str: # <<<<<<<<<<<<<<
* return <str>s
* elif typ is _istr:
*/
__pyx_t_1 = (__pyx_v_typ == (&PyUnicode_Type));
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":105
* typ = type(s)
* if typ is str:
* return <str>s # <<<<<<<<<<<<<<
* elif typ is _istr:
* return PyObject_Str(s)
*/
__Pyx_XDECREF(__pyx_r);
__Pyx_INCREF(((PyObject*)__pyx_v_s));
__pyx_r = ((PyObject*)__pyx_v_s);
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":104
* cdef str to_str(object s):
* typ = type(s)
* if typ is str: # <<<<<<<<<<<<<<
* return <str>s
* elif typ is _istr:
*/
}
/* "aiohttp/_http_writer.pyx":106
* if typ is str:
* return <str>s
* elif typ is _istr: # <<<<<<<<<<<<<<
* return PyObject_Str(s)
* elif not isinstance(s, str):
*/
__pyx_t_1 = (__pyx_v_typ == ((PyTypeObject*)__pyx_v_7aiohttp_12_http_writer__istr));
if (__pyx_t_1) {
/* "aiohttp/_http_writer.pyx":107
* return <str>s
* elif typ is _istr:
* return PyObject_Str(s) # <<<<<<<<<<<<<<
* elif not isinstance(s, str):
* raise TypeError("Cannot serialize non-str key {!r}".format(s))
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_2 = PyObject_Str(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 107, __pyx_L1_error)
__pyx_r = ((PyObject*)__pyx_t_2);
__pyx_t_2 = 0;
goto __pyx_L0;
/* "aiohttp/_http_writer.pyx":106
* if typ is str:
* return <str>s
* elif typ is _istr: # <<<<<<<<<<<<<<
* return PyObject_Str(s)
* elif not isinstance(s, str):
*/
}
/* "aiohttp/_http_writer.pyx":108
* elif typ is _istr:
* return PyObject_Str(s)
* elif not isinstance(s, str): # <<<<<<<<<<<<<<
* raise TypeError("Cannot serialize non-str key {!r}".format(s))
* else:
*/
__pyx_t_1 = PyUnicode_Check(__pyx_v_s);
__pyx_t_3 = (!__pyx_t_1);
if (unlikely(__pyx_t_3)) {
/* "aiohttp/_http_writer.pyx":109
* return PyObject_Str(s)
* elif not isinstance(s, str):
* raise TypeError("Cannot serialize non-str key {!r}".format(s)) # <<<<<<<<<<<<<<
* else:
* return str(s)
*/
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Cannot_serialize_non_str_key_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_t_5 = NULL;
__pyx_t_6 = 0;
#if CYTHON_UNPACK_METHODS
if (likely(PyMethod_Check(__pyx_t_4))) {
__pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
if (likely(__pyx_t_5)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
__Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
__Pyx_DECREF_SET(__pyx_t_4, function);
__pyx_t_6 = 1;
}
}
#endif
{
PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_s};
__pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
__Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
__Pyx_Raise(__pyx_t_4, 0, 0, 0);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__PYX_ERR(0, 109, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":108
* elif typ is _istr:
* return PyObject_Str(s)
* elif not isinstance(s, str): # <<<<<<<<<<<<<<
* raise TypeError("Cannot serialize non-str key {!r}".format(s))
* else:
*/
}
/* "aiohttp/_http_writer.pyx":111
* raise TypeError("Cannot serialize non-str key {!r}".format(s))
* else:
* return str(s) # <<<<<<<<<<<<<<
*
*
*/
/*else*/ {
__Pyx_XDECREF(__pyx_r);
__pyx_t_4 = __Pyx_PyObject_Str(__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 111, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_4);
__pyx_r = ((PyObject*)__pyx_t_4);
__pyx_t_4 = 0;
goto __pyx_L0;
}
/* "aiohttp/_http_writer.pyx":102
* # --------------- _serialize_headers ----------------------
*
* cdef str to_str(object s): # <<<<<<<<<<<<<<
* typ = type(s)
* if typ is str:
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_2);
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_AddTraceback("aiohttp._http_writer.to_str", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = 0;
__pyx_L0:;
__Pyx_XDECREF((PyObject *)__pyx_v_typ);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
/* "aiohttp/_http_writer.pyx":114
*
*
* cdef void _safe_header(str string) except *: # <<<<<<<<<<<<<<
* if "\r" in string or "\n" in string:
* raise ValueError(
*/
static void __pyx_f_7aiohttp_12_http_writer__safe_header(PyObject *__pyx_v_string) {
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_safe_header", 1);
/* "aiohttp/_http_writer.pyx":115
*
* cdef void _safe_header(str string) except *:
* if "\r" in string or "\n" in string: # <<<<<<<<<<<<<<
* raise ValueError(
* "Newline or carriage return character detected in HTTP status message or "
*/
if (unlikely(__pyx_v_string == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 115, __pyx_L1_error)
}
__pyx_t_2 = (__Pyx_PyUnicode_ContainsTF(__pyx_kp_u_, __pyx_v_string, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 115, __pyx_L1_error)
if (!__pyx_t_2) {
} else {
__pyx_t_1 = __pyx_t_2;
goto __pyx_L4_bool_binop_done;
}
if (unlikely(__pyx_v_string == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
__PYX_ERR(0, 115, __pyx_L1_error)
}
__pyx_t_2 = (__Pyx_PyUnicode_ContainsTF(__pyx_kp_u__2, __pyx_v_string, Py_EQ)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 115, __pyx_L1_error)
__pyx_t_1 = __pyx_t_2;
__pyx_L4_bool_binop_done:;
if (unlikely(__pyx_t_1)) {
/* "aiohttp/_http_writer.pyx":116
* cdef void _safe_header(str string) except *:
* if "\r" in string or "\n" in string:
* raise ValueError( # <<<<<<<<<<<<<<
* "Newline or carriage return character detected in HTTP status message or "
* "header. This is a potential security issue."
*/
__pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_3);
__Pyx_Raise(__pyx_t_3, 0, 0, 0);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__PYX_ERR(0, 116, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":115
*
* cdef void _safe_header(str string) except *:
* if "\r" in string or "\n" in string: # <<<<<<<<<<<<<<
* raise ValueError(
* "Newline or carriage return character detected in HTTP status message or "
*/
}
/* "aiohttp/_http_writer.pyx":114
*
*
* cdef void _safe_header(str string) except *: # <<<<<<<<<<<<<<
* if "\r" in string or "\n" in string:
* raise ValueError(
*/
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_AddTraceback("aiohttp._http_writer._safe_header", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_L0:;
__Pyx_RefNannyFinishContext();
}
/* "aiohttp/_http_writer.pyx":122
*
*
* def _serialize_headers(str status_line, headers): # <<<<<<<<<<<<<<
* cdef Writer writer
* cdef object key
*/
/* Python wrapper */
static PyObject *__pyx_pw_7aiohttp_12_http_writer_1_serialize_headers(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7aiohttp_12_http_writer_1_serialize_headers = {"_serialize_headers", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7aiohttp_12_http_writer_1_serialize_headers, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7aiohttp_12_http_writer_1_serialize_headers(PyObject *__pyx_self,
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
PyObject *__pyx_v_status_line = 0;
PyObject *__pyx_v_headers = 0;
#if !CYTHON_METH_FASTCALL
CYTHON_UNUSED Py_ssize_t __pyx_nargs;
#endif
CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
PyObject* values[2] = {0,0};
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_serialize_headers (wrapper)", 0);
#if !CYTHON_METH_FASTCALL
#if CYTHON_ASSUME_SAFE_MACROS
__pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
#else
__pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
#endif
#endif
__pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
{
PyObject **__pyx_pyargnames[] = {&__pyx_n_s_status_line,&__pyx_n_s_headers,0};
if (__pyx_kwds) {
Py_ssize_t kw_args;
switch (__pyx_nargs) {
case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
CYTHON_FALLTHROUGH;
case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
CYTHON_FALLTHROUGH;
case 0: break;
default: goto __pyx_L5_argtuple_error;
}
kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
switch (__pyx_nargs) {
case 0:
if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_status_line)) != 0)) {
(void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
kw_args--;
}
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
else goto __pyx_L5_argtuple_error;
CYTHON_FALLTHROUGH;
case 1:
if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_headers)) != 0)) {
(void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
kw_args--;
}
else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
else {
__Pyx_RaiseArgtupleInvalid("_serialize_headers", 1, 2, 2, 1); __PYX_ERR(0, 122, __pyx_L3_error)
}
}
if (unlikely(kw_args > 0)) {
const Py_ssize_t kwd_pos_args = __pyx_nargs;
if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_serialize_headers") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
}
} else if (unlikely(__pyx_nargs != 2)) {
goto __pyx_L5_argtuple_error;
} else {
values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
}
__pyx_v_status_line = ((PyObject*)values[0]);
__pyx_v_headers = values[1];
}
goto __pyx_L6_skip;
__pyx_L5_argtuple_error:;
__Pyx_RaiseArgtupleInvalid("_serialize_headers", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 122, __pyx_L3_error)
__pyx_L6_skip:;
goto __pyx_L4_argument_unpacking_done;
__pyx_L3_error:;
{
Py_ssize_t __pyx_temp;
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
}
}
__Pyx_AddTraceback("aiohttp._http_writer._serialize_headers", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
return NULL;
__pyx_L4_argument_unpacking_done:;
if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_status_line), (&PyUnicode_Type), 1, "status_line", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
__pyx_r = __pyx_pf_7aiohttp_12_http_writer__serialize_headers(__pyx_self, __pyx_v_status_line, __pyx_v_headers);
/* function exit code */
goto __pyx_L0;
__pyx_L1_error:;
__pyx_r = NULL;
__pyx_L0:;
{
Py_ssize_t __pyx_temp;
for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
__Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
}
}
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyObject *__pyx_pf_7aiohttp_12_http_writer__serialize_headers(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_status_line, PyObject *__pyx_v_headers) {
struct __pyx_t_7aiohttp_12_http_writer_Writer __pyx_v_writer;
PyObject *__pyx_v_key = 0;
PyObject *__pyx_v_val = 0;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
int __pyx_t_1;
int __pyx_t_2;
PyObject *__pyx_t_3 = NULL;
Py_ssize_t __pyx_t_4;
Py_ssize_t __pyx_t_5;
PyObject *__pyx_t_6 = NULL;
PyObject *__pyx_t_7 = NULL;
int __pyx_t_8;
char const *__pyx_t_9;
PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
PyObject *__pyx_t_14 = NULL;
PyObject *__pyx_t_15 = NULL;
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_serialize_headers", 1);
/* "aiohttp/_http_writer.pyx":128
* cdef bytes ret
*
* _init_writer(&writer) # <<<<<<<<<<<<<<
*
* try:
*/
__pyx_f_7aiohttp_12_http_writer__init_writer((&__pyx_v_writer)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error)
/* "aiohttp/_http_writer.pyx":130
* _init_writer(&writer)
*
* try: # <<<<<<<<<<<<<<
* if _write_str(&writer, status_line) < 0:
* raise
*/
/*try:*/ {
/* "aiohttp/_http_writer.pyx":131
*
* try:
* if _write_str(&writer, status_line) < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\r') < 0:
*/
__pyx_t_1 = __pyx_f_7aiohttp_12_http_writer__write_str((&__pyx_v_writer), __pyx_v_status_line); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_1 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":132
* try:
* if _write_str(&writer, status_line) < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b'\r') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 132, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":131
*
* try:
* if _write_str(&writer, status_line) < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\r') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":133
* if _write_str(&writer, status_line) < 0:
* raise
* if _write_byte(&writer, b'\r') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\n') < 0:
*/
__pyx_t_1 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), '\r'); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_1 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":134
* raise
* if _write_byte(&writer, b'\r') < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b'\n') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 134, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":133
* if _write_str(&writer, status_line) < 0:
* raise
* if _write_byte(&writer, b'\r') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\n') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":135
* if _write_byte(&writer, b'\r') < 0:
* raise
* if _write_byte(&writer, b'\n') < 0: # <<<<<<<<<<<<<<
* raise
*
*/
__pyx_t_1 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), '\n'); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_1 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":136
* raise
* if _write_byte(&writer, b'\n') < 0:
* raise # <<<<<<<<<<<<<<
*
* for key, val in headers.items():
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 136, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":135
* if _write_byte(&writer, b'\r') < 0:
* raise
* if _write_byte(&writer, b'\n') < 0: # <<<<<<<<<<<<<<
* raise
*
*/
}
/* "aiohttp/_http_writer.pyx":138
* raise
*
* for key, val in headers.items(): # <<<<<<<<<<<<<<
* _safe_header(to_str(key))
* _safe_header(to_str(val))
*/
__pyx_t_4 = 0;
if (unlikely(__pyx_v_headers == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
__PYX_ERR(0, 138, __pyx_L4_error)
}
__pyx_t_6 = __Pyx_dict_iterator(__pyx_v_headers, 0, __pyx_n_s_items, (&__pyx_t_5), (&__pyx_t_1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 138, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_3);
__pyx_t_3 = __pyx_t_6;
__pyx_t_6 = 0;
while (1) {
__pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_6, &__pyx_t_7, NULL, __pyx_t_1);
if (unlikely(__pyx_t_8 == 0)) break;
if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 138, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_6);
__Pyx_GOTREF(__pyx_t_7);
__Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
__pyx_t_6 = 0;
__Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_7);
__pyx_t_7 = 0;
/* "aiohttp/_http_writer.pyx":139
*
* for key, val in headers.items():
* _safe_header(to_str(key)) # <<<<<<<<<<<<<<
* _safe_header(to_str(val))
*
*/
__pyx_t_7 = __pyx_f_7aiohttp_12_http_writer_to_str(__pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 139, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_f_7aiohttp_12_http_writer__safe_header(((PyObject*)__pyx_t_7)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 139, __pyx_L4_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
/* "aiohttp/_http_writer.pyx":140
* for key, val in headers.items():
* _safe_header(to_str(key))
* _safe_header(to_str(val)) # <<<<<<<<<<<<<<
*
* if _write_str(&writer, to_str(key)) < 0:
*/
__pyx_t_7 = __pyx_f_7aiohttp_12_http_writer_to_str(__pyx_v_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 140, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_f_7aiohttp_12_http_writer__safe_header(((PyObject*)__pyx_t_7)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 140, __pyx_L4_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
/* "aiohttp/_http_writer.pyx":142
* _safe_header(to_str(val))
*
* if _write_str(&writer, to_str(key)) < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b':') < 0:
*/
__pyx_t_7 = __pyx_f_7aiohttp_12_http_writer_to_str(__pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 142, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = __pyx_f_7aiohttp_12_http_writer__write_str((&__pyx_v_writer), ((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L4_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_2 = (__pyx_t_8 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":143
*
* if _write_str(&writer, to_str(key)) < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b':') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 143, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":142
* _safe_header(to_str(val))
*
* if _write_str(&writer, to_str(key)) < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b':') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":144
* if _write_str(&writer, to_str(key)) < 0:
* raise
* if _write_byte(&writer, b':') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b' ') < 0:
*/
__pyx_t_8 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), ':'); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_8 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":145
* raise
* if _write_byte(&writer, b':') < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b' ') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 145, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":144
* if _write_str(&writer, to_str(key)) < 0:
* raise
* if _write_byte(&writer, b':') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b' ') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":146
* if _write_byte(&writer, b':') < 0:
* raise
* if _write_byte(&writer, b' ') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_str(&writer, to_str(val)) < 0:
*/
__pyx_t_8 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), ' '); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_8 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":147
* raise
* if _write_byte(&writer, b' ') < 0:
* raise # <<<<<<<<<<<<<<
* if _write_str(&writer, to_str(val)) < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 147, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":146
* if _write_byte(&writer, b':') < 0:
* raise
* if _write_byte(&writer, b' ') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_str(&writer, to_str(val)) < 0:
*/
}
/* "aiohttp/_http_writer.pyx":148
* if _write_byte(&writer, b' ') < 0:
* raise
* if _write_str(&writer, to_str(val)) < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\r') < 0:
*/
__pyx_t_7 = __pyx_f_7aiohttp_12_http_writer_to_str(__pyx_v_val); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 148, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_7);
__pyx_t_8 = __pyx_f_7aiohttp_12_http_writer__write_str((&__pyx_v_writer), ((PyObject*)__pyx_t_7)); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L4_error)
__Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
__pyx_t_2 = (__pyx_t_8 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":149
* raise
* if _write_str(&writer, to_str(val)) < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b'\r') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 149, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":148
* if _write_byte(&writer, b' ') < 0:
* raise
* if _write_str(&writer, to_str(val)) < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\r') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":150
* if _write_str(&writer, to_str(val)) < 0:
* raise
* if _write_byte(&writer, b'\r') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\n') < 0:
*/
__pyx_t_8 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), '\r'); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_8 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":151
* raise
* if _write_byte(&writer, b'\r') < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b'\n') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 151, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":150
* if _write_str(&writer, to_str(val)) < 0:
* raise
* if _write_byte(&writer, b'\r') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\n') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":152
* if _write_byte(&writer, b'\r') < 0:
* raise
* if _write_byte(&writer, b'\n') < 0: # <<<<<<<<<<<<<<
* raise
*
*/
__pyx_t_8 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), '\n'); if (unlikely(__pyx_t_8 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_8 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":153
* raise
* if _write_byte(&writer, b'\n') < 0:
* raise # <<<<<<<<<<<<<<
*
* if _write_byte(&writer, b'\r') < 0:
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 153, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":152
* if _write_byte(&writer, b'\r') < 0:
* raise
* if _write_byte(&writer, b'\n') < 0: # <<<<<<<<<<<<<<
* raise
*
*/
}
}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
/* "aiohttp/_http_writer.pyx":155
* raise
*
* if _write_byte(&writer, b'\r') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\n') < 0:
*/
__pyx_t_1 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), '\r'); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_1 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":156
*
* if _write_byte(&writer, b'\r') < 0:
* raise # <<<<<<<<<<<<<<
* if _write_byte(&writer, b'\n') < 0:
* raise
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 156, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":155
* raise
*
* if _write_byte(&writer, b'\r') < 0: # <<<<<<<<<<<<<<
* raise
* if _write_byte(&writer, b'\n') < 0:
*/
}
/* "aiohttp/_http_writer.pyx":157
* if _write_byte(&writer, b'\r') < 0:
* raise
* if _write_byte(&writer, b'\n') < 0: # <<<<<<<<<<<<<<
* raise
*
*/
__pyx_t_1 = __pyx_f_7aiohttp_12_http_writer__write_byte((&__pyx_v_writer), '\n'); if (unlikely(__pyx_t_1 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 157, __pyx_L4_error)
__pyx_t_2 = (__pyx_t_1 < 0);
if (unlikely(__pyx_t_2)) {
/* "aiohttp/_http_writer.pyx":158
* raise
* if _write_byte(&writer, b'\n') < 0:
* raise # <<<<<<<<<<<<<<
*
* return PyBytes_FromStringAndSize(writer.buf, writer.pos)
*/
__Pyx_ReraiseException(); __PYX_ERR(0, 158, __pyx_L4_error)
/* "aiohttp/_http_writer.pyx":157
* if _write_byte(&writer, b'\r') < 0:
* raise
* if _write_byte(&writer, b'\n') < 0: # <<<<<<<<<<<<<<
* raise
*
*/
}
/* "aiohttp/_http_writer.pyx":160
* raise
*
* return PyBytes_FromStringAndSize(writer.buf, writer.pos) # <<<<<<<<<<<<<<
* finally:
* _release_writer(&writer)
*/
__Pyx_XDECREF(__pyx_r);
__pyx_t_3 = PyBytes_FromStringAndSize(__pyx_v_writer.buf, __pyx_v_writer.pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L4_error)
__Pyx_GOTREF(__pyx_t_3);
__pyx_r = __pyx_t_3;
__pyx_t_3 = 0;
goto __pyx_L3_return;
}
/* "aiohttp/_http_writer.pyx":162
* return PyBytes_FromStringAndSize(writer.buf, writer.pos)
* finally:
* _release_writer(&writer) # <<<<<<<<<<<<<<
*/
/*finally:*/ {
__pyx_L4_error:;
/*exception exit:*/{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
__pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
__Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
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);
__Pyx_XGOTREF(__pyx_t_10);
__Pyx_XGOTREF(__pyx_t_11);
__Pyx_XGOTREF(__pyx_t_12);
__Pyx_XGOTREF(__pyx_t_13);
__Pyx_XGOTREF(__pyx_t_14);
__Pyx_XGOTREF(__pyx_t_15);
__pyx_t_1 = __pyx_lineno; __pyx_t_8 = __pyx_clineno; __pyx_t_9 = __pyx_filename;
{
__pyx_f_7aiohttp_12_http_writer__release_writer((&__pyx_v_writer)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L20_error)
}
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_13);
__Pyx_XGIVEREF(__pyx_t_14);
__Pyx_XGIVEREF(__pyx_t_15);
__Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
}
__Pyx_XGIVEREF(__pyx_t_10);
__Pyx_XGIVEREF(__pyx_t_11);
__Pyx_XGIVEREF(__pyx_t_12);
__Pyx_ErrRestore(__pyx_t_10, __pyx_t_11, __pyx_t_12);
__pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
__pyx_lineno = __pyx_t_1; __pyx_clineno = __pyx_t_8; __pyx_filename = __pyx_t_9;
goto __pyx_L1_error;
__pyx_L20_error:;
if (PY_MAJOR_VERSION >= 3) {
__Pyx_XGIVEREF(__pyx_t_13);
__Pyx_XGIVEREF(__pyx_t_14);
__Pyx_XGIVEREF(__pyx_t_15);
__Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
}
__Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
__Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
__Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
__pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0;
goto __pyx_L1_error;
}
__pyx_L3_return: {
__pyx_t_15 = __pyx_r;
__pyx_r = 0;
__pyx_f_7aiohttp_12_http_writer__release_writer((&__pyx_v_writer)); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L1_error)
__pyx_r = __pyx_t_15;
__pyx_t_15 = 0;
goto __pyx_L0;
}
}
/* "aiohttp/_http_writer.pyx":122
*
*
* def _serialize_headers(str status_line, headers): # <<<<<<<<<<<<<<
* cdef Writer writer
* cdef object key
*/
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_3);
__Pyx_XDECREF(__pyx_t_6);
__Pyx_XDECREF(__pyx_t_7);
__Pyx_AddTraceback("aiohttp._http_writer._serialize_headers", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XDECREF(__pyx_v_key);
__Pyx_XDECREF(__pyx_v_val);
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
static PyMethodDef __pyx_methods[] = {
{0, 0, 0, 0}
};
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
#define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define CYTHON_SMALL_CODE __attribute__((cold))
#else
#define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */
static int __Pyx_CreateStringTabAndInitStrings(void) {
__Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
{&__pyx_kp_u_Cannot_serialize_non_str_key_r, __pyx_k_Cannot_serialize_non_str_key_r, sizeof(__pyx_k_Cannot_serialize_non_str_key_r), 0, 1, 0, 0},
{&__pyx_kp_u_Newline_or_carriage_return_chara, __pyx_k_Newline_or_carriage_return_chara, sizeof(__pyx_k_Newline_or_carriage_return_chara), 0, 1, 0, 0},
{&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
{&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
{&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
{&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
{&__pyx_n_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 1},
{&__pyx_n_s_aiohttp__http_writer, __pyx_k_aiohttp__http_writer, sizeof(__pyx_k_aiohttp__http_writer), 0, 0, 1, 1},
{&__pyx_kp_s_aiohttp__http_writer_pyx, __pyx_k_aiohttp__http_writer_pyx, sizeof(__pyx_k_aiohttp__http_writer_pyx), 0, 0, 1, 0},
{&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
{&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
{&__pyx_n_s_headers, __pyx_k_headers, sizeof(__pyx_k_headers), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
{&__pyx_n_s_istr, __pyx_k_istr, sizeof(__pyx_k_istr), 0, 0, 1, 1},
{&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
{&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_multidict, __pyx_k_multidict, sizeof(__pyx_k_multidict), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_ret, __pyx_k_ret, sizeof(__pyx_k_ret), 0, 0, 1, 1},
{&__pyx_n_s_serialize_headers, __pyx_k_serialize_headers, sizeof(__pyx_k_serialize_headers), 0, 0, 1, 1},
{&__pyx_n_s_status_line, __pyx_k_status_line, sizeof(__pyx_k_status_line), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
{&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
__pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 109, __pyx_L1_error) | | |